on master help sign in
Ambiguous default for MonadState
commit2b7b27e604f4292679721cd3db09704e16aa73d3 authorIndex Int <vlad.z.4096@gmail.com> dateSat 30 Apr 2016, 20:03 (10 years ago) parent150f485
20 files changed+111−258
ether.cabal+2−4 src/Control/Monad/Ether/Ambiguous.hs−13 src/Control/Monad/Ether/Ambiguous/State.hs−8 src/Control/Monad/Ether/Ambiguous/State/Lazy.hs−79 src/Control/Monad/Ether/Ambiguous/State/Strict.hs−79 src/Control/Monad/Ether/Implicit/State/Lazy.hs+1−1 src/Control/Monad/Ether/Implicit/State/Strict.hs+1−1 src/Control/Monad/Ether/State/Class.hs+10−18 src/Control/Monad/Ether/State/Common.hs+37 src/Control/Monad/Ether/State/Lazy.hs+5−2 src/Control/Monad/Ether/State/Strict.hs+5−2 src/Control/Monad/Trans/Ether/Except.hs−1 src/Control/Monad/Trans/Ether/State/Lazy.hs+22−22 src/Control/Monad/Trans/Ether/State/Strict.hs+22−22 test/Regression/T1.hs+1−1 test/Regression/T3.hs+1−1 test/Regression/T4.hs+1−1 test/Regression/T7.hs+1−1 test/Regression/T8.hs+1−1 test/Regression/T9.hs+1−1
ether.cabal+2−4
@@ -54,10 +54,8 @@ library
5454 Control.Monad.Ether.Implicit.State.Lazy
5555 Control.Monad.Ether.Implicit.State.Strict
5656 Control.Monad.Ether.Implicit.Except
57− Control.Monad.Ether.Ambiguous
58− Control.Monad.Ether.Ambiguous.State
59− Control.Monad.Ether.Ambiguous.State.Lazy
60− Control.Monad.Ether.Ambiguous.State.Strict
57+
58+ other-modules: Control.Monad.Ether.State.Common
6159
6260 build-depends: base >=4.7 && <4.10
6361 , transformers >=0.4.2
src/Control/Monad/Ether/Ambiguous.hsdeleted−13
@@ -1,13 +0,0 @@
1−
2−-- | This module provides convenience exports of all
3−-- ambiguously tagged monad classes from Ether.
4−
5−module Control.Monad.Ether.Ambiguous (module X) where
6−
7−import Control.Monad as X
8−import Control.Monad.Fix as X
9−import Control.Monad.Ether.Reader as X
10−import Control.Monad.Ether.Writer as X
11−import Control.Monad.Ether.Ambiguous.State as X
12−import Control.Monad.Ether.Except as X
13−import Control.Monad.Trans.Ether.Dispatch as X
src/Control/Monad/Ether/Ambiguous/State.hsdeleted−8
@@ -1,8 +0,0 @@
1−
2−-- | See "Control.Monad.Ether.State".
3−
4−module Control.Monad.Ether.Ambiguous.State
5− ( module Control.Monad.Ether.Ambiguous.State.Lazy
6− ) where
7−
8−import Control.Monad.Ether.Ambiguous.State.Lazy
src/Control/Monad/Ether/Ambiguous/State/Lazy.hsdeleted−79
@@ -1,79 +0,0 @@
1−{-# LANGUAGE AllowAmbiguousTypes #-}
2−{-# LANGUAGE ScopedTypeVariables #-}
3−{-# LANGUAGE MagicHash #-}
4−
5−-- | See "Control.Monad.Ether.State.Lazy".
6−
7−module Control.Monad.Ether.Ambiguous.State.Lazy
8− (
9− -- * MonadState class
10− MonadState
11− , get
12− , put
13− , state
14− , modify
15− , gets
16− -- * The State monad
17− , State
18− , runState
19− , evalState
20− , execState
21− -- * The StateT monad transformer
22− , StateT
23− , stateT
24− , runStateT
25− , evalStateT
26− , execStateT
27− ) where
28−
29−import GHC.Prim (Proxy#, proxy#)
30−import Control.Monad.Ether.State.Lazy (MonadState, StateT, State)
31−import qualified Control.Monad.Ether.State.Lazy as Explicit
32−
33−-- | See 'Control.Monad.Ether.State.Lazy.stateT'.
34−stateT :: forall tag s m a . (s -> m (a, s)) -> StateT tag s m a
35−stateT = Explicit.stateT proxy#
36−
37−-- | See 'Control.Monad.Ether.State.Lazy.runStateT'.
38−runStateT :: forall tag s m a . StateT tag s m a -> s -> m (a, s)
39−runStateT = Explicit.runStateT proxy#
40−
41−-- | See 'Control.Monad.Ether.State.Lazy.runState'.
42−runState :: forall tag s a . State tag s a -> s -> (a, s)
43−runState = Explicit.runState proxy#
44−
45−-- | See 'Control.Monad.Ether.State.Lazy.evalStateT'.
46−evalStateT :: forall tag s m a . Monad m => StateT tag s m a -> s -> m a
47−evalStateT = Explicit.evalStateT proxy#
48−
49−-- | See 'Control.Monad.Ether.State.Lazy.evalState'.
50−evalState :: forall tag s a . State tag s a -> s -> a
51−evalState = Explicit.evalState proxy#
52−
53−-- | See 'Control.Monad.Ether.State.Lazy.execStateT'.
54−execStateT :: forall tag s m a . Monad m => StateT tag s m a -> s -> m s
55−execStateT = Explicit.execStateT proxy#
56−
57−-- | See 'Control.Monad.Ether.State.Lazy.execState'.
58−execState :: forall tag s a . State tag s a -> s -> s
59−execState = Explicit.execState proxy#
60−
61−-- | See 'Control.Monad.Ether.State.Lazy.get'.
62−get :: forall tag s m . MonadState tag s m => m s
63−get = Explicit.get (proxy# :: Proxy# tag)
64−
65−-- | See 'Control.Monad.Ether.State.Lazy.gets'.
66−gets :: forall tag s m a . MonadState tag s m => (s -> a) -> m a
67−gets = Explicit.gets (proxy# :: Proxy# tag)
68−
69−-- | See 'Control.Monad.Ether.State.Lazy.put'.
70−put :: forall tag s m . MonadState tag s m => s -> m ()
71−put = Explicit.put (proxy# :: Proxy# tag)
72−
73−-- | See 'Control.Monad.Ether.State.Lazy.state'.
74−state :: forall tag s m a . MonadState tag s m => (s -> (a, s)) -> m a
75−state = Explicit.state (proxy# :: Proxy# tag)
76−
77−-- | See 'Control.Monad.Ether.State.Lazy.modify'.
78−modify :: forall tag s m . MonadState tag s m => (s -> s) -> m ()
79−modify = Explicit.modify (proxy# :: Proxy# tag)
src/Control/Monad/Ether/Ambiguous/State/Strict.hsdeleted−79
@@ -1,79 +0,0 @@
1−{-# LANGUAGE AllowAmbiguousTypes #-}
2−{-# LANGUAGE ScopedTypeVariables #-}
3−{-# LANGUAGE MagicHash #-}
4−
5−-- | See "Control.Monad.Ether.State.Strict".
6−
7−module Control.Monad.Ether.Ambiguous.State.Strict
8− (
9− -- * MonadState class
10− MonadState
11− , get
12− , put
13− , state
14− , modify
15− , gets
16− -- * The State monad
17− , State
18− , runState
19− , evalState
20− , execState
21− -- * The StateT monad transformer
22− , StateT
23− , stateT
24− , runStateT
25− , evalStateT
26− , execStateT
27− ) where
28−
29−import GHC.Prim (Proxy#, proxy#)
30−import Control.Monad.Ether.State.Strict (MonadState, StateT, State)
31−import qualified Control.Monad.Ether.State.Strict as Explicit
32−
33−-- | See 'Control.Monad.Ether.State.Strict.stateT'.
34−stateT :: forall tag s m a . (s -> m (a, s)) -> StateT tag s m a
35−stateT = Explicit.stateT proxy#
36−
37−-- | See 'Control.Monad.Ether.State.Strict.runStateT'.
38−runStateT :: forall tag s m a . StateT tag s m a -> s -> m (a, s)
39−runStateT = Explicit.runStateT proxy#
40−
41−-- | See 'Control.Monad.Ether.State.Strict.runState'.
42−runState :: forall tag s a . State tag s a -> s -> (a, s)
43−runState = Explicit.runState proxy#
44−
45−-- | See 'Control.Monad.Ether.State.Strict.evalStateT'.
46−evalStateT :: forall tag s m a . Monad m => StateT tag s m a -> s -> m a
47−evalStateT = Explicit.evalStateT proxy#
48−
49−-- | See 'Control.Monad.Ether.State.Strict.evalState'.
50−evalState :: forall tag s a . State tag s a -> s -> a
51−evalState = Explicit.evalState proxy#
52−
53−-- | See 'Control.Monad.Ether.State.Strict.execStateT'.
54−execStateT :: forall tag s m a . Monad m => StateT tag s m a -> s -> m s
55−execStateT = Explicit.execStateT proxy#
56−
57−-- | See 'Control.Monad.Ether.State.Strict.execState'.
58−execState :: forall tag s a . State tag s a -> s -> s
59−execState = Explicit.execState proxy#
60−
61−-- | See 'Control.Monad.Ether.State.Strict.get'.
62−get :: forall tag s m . MonadState tag s m => m s
63−get = Explicit.get (proxy# :: Proxy# tag)
64−
65−-- | See 'Control.Monad.Ether.State.Strict.gets'.
66−gets :: forall tag s m a . MonadState tag s m => (s -> a) -> m a
67−gets = Explicit.gets (proxy# :: Proxy# tag)
68−
69−-- | See 'Control.Monad.Ether.State.Strict.put'.
70−put :: forall tag s m . MonadState tag s m => s -> m ()
71−put = Explicit.put (proxy# :: Proxy# tag)
72−
73−-- | See 'Control.Monad.Ether.State.Strict.state'.
74−state :: forall tag s m a . MonadState tag s m => (s -> (a, s)) -> m a
75−state = Explicit.state (proxy# :: Proxy# tag)
76−
77−-- | See 'Control.Monad.Ether.State.Strict.modify'.
78−modify :: forall tag s m . MonadState tag s m => (s -> s) -> m ()
79−modify = Explicit.modify (proxy# :: Proxy# tag)
src/Control/Monad/Ether/Implicit/State/Lazy.hs+1−1
@@ -26,7 +26,7 @@ module Control.Monad.Ether.Implicit.State.Lazy
2626 , execStateT
2727 ) where
2828
29−import qualified Control.Monad.Ether.Ambiguous.State.Lazy as A
29+import qualified Control.Monad.Ether.State.Lazy as A
3030
3131-- | See 'Control.Monad.Ether.State.Lazy.StateT'.
3232type StateT s = A.StateT s s
src/Control/Monad/Ether/Implicit/State/Strict.hs+1−1
@@ -26,7 +26,7 @@ module Control.Monad.Ether.Implicit.State.Strict
2626 , execStateT
2727 ) where
2828
29−import qualified Control.Monad.Ether.Ambiguous.State.Strict as A
29+import qualified Control.Monad.Ether.State.Strict as A
3030
3131-- | See 'Control.Monad.Ether.State.Strict.StateT'.
3232type StateT s = A.StateT s s
src/Control/Monad/Ether/State/Class.hs+10−18
@@ -4,15 +4,15 @@
44{-# LANGUAGE FunctionalDependencies #-}
55{-# LANGUAGE TypeFamilies #-}
66{-# LANGUAGE PolyKinds #-}
7+{-# LANGUAGE TypeApplications #-}
8+{-# LANGUAGE ScopedTypeVariables #-}
79{-# LANGUAGE MagicHash #-}
810
911-- | See "Control.Monad.State.Class".
1012
1113module Control.Monad.Ether.State.Class
12− ( MonadState(..)
13− , modify
14− , gets
15− ) where
14+ ( MonadState(..)
15+ ) where
1616
1717import GHC.Prim (Proxy#)
1818import qualified Control.Monad.Trans.Ether.State.Lazy as S.L
@@ -40,23 +40,15 @@ class Monad m => MonadState tag s m | m tag -> s where
4040 put t s'
4141 return a
4242
43−-- | Modifies the state inside a state monad.
44−modify :: MonadState tag s m => Proxy# tag -> (s -> s) -> m ()
45−modify t f = state t (\s -> ((), f s))
46−
47−-- | Gets specific component of the state, using a projection function supplied.
48−gets :: MonadState tag s m => Proxy# tag -> (s -> a) -> m a
49−gets t f = fmap f (get t)
50−
5143instance (Monad m, s ~ s') => MonadState tag s (S.L.StateT tag s' m) where
52− get = S.L.get
53− put = S.L.put
54− state = S.L.state
44+ get _ = S.L.get @tag
45+ put _ = S.L.put @tag
46+ state _ = S.L.state @tag
5547
5648instance (Monad m, s ~ s') => MonadState tag s (S.S.StateT tag s' m) where
57− get = S.S.get
58− put = S.S.put
59− state = S.S.state
49+ get _ = S.S.get @tag
50+ put _ = S.S.put @tag
51+ state _ = S.S.state @tag
6052
6153instance {-# OVERLAPPABLE #-}
6254 ( Lift.MonadTrans t
src/Control/Monad/Ether/State/Common.hsnew file+37
@@ -0,0 +1,37 @@
1+{-# LANGUAGE AllowAmbiguousTypes #-}
2+{-# LANGUAGE TypeApplications #-}
3+{-# LANGUAGE ScopedTypeVariables #-}
4+{-# LANGUAGE MagicHash #-}
5+
6+module Control.Monad.Ether.State.Common
7+ ( MonadState
8+ , get
9+ , put
10+ , state
11+ , modify
12+ , gets
13+ ) where
14+
15+import GHC.Prim (Proxy#, proxy#)
16+import Control.Monad.Ether.State.Class (MonadState)
17+import qualified Control.Monad.Ether.State.Class as C
18+
19+-- | Return the state from the internals of the monad.
20+get :: forall tag s m . MonadState tag s m => m s
21+get = C.get (proxy# :: Proxy# tag)
22+
23+-- | Replace the state inside the monad.
24+put :: forall tag s m . MonadState tag s m => s -> m ()
25+put = C.put (proxy# :: Proxy# tag)
26+
27+-- | Embed a simple state action into the monad.
28+state :: forall tag s m a . MonadState tag s m => (s -> (a, s)) -> m a
29+state = C.state (proxy# :: Proxy# tag)
30+
31+-- | Modifies the state inside a state monad.
32+modify :: forall tag s m . MonadState tag s m => (s -> s) -> m ()
33+modify f = state @tag (\s -> ((), f s))
34+
35+-- | Gets specific component of the state, using a projection function supplied.
36+gets :: forall tag s m a . MonadState tag s m => (s -> a) -> m a
37+gets f = fmap f (get @tag)
src/Control/Monad/Ether/State/Lazy.hs+5−2
@@ -4,7 +4,10 @@
44module Control.Monad.Ether.State.Lazy
55 (
66 -- * MonadState class
7− MonadState(..)
7+ MonadState
8+ , get
9+ , put
10+ , state
811 , modify
912 , gets
1013 -- * The State monad
@@ -20,5 +23,5 @@ module Control.Monad.Ether.State.Lazy
2023 , execStateT
2124 ) where
2225
23−import Control.Monad.Ether.State.Class
26+import Control.Monad.Ether.State.Common
2427import Control.Monad.Trans.Ether.State.Lazy hiding (state, get, put)
src/Control/Monad/Ether/State/Strict.hs+5−2
@@ -4,7 +4,10 @@
44module Control.Monad.Ether.State.Strict
55 (
66 -- * MonadState class
7− MonadState(..)
7+ MonadState
8+ , get
9+ , put
10+ , state
811 , modify
912 , gets
1013 -- * The State monad
@@ -20,5 +23,5 @@ module Control.Monad.Ether.State.Strict
2023 , execStateT
2124 ) where
2225
23−import Control.Monad.Ether.State.Class
26+import Control.Monad.Ether.State.Common
2427import Control.Monad.Trans.Ether.State.Strict hiding (state, get, put)
src/Control/Monad/Trans/Ether/Except.hs−1
@@ -9,7 +9,6 @@
99{-# LANGUAGE AllowAmbiguousTypes #-}
1010{-# LANGUAGE TypeApplications #-}
1111{-# LANGUAGE ScopedTypeVariables #-}
12−{-# LANGUAGE MagicHash #-}
1312
1413-- | See "Control.Monad.Trans.Except".
1514
src/Control/Monad/Trans/Ether/State/Lazy.hs+22−22
@@ -6,7 +6,8 @@
66{-# LANGUAGE DataKinds #-}
77{-# LANGUAGE PolyKinds #-}
88{-# LANGUAGE GeneralizedNewtypeDeriving #-}
9−{-# LANGUAGE MagicHash #-}
9+{-# LANGUAGE AllowAmbiguousTypes #-}
10+{-# LANGUAGE ScopedTypeVariables #-}
1011
1112-- | See "Control.Monad.Trans.State.Lazy".
1213
@@ -29,7 +30,6 @@ module Control.Monad.Trans.Ether.State.Lazy
2930 , put
3031 ) where
3132
32−import GHC.Prim (Proxy#)
3333import Data.Functor.Identity (Identity(..))
3434import qualified Control.Monad.Trans.State.Lazy as Trans
3535import Control.Monad.Trans.Ether.Tagged
@@ -49,48 +49,48 @@ type State tag r = StateT tag r Identity
4949type StateT tag s = TaggedTrans tag (Trans.StateT s)
5050
5151-- | Constructor for computations in the state monad transformer.
52−stateT :: Proxy# tag -> (s -> m (a, s)) -> StateT tag s m a
53−stateT _ = pack . Trans.StateT
52+stateT :: forall tag s m a . (s -> m (a, s)) -> StateT tag s m a
53+stateT = pack . Trans.StateT
5454
5555-- | Constructor for computations in the state monad
5656-- (the inverse of 'runState').
57−state :: Monad m => Proxy# tag -> (s -> (a, s)) -> StateT tag s m a
58−state _ = pack . Trans.state
57+state :: forall tag s m a . Monad m => (s -> (a, s)) -> StateT tag s m a
58+state = pack . Trans.state
5959
6060-- | Runs a 'StateT' with the given initial state
6161-- and returns both the final value and the final state.
62−runStateT :: Proxy# tag -> StateT tag s m a -> s -> m (a, s)
63−runStateT _ = Trans.runStateT . unpack
62+runStateT :: forall tag s m a . StateT tag s m a -> s -> m (a, s)
63+runStateT = Trans.runStateT . unpack
6464
6565-- | Runs a 'StateT' with the given initial state
6666-- and returns the final value, discarding the final state.
67−evalStateT :: Monad m => Proxy# tag -> StateT tag s m a -> s -> m a
68−evalStateT _ = Trans.evalStateT . unpack
67+evalStateT :: forall tag s m a . Monad m => StateT tag s m a -> s -> m a
68+evalStateT = Trans.evalStateT . unpack
6969
7070-- | Runs a 'StateT' with the given initial state
7171-- and returns the final state, discarding the final value.
72−execStateT :: Monad m => Proxy# tag -> StateT tag s m a -> s -> m s
73−execStateT _ = Trans.execStateT . unpack
72+execStateT :: forall tag s m a . Monad m => StateT tag s m a -> s -> m s
73+execStateT = Trans.execStateT . unpack
7474
7575-- | Runs a 'State' with the given initial state
7676-- and returns both the final value and the final state.
77−runState :: Proxy# tag -> State tag s a -> s -> (a, s)
78−runState _ = Trans.runState . unpack
77+runState :: forall tag s a . State tag s a -> s -> (a, s)
78+runState = Trans.runState . unpack
7979
8080-- | Runs a 'State' with the given initial state
8181-- and returns the final value, discarding the final state.
82−evalState :: Proxy# tag -> State tag s a -> s -> a
83−evalState _ = Trans.evalState . unpack
82+evalState :: forall tag s a . State tag s a -> s -> a
83+evalState = Trans.evalState . unpack
8484
8585-- | Runs a 'State' with the given initial state
8686-- and returns the final state, discarding the final value.
87−execState :: Proxy# tag -> State tag s a -> s -> s
88−execState _ = Trans.execState . unpack
87+execState :: forall tag s a . State tag s a -> s -> s
88+execState = Trans.execState . unpack
8989
9090-- | Fetch the current value of the state within the monad.
91−get :: Monad m => Proxy# tag -> StateT tag s m s
92−get _ = pack Trans.get
91+get :: forall tag s m . Monad m => StateT tag s m s
92+get = pack Trans.get
9393
9494-- | Set the value of the state within the monad.
95−put :: Monad m => Proxy# tag -> s -> StateT tag s m ()
96−put _ = pack . Trans.put
95+put :: forall tag s m . Monad m => s -> StateT tag s m ()
96+put = pack . Trans.put
src/Control/Monad/Trans/Ether/State/Strict.hs+22−22
@@ -6,7 +6,8 @@
66{-# LANGUAGE DataKinds #-}
77{-# LANGUAGE PolyKinds #-}
88{-# LANGUAGE GeneralizedNewtypeDeriving #-}
9−{-# LANGUAGE MagicHash #-}
9+{-# LANGUAGE AllowAmbiguousTypes #-}
10+{-# LANGUAGE ScopedTypeVariables #-}
1011
1112-- | See "Control.Monad.Trans.State.Strict".
1213
@@ -29,7 +30,6 @@ module Control.Monad.Trans.Ether.State.Strict
2930 , put
3031 ) where
3132
32−import GHC.Prim (Proxy#)
3333import Data.Functor.Identity (Identity(..))
3434import qualified Control.Monad.Trans.State.Strict as Trans
3535import Control.Monad.Trans.Ether.Tagged
@@ -49,48 +49,48 @@ type State tag r = StateT tag r Identity
4949type StateT tag s = TaggedTrans tag (Trans.StateT s)
5050
5151-- | Constructor for computations in the state monad transformer.
52−stateT :: Proxy# tag -> (s -> m (a, s)) -> StateT tag s m a
53−stateT _ = pack . Trans.StateT
52+stateT :: forall tag s m a . (s -> m (a, s)) -> StateT tag s m a
53+stateT = pack . Trans.StateT
5454
5555-- | Constructor for computations in the state monad
5656-- (the inverse of 'runState').
57−state :: Monad m => Proxy# tag -> (s -> (a, s)) -> StateT tag s m a
58−state _ = pack . Trans.state
57+state :: forall tag s m a . Monad m => (s -> (a, s)) -> StateT tag s m a
58+state = pack . Trans.state
5959
6060-- | Runs a 'StateT' with the given initial state
6161-- and returns both the final value and the final state.
62−runStateT :: Proxy# tag -> StateT tag s m a -> s -> m (a, s)
63−runStateT _ = Trans.runStateT . unpack
62+runStateT :: forall tag s m a . StateT tag s m a -> s -> m (a, s)
63+runStateT = Trans.runStateT . unpack
6464
6565-- | Runs a 'StateT' with the given initial state
6666-- and returns the final value, discarding the final state.
67−evalStateT :: Monad m => Proxy# tag -> StateT tag s m a -> s -> m a
68−evalStateT _ = Trans.evalStateT . unpack
67+evalStateT :: forall tag s m a . Monad m => StateT tag s m a -> s -> m a
68+evalStateT = Trans.evalStateT . unpack
6969
7070-- | Runs a 'StateT' with the given initial state
7171-- and returns the final state, discarding the final value.
72−execStateT :: Monad m => Proxy# tag -> StateT tag s m a -> s -> m s
73−execStateT _ = Trans.execStateT . unpack
72+execStateT :: forall tag s m a . Monad m => StateT tag s m a -> s -> m s
73+execStateT = Trans.execStateT . unpack
7474
7575-- | Runs a 'State' with the given initial state
7676-- and returns both the final value and the final state.
77−runState :: Proxy# tag -> State tag s a -> s -> (a, s)
78−runState _ = Trans.runState . unpack
77+runState :: forall tag s a . State tag s a -> s -> (a, s)
78+runState = Trans.runState . unpack
7979
8080-- | Runs a 'State' with the given initial state
8181-- and returns the final value, discarding the final state.
82−evalState :: Proxy# tag -> State tag s a -> s -> a
83−evalState _ = Trans.evalState . unpack
82+evalState :: forall tag s a . State tag s a -> s -> a
83+evalState = Trans.evalState . unpack
8484
8585-- | Runs a 'State' with the given initial state
8686-- and returns the final state, discarding the final value.
87−execState :: Proxy# tag -> State tag s a -> s -> s
88−execState _ = Trans.execState . unpack
87+execState :: forall tag s a . State tag s a -> s -> s
88+execState = Trans.execState . unpack
8989
9090-- | Fetch the current value of the state within the monad.
91−get :: Monad m => Proxy# tag -> StateT tag s m s
92−get _ = pack Trans.get
91+get :: forall tag s m . Monad m => StateT tag s m s
92+get = pack Trans.get
9393
9494-- | Set the value of the state within the monad.
95−put :: Monad m => Proxy# tag -> s -> StateT tag s m ()
96−put _ = pack . Trans.put
95+put :: forall tag s m . Monad m => s -> StateT tag s m ()
96+put = pack . Trans.put
test/Regression/T1.hs+1−1
@@ -1,6 +1,6 @@
11module Regression.T1 (test1) where
22
3−import Control.Monad.Ether.Ambiguous
3+import Control.Monad.Ether
44import Control.Ether.Abbr
55
66import Test.Tasty
test/Regression/T3.hs+1−1
@@ -1,7 +1,7 @@
11module Regression.T3 (test3) where
22
33import Control.Ether.Abbr
4−import Control.Monad.Ether.Ambiguous
4+import Control.Monad.Ether
55
66import qualified Control.Monad.Reader as T
77import qualified Control.Monad.State as T
test/Regression/T4.hs+1−1
@@ -1,7 +1,7 @@
11module Regression.T4 (test4) where
22
33import Control.Ether.Abbr
4−import Control.Monad.Ether.Ambiguous
4+import Control.Monad.Ether
55
66import Test.Tasty
77import Test.Tasty.QuickCheck
test/Regression/T7.hs+1−1
@@ -3,7 +3,7 @@ module Regression.T7 (test7) where
33import Data.Monoid
44import Control.Monad
55
6−import Control.Monad.Ether.Ambiguous
6+import Control.Monad.Ether
77import qualified Control.Monad.Writer as T
88
99import Test.Tasty
test/Regression/T8.hs+1−1
@@ -1,7 +1,7 @@
11module Regression.T8 (test8) where
22
33import Control.Ether.Abbr
4−import Control.Monad.Ether.Ambiguous
4+import Control.Monad.Ether
55
66import qualified Control.Monad.State as T
77
test/Regression/T9.hs+1−1
@@ -1,7 +1,7 @@
11module Regression.T9 (test9) where
22
33import Control.Ether.Abbr
4−import Control.Monad.Ether.Ambiguous
4+import Control.Monad.Ether
55
66import Test.Tasty
77import Test.Tasty.QuickCheck