Skip to content

Commit 6506d48

Browse files
committed
[Refactor] Remove superfluous lazy pattern match
1 parent 2033934 commit 6506d48

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎Control/Monad/Trans/State/Lazy.hs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,15 +168,15 @@ newtype StateT s m a = StateT { runStateT :: s -> m (a,s) }
168168
--
169169
-- * @'evalStateT' m s = 'liftM' 'fst' ('runStateT' m s)@
170170
evalStateT :: Functor m => StateT s m a -> s -> m a
171-
evalStateT m s = (\(~(a, _)) -> a) <$> runStateT m s
171+
evalStateT m s = (\(a, _) -> a) <$> runStateT m s
172172
{-# INLINE evalStateT #-}
173173

174174
-- | Evaluate a state computation with the given initial state
175175
-- and return the final state, discarding the final value.
176176
--
177177
-- * @'execStateT' m s = 'liftM' 'snd' ('runStateT' m s)@
178178
execStateT :: Functor m => StateT s m a -> s -> m s
179-
execStateT m s = (\(~(_, s')) -> s') <$> runStateT m s
179+
execStateT m s = (\(_, s') -> s') <$> runStateT m s
180180
{-# INLINE execStateT #-}
181181

182182
-- | Map both the return value and final state of a computation using

0 commit comments

Comments
 (0)