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

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

Moduleghc-lib-parser-9.14.1.20251220GHC2021

GHC.Tc.Types.Evidence

  • 22 types
  • 58 values

HsWrapper

18 declarations
datadata HsWrapper
#
Instances4Data, Semigroup, Monoid, Outputable
  • Data HsWrapperDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Tc.Types.Evidence
  • Semigroup HsWrapperDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Tc.Types.Evidence

    The Semigroup instance is a bit fishy, since WpCompose, as a data constructor, is "syntactic" and not associative. Concretely, if a, b, and c aren't WpHole:

    (a <> b) <> c ?= a <> (b <> c)

    >

    (a `WpCompose` b) `WpCompose` c /= @ a `WpCompose` (b `WpCompose` c)

    However these two associations are are "semantically equal" in the sense that they produce equal functions when passed to GHC.HsToCore.Binds.dsHsWrapper.

  • Monoid HsWrapperDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Tc.Types.Evidence
  • Outputable HsWrapperDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Tc.Types.Evidence
valuemkWpFun
  1. :: HsWrapper
  2. -> HsWrapper
  3. -> Scaled TcTypeFRR

    the "from" type of the first wrapper

  4. -> TcType

    Either "from" type or "to" type of the second wrapper (used only when the second wrapper is the identity)

  5. -> HsWrapper
#

Smart constructor to create a WpFun HsWrapper, which avoids introducing a lambda abstraction if the two supplied wrappers are either identities or casts.

PRECONDITION: either:

  1. both of the HsWrappers are identities or casts, or

  2. both the "from" and "to" types of the first wrapper have a syntactically fixed RuntimeRep (see Note [Fixed RuntimeRep] in GHC.Tc.Utils.Concrete).

Identifies the lambda-bound dictionaries of an HsWrapper. This is used (only) to allow the pattern-match overlap checker to know what Given dictionaries are in scope.

We specifically do not collect dictionaries bound in a WpLet. These are either superclasses of lambda-bound ones, or (extremely numerous) results of binding Wanted dictionaries. We definitely don't want all those cluttering up the Given dictionaries for pattern-match overlap checking!

Evidence bindings

22 declarations

EvTerm (already a CoreExpr)

24 declarations
valueevId :: EvId -> EvExpr
#

Any sort of evidence Id, including coercions

datadata EvTypeable
#

Instructions on how to make a Typeable dictionary. See Note [Typeable evidence terms]

Constructors

Instances2Data, Outputable

HoleExprRef

1 declaration

TcCoercion

12 declarations
datadata CoercionHole
#

A coercion to be filled in by the type-checker. See Note [Coercion holes]

Instances3Data, Uniquable, Outputable
datadata Role
#

See Note [Roles] in GHC.Core.Coercion

Order of constructors matters: the Ord instance coincides with the *super*typing relation on roles.

Instances7Eq, Data, Ord, NFData, Outputable, Binary, …
  • Eq RoleDefined in ghc-lib-parser-9.14.1.20251220 · Language.Haskell.Syntax.Basic
  • Data RoleDefined in ghc-lib-parser-9.14.1.20251220 · Language.Haskell.Syntax.Basic
  • Ord RoleDefined in ghc-lib-parser-9.14.1.20251220 · Language.Haskell.Syntax.Basic
  • NFData RoleDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Core.Coercion.Axiom · orphan
  • Outputable RoleDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Core.Coercion.Axiom · orphan
  • Binary RoleDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Core.Coercion.Axiom · orphan
  • type Anno (Maybe Role) = EpAnnCODefined in ghc-lib-parser-9.14.1.20251220 · GHC.Hs.Decls · orphan
datadata LeftOrRight
#
Instances6Eq, Data, Ord, NFData, Outputable, Binary

QuoteWrapper

3 declarations