Ticket #7162 (closed feature request: fixed)
RULES that never fire (automatically)
| Reported by: | andygill | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.8.1 |
| Component: | Compiler | Version: | 7.7 |
| Keywords: | Cc: | afarmer@…, simonpj@… | |
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | None/Unknown | Difficulty: | Unknown |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description (last modified by simonpj) (diff)
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,
but 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 are happy making the required changes.

