HORIZON HASKELLDocslts/ghc-10.0.xaa25b892026-10-10Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · aa25b89 · 2026-10-10

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.

  • 2 types
  • 24 values

Looking up rules

RuleBase, RuleEnv

Checking rule applications

Manipulating RuleInfo rules

RuleBase and RuleEnv

Misc. CoreRule helpers

3 declarations

Making rules

4 declarations
valueroughTopNames :: [CoreExpr] -> [Maybe Name]
#

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