Proposal: merge either into transformers

Henning Thielemann lemming at
Sat Dec 8 23:55:45 CET 2012

On Fri, 7 Dec 2012, Edward Kmett wrote:

> I will be sad to see those instances go, but I'm also +1

How about:

import Prelude hiding (Show, showsPrec)
import qualified Prelude as P

class Show m where
   showsPrec :: (P.Show e, P.Show a) => Int -> m (Either e a) -> ShowS

instance (Show m, P.Show e, P.Show a) => P.Show (EitherT e m a) where
   showsPrec d (EitherT m) = showParen (d > 10) $
     showString "EitherT " . showsPrec 11 m

and so on for Read, Eq, Ord?

More information about the Libraries mailing list