compiler icon indicating copy to clipboard operation
compiler copied to clipboard

Compiler hangs when comparing functions with extensible records in type signature

Open jfmengels opened this issue 5 years ago • 1 comments

Quick Summary: The following incorrect code causes the compiler to hang forever and grab more and more memory.

SSCCE

module CompilerError exposing (..)

type Thing b
    = Thing

changesTypeVariable : Thing { b | something : () } -> Thing { b | somethingElse : () }
changesTypeVariable _ =
    Thing

foo =
    if True then
        changesTypeVariable

    else
        identity
  • Elm: 0.19.1
  • Browser: NA
  • Operating System: Linux Ubuntu 18.04

Additional Details

When I run this, I get to see Compiling ..., and then I need to kill the process because it hangs forever, and it also seems to take more and more memory endlessly.

jfmengels avatar May 14 '20 21:05 jfmengels

Thanks for reporting this! To set expectations:

  • Issues are reviewed in batches, so it can take some time to get a response.
  • Ask questions a community forum. You will get an answer quicker that way!
  • If you experience something similar, open a new issue. We like duplicates.

Finally, please be patient with the core team. They are trying their best with limited resources.

github-actions[bot] avatar May 14 '20 21:05 github-actions[bot]