summaryrefslogtreecommitdiff
path: root/src/Interpreter.hs
diff options
context:
space:
mode:
authorTom Smeding <t.j.smeding@uu.nl>2025-04-21 21:56:34 +0200
committerTom Smeding <t.j.smeding@uu.nl>2025-04-21 21:56:34 +0200
commitc586e7d2343fa735a9b27e0b1a201dd2cb2bc68e (patch)
tree9315228980b2c5983c785889b815aaab46534052 /src/Interpreter.hs
parent0dc5c31b023ee7d569bbc0df7615b2bf55ba01f5 (diff)
Add integer modulo operator
Diffstat (limited to 'src/Interpreter.hs')
-rw-r--r--src/Interpreter.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Interpreter.hs b/src/Interpreter.hs
index 572f2bd..58d79a5 100644
--- a/src/Interpreter.hs
+++ b/src/Interpreter.hs
@@ -184,6 +184,7 @@ interpretOp op arg = case op of
OExp st -> floatingIsFractional st $ exp arg
OLog st -> floatingIsFractional st $ log arg
OIDiv st -> integralIsIntegral st $ uncurry quot arg
+ OMod st -> integralIsIntegral st $ uncurry rem arg
where
styIsEq :: SScalTy t -> (Eq (Rep (TScal t)) => r) -> r
styIsEq STI32 = id