Embrace -XTypeInType, add -XStarIsType
[ghc.git] / testsuite / tests / indexed-types / should_compile / T12522b.hs
1 {-# LANGUAGE DataKinds #-}
2 {-# LANGUAGE KindSignatures #-}
3 {-# LANGUAGE TypeFamilyDependencies #-}
4 {-# LANGUAGE TypeOperators #-}
5
6 module T12522b where
7
8 import Data.Kind (Type)
9
10 newtype I a = I a
11
12 type family Curry (as :: [Type]) b = f | f -> as b where
13 Curry '[] b = I b
14 Curry (a:as) b = a -> Curry as b
15
16 data Uncurried (as :: [Type]) b
17
18 def :: Curry as b -> Uncurried as b
19 def = undefined
20
21 -- test2 :: Uncurried [Bool, Bool] Bool
22 test2 = def $ \a b -> I $ a && b