From 0a51c798d1322297f13ce6bc7a500ce5212b5e8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Wed, 18 Sep 2024 21:22:51 +0200 Subject: Greater-then/less-then comparison operators for numbers Changelog: Added `>`, `>=`, `<=` and `<` operators for numbers --- src/Parser/Expr.hs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/Parser/Expr.hs') 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) + ] ] ] -- cgit v1.2.3