From 2664fe5010189e4afdc52608a793910331330376 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Fri, 6 Dec 2024 21:09:01 +0100 Subject: Functions returning arbitrary types --- src/Parser.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/Parser.hs') diff --git a/src/Parser.hs b/src/Parser.hs index 940bd60..1339ec8 100644 --- a/src/Parser.hs +++ b/src/Parser.hs @@ -54,6 +54,11 @@ parseDefinition = label "symbol definition" $ toplevel ToplevelDefinition $ do atypes' <- getInferredTypes atypes ( name, ) . SomeExpr . ArgsReq atypes' . FunctionAbstraction <$> replaceDynArgs (mconcat steps) return $ L.IndentSome Nothing finish testStep + , do + osymbol "=" + SomeExpr (expr :: Expr e) <- someExpr + atypes' <- getInferredTypes atypes + L.IndentNone . ( name, ) . SomeExpr . ArgsReq atypes' . FunctionAbstraction <$> replaceDynArgs expr ] modify $ \s -> s { testVars = fmap someExprType def : testVars s } return def -- cgit v1.2.3