Re: space leak in base or mtl

At the least transformers should probably provide the manual overrides for
<* and *> for all of the monad transformer data types.
That should fix these cases.
-Edward
On Thu, Oct 6, 2016 at 5:08 AM, Zoran Bosnjak
Dear base and mtl maintainers, I would like to report a memory leak problem (not sure which haskell component) when using "forever" in combination with "readerT" or "stateT". Simple test program to reproduce the problem: --- import Control.Concurrent import Control.Monad import Control.Monad.Trans import Control.Monad.Trans.Reader import Control.Monad.Trans.State
main :: IO () main = do -- no leak when using loop1 instead of loop2 --let loop1 = (liftIO $ threadDelay 1) >> loop1 let loop2 = forever (liftIO $ threadDelay 1)
_ <- runStateT (runReaderT loop2 'a') 'b' return () ---
I have asked on haskell-cafe, but the analysis is above my haskell knowledge: https://mail.haskell.org/pipermail/haskell-cafe/2016-October/125176.html https://mail.haskell.org/pipermail/haskell-cafe/2016-October/125177.html https://mail.haskell.org/pipermail/haskell-cafe/2016-October/125178.html
regards, Zoran
participants (1)
-
Edward Kmett