Performing effects inside handlers? Unclear type error #660
Replies: 1 comment 2 replies
-
First of all, I recommend you don't use unsafe-total if you can avoid it. Next let's take a look at the error:
I'll take you through my thought process when I was debugging this error, hopefully it is instructional. I don't claim that it is the only way to debug the issue. First let's take a look at the handler and what the operation handlers are declared as: both are declared as |
Beta Was this translation helpful? Give feedback.
-
I'm trying to write a small reactive signal library. Here is the core of it:
The idea being:
with-context
get
effect, the continuation for that call is inserted into that signal's dependenciesI'm running into a couple of problems:
unsafe-total
, is there a workaround for this pattern? I've had similar issues implementing a basicwriter
effect a la Haskell's writer monadAny advice?
Beta Was this translation helpful? Give feedback.
All reactions