diff options
author | Łukasz Hanuszczak <lukasz.hanuszczak@gmail.com> | 2015-08-06 21:22:06 +0200 |
---|---|---|
committer | Łukasz Hanuszczak <lukasz.hanuszczak@gmail.com> | 2015-08-06 21:22:06 +0200 |
commit | 66c91a3c20d18f2a2f9ccfbbc7a04bddd5507008 (patch) | |
tree | efcd84ecab64417a19ff5cc2871932f30878a664 /html-test/src/PromotedTypes.hs | |
parent | 3ad8ada0ea2982ba7974e381f07e84c35c9559af (diff) |
Rename advanced types test case and accept new output.
Diffstat (limited to 'html-test/src/PromotedTypes.hs')
-rw-r--r-- | html-test/src/PromotedTypes.hs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/html-test/src/PromotedTypes.hs b/html-test/src/PromotedTypes.hs new file mode 100644 index 00000000..ae3ad375 --- /dev/null +++ b/html-test/src/PromotedTypes.hs @@ -0,0 +1,25 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE GADTs #-} +{-# LANGUAGE KindSignatures #-} +{-# LANGUAGE TypeOperators #-} + + +module PromotedTypes where + + +data RevList a = RNil | RevList a :> a + + +data Pattern :: [*] -> * where + Nil :: Pattern '[] + Cons :: Maybe h -> Pattern t -> Pattern (h ': t) + + +-- Unlike (:), (:>) does not have to be quoted on type level. +data RevPattern :: RevList * -> * where + RevNil :: RevPattern RNil + RevCons :: Maybe h -> RevPattern t -> RevPattern (t :> h) + + +data Tuple :: (*, *) -> * where + Tuple :: a -> b -> Tuple '(a, b) |