HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduleghc-9.10.3GHC2021

GHC.Core.Rules

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

  • 2 types
  • 22 values
  • Packageghc-9.10.3
  • Exports24
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceRules.hs

Looking up rules

RuleBase, RuleEnv

Checking rule applications

Manipulating RuleInfo rules

RuleBase and RuleEnv

Misc. CoreRule helpers

3 declarations

Making rules

3 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