-
I'm trying to make a version of the
The message:
I find this odd, because to me it seems that many-rec has effect |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
This error happens due to effect inference. The compiler first encounters Here is how to fix it: Remove the
But then you have to pay attention in the
|
Beta Was this translation helpful? Give feedback.
This error happens due to effect inference. The compiler first encounters
parse(input, p)
which the effecte
introduced byp : parser<e,a>
. Koka then tries to unifye
with the effect of the function<div,parse|e>
. But clearly, they can not be unified: Remember that Koka functions can have the same effect multiple times and so<div,parse|e>
is strictly bigger thane
.Here is how to fix it: Remove the
parse
effect frommany-rec
since there are no parsing combinators in this function. You can mask thediv
effect so that it does not apply toparse(input, p)
: