Hacker News new | ask | show | jobs
by siknad 1569 days 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...

1 comments

Monad transformers are different from monads. Monad transformers do have runtime costs, they are adding indirection at runtime.
Sometimes - it's pretty cool what GHC can do