summaryrefslogtreecommitdiff
path: root/src/Language.hs
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2025-03-04 21:33:56 +0100
committerTom Smeding <tom@tomsmeding.com>2025-03-04 21:45:50 +0100
commitd751deedfdc2ba5fbeb72ede5754587a1f677835 (patch)
tree7bbb7ea6ac1482599a597feee1401d2b781b4971 /src/Language.hs
parentbacd70ca6ba028e935bb512aeee713943901acdd (diff)
Compile: Fix right-precedence of (*)
Diffstat (limited to 'src/Language.hs')
-rw-r--r--src/Language.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Language.hs b/src/Language.hs
index 70cc4f9..810a889 100644
--- a/src/Language.hs
+++ b/src/Language.hs
@@ -182,9 +182,11 @@ not_ = oper ONot
and_ :: NExpr env (TScal TBool) -> NExpr env (TScal TBool) -> NExpr env (TScal TBool)
and_ = oper2 OAnd
+infixr 3 `and_`
or_ :: NExpr env (TScal TBool) -> NExpr env (TScal TBool) -> NExpr env (TScal TBool)
or_ = oper2 OOr
+infixr 2 `or_`
-- | The first alternative is the True case; the second is the False case.
if_ :: NExpr env (TScal TBool) -> NExpr env t -> NExpr env t -> NExpr env t
@@ -198,3 +200,4 @@ toFloat_ = oper OToFl64
idiv :: (KnownScalTy t, ScalIsIntegral t ~ True) => NExpr env (TScal t) -> NExpr env (TScal t) -> NExpr env (TScal t)
idiv = oper2 (OIDiv knownScalTy)
+infixl 7 `idiv`