[jhc] Success with strictness
John Meacham
john at repetae.net
Fri Sep 4 19:42:45 EDT 2009
On Fri, Sep 04, 2009 at 04:27:34PM -0700, Taral wrote:
> --- old-jhc/src/FrontEnd/Tc/Monad.hs 2009-09-04 16:27:03.000000000 -0700
> +++ new-jhc/src/FrontEnd/Tc/Monad.hs 2009-09-04 16:27:04.000000000 -0700
> @@ -50,7 +50,7 @@
>
> import Control.Monad.Error
> import Control.Monad.Reader
> -import Control.Monad.Writer
> +import Control.Monad.Writer.Strict
> import qualified Data.Traversable as T
> import qualified Data.Foldable as T
> import qualified Data.Sequence as Seq
>
> Allows compilation of containers with 750m max heap. Takes a couple
> tries, though, which implies we still may have some leaks.
Ah, excellent! I was wondering whether lazy writer monads were hurting
me. A lot of the written data is 'mempty' so if those are lazily being
stored up, I could see that leaking memory. I use Writer monads all over
the place, I wonder if the strict versions will help in other places.
John
--
John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/
More information about the jhc
mailing list