Skip to content

forever contains a space leak

  1. 9.0.0's forever (implemented in terms of Applicative) has a space leak for certain base Monads. The old forever (implemented in terms of Monad) does not.

See these messages for details

This is not necessarily forever's fault. It seems likely that the broken behaviour that occurs with ReaderT and StateT (on IO) could be fixed by a specialised implementation of *> (for ReaderT and StateT).

Perhaps, then, this bug should ultimately be fixed in transformers (and various other packages which supply Applicatives) but it is a regression introduced by base-4.9.0.0 so I think it's worthwhile to discuss here.

Trac metadata
Trac field Value
Version 8.0.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component libraries/base
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information