koka-lang / koka

Koka language compiler and interpreter
http://koka-lang.org
Other
3.16k stars 151 forks source link

Checking stucks with implicit parameters on recursive data types #446

Closed oxalica closed 5 months ago

oxalica commented 5 months ago

Run show([]) in koka 3.0.1 REPL, it stucks on checking with 100% CPU, consuming more than 10GB memory, and I have to kill it. Compiling a file with fun foo() show([]) also yields the same result.

I guess it's guessing the implicit parameters and infinitely trying nested lists?

TimWhiting commented 5 months ago

This is already known and will be fixed in the next release. For now annotate the type: here is the previous issue with the linked commit that fixes it #437