Skip to content

Why is unlifting strategy a property of Eff, and not individual effects? #158

Answered by arybczak
ocharles asked this question in Q&A
Discussion options

You must be logged in to vote

They seem to be a unique aspect to effectful, and I don't recall seeing anything similar in any other effect libraries

Yes, because effectful is the only library that offers thread local state and the MonadUnliftIO instance (in principle cleff is another one, but its thread local state has a funky behavior when forking, i.e. it resets to the initial value).

It seems surprising to me that this is a property of Eff as a whole

It's not, it's a property of the IOE effect.

not a choice made by each individual effect (or perhaps its handler)

It is though ;) There are specific unlifts for static and dynamic effects.

When using functions with the MonadUnliftIO constraint there, with static …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by arybczak
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