Closed anfelor closed 7 months ago
I could work around this by splitting the match
into two nested matches.
This is fixed?
Yes, this is fixed. Koka continues to infer an unnecessary div
effect since it can not see that this recursion is well-founded, but that is also common even for the much more advanced heuristics used in proof assistants so it does not seem to be worth the effort of fixing. Unfortunately, Koka also infers an exn
effect since it can not see that the pattern matches are exhaustive. That would be worth fixing, but requires a discussion on which algorithm from the literature we should adopt.
Koka v. 2.1.9 fails while compiling this merge function:
with:
Notice also, that Koka inferred both the
exn
anddiv
effect even though there is no good reason for this. Replacingas_
andbs_
in the branches by the matched terms does not change the error message.