Skip to content

Commit

Permalink
last semicolon in letrec no longer optional
Browse files Browse the repository at this point in the history
  • Loading branch information
janmasrovira committed Oct 25, 2022
1 parent 323df67 commit c5ee541
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/Juvix/Compiler/Core/Translation/FromSource.hs
Original file line number Diff line number Diff line change
Expand Up @@ -716,8 +716,7 @@ letrecDefs ::
Index ->
HashMap Text Level ->
ParsecS r (NonEmpty LetItem)
letrecDefs names varsNum vars =
mapM letrecItem names
letrecDefs names varsNum vars = forM names letrecItem
where
letrecItem :: Text -> ParsecS r LetItem
letrecItem n = do
Expand All @@ -728,7 +727,6 @@ letrecDefs names varsNum vars =
name <- lift $ freshName KNameLocal txt i
kw kwAssign
v <- bracedExpr varsNum vars
-- TODO last semicolon optional
kw kwSemicolon
return $ LetItem (Binder (Just name) mkDynamic') v

Expand Down
2 changes: 1 addition & 1 deletion tests/Core/positive/test040.jvc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def mutrec :=
1
else
x * f (x - 1)
} in z
} in z;
in writeLn (f 5) >> writeLn (f 10) >> writeLn (f 100) >> writeLn (g 5) >> writeLn (h 5);

letrec x := 3
Expand Down

0 comments on commit c5ee541

Please sign in to comment.