Open ajmcmiddlin opened 3 years ago
Thanks for reporting this! To set expectations:
Finally, please be patient with the core team. They are trying their best with limited resources.
I ran into this very bug this week while using elm-monocle. Looking forward to a fix. But in the meantime I'll switch round the argument order of my getter :blush:
Quick Summary: Compiler hangs and uses more and more memory on type error.
SSCCE
Additional Details
When I run
elm make src/Main.elm
the command never returns, and continues to use more and more memory until I kill the process.The issue is with
fooN
, as the anonymous function used to defineset
has its parameters around the wrong way. If we change the definition tofooN = Lens .n (\n foo -> {foo | n = n})
then it compiles without error.Additionally, if we simplify the
Lens
type definition to only includeset
, the compiler produces a type error and doesn't hang.I originally encountered this using
elm-monocle
but have inlined theLens
definition to reproduce.