Reorder declarations
This commit is contained in:
parent
f0673525ee
commit
05e5b9d300
|
@ -1,3 +1,10 @@
|
|||
data Term =
|
||||
Nat Integer
|
||||
| Abs String Term -- EAbs Abstraction
|
||||
| Inv Term Term -- EApp Invocation (a.k.a. Application) of a function
|
||||
| Var String -- EVar a variable
|
||||
| Add
|
||||
|
||||
--------------------
|
||||
-- Exercise 1
|
||||
--------------------
|
||||
|
@ -13,13 +20,6 @@
|
|||
-- ((Lx.(x z)) (Ly.(w (Lw.(((w y) z) x)))))
|
||||
-- (Lx.((x y) (Lx.(y x))))
|
||||
|
||||
data Term =
|
||||
Nat Integer
|
||||
| Abs String Term -- EAbs Abstraction
|
||||
| Inv Term Term -- EApp Invocation (a.k.a. Application) of a function
|
||||
| Var String -- EVar a variable
|
||||
| Add
|
||||
|
||||
pretty x = case x of
|
||||
(Abs name term) -> "L" ++ name ++ "." ++ pretty term
|
||||
(Inv func param) -> "(" ++ pretty func ++ " " ++ pretty param ++ ")"
|
||||
|
|
Loading…
Reference in a new issue