Closed Gabriella439 closed 5 years ago
Related to https://github.com/Gabriel439/Haskell-Pipes-Library/issues/15#issuecomment-522994157
forever began to leak for pipes in #194 due to removing the leak-free implementation of the (*>) operator.
forever
pipes
(*>)
Specifically, forever is implemented as:
forever a = let a' = a *> a' in a'
... and in the absence of a specialized implementation of the (*>) operator, it falls back on the default implementation, which is:
a1 *> a2 = (id <$ a1) <*> a2
Unfortunately, that implementation leaks space, which is why pipes requires a more efficient implementation, which this change restores.
Related to https://github.com/Gabriel439/Haskell-Pipes-Library/issues/15#issuecomment-522994157
forever
began to leak forpipes
in #194 due to removing the leak-free implementation of the(*>)
operator.Specifically,
forever
is implemented as:... and in the absence of a specialized implementation of the
(*>)
operator, it falls back on the default implementation, which is:Unfortunately, that implementation leaks space, which is why
pipes
requires a more efficient implementation, which this change restores.