Skip to content

fix: wrapping comp in direct handle block#28

Open
amistozy wants to merge 1 commit intokoka-community:mainfrom
amistozy:wrap-comp-with-handle
Open

fix: wrapping comp in direct handle block#28
amistozy wants to merge 1 commit intokoka-community:mainfrom
amistozy:wrap-comp-with-handle

Conversation

@amistozy
Copy link
Copy Markdown
Contributor

Rewrites with handler ... comp() as handle(comp) ... to prevent type inference issues with local effects.

When compiling the original form with with handler ... comp(), the compiler gives a type inference error:

effects do not match
context        :     with handler
                 ...
                     comp()
term           :     comp()
inferred effect: <cache<$a,$b>,div,exn|$e>
expected effect: <cache<$a,$b>,div,exn,local<_h>|_e1>

Rewrites `with handler ... comp()` as `handle(comp) ...` to prevent
type inference issues with local effects.
@TimWhiting
Copy link
Copy Markdown
Member

Which version of the compiler is this on? Does it happen on both the lastest dev release and the regular release, or one or the other? Also does the fix work on both releases?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants