tym przypadku MonadState, kopiowane z http://book.realworldhaskell.org/read/monad-transformers.html, daje mi błąd z GHC 7.4.2MonadState wystąpienie z Real World Haskell nie kompiluje
instance (MonadState s m) => MonadState s (MaybeT m) where
get = lift get
put k = lift (put k)
daje
Illegal instance declaration for `MonadState s (MaybeT m)'
(All instance types must be of the form (T a1 ... an)
where a1 ... an are *distinct type variables*,
and each type variable appears at most once in the instance head.
Use -XFlexibleInstances if you want to disable this.)
In the instance declaration for `MonadState s (MaybeT m)'
Jeśli dodać XFlexibleInstances, Następnie polecono mi dodać XUndecidableInstances - nie sądzę, żebym potrzebował tych rozszerzeń tutaj. W jaki sposób można skompilować tę instancję?