forever contains a space leak
- 9.0.0's
forever(implemented in terms ofApplicative) has a space leak for certain baseMonads. The oldforever(implemented in terms ofMonad) does not.
See these messages for details
- https://mail.haskell.org/pipermail/haskell-cafe/2016-October/125177.html
- https://mail.haskell.org/pipermail/haskell-cafe/2016-October/125178.html
- https://mail.haskell.org/pipermail/haskell-cafe/2016-November/125443.html
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 |