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.Tc.Utils.Unify

Type subsumption and unification

  • 8 types
  • 45 values
  • Packageghc-9.10.3
  • Exports53
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceUnify.hs

Use this function to split off arguments types when you have an "expected" type.

This function skolemises at each polytype.

Invariant: this function only applies the provided function to a list of argument types which all have a syntactically fixed RuntimeRep in the sense of Note [Fixed RuntimeRep] in GHC.Tc.Utils.Concrete. See Note [Return arguments with a fixed RuntimeRep].

valuematchActualFunTy
  1. :: ExpectedFunTyOrigin

    See Note [Herald for matchExpectedFunTys]

  2. -> Maybe TypedThing

    The thing with type TcSigmaType

  3. -> (Arity, TcType)

    Total number of value args in the call, and the original function type (Both are used only for error messages)

  4. -> TcRhoType

    Type to analyse: a TcRhoType

  5. -> TcM (HsWrapper, Scaled TcSigmaTypeFRR, TcSigmaType)
#

matchActualFunTy looks for just one function arrow, returning an uninstantiated sigma-type.

Invariant: the returned argument type has a syntactically fixed RuntimeRep in the sense of Note [Fixed RuntimeRep] in GHC.Tc.Utils.Concrete.

See Note [Return arguments with a fixed RuntimeRep].