This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
module Gyehoek.Syntax where
|
||||
|
||||
import Data.Text (Text)
|
||||
import Data.List (List)
|
||||
|
||||
|
||||
type Name = Text
|
||||
|
||||
data Prim = PrimAdd | PrimSub | PrimMul | PrimDiv
|
||||
deriving (Show)
|
||||
|
||||
data Val
|
||||
= ValInt Int
|
||||
| ValNil
|
||||
| ValPrim Prim
|
||||
| ValLambda (List Name) Exp
|
||||
| ValVar Name
|
||||
deriving (Show)
|
||||
|
||||
data Exp
|
||||
= ExpLet (List (Name, Exp)) Exp
|
||||
| ExpApply Exp (List Exp)
|
||||
| ExpProgn (List Exp)
|
||||
| ExpVal Val
|
||||
deriving (Show)
|
||||
Reference in New Issue
Block a user