repositories
/
clean-tests.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
use Q style
[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
10
data Tuple a b = Tuple a b
11
$(genDSL ''Tuple)
12
13
data Tuple3 a c = Tuple3 a Int c
14
$(genDSL ''Tuple3)
15
16
data TupleR a b = TupleR {first :: a, second :: b}
17
$(genDSL ''TupleR)
18
19
data List a = Nil | Cons a (List a)
20
$(genDSL ''List)