Open JonathanStarup opened 4 months ago
Sad. Is this in monomorph? Maybe we need a different map function.
It is conceptually impossible
It is conceptually impossible
Oh
So I guess you want an error message instead. But its tricky to produce, I think?
Yes, hard to spot, especially with the mutual example. And possibly worse with lambdas
My guess is that the best we can do is cycle detection in MonoDefs
f(Int32)
requires f(List[Int32])
requires f(List[List[Int32]])
etc
One way to solve it is to monomorphize to erased types, this would break the cycle. This would however also break typematch
Notice this can also happen through mutual recursion