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

GHC 9.14.1 · lts/ghc-9.14.x · 3e2d568 · 2026-10-11

Moduleghc-9.14.1GHC2021

GHC.Tc.Utils.Instantiate

  • 38 values
  • Packageghc-9.14.1
  • Exports38
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceTcMType.hs
valuenewMethodFromName
  1. :: CtOrigin

    why do we need this?

  2. -> Name

    name of the method

  3. -> [TcRhoType]

    types with which to instantiate the class

  4. -> TcM (HsExpr GhcTc)
#

Used when Name is the wired-in name for a wired-in class method, so the caller knows its type for sure, which should be of form

forall a. C a => <blah>

newMethodFromName is supposed to instantiate just the outer type variable and constraint