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

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

Moduleghc-10.0.0.20260917GHC2024

GHC.Tc.Solver

  • 1 type
  • 21 values
datadata InferMode
#

How should we choose which constraints to quantify over?

Constructors

  • ApplyMR

    Apply the monomorphism restriction, never quantifying over any constraints

  • EagerDefaulting

    See Note [TcRnExprMode] in GHC.Tc.Module, the :type +d case; this mode refuses to quantify over any defaultable constraint

  • NoRestrictions

    Quantify over any constraint that satisfies pickQuantifiablePreds

Instances1Outputable
valuesolveEqualities :: String -> TcM a -> TcM a
#

Type-check a thing that emits only equality constraints, solving any constraints we can and re-emitting constraints that we can't. Use this variant only when we'll get another crack at it later See Note [Failure in local type signatures]

Panics if we solve any non-equality constraints. (In runTCSEqualities we use an error thunk for the evidence bindings.)

Return (Just new_inerts) if the Givens are satisfiable, Nothing if definitely contradictory. So Nothing says something definite; if in doubt return Just

See Note [Pattern match warnings with insoluble Givens] above.