ghc-8.10.6: The GHC API
Safe HaskellNone




data InferMode Source #

How should we choose which constraints to quantify over?



Apply the monomorphism restriction, never quantifying over any constraints


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


Quantify over any constraint that satisfies TcType.pickQuantifiablePreds


Instances details
Outputable InferMode # 
Instance details

Defined in TcSimplify

solveEqualities :: TcM a -> TcM a Source #

Type-check a thing that emits only equality constraints, then solve those constraints. Fails outright if there is trouble. Use this if you're not going to get another crack at solving (because, e.g., you're checking a datatype declaration)

solveLocalEqualities :: String -> TcM a -> TcM a Source #

Type-check a thing that emits only equality constraints, solving any constraints we can and re-emitting constraints that we can't. The thing_inside should generally bump the TcLevel to make sure that this run of the solver doesn't affect anything lying around.

tcNormalise :: Bag EvVar -> Type -> TcM Type Source #

Normalise a type as much as possible using the given constraints. See Note [tcNormalise].

simpl_top :: WantedConstraints -> TcS WantedConstraints Source #

Simplify top-level constraints, but without reporting any unsolved constraints nor unsafe overlapping.

runTcSDeriveds :: TcS a -> TcM a Source #

This variant of runTcS will keep solving, even when only Deriveds are left around. It also doesn't return any evidence, as callers won't need it.