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

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/b7ada1c5b5470c0738e82eb842538c0264d9ce6e

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

commit b7ada1c5b5470c0738e82eb842538c0264d9ce6e
Author: Simon Peyton Jones <[email protected]>
Date:   Tue May 22 15:18:30 2012 +0100

    Test Trac #6118

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

 tests/polykinds/T6118.hs |   23 +++++++++++++++++++++++
 tests/polykinds/all.T    |    1 +
 2 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/tests/polykinds/T6118.hs b/tests/polykinds/T6118.hs
new file mode 100644
index 0000000..df510ff
--- /dev/null
+++ b/tests/polykinds/T6118.hs
@@ -0,0 +1,23 @@
+{-# LANGUAGE PolyKinds, DataKinds, KindSignatures, RankNTypes,
+             TypeFamilies, FlexibleInstances, UndecidableInstances #-}
+
+module T6118 where
+
+import GHC.Exts
+
+data Nat = Zero | Succ Nat
+data List a = Nil | Cons a (List a)
+
+class SingE (a :: k) where
+  type Demote a :: *
+
+instance SingE (a :: Bool) where
+  type Demote a = Bool
+instance SingE (a :: Nat) where
+  type Demote a = Nat
+
+instance SingE (a :: Maybe k) where
+  type Demote a = Maybe (Demote (Any :: k))
+
+instance SingE (a :: List k) where
+  type Demote (a :: List k) = List (Demote (Any :: k))
\ No newline at end of file
diff --git a/tests/polykinds/all.T b/tests/polykinds/all.T
index a9b44af..2261fda 100644
--- a/tests/polykinds/all.T
+++ b/tests/polykinds/all.T
@@ -49,3 +49,4 @@ test('T6015', normal, compile, [''])
 test('T6015a', normal, compile, [''])
 test('T6068', normal, ghci_script, ['T6068.script'])
 test('RedBlack', normal, compile, [''])
+test('T6118', normal, compile,[''])



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

Reply via email to