X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=sem.icl;h=603d53abfffa1a07b9637d5b0b222d0c6969633e;hb=da76566f1640467256a8f4e166ebfcd3731aef4b;hp=addadad6c3f33fdd3bcc0255d3d582ea0c75f1b5;hpb=2302fbd1f7421f6824879e64d904157acb9797b1;p=cc1516.git diff --git a/sem.icl b/sem.icl index addadad..603d53a 100644 --- a/sem.icl +++ b/sem.icl @@ -49,7 +49,7 @@ semFunDecl fd=:(FunDecl p f args mt vds stmts) = (case mt of Nothing = let t = IdType f in putIdent f t >>| pure t Just t = putIdent f t >>| pure t) >>= \ft -> - mapM_ (\a-> putIdent a (IdType <$> freshIdent)) args >>| + mapM_ (\a-> freshIdent >>= \fr-> putIdent a (IdType fr)) args >>| mapM_ semVarDecl vds >>| mapM_ (checkStmt $ resultType ft) stmts >>| restoreGamma gamma >>| pure fd