We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f33bee commit a6765f4Copy full SHA for a6765f4
src/Control/Monad/Reader/Trans.purs
@@ -102,10 +102,8 @@ instance distributiveReaderT :: (Distributive g) => Distributive (ReaderT e g) w
102
collect f = distribute <<< map f
103
104
instance monadRecReaderT :: (MonadRec m) => MonadRec (ReaderT r m) where
105
- tailRecM k a = ReaderT \r -> tailRecM k' (Tuple a r)
+ tailRecM k a = ReaderT \r -> tailRecM (k' r) a
106
where
107
- k' (Tuple a r) = do
+ k' r a = do
108
result <- runReaderT (k a) r
109
- return case result of
110
- Left a -> Left (Tuple a r)
111
- Right b -> Right b
+ return $ either Left Right result
0 commit comments