STRs for negation primitive -- evaluator can negate ints

STR = state transition rule. did this unmedicated! next up will be other primitive arithmetic operations
This commit is contained in:
crumbtoo
2023-11-13 14:29:28 -07:00
parent cc7f940ef8
commit d7bd36ae49
2 changed files with 107 additions and 16 deletions

View File

@@ -19,7 +19,8 @@ data Expr = Var Name
data Prim = IntP Int
| IntAddP
deriving Show
| IntNegP
deriving (Show, Eq)
infixl 2 :$
pattern (:$) :: Expr -> Expr -> Expr