packages feed

potoki-core 2.1.0.1 → 2.2

raw patch · 2 files changed

+5/−5 lines, 2 files

Files

library/Potoki/Core/Transform/State.hs view
@@ -15,7 +15,7 @@ the "list" transform. -} {-# INLINE runState #-}-runState :: (input -> O.State state output) -> state -> Transform input (state, output)+runState :: (input -> O.State state output) -> state -> Transform input (output, state) runState stateFn initialState =   Transform $ \ (A.Fetch fetchIO) -> M.Acquire $ do     stateRef <- newIORef initialState@@ -26,15 +26,15 @@           case O.runState (stateFn input) currentState of             (output, newState) -> do               writeIORef stateRef newState-              return (Just (newState, output))+              return (Just (output, newState))         Nothing -> return Nothing  {-# INLINE evalState #-} evalState :: (input -> O.State state output) -> state -> Transform input output evalState stateFn initialState =-  runState stateFn initialState >>> arr snd+  rmap fst (runState stateFn initialState)  {-# INLINE execState #-} execState :: (input -> O.State state output) -> state -> Transform input state execState stateFn initialState =-  runState stateFn initialState >>> arr fst+  rmap snd (runState stateFn initialState)
potoki-core.cabal view
@@ -1,7 +1,7 @@ name:   potoki-core version:-  2.1.0.1+  2.2 synopsis:   Low-level components of "potoki" description: