jfmengels/elm-review-simplify
View on GitHubMerging of let..in can lead to naming collisions
Open
#313 opened on Jun 26, 2024
bughelp wanted
Repository metrics
- Stars
- (22 stars)
- PR merge metrics
- (PR metrics pending)
Description
SSCCE
value =
let
a name = name
in
let
name = "str"
in
a name
Currently, this gets simplified to the following, which introduces a naming collision error from the compiler.
value =
let
a name = name
name = "str"
in
a name
I think the solution would be to check that there will be no collisions, but this is quite a bit of analysis compared to what is done today. I wonder if there's a smart way of doing it :thinking: