Changes between Initial Version and Version 1 of Ticket #7162


Ignore:
Timestamp:
Aug 21, 2012 9:56:00 AM (20 months ago)
Author:
simonpj
Comment:

I think I'm ok with this. All the machinery is there already except for the concrete syntax to say "never execute".

The only question in my mind is whether to be a bit more explicit by saying

  {-# RULES [NEVER] "map/map" ... #-}

but that means more work in the lexer, so it probably isn't worth it. I don't feel strongly.

Simon

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #7162

    • Property Difficulty changed from to Unknown
  • Ticket #7162 – Description

    initial v1  
    22 
    33HERMIT, 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  
    4  - attempt this *before* this (opt) pass, or  
    5  - attempt *after* this pass, there is no way of saying  
    6  - *never* attempt. 
     4 - attempt this '''before''' this (opt) pass, or  
     5 - attempt '''after''' this pass,  
     6but there is no way of saying  
     7 - '''never''' attempt. 
    78 
    89We were thinking 
     10{{{ 
     11    {-# RULES [~] "map/map" forall f g . map f (map g xs) = map (f.g) xs #-} 
     12}}} 
     13Where the `[~]` says *never* execute this without be explicitly asked, following on from the `[~0]` which does not run in first pass. 
    914 
    10     {-# RULES [~] "map/map" forall f g . map f (map g xs) = map (f.g) xs #-} 
     15We are happy making the required changes. 
    1116 
    12 Where the [~] says *never* execute this without be explicitly asked, following on from the [~0] which does not run in first pass. 
    13  
    14 We happy making the required changes. 
    15