Looking for list comprehensions use cases

Christian Höner zu Siederdissen choener at tbi.univie.ac.at
Wed Jul 23 12:28:27 UTC 2014

Hi Janek,

yes to both -- in a way. See Section 5.3 here for lists:

For my usual work, I use stream fusion and manually 'flatten' everything
in all of ADPfusion and rather large bunch of other work building on top
of that. ;-)

Giegerich's original ADP is full or list comprehensions -- every single
function uses them, and does not require a lot of additional machinery
to run.

Note that if you want to introduce deep optimizations, it'll be a larger
project. See also Coutts' phd thesis ([2] in our paper), and the
original stream fusion paper [3].



[2] D. Coutts. Stream Fusion: Practical Shortcut Fusion for Coinductive
Sequence Types. PhD thesis, University of Oxford, 2010.
[3] D. Coutts, R. Leshchinskiy, and D. Stewart. Stream fusion: From
to streams to nothing at all. In Proceedings of the 12th ACM SIGPLAN
International Conference on Functional Programming, pages 315–
326, Freiburg, Germany, 2007. ACM.

* Jan Stolarek <jan.stolarek at p.lodz.pl> [23.07.2014 13:57]:
> Haskellers,
> recently I've been looking into the possibility of creating some new optimisations for GHC. These 
> would be mostly aimed at list comprehensions. Here's where I need your help:
> 1. Do you have complex list comprehensions usage examples from real code? By complex I mean  
> nested list comprehensions, reading from more than one list ([ ...| x <- xs, y <- ys ... ]) etc.
> 2. Do you have list comprehensions code that you had to optimize by hand because GHC was unable to 
> make them fast enough?
> Janek
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users at haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20140723/f3929d84/attachment.sig>

More information about the Glasgow-haskell-users mailing list