Skip to content

Single value cache #146

Answered by anfelor
schicks asked this question in Q&A
Jan 21, 2021 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

I think the problem is that you declare the handler to return () without any effect and then resume in your handler by giving an optional<double> (the return type of the operation should match the value you give to resume). Furthermore you use a local variable that was declared outside of our handler which gives you the local<_h> effect and for some reason the compiler also gives you a exn effect. I think you can read this from the error message:

inferred type: std/core/hnd/clause2<int,optional<double>,optional<double>,_b,<exn,local<_h>|_e1>,()>
expected type: std/core/hnd/clause2<int,optional<double>,(),.hnd-cached<int,double>,_e,_a>
               input type, output type, something?, ef…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@schicks
Comment options

@anfelor
Comment options

@anfelor
Comment options

@schicks
Comment options

Answer selected by schicks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants