diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2024-09-18 21:22:51 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2024-09-18 21:22:51 +0200 |
commit | 0a51c798d1322297f13ce6bc7a500ce5212b5e8e (patch) | |
tree | e77b299382259a4c8686e6243b17b1f4924af051 /src | |
parent | cf508f90bc3c51ef01de1f66226d8168cb1630fe (diff) |
Greater-then/less-then comparison operators for numbers
Changelog: Added `>`, `>=`, `<=` and `<` operators for numbers
Diffstat (limited to 'src')
-rw-r--r-- | src/Parser/Expr.hs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Parser/Expr.hs b/src/Parser/Expr.hs index 835c58d..f9b1e32 100644 --- a/src/Parser/Expr.hs +++ b/src/Parser/Expr.hs @@ -245,6 +245,22 @@ someExpr = join inner <?> "expression" , SomeBinOp ((/=) @Scientific) , SomeBinOp ((/=) @Text) ] + , binary ">" $ + [ SomeBinOp ((>) @Integer) + , SomeBinOp ((>) @Scientific) + ] + , binary ">=" $ + [ SomeBinOp ((>=) @Integer) + , SomeBinOp ((>=) @Scientific) + ] + , binary "<=" $ + [ SomeBinOp ((<=) @Integer) + , SomeBinOp ((<=) @Scientific) + ] + , binary "<" $ + [ SomeBinOp ((<) @Integer) + , SomeBinOp ((<) @Scientific) + ] ] ] |