aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorŁukasz Hanuszczak <lukasz.hanuszczak@gmail.com>2015-08-06 21:17:10 +0200
committerŁukasz Hanuszczak <lukasz.hanuszczak@gmail.com>2015-08-06 21:17:10 +0200
commit3ad8ada0ea2982ba7974e381f07e84c35c9559af (patch)
treed931d3bb615097e04e3df00cddaeae7f77d38099
parent33fe6286907592b1783a4b9b7c4b7f63ae080cde (diff)
Extend advanced types test case with other examples.
-rw-r--r--html-test/src/AdvanceTypes.hs14
1 files changed, 14 insertions, 0 deletions
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)