Effectful-2.3.0.0 is now available

Hey everyone,

Today I released effectful-core-2.3.0.0, effectful-2.3.0.0 and effectful-plugin-1.1.0.2.

Highlights:

  • Added support for turning an effect handler into an effectful operation via the Provider effect.
  • Added support for having multiple effects of the same type in scope via the Labeled effect.
  • Added various ByteString related functions to the FileSystem effect.
  • Added a new Console effect for interaction with stdin/stdout.
  • Plugin now supports GHC 9.8.
11 Likes

Labeled is interesting. It seems that it brings a particular effect to the “front” so that it’s the default one used for an operation of matching type.

2 Likes

Great work! I’m excited about the Provider: I’ve noticed a pattern where the runner of some effect needs an argument. In some of those cases, that means the runner doesn’t go in the top-level set of runners. With Provider, I could run the runner at top level, and provide the relevant parameter later.

The downside, though, is that this Provider_ MyEffect MyParameterType would permeate through most (/all?) uses of the effect. :thinking:

I would need to play with it to see where it works well and where it wouldn’t. I’m excited nonetheless!

3 Likes

Hm Provider is interesting. It seems to be about initializing interpreters if I read right?

I approach that problem slightly differently with cleff in my game engine here. I compose interpreter construction with bind. This composed nicely with Managed, for instance.

I bet I can steal Provider a bit and make my thing even better potentially.