Skip to content

Commit 37fbd2c

Browse files
author
Alex Gryzlov
committed
fix name shadowing
1 parent ad6f912 commit 37fbd2c

File tree

9 files changed

+21
-21
lines changed

9 files changed

+21
-21
lines changed

src/Control/Comonad/Env/Class.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ instance comonadAskEnvT :: Comonad w => ComonadAsk e (EnvT e w) where
4343

4444
instance comonadEnvEnvT :: Comonad w => ComonadEnv e (EnvT e w) where
4545
local f (EnvT x) = EnvT case x of
46-
Tuple x y -> Tuple (f x) y
46+
Tuple y z -> Tuple (f y) z

src/Control/Comonad/Traced/Trans.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ instance functorTracedT :: Functor w => Functor (TracedT t w) where
2929
map f (TracedT w) = TracedT ((\g t -> f $ g t) <$> w)
3030

3131
instance extendTracedT :: (Extend w, Semigroup t) => Extend (TracedT t w) where
32-
extend f (TracedT w) = TracedT ((\w t -> f $ TracedT ((\h t' -> h $ t <> t') <$> w)) <<= w)
32+
extend f (TracedT w) = TracedT ((\w' t -> f $ TracedT ((\h t' -> h $ t <> t') <$> w')) <<= w)
3333

3434
instance comonadTracedT :: (Comonad w, Monoid t) => Comonad (TracedT t w) where
3535
extract (TracedT w) = extract w mempty

src/Control/Monad/Except/Trans.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ withExceptT :: forall e e' m a. Functor m => (e -> e') -> ExceptT e m a -> Excep
4242
withExceptT f (ExceptT t) = ExceptT $ map (mapLeft f) t
4343
where
4444
mapLeft _ (Right x) = Right x
45-
mapLeft f (Left x) = Left (f x)
45+
mapLeft f' (Left x) = Left (f' x)
4646

4747
-- | Transform the unwrapped computation using the given function.
4848
mapExceptT :: forall e e' m n a b. (m (Either e a) -> n (Either e' b)) -> ExceptT e m a -> ExceptT e' n b

src/Control/Monad/List/Trans.purs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,14 @@ wrapLazy v = ListT $ pure (Skip v)
117117
unfold :: forall f a z. Monad f => (z -> f (Maybe (Tuple z a))) -> z -> ListT f a
118118
unfold f z = ListT $ g <$> f z
119119
where
120-
g (Just (Tuple z a)) = Yield a (defer \_ -> unfold f z)
120+
g (Just (Tuple z' a)) = Yield a (defer \_ -> unfold f z')
121121
g Nothing = Done
122122

123123
-- | Generate an infinite list by iterating a function.
124124
iterate :: forall f a. Monad f => (a -> a) -> a -> ListT f a
125125
iterate f a = unfold g a
126126
where
127-
g a = pure $ Just (Tuple (f a) a)
127+
g x = pure $ Just (Tuple (f x) x)
128128

129129
-- | Generate an infinite list by repeating a value.
130130
repeat :: forall f a. Monad f => a -> ListT f a
@@ -255,7 +255,7 @@ instance functorListT :: Functor f => Functor (ListT f) where
255255
instance unfoldableListT :: Monad f => Unfoldable (ListT f) where
256256
unfoldr f b = go (f b)
257257
where go Nothing = nil
258-
go (Just (Tuple a b)) = cons (pure a) (defer \_ -> (go (f b)))
258+
go (Just (Tuple x y)) = cons (pure x) (defer \_ -> (go (f y)))
259259

260260
instance applyListT :: Monad f => Apply (ListT f) where
261261
apply = ap
@@ -267,7 +267,7 @@ instance bindListT :: Monad f => Bind (ListT f) where
267267
bind fa f = stepMap g fa where
268268
g (Yield a s) = Skip (h <$> s)
269269
where
270-
h s = f a <> (s >>= f)
270+
h s' = f a <> (s' >>= f)
271271
g (Skip s) = Skip ((_ >>= f) <$> s)
272272
g Done = Done
273273

src/Control/Monad/RWS/Trans.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,5 +113,5 @@ instance monadRecRWST :: (MonadRec m, Monoid w) => MonadRec (RWST r w s m) where
113113
RWST m -> do
114114
RWSResult state' result' writer' <- m r state
115115
pure case result' of
116-
Loop a -> Loop (RWSResult state' a (writer <> writer'))
117-
Done b -> Done (RWSResult state' b (writer <> writer'))
116+
Loop x -> Loop (RWSResult state' x (writer <> writer'))
117+
Done y -> Done (RWSResult state' y (writer <> writer'))

src/Control/Monad/Reader/Trans.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ instance monadEffReader :: MonadEff eff m => MonadEff eff (ReaderT r m) where
8282

8383
instance monadContReaderT :: MonadCont m => MonadCont (ReaderT r m) where
8484
callCC f = ReaderT \r -> callCC \c ->
85-
case f (ReaderT <<< const <<< c) of ReaderT f -> f r
85+
case f (ReaderT <<< const <<< c) of ReaderT f' -> f' r
8686

8787
instance monadErrorReaderT :: MonadError e m => MonadError e (ReaderT r m) where
8888
throwError = lift <<< throwError
@@ -112,4 +112,4 @@ instance distributiveReaderT :: Distributive g => Distributive (ReaderT e g) whe
112112
instance monadRecReaderT :: MonadRec m => MonadRec (ReaderT r m) where
113113
tailRecM k a = ReaderT \r -> tailRecM (k' r) a
114114
where
115-
k' r a = case k a of ReaderT f -> pure =<< f r
115+
k' r a' = case k a' of ReaderT f -> pure =<< f r

src/Control/Monad/State.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ evalState (StateT m) s = case m s of Identity (Tuple a _) -> a
3434

3535
-- | Run a computation in the `State` monad, discarding the result
3636
execState :: forall s a. State s a -> s -> s
37-
execState (StateT m) s = case m s of Identity (Tuple _ s) -> s
37+
execState (StateT m) s = case m s of Identity (Tuple _ s') -> s'
3838

3939
-- | Change the type of the result in a `State` action
4040
mapState :: forall s a b. (Tuple a s -> Tuple b s) -> State s a -> State s b

src/Control/Monad/State/Trans.purs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ instance monadStateT :: Monad m => Monad (StateT s m)
8282
instance monadRecStateT :: MonadRec m => MonadRec (StateT s m) where
8383
tailRecM f a = StateT \s -> tailRecM f' (Tuple a s)
8484
where
85-
f' (Tuple a s) =
86-
case f a of StateT st ->
85+
f' (Tuple a' s) =
86+
case f a' of StateT st ->
8787
st s >>= \(Tuple m s1) ->
8888
pure case m of
89-
Loop a -> Loop (Tuple a s1)
90-
Done b -> Done (Tuple b s1)
89+
Loop x -> Loop (Tuple x s1)
90+
Done y -> Done (Tuple y s1)
9191

9292
instance monadZeroStateT :: MonadZero m => MonadZero (StateT s m)
9393

@@ -106,7 +106,7 @@ instance monadEffState :: MonadEff eff m => MonadEff eff (StateT s m) where
106106

107107
instance monadContStateT :: MonadCont m => MonadCont (StateT s m) where
108108
callCC f = StateT \s -> callCC \c ->
109-
case f (\a -> StateT \s' -> c (Tuple a s')) of StateT f -> f s
109+
case f (\a -> StateT \s' -> c (Tuple a s')) of StateT f' -> f' s
110110

111111
instance monadErrorStateT :: MonadError e m => MonadError e (StateT s m) where
112112
throwError e = lift (throwError e)

src/Control/Monad/Writer/Trans.purs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@ instance monadWriterT :: (Monoid w, Monad m) => Monad (WriterT w m)
7979
instance monadRecWriterT :: (Monoid w, MonadRec m) => MonadRec (WriterT w m) where
8080
tailRecM f a = WriterT $ tailRecM f' (Tuple a mempty)
8181
where
82-
f' (Tuple a w) =
83-
case f a of WriterT wt ->
82+
f' (Tuple a' w) =
83+
case f a' of WriterT wt ->
8484
wt >>= \(Tuple m w1) ->
8585
pure case m of
86-
Loop a -> Loop (Tuple a (w <> w1))
87-
Done b -> Done (Tuple b (w <> w1))
86+
Loop x -> Loop (Tuple x (w <> w1))
87+
Done y -> Done (Tuple y (w <> w1))
8888

8989
instance monadZeroWriterT :: (Monoid w, MonadZero m) => MonadZero (WriterT w m)
9090

0 commit comments

Comments
 (0)