Re: [Haskell-cafe] List Fusion of concatMap

2011-12-01 Thread Joachim Breitner
Hi, Am Donnerstag, den 01.12.2011, 21:44 +0100 schrieb Joachim Breitner: Does ghc treat list comprehensions differently here? I could answer this by looking at compiler/deSugar/DsListComp.lhs in the GHC source: List comprehensions may be desugared in one of two ways:

Re: [Haskell-cafe] List Fusion of concatMap

2011-12-01 Thread Joachim Breitner
Hi, Am Donnerstag, den 01.12.2011, 22:16 +0100 schrieb Joachim Breitner: This would motivate the following definition for a fusionable concatMap, going via list comprehensions and their translation to ideal list fusion consumers/producers: concatMap f xs == [ y | x - xs, y - f x ] ==