HORIZON HASKELLDocslts/ghc-10.0.x04404a62026-10-19Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 04404a6 · 2026-10-19

Moduleghc-10.0.0.20260917GHC2024

GHC.Core.Rules

Functions for collecting together and applying rewrite rules to a module. The CoreRule datatype itself is declared elsewhere.

Contents
  1. Looking up rules
  2. RuleBase, RuleEnv
  3. Checking rule applications
  4. Manipulating RuleInfo rules
  5. RuleBase and RuleEnv
  6. Misc. CoreRule helpers
  7. Making rules
Synopsis

Looking up rules

RuleBase, RuleEnv

Checking rule applications

Manipulating RuleInfo rules

RuleBase and RuleEnv

Misc. CoreRule helpers

Making rules

Find the "top" free names of several expressions. Such names are either:

  1. The function finally being applied to in an application chain (if that name is a GlobalId: see GHC.Types.Var#globalvslocal), or

  2. The TyCon if the expression is a Type

This is used for the fast-match-check for rules; if the top names don't match, the rest can't