| I want to use rules to avoid the generation of intermediate lists.
| Therefore I need to know how list-comprehensions of the following
| form are translated:
|  [f a | a <- as]
| Is this:
|  map f as?

No.  But you can be sure that any list comprehension will be
translated to something of the form

        build f

for some f.  Furthermore, every generator
        x <- <expression>
will be translated to a form that consumes <expression> with
a foldr.

That should be enough, I think.

Simon

Reply via email to