Authors
Andrew Farmer, Christian Höner zu Siederdissen, Andy Gill
Publication date
2014/1/11
Conference
Proceedings of the ACM SIGPLAN 2014 workshop on Partial evaluation and program manipulation
Pages
97-108
Publisher
ACM
Description
Stream Fusion, a popular deforestation technique in the Haskell community, cannot fuse the concatMap combinator. This is a serious limitation, as concatMap represents computations on nested streams. The original implementation of Stream Fusion used the Glasgow Haskell Compiler's user-directed rewriting system. A transformation which allows the compiler to fuse many uses of concatMap has previously been proposed, but never implemented, because the host rewrite system was not expressive enough to implement the proposed transformation. In this paper, we develop a custom optimization plugin which implements the proposed concatMap transformation, and study the effectiveness of the transformation in practice. We also provide a new translation scheme for list comprehensions which enables them to be optimized. Within this framework, we extend the transformation to monadic streams. Code featuring …
Total citations
2013201420152016201720182019202020212022202320241467312111
Scholar articles
A Farmer, C Hoener zu Siederdissen, A Gill - Proceedings of the ACM SIGPLAN 2014 workshop on …, 2014