@@ -1,8 +1,15 @@
1+{-# OPTIONS_GHC -fno-warn-unrecognised-pragmas #-}
2+
3+{-# LANGUAGE CPP #-}
14{-# LANGUAGE MultiParamTypeClasses #-}
25{-# LANGUAGE FlexibleInstances #-}
36{-# LANGUAGE UndecidableInstances #-}
47{-# LANGUAGE FunctionalDependencies #-}
58
9+#if __GLASGOW_HASKELL__ < 710
10+{-# LANGUAGE OverlappingInstances #-}
11+#endif
12+
613-- | See "Control.Monad.State.Class".
714
815module Control.Monad.Ether.State.Class
@@ -11,6 +18,10 @@ module Control.Monad.Ether.State.Class
1118 , gets
1219 ) where
1320
21+#if __GLASGOW_HASKELL__ < 710
22+import Data.Monoid
23+#endif
24+
1425import Control.Monad.Trans (lift)
1526
1627import Control.Monad.Trans.Ether.Reader (ReaderT)
@@ -18,6 +29,7 @@ import Control.Monad.Trans.Ether.Writer (WriterT)
1829import Control.Monad.Trans.Ether.Except (ExceptT)
1930import qualified Control.Monad.Trans.Ether.State.Lazy as S.L
2031import qualified Control.Monad.Trans.Ether.State.Strict as S.S
32+import qualified Control.Ether.Util as Util
2133
2234-- for mtl instances
2335import qualified Control.Monad.Trans.Cont as Trans (ContT)
@@ -58,7 +70,7 @@ modify t f = state t (\s -> ((), f s))
5870
5971-- | Gets specific component of the state, using a projection function supplied.
6072gets :: MonadState tag s m => proxy tag -> (s -> a) -> m a
61−gets t f = fmap f (get t)
73+gets t f = Util.fmap f (get t)
6274
6375instance {-# OVERLAPPING #-} Monad m => MonadState tag s (S.L.StateT tag s m) where
6476 get = S.L.get