Making rule application less fragile

Don Stewart dons at galois.com
Thu Mar 13 18:32:46 EDT 2008


johan.tibell:
> On Thu, Mar 13, 2008 at 11:24 PM, Don Stewart <dons at galois.com> wrote:
> > Hey Johan,
> >
> >  The main thing to remember is that anything you wish to match on
> >  in a rule needs to not be inlined in the first pass.
> >
> >  So to match "many" or "satisfy" robustly, you'll need:
> >
> >     {-# NOINLINE [1] many #-}
> >
> >  For example.
> 
> Does that mean that I should add a [2] to my rules so they are run
> after? I guess it doesn't hurt to try them earlier.

Right, the rules can run anytime. You want them to run before many gets
inlined.


More information about the Glasgow-haskell-users mailing list