Skip to content

Commit

Permalink
Fix bug where unsafeCoerce removal was not bound to LamderaGenerated.…
Browse files Browse the repository at this point in the history
…elm only
  • Loading branch information
supermario committed May 1, 2024
1 parent dbc1f91 commit 4dd2053
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions extra/Lamdera/Evergreen/ModifyAST.hs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,17 @@ update :: Can.Module -> Can.Module
update canonical =
let
moduleName :: Module.Canonical = (Can._name canonical)
decls :: Can.Decls = (Can._decls canonical) & removeUnsafeCoercePlaceholder
newDecls :: Can.Decls = updateDecls moduleName decls
in
canonical { Can._decls = newDecls }
case moduleName of
Module.Canonical (Name "author" "project") "LamderaHelpers" ->
let
decls :: Can.Decls = (Can._decls canonical) & removeUnsafeCoercePlaceholder
newDecls :: Can.Decls = updateDecls moduleName decls
in
canonical { Can._decls = newDecls }

_ ->
canonical


removeUnsafeCoercePlaceholder :: Can.Decls -> Can.Decls
Expand Down

0 comments on commit 4dd2053

Please sign in to comment.