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

Moduleghc-9.10.3GHC2021

GHC.Tc.Utils.Instantiate

  • 38 values
  • Packageghc-9.10.3
  • 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