From f7934c21ae1f88047edc4afd93c078644f2f130b Mon Sep 17 00:00:00 2001 From: Matthew Pickering <matthewtpickering@gmail.com> Date: Fri, 12 Feb 2021 15:24:32 +0000 Subject: [PATCH] Make local strict --- Control/Monad/Trans/Reader.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Control/Monad/Trans/Reader.hs b/Control/Monad/Trans/Reader.hs index 25e3ad2..b655c09 100644 --- a/Control/Monad/Trans/Reader.hs +++ b/Control/Monad/Trans/Reader.hs @@ -129,7 +129,7 @@ withReaderT :: (r' -> r) -- ^ The function to modify the environment. -> ReaderT r m a -- ^ Computation to run in the modified environment. -> ReaderT r' m a -withReaderT f m = ReaderT $ runReaderT m . f +withReaderT f m = ReaderT $ \x -> runReaderT m $! f x {-# INLINE withReaderT #-} instance (Functor m) => Functor (ReaderT r m) where -- GitLab