aboutsummaryrefslogtreecommitdiff
path: root/src/Data
diff options
context:
space:
mode:
authorMarvin Borner2024-11-13 16:18:01 +0100
committerMarvin Borner2024-11-13 21:53:37 +0100
commitf60b209eae598160f6cf160415e08ae72658cd32 (patch)
tree3f8db41ec8b0e378b2aa3e2d1c8f827b981cbb32 /src/Data
Initial structure
Diffstat (limited to 'src/Data')
-rw-r--r--src/Data/Mili.hs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Data/Mili.hs b/src/Data/Mili.hs
new file mode 100644
index 0000000..b407d00
--- /dev/null
+++ b/src/Data/Mili.hs
@@ -0,0 +1,13 @@
+module Data.Mili
+ ( Term(..)
+ ) where
+
+data Term = Abs Term -- | Abstraction
+ | App Term Term -- | Application
+ | Lvl Int -- | de Bruijn level
+
+instance Show Term where
+ showsPrec _ (Abs m) = showString "[" . shows m . showString "]"
+ showsPrec _ (App m n) =
+ showString "(" . shows m . showString " " . shows n . showString ")"
+ showsPrec _ (Lvl i) = shows i