lambdas without params, lambdas are now passed as vars instead of funcs
[cc1516.git] / sem.icl
diff --git a/sem.icl b/sem.icl
index 47b6c1a..2f9e7d6 100644 (file)
--- a/sem.icl
+++ b/sem.icl
@@ -128,7 +128,7 @@ instance unfoldL_ Expr where
         fresh >>= \(IdType n) ->
         let f = ("2lambda_"+++n) in
         let fd = FunDecl p f args Nothing [] [ReturnStmt $ Just e] in 
-        let fe = FunExpr p f [] [] in
+        let fe = VarExpr p (VarDef f []) in
         pure ([fd], fe)
     unfoldL_ (FunExpr p f es fs) = flattenT <$> mapM unfoldL_ es >>= \(fds, es_)->
         pure (fds, FunExpr p f es_ fs)