move Prim to TIM.hs

This commit is contained in:
crumbtoo
2023-11-14 12:34:14 -07:00
parent a259d5c42b
commit 42c3ffb6ba
2 changed files with 15 additions and 13 deletions

View File

@@ -38,6 +38,21 @@ type Stats = Int
----------------------------------------------------------------------------------
data Prim = PrimConstr Int Int -- PrimConstr Tag Arity
| IntP Int
| IntAddP
| IntSubP
| IntMulP
| IntDivP
| IntNegP
deriving (Show, Eq)
instance Pretty Prim where
prettyPrec (IntP n) = withPrec maxBound $ IStr $ show n ++ "#"
prettyPrec IntAddP = withPrec maxBound $ "+#"
----------------------------------------------------------------------------------
tiStatIncSteps :: Stats -> Stats
tiStatIncSteps = (+1)