HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

  • Packageghc-9.10.3
  • Exports74
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceEvidence.hs

HsWrapper

18 declarations
datadata HsWrapper
#
Instances5Data, Semigroup, Monoid, Outputable, ToHie
  • Data HsWrapperDefined in ghc-9.10.3 · GHC.Tc.Types.Evidence
  • Semigroup HsWrapperDefined in ghc-9.10.3 · 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-9.10.3 · GHC.Tc.Types.Evidence
  • Outputable HsWrapperDefined in ghc-9.10.3 · GHC.Tc.Types.Evidence
  • ToHie (LocatedA HsWrapper)Defined in ghc-9.10.3 · GHC.Iface.Ext.Ast
valuemkWpFun
  1. :: HsWrapper
  2. -> HsWrapper
  3. -> Scaled TcTypeFRR

    the "from" type of the first wrapper MUST have a fixed RuntimeRep

  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.

PRECONDITION: the "from" type of the first wrapper must 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

21 declarations

EvTerm (already a CoreExpr)

17 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

14 declarations
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, Outputable, Binary, Anno, …
  • Eq RoleDefined in ghc-9.10.3 · Language.Haskell.Syntax.Basic
  • Data RoleDefined in ghc-9.10.3 · Language.Haskell.Syntax.Basic
  • Ord RoleDefined in ghc-9.10.3 · Language.Haskell.Syntax.Basic
  • Outputable RoleDefined in ghc-9.10.3 · GHC.Core.Coercion.Axiom · orphan
  • Binary RoleDefined in ghc-9.10.3 · GHC.Core.Coercion.Axiom · orphan
  • type Anno (Maybe Role) = EpAnnCODefined in ghc-9.10.3 · GHC.Hs.Decls · orphan
  • type Anno (Maybe Role) = EpAnnCODefined in ghc-9.10.3 · GHC.Hs.Decls · orphan
valueunwrapIP :: Type -> CoercionR
#

Create a Coercion that unwraps an implicit-parameter dictionary to expose the underlying value. We expect the Type to have the form `IP sym ty`, and return a Coercion `co :: IP sym ty ~ ty`

QuoteWrapper

3 declarations