"Monad transformers more powerful than effects" - Examples?

Functional ProgrammingMonadsEffectsIdris

Functional Programming Problem Overview


The paper ["Programming and reasoning with algebraic effects and dependent types" by Edwin C. Brady][1] on effects in Idris contains the (unreferenced) claim that:

> Although [effects and monad transformers] are not equivalent in power — monads and monad transformers can express more concepts — many common effectful computations are captured.

What examples are there that can be modelled by monad transformers but not effects?

[1]: http://eb.host.cs.st-andrews.ac.uk/drafts/effects.pdf "Edwin C. Brady (2013?): 'Programming and reasoning with algebraic effects and dependent types'"

Functional Programming Solutions


Solution 1 - Functional Programming

Continuations can be modelled as monads, using CPS, but they are not algebraic effects as they cannot be modelled using Lawvere theories. See Martin Hyland and John Power, 2007, The Category Theoretic Understanding of Universal Algebra: Lawvere Theories and Monads (pdf), ENTCS 172:437-458.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questiongeoff_hView Question on Stackoverflow
Solution 1 - Functional ProgrammingCharles StewartView Answer on Stackoverflow