strict arith

This commit is contained in:
crumbtoo
2023-12-04 13:50:48 -07:00
parent a3a38cb256
commit 5c3b7c2c30
3 changed files with 87 additions and 6 deletions

View File

@@ -37,14 +37,14 @@ data Expr = Var Name
| Lam [Name] Expr
| App Expr Expr
| IntE Int
deriving (Show, Lift)
deriving (Show, Lift, Eq)
infixl 2 :$
pattern (:$) :: Expr -> Expr -> Expr
pattern f :$ x = App f x
data Binding = Binding Name Expr
deriving (Show, Lift)
deriving (Show, Lift, Eq)
infixl 1 :=
pattern (:=) :: Name -> Expr -> Binding
@@ -55,12 +55,12 @@ data Rec = Rec
deriving (Show, Eq, Lift)
data Alter = Alter Int [Name] Expr
deriving (Show, Lift)
deriving (Show, Lift, Eq)
type Name = String
data ScDef = ScDef Name [Name] Expr
deriving (Show, Lift)
deriving (Show, Lift, Eq)
data Module = Module (Maybe (Name, [Name])) Program
deriving (Show, Lift)