space leak in base or mtl
Edward Kmett
ekmett at gmail.com
Thu Oct 6 11:25:48 UTC 2016
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 <zoran.bosnjak at via.si> wrote:
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20161006/a9547c74/attachment.html>
More information about the Libraries
mailing list