Skip to content

Commit

Permalink
fix(compiler): fixed other declaration types in ANF
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasvergne committed Aug 7, 2024
1 parent 3b5ce57 commit b4159ff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Plume/Compiler/Desugaring/Modules/ANF.hs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ desugarANF (_, _, _, sba) f (Pre.CEDeclaration name expr body) = do
<> [Post.DSDeclaration fresh body' | sba]

return (if sba then Post.DEVar fresh else body', stmts)
desugarANF t f (Pre.CEMutDeclaration name expr body) = do
desugarANF _ f (Pre.CEMutDeclaration name expr body) = do
(expr', stmt1) <- f expr
(body', stmts2) <- desugarANF t f body
(body', stmts2) <- f body

fresh <- freshName

Expand All @@ -48,9 +48,9 @@ desugarANF t f (Pre.CEMutDeclaration name expr body) = do
<> [Post.DSDeclaration fresh body']

return (Post.DEVar fresh, stmts)
desugarANF t f (Pre.CEMutUpdate name expr body) = do
desugarANF _ f (Pre.CEMutUpdate name expr body) = do
(expr', stmt1) <- f expr
(body', stmts2) <- desugarANF t f body
(body', stmts2) <- f body

fresh <- freshName

Expand Down

0 comments on commit b4159ff

Please sign in to comment.