repositories
/
clean-tests.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
clean up even more
[clean-tests.git]
/
datatype
/
Tuple.hs
1
{-# LANGUAGE TemplateHaskell #-}
2
{-# LANGUAGE DeriveGeneric #-}
3
module Tuple where
4
5
import Printer
6
import Compiler
7
import Interpreter
8
import Language.GenDSL
9
import Language
10
11
data Tuple a b = Tuple a b
12
$(genDSL ''Tuple)
13
14
data Tuple3 a c = Tuple3 a Int c
15
$(genDSL ''Tuple3)
16
17
data TupleR a b = TupleR {first :: a, second :: b}
18
$(genDSL ''TupleR)
19
20
data List a = Nil | Cons a (List a)
21
$(genDSL ''List)