Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/6ab2ac37ba6c8150ef9d065d8a048d46bcf3b089

>---------------------------------------------------------------

commit 6ab2ac37ba6c8150ef9d065d8a048d46bcf3b089
Author: Simon Peyton Jones <[email protected]>
Date:   Sun Mar 4 08:26:35 2012 +0000

    Test Trac #5862

>---------------------------------------------------------------

 tests/polykinds/T5862.hs |   27 +++++++++++++++++++++++++++
 tests/polykinds/all.T    |    8 +++++---
 2 files changed, 32 insertions(+), 3 deletions(-)

diff --git a/tests/polykinds/T5862.hs b/tests/polykinds/T5862.hs
new file mode 100644
index 0000000..e2b37bf
--- /dev/null
+++ b/tests/polykinds/T5862.hs
@@ -0,0 +1,27 @@
+{-# 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
diff --git a/tests/polykinds/all.T b/tests/polykinds/all.T
index bf863dd..9ed6b92 100644
--- a/tests/polykinds/all.T
+++ b/tests/polykinds/all.T
@@ -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, [''])



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to