concrete functor and monad transformers
#100Can `runExceptT` become a record field of `ExceptT`
Other transformers like MaybeT
already do it like this and it has a couple of advantages, e.g. GHC
generates HasField
instances for it and since it is a different symbol type internally, it also gets highlighted differently with semantic highlighting.
I just had a look and that is true for multiple other transformers. I would be happy to make the change for all of them.
A disadvantage is that you get a messier
Show
instance.I have read the mailing list entries from back when the accessors were removed.
I think I would argue that these days that disadvantage is outweighed by the substantial advantages.
- the
HasField
instance (which could admittedly also written by hand - the advantages wrt imports and exports (
import .. (ExceptT (..))
) - the more consistent look and feel with the rest of the library.
Additionally, the
Show
argument only applies toExceptT
, afaict. E.g. AccumT which also doesn't have the record accessor cannot beShow
n anyway.- the
- status set to closed
OK, I've done this