I'm trying to create my own data type, which will be part of Monad class, but
newtype Container a = Container a deriving Monad
gives me this error:
* Can't make a derived instance of `Monad Container'
(even with cunning GeneralizedNewtypeDeriving):
cannot eta-reduce the representation type enough
* In the newtype declaration for `Container'
|
30 | newtype Container a = Container a deriving Monad
It works fine for other classes (Show for example), but not for Monad, so how can I convince ghci to instance my Container to Monad class?
Thanks