3 ms·
> which have a runtime costs As monad is just an interface, it doesn't necessary cause runtime costs. Identity is a monad too. Effects may not always require s
by siknad 5y ago
> which have a runtime costs
As monad is just an interface, it doesn't necessary cause runtime costs. Identity is a monad too. Effects may not always require sacrificing performance, but as they can be used to implement exceptions they are not just free compile time annotations. Also the differences discussed there: https://www.reddit.com/r/haskell/comments/3nkv2a/why_dont_we_use_effect_handlers_as_opposed_to/ https://www.reddit.com/r/haskell/comments/3nkv2a/why_dont_we...
- DarylZero 5y agoMonad transformers are different from monads. Monad transformers do have runtime costs, they are adding indirection at runtime.
- whateveracct 5y agoSometimes - it's pretty cool what GHC can do