Add support for printing constants
This commit is contained in:
parent
bfb920ca74
commit
08ed943d56
1 changed files with 2 additions and 0 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
import Data.Set (Set)
|
||||||
--------------------
|
--------------------
|
||||||
-- Slides
|
-- Slides
|
||||||
--------------------
|
--------------------
|
||||||
|
@ -14,6 +15,7 @@ pretty x = case x of
|
||||||
(Inv func param) -> "(" ++ pretty func ++ " " ++ pretty param ++ ")"
|
(Inv func param) -> "(" ++ pretty func ++ " " ++ pretty param ++ ")"
|
||||||
(Var name) -> name
|
(Var name) -> name
|
||||||
Add -> "Add"
|
Add -> "Add"
|
||||||
|
Nat value -> show value
|
||||||
|
|
||||||
-- example
|
-- example
|
||||||
-- >>> pretty (Abs "x" $ Abs "y" $ Inv (Inv Add (Var "x")) (Var "y"))
|
-- >>> pretty (Abs "x" $ Abs "y" $ Inv (Inv Add (Var "x")) (Var "y"))
|
||||||
|
|
Loading…
Reference in a new issue