support all other patterns and nested patterns
[clean-tests.git] / datatype / Tuple.hs
1 {-# LANGUAGE TemplateHaskell #-}
2 {-# LANGUAGE DeriveGeneric #-}
3 module Tuple where
4
5 import GHC.Generics
6
7 import Printer
8 import Compiler
9 import Serialise
10 import Language.GenDSL
11
12 data Tuple a b = Tuple a b
13 deriving Generic
14 $(mkConsClass ''Tuple)
15
16 data Tuple3 a c = Tuple3 a Int c
17 deriving Generic
18 $(mkConsClass ''Tuple3)
19
20 data TupleR a b = TupleR {first :: a, second :: b}
21 deriving Generic
22 $(mkConsClass ''TupleR)
23
24 data List a = Nil | Cons a (List a)
25 deriving (Generic, Show)
26 $(mkConsClass ''List)