|
|
|
|
|
by dllthomas
4181 days ago
|
|
"if these values are already monads, you enter monad transformer hell (and it spreads to all the function signatures in your entire code base)" In addition to dragonwriter's objection, this is basically wrong. You can deal with wrapped maybes without touching monad transformers. Further, MaybeT is quite convenient when you have a lot of operatons that may fail, and you want to give up on the chain if they do. It doesn't spread arbitrarily far, though - at any point you can runMaybeT to turn (MaybeT m a) into (m (Maybe a)), for any Monad m. In general, monad transformers don't propagate crazy far unless they need data that's only available crazy far away. |
|