I was trying to write [some `EitherT` monad transformer, as suggested from real world haskell chapter 18](http://book.realworldhaskell.org/read/monad-transformers.html#x_fu).

```
newtype EitherT e m a = EitherT {
    runEitherT :: m (Either e a) 
}

```

my `EitherT` will have `Left error` and `Right result` for its `Either` type, and will bind all computation that yields `Right` values while stopping at `left` values, keeping them as error.

my code is below(sorry for the imperative style):

```
bindET :: (Monad m) => (EitherT e m a) -> (a -> EitherT e m b) -> (EitherT e m b)
x `bindET` f = EitherT $ do
    mx <- runEitherT x
    case mx of
        Right success -> runEitherT (f success)
        Left error -> return (Left error)

instance (Monad m) => Monad (EitherT e m) where
    return a = EitherT $ return (Right a)
    (>>=) = bindET
    fail e = EitherT $ return (Left e)

```

I thought writing `Monad` instances for `EitherT` transformer was quite simple, however I get this cryptic error message when I load the code into ghci:

```
EitherT.hs:30:18:
    Could not deduce (e ~ [Char])
    from the context (Monad m)
      bound by the instance declaration at EitherT.hs:27:10-41
      `e' is a rigid type variable bound by
          the instance declaration at EitherT.hs:27:10
    Expected type: EitherT e m a
      Actual type: EitherT String m a
    In the expression: EitherT $ return (Left e)
    In an equation for `fail': fail e = EitherT $ return (Left e)
    In the instance declaration for `Monad (EitherT e m)'
Failed, modules loaded: none.

```

it seems `fail` function is fixed to take `String` as an argument - well, if that's the case then my `EitherT e m a` will be `EitherT String m a` and all the `Left` values will be `Left String`. but I want `EitherT` monad to take any types of value as `Left` to indicate errors in computation. How can I achieve that?