Closed paluh closed 5 years ago
If we hard-code the e
type to PGError
, won't that limit other error types from being used in a computation? I'm not sure whether one would do such a thing, but I thought I'd bring it up.
If we hard-code the e type to PGError, won't that limit other error types from being used in a computation?
This base monad should be hoisted into an application stack using withExceptT
. We are not able to avoid some form of hoisting I think if we want to provide some form of monad or class out of the box. The problem is that current model with hardcoded ExceptT
seems to be hard to hoist in the real world scenarios.
We can probably provide polymorphic version of
PG
instead of concrete stack - something like this should be sufficient: