summaryrefslogtreecommitdiff
path: root/src/AST.hs
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2024-10-21 23:20:57 +0200
committerTom Smeding <tom@tomsmeding.com>2024-10-21 23:20:57 +0200
commite7d7ac0fd8b81c1d6fae9ab7c1e4654133c631ea (patch)
tree4dc880e6956b42f0920382d772b49adc2a4ce556 /src/AST.hs
parent246439502b78c4a8fcc27ab3296c67471a2b239d (diff)
Tests
Diffstat (limited to 'src/AST.hs')
-rw-r--r--src/AST.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/AST.hs b/src/AST.hs
index 5dab62f..94c8537 100644
--- a/src/AST.hs
+++ b/src/AST.hs
@@ -150,6 +150,8 @@ data SOp a t where
OEq :: ScalIsNumeric a ~ True => SScalTy a -> SOp (TPair (TScal a) (TScal a)) (TScal TBool)
ONot :: SOp (TScal TBool) (TScal TBool)
OIf :: SOp (TScal TBool) (TEither TNil TNil)
+ ORound64 :: SOp (TScal TF64) (TScal TI64)
+ OToFl64 :: SOp (TScal TI64) (TScal TF64)
deriving instance Show (SOp a t)
opt2 :: SOp a t -> STy t
@@ -162,6 +164,8 @@ opt2 = \case
OEq _ -> STScal STBool
ONot -> STScal STBool
OIf -> STEither STNil STNil
+ ORound64 -> STScal STI64
+ OToFl64 -> STScal STF64
typeOf :: Expr x env t -> STy t
typeOf = \case