On 4 October 2010 03:40, Michael Vanier <mvanie...@gmail.com> wrote: > newtype MyMonad a = > MyMonad ((StateT (MyData a) (Either SomeError) a)) > deriving (Monad, > MonadState (MyData a), > MonadError SomeError, > Typeable)
I think it's the `a'. I think it needs to be a concrete type. E.g. the following is OK: newtype MyMonad a = MyMonad ((StateT (MyData ()) (Either SomeError) a)) deriving (Monad, MonadState (MyData ()), MonadError SomeError, Typeable) But newtype MyMonad a = MyMonad ((StateT (MyData ()) (Either SomeError) [a])) deriving (Monad, MonadState (MyData ()), MonadError SomeError, Typeable) is not. This reminds me of the restriction that impredicative types remove, but I don't think it's related. > These error messages mean nothing to me. What's going on? Can the more > specific code be made to work? This is with ghc 6.12.3. It seems like eta-reducing `X' or `x' is "enough", but Foo x,, i.e. a parametrized type with a type variable isn't "enough". I think that's what's going on, but I don't know why. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe