SCC analysis for instances as well as types/classes
[ghc.git] / testsuite / tests / typecheck / should_compile / T11254.hs
1 -- /tmp/panic.hs
2 {-# LANGUAGE FlexibleContexts #-}
3 {-# LANGUAGE FlexibleInstances #-}
4 {-# LANGUAGE InstanceSigs #-}
5 {-# LANGUAGE TypeFamilies #-}
6 {-# LANGUAGE TypeSynonymInstances #-}
7 {-# LANGUAGE UndecidableSuperClasses #-}
8 {-# OPTIONS_GHC -fdefer-type-errors #-}
9
10 module T11254 where
11
12 class (Frac (Frac a) ~ Frac a, Fractional (Frac a), ID (Frac a)) => ID a where
13 type Frac a
14 embed :: a -> Frac a
15
16 instance ID Rational where
17 type Frac Rational = Int
18 embed :: Rational -> Rational
19 embed = undefined