kongware / scriptum

Functional Programming Unorthodoxly Adjusted to Client-/Server-side Javascript
MIT License
383 stars 21 forks source link

`Mutable(arrPush)` yields an infinite loop #296

Closed ivenmarquardt closed 3 years ago

ivenmarquardt commented 3 years ago

This is probably caused by an insufficient occurs check.

ivenmarquardt commented 3 years ago

Possible fix: move the occurs check from instatiation to substitution process.

ivenmarquardt commented 3 years ago

I wound up parsing all involved type vars and checking if they occur on both side of the instantiations. I am a bit more confident now that this issue doesn't pop up at the next opportunity. Done.