diff options
author | Marvin Borner | 2024-11-27 16:18:16 +0100 |
---|---|---|
committer | Marvin Borner | 2024-11-27 16:18:16 +0100 |
commit | 02ff39d0ab6488fa8cedb31030130b352e10b3e2 (patch) | |
tree | 2fef90f83699831d13dea768e144430e1f60a7a2 /src/Language/Mili/Compiler.hs | |
parent | 91d52159a5ac32165dca0edfaf75a19845156551 (diff) |
Diffstat (limited to 'src/Language/Mili/Compiler.hs')
-rw-r--r-- | src/Language/Mili/Compiler.hs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Language/Mili/Compiler.hs b/src/Language/Mili/Compiler.hs new file mode 100644 index 0000000..ab23767 --- /dev/null +++ b/src/Language/Mili/Compiler.hs @@ -0,0 +1,19 @@ +-- MIT License, Copyright (c) 2024 Marvin Borner + +module Language.Mili.Compiler + ( compile + ) where + +import Data.Mili ( Nat(..) + , Term(..) + , shift + ) + +data Comp = CAbs String Comp -- | Abstraction with pointer + | CApp Comp Comp -- | Application + | CVar -- | Namless variable + | CNum Nat -- | Peano numeral + | CRec Comp Comp Comp Comp Comp -- | Unbounded iteration + +compile :: Term -> Comp +compile t = CVar |