From 3ad8ada0ea2982ba7974e381f07e84c35c9559af Mon Sep 17 00:00:00 2001 From: Ɓukasz Hanuszczak Date: Thu, 6 Aug 2015 21:17:10 +0200 Subject: Extend advanced types test case with other examples. --- html-test/src/AdvanceTypes.hs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/html-test/src/AdvanceTypes.hs b/html-test/src/AdvanceTypes.hs index 939fdf07..c89d7396 100644 --- a/html-test/src/AdvanceTypes.hs +++ b/html-test/src/AdvanceTypes.hs @@ -4,6 +4,20 @@ {-# LANGUAGE TypeOperators #-} module AdvanceTypes 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