[GHC] #7162: RULES that never fire (automatically)

GHC cvs-ghc at haskell.org
Sun Aug 19 04:09:23 CEST 2012


#7162: RULES that never fire (automatically)
------------------------------+---------------------------------------------
 Reporter:  andygill          |          Owner:                  
     Type:  feature request   |         Status:  new             
 Priority:  normal            |      Component:  Compiler        
  Version:  7.4.2             |       Keywords:                  
       Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
  Failure:  None/Unknown      |       Testcase:                  
Blockedby:                    |       Blocking:                  
  Related:                    |  
------------------------------+---------------------------------------------
 We want a way of having GHC RULES known by GHC, but not used by the
 optimizer.

 HERMIT, a interactive plugin for GHC that applies rules - and as well as
 built in rules (like alpha conversion, beta-reduction, etc) - also provide
 access to the named GHC RULES. Here is the rub: We want to use GHC RULES
 that are parsed and typed checked like normal rules, are visible to the
 HERMIT system, but never run by the simplifier. Currently we can say
  - attempt this *before* this (opt) pass, or
  - attempt *after* this pass, there is no way of saying
  - *never* attempt.

 We were thinking

     {-# RULES [~] "map/map" forall f g . map f (map g xs) = map (f.g) xs
 #-}

 Where the [~] says *never* execute this without be explicitly asked,
 following on from the [~0] which does not run in first pass.

 We happy making the required changes.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7162>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the Glasgow-haskell-bugs mailing list