[GHC] #1127: Make mtl lazier

GHC trac at galois.com
Wed Jan 31 07:44:57 EST 2007


#1127: Make mtl lazier
-------------------------------+--------------------------------------------
 Reporter:  igloo              |          Owner:         
     Type:  proposal           |         Status:  new    
 Priority:  normal             |      Milestone:  Not GHC
Component:  libraries (other)  |        Version:  6.6    
 Severity:  normal             |     Resolution:         
 Keywords:                     |     Difficulty:  Unknown
 Testcase:                     |   Architecture:  Unknown
       Os:  Unknown            |  
-------------------------------+--------------------------------------------
Changes (by igloo):

  * summary:  Make StateT in mtl truly lazy => Make mtl lazier

Old description:

> The StateT monad gives every impression of intending to be lazy, but the
> absence of a ~ means that it isn't fully lazy. This bit me in the
> compression library, meaning I currently bundle a LazyStateT module that
> provides essentially StateT with this change. There was also a recent
> discussion about it on one of the mailing lists:
> http://www.haskell.org/pipermail/haskell-cafe/2007-January/021244.html
>
> I propose making StateT lazy.
>
> Deadline: 28 February 2007.

New description:

 I propose making mtl lazier. Currently the transformers force tuples to
 WHNF as they put them on the left of <- in do blocks. I suspect this was
 unintentional, and makes them less lazy than their non-transformer
 counterparts.

 For example, the StateT monad gives every impression of intending to be
 lazy, but the absence of a ~ means that it isn't fully lazy. This bit me
 in the compression library, meaning I currently bundle a LazyStateT module
 that provides essentially StateT with this change. There was also a recent
 discussion about it on one of the mailing lists:
 http://www.haskell.org/pipermail/haskell-cafe/2007-January/021244.html

 Deadline: 28 February 2007.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1127>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list