summaryrefslogtreecommitdiff
path: root/src/Parser/Statement.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Parser/Statement.hs')
-rw-r--r--src/Parser/Statement.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Parser/Statement.hs b/src/Parser/Statement.hs
index 6434a53..2d45a21 100644
--- a/src/Parser/Statement.hs
+++ b/src/Parser/Statement.hs
@@ -91,7 +91,10 @@ instance ExprType a => ParamType (TypedVarName a) where
showParamType _ = "<variable>"
instance ExprType a => ParamType (Expr a) where
- parseParam _ = typedExpr
+ parseParam _ = do
+ off <- stateOffset <$> getParserState
+ SomeExpr e <- literal <|> variable <|> between (symbol "(") (symbol ")") someExpr
+ unifyExpr off Proxy e
showParamType _ = "<" ++ T.unpack (textExprType @a Proxy) ++ ">"
instance ParamType a => ParamType [a] where