desperately seeking RULES help

Don Stewart dons at galois.com
Mon Jun 9 18:10:44 EDT 2008


claus.reinke:
> >Here it is:
> >
> >{-# OPTIONS_GHC -O2 -Wall -fglasgow-exts -ddump-simpl #-}
> >-- compile with: ghc -fno-method-sharing -c F.hs
> 
> thanks! it seems i misread the users guide (or is this a bug?).
> i used -frewrite-rules ("Switch on all rewrite rules"), which 
> does not(!) work, instead of -fglasgow-exts, which does 
> work (ghc-6.9.20080514, booted from 6.6.1). 
> 
> i learned something new,-)

Right. There are two things here:

    1) -frewrite-rules

enables rules to fire.

    2) -fglasgow-exts

enables parsing of RULES pragmas, and their interpretation.

You need both if you wish to both write your own rules, and have them
fire.

-- Don


More information about the Glasgow-haskell-users mailing list