--- 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. -- Taral <taralx@gmail.com> "Please let me know if there's any further trouble I can give you." -- Unknown
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/
On Fri, Sep 4, 2009 at 4:42 PM, John Meacham<john@repetae.net> wrote:
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.
It depends. If you are using 'tell (f large_thing)' where (f large_thing) === mempty, then yes. -- Taral <taralx@gmail.com> "Please let me know if there's any further trouble I can give you." -- Unknown
On Fri, Sep 04, 2009 at 04:52:12PM -0700, Taral wrote:
On Fri, Sep 4, 2009 at 4:42 PM, John Meacham<john@repetae.net> wrote:
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.
It depends. If you are using 'tell (f large_thing)' where (f large_thing) === mempty, then yes.
I was thinking more of the 'mappend's introduced by every (>>) and (>>=). John -- John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/
On Fri, Sep 4, 2009 at 4:53 PM, John Meacham<john@repetae.net> wrote:
I was thinking more of the 'mappend's introduced by every (>>) and (>>=).
Oh, those. I think there's some optimizer trickery to rewrite (mappend x mempty) to x. -- Taral <taralx@gmail.com> "Please let me know if there's any further trouble I can give you." -- Unknown
On Fri, Sep 4, 2009 at 4:55 PM, Taral<taralx@gmail.com> wrote:
Oh, those. I think there's some optimizer trickery to rewrite (mappend x mempty) to x.
Or not. Looks like that's only for builtin monoids. -- Taral <taralx@gmail.com> "Please let me know if there's any further trouble I can give you." -- Unknown
participants (2)
-
John Meacham -
Taral