ghc-9.2.8: The GHC API
Safe HaskellSafe-Inferred
LanguageHaskell2010

GHC.Tc.Errors.Hole.FitTypes

Synopsis

Documentation

data TypedHole #

Constructors

TypedHole 

Fields

Instances

Instances details
Outputable TypedHole # 
Instance details

Defined in GHC.Tc.Errors.Hole.FitTypes

Methods

ppr :: TypedHole -> SDoc #

data HoleFit #

HoleFit is the type we use for valid hole fits. It contains the element that was checked, the Id of that element as found by tcLookup, and the refinement level of the fit, which is the number of extra argument holes that this fit uses (e.g. if hfRefLvl is 2, the fit is for `Id _ _`).

Constructors

HoleFit 

Fields

RawHoleFit SDoc

A fit that is just displayed as is. Here so thatHoleFitPlugins can inject any fit they want.

Instances

Instances details
Outputable HoleFit # 
Instance details

Defined in GHC.Tc.Errors.Hole.FitTypes

Methods

ppr :: HoleFit -> SDoc #

Eq HoleFit # 
Instance details

Defined in GHC.Tc.Errors.Hole.FitTypes

Methods

(==) :: HoleFit -> HoleFit -> Bool #

(/=) :: HoleFit -> HoleFit -> Bool #

Ord HoleFit # 
Instance details

Defined in GHC.Tc.Errors.Hole.FitTypes

type CandPlugin = TypedHole -> [HoleFitCandidate] -> TcM [HoleFitCandidate] #

A plugin for modifying the candidate hole fits *before* they're checked.

type FitPlugin = TypedHole -> [HoleFit] -> TcM [HoleFit] #

A plugin for modifying hole fits *after* they've been found.

data HoleFitPlugin #

A HoleFitPlugin is a pair of candidate and fit plugins.

data HoleFitPluginR #

HoleFitPluginR adds a TcRef to hole fit plugins so that plugins can track internal state. Note the existential quantification, ensuring that the state cannot be modified from outside the plugin.

Constructors

forall s. HoleFitPluginR 

Fields