diff options
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/T13822.hs')
-rw-r--r-- | testsuite/tests/typecheck/should_compile/T13822.hs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T13822.hs b/testsuite/tests/typecheck/should_compile/T13822.hs index 88c14c2aff..376c01491a 100644 --- a/testsuite/tests/typecheck/should_compile/T13822.hs +++ b/testsuite/tests/typecheck/should_compile/T13822.hs @@ -1,5 +1,6 @@ {-# LANGUAGE GADTs, TypeOperators, PolyKinds, DataKinds, - TypeFamilyDependencies, RankNTypes, LambdaCase, EmptyCase #-} + TypeFamilyDependencies, RankNTypes, LambdaCase, EmptyCase, + StandaloneKindSignatures #-} module T13822 where @@ -18,14 +19,16 @@ type family IK STAR = Type IK (a:>b) = IK a -> IK b +type I :: Ty k -> IK k type family - I (t :: Ty k) = (res :: IK k) | res -> t where + I t = res | res -> t where I TInt = Int I TBool = Bool I TMaybe = Maybe I (TApp f a) = (I f) (I a) -data TyRep (k :: KIND) (t :: Ty k) where +type TyRep :: forall (k :: KIND) -> Ty k -> Type +data TyRep k t where TyInt :: TyRep STAR TInt TyBool :: TyRep STAR TBool TyMaybe :: TyRep (STAR:>STAR) TMaybe |