Looking for help writing some GHC RULES

wren romano winterkoninkje at gmail.com
Tue Jul 22 22:53:50 UTC 2014

On Tue, Jul 22, 2014 at 6:42 PM, David Feuer <david.feuer at gmail.com> wrote:
> I'm looking for some help writing some translate/untranslate rules to
> implement fusion for a couple of basic functions (the ones I'm looking at
> right now are takeWhile and scanr, but there may be others). I have a
> translation for takeWhile that seems to be at least decent, and one for
> scanr that is completely untested. I've never mucked about with GHC RULES,
> however, so I don't even know where to begin.

Probably the best place to start is to take a look at the source for
GHC.Base and GHC.List, in particular the rules for map and filter
capture the overarching pattern of how to stage the different rules.


Live well,

More information about the Libraries mailing list