top | item 45344899

(no title)

oisdk | 5 months ago

> that's my understanding of why these things are called 'algebraic' effects.

This is a misconception. Algebraic effects are not algebraic because they come from algebraic data types, the two features are completely independent (you can have algebraic effects without algebraic data types and vice versa).

> It's not that ConsoleOutput and ConsoleInput (however you define that using + or *) are magically 'composable' just because they're both algebraic... for that composition you need extra rules (however you specify that) because effects don't (in general) compose.

Actually, if you have two algebraic effects they can automatically compose. And this is a consequence of them both being algebraic. It's just that an algebraic effect is unrelated to an algebraic data type.

discuss

order

Quekid5|5 months ago

Are we just talking MTL style then? Because those compose in some sense, but ... it might not be in the sense anyone actually wants.