
On Thursday 16 September 2010 16:39:56, Daniel Fischer wrote:
The current implementation of Data.List.intersperse causes a space leak under certain not uncommon circumstances. Trac ticket: http://hackage.haskell.org/trac/ghc/ticket/4282 The proposed implementation,
intersperse :: a -> [a] -> [a] intersperse _ [] = [] intersperse sep (x:xs) = x : go xs where go [] = [] go (y:ys) = sep : y : go ys
changes the semantics from
intersperse sep (x : _|_) = _|_
to
intersperse sep (x : _|_) = x : _|_
apart from that, I think only the run-time behaviour is changed.
Period of discussion: Two weeks, until 30 Sep. 2010.
Cheers, Daniel
As Duncan pointed out, I've omitted to make explicit that this change would also affect Data.List.intercalate, changing its behaviour from intercalate sep (xs : _|_) = _|_ to intercalate sep (xs : _|_) = xs ++ _|_ I would like to include that explicitly in the proposal.