From 323bd8113f996bad1871f8d6c9e814eacb1ab252 Mon Sep 17 00:00:00 2001 From: ElvishJerricco Date: Wed, 2 Mar 2016 05:50:41 -0500 Subject: [PATCH] Use Data.Proxy instead of ProxyState --- src/Control/Monad/Freer/State.hs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Control/Monad/Freer/State.hs b/src/Control/Monad/Freer/State.hs index e08ecfb..0a78c1f 100644 --- a/src/Control/Monad/Freer/State.hs +++ b/src/Control/Monad/Freer/State.hs @@ -25,11 +25,11 @@ module Control.Monad.Freer.State ( put, runState, - ProxyState(..), transactionState ) where import Control.Monad.Freer.Internal +import Data.Proxy -------------------------------------------------------------------------------- -- State, strict -- @@ -57,14 +57,12 @@ runState (E u q) s = case decomp u of Left u' -> E u' (tsingleton (\x -> runState (qApp q x) s)) -data ProxyState s = ProxyState - -- | -- An encapsulated State handler, for transactional semantics -- The global state is updated only if the transactionState finished -- successfully transactionState :: forall s r w. Member (State s) r => - ProxyState s -> Eff r w -> Eff r w + Proxy s -> Eff r w -> Eff r w transactionState _ m = do s <- get; loop s m where loop :: s -> Eff r w -> Eff r w