From 66c91a3c20d18f2a2f9ccfbbc7a04bddd5507008 Mon Sep 17 00:00:00 2001 From: Ɓukasz Hanuszczak Date: Thu, 6 Aug 2015 21:22:06 +0200 Subject: Rename advanced types test case and accept new output. --- html-test/src/PromotedTypes.hs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 html-test/src/PromotedTypes.hs (limited to 'html-test/src/PromotedTypes.hs') 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) -- cgit v1.2.3