ghc-8.4.2: The GHC API

TcSimplify

Synopsis

Documentation

data InferMode Source #

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 TcRnDriver, the :type +d case; this mode refuses to quantify over any defaultable constraint NoRestrictions Quantify over any constraint that satisfies TcType.pickQuantifiablePreds
Instances
 # Instance detailsDefined in TcSimplify Methods

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.

Reports whether first type (ty_a) subsumes the second type (ty_b), discarding any errors. Subsumption here means that the ty_b can fit into the ty_a, i.e. tcSubsumes a b == True if b is a subtype of a. N.B.: Make sure that the types contain all the constraints contained in any associated implications.

A tcSubsumes which takes into account relevant constraints, to fix trac #14273. Make sure that the constraints are cloned, since the simplifier may perform unification

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.