Add support for printing constants

This commit is contained in:
Manuel Thalmann 2024-06-17 00:26:34 +02:00
parent bfb920ca74
commit 08ed943d56

View file

@ -1,3 +1,4 @@
import Data.Set (Set)
--------------------
-- Slides
--------------------
@ -14,6 +15,7 @@ pretty x = case x of
(Inv func param) -> "(" ++ pretty func ++ " " ++ pretty param ++ ")"
(Var name) -> name
Add -> "Add"
Nat value -> show value
-- example
-- >>> pretty (Abs "x" $ Abs "y" $ Inv (Inv Add (Var "x")) (Var "y"))