Commit ffd72d2b authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Test Trac #5862

parent 3b9c6514
{-# LANGUAGE PolyKinds,
TypeFamilies,
GADTs,
DataKinds,
KindSignatures
#-}
module T5862 where
data Nat = Zero | Succ Nat
data SNat a where
SZero :: SNat 'Zero
SSucc :: SNat n -> SNat ('Succ n)
data SBool a where
SFalse :: SBool 'False
STrue :: SBool 'True
data SMaybe a where
SNothing :: SMaybe 'Nothing
SJust :: Sing a -> SMaybe ('Just a)
type family Sing a
type instance Sing (a :: Nat) = SNat a
type instance Sing (a :: Bool) = SBool a
type instance Sing (a :: Maybe *) = SMaybe a -- want to say Maybe k
......@@ -17,11 +17,13 @@ test('PolyKinds07', normal, compile_fail, [''])
test('PolyKinds12', normal, compile, [''])
test('Freeman', normal, compile_and_run, [''])
test('MonoidsTF', normal, compile_and_run, [''])
test('MonoidsFD', normal, compile_and_run, [''])
test('T5798', normal, compile, [''])
test('T5770', normal, compile, [''])
test('T5771', normal, compile, [''])
test('T5717', normal, compile, [''])
test('T5862', normal, compile, [''])
test('Freeman', normal, compile_and_run, [''])
test('MonoidsTF', normal, compile_and_run, [''])
test('MonoidsFD', normal, compile_and_run, [''])
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment