Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data TypedHole = TyH {
- tyHRelevantCts :: Cts
- tyHImplics :: [Implication]
- tyHCt :: Maybe Ct
- data HoleFit
- data HoleFitCandidate
- type CandPlugin = TypedHole -> [HoleFitCandidate] -> TcM [HoleFitCandidate]
- type FitPlugin = TypedHole -> [HoleFit] -> TcM [HoleFit]
- data HoleFitPlugin = HoleFitPlugin {}
- data HoleFitPluginR = HoleFitPluginR {
- hfPluginInit :: TcM (TcRef s)
- hfPluginRun :: TcRef s -> HoleFitPlugin
- hfPluginStop :: TcRef s -> TcM ()
- hfIsLcl :: HoleFit -> Bool
- pprHoleFitCand :: HoleFitCandidate -> SDoc
Documentation
TyH | |
|
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 _ _`).
HoleFit | |
| |
RawHoleFit SDoc | A fit that is just displayed as is. Here so thatHoleFitPlugins can inject any fit they want. |
data HoleFitCandidate Source #
HoleFitCandidates are passed to hole fit plugins and then checked whether they fit a given typed-hole.
Instances
Eq HoleFitCandidate Source # | |
Defined in TcHoleFitTypes (==) :: HoleFitCandidate -> HoleFitCandidate -> Bool # (/=) :: HoleFitCandidate -> HoleFitCandidate -> Bool # | |
Ord HoleFitCandidate Source # | |
Defined in TcHoleFitTypes compare :: HoleFitCandidate -> HoleFitCandidate -> Ordering # (<) :: HoleFitCandidate -> HoleFitCandidate -> Bool # (<=) :: HoleFitCandidate -> HoleFitCandidate -> Bool # (>) :: HoleFitCandidate -> HoleFitCandidate -> Bool # (>=) :: HoleFitCandidate -> HoleFitCandidate -> Bool # max :: HoleFitCandidate -> HoleFitCandidate -> HoleFitCandidate # min :: HoleFitCandidate -> HoleFitCandidate -> HoleFitCandidate # | |
Outputable HoleFitCandidate Source # | |
Defined in TcHoleFitTypes | |
HasOccName HoleFitCandidate Source # | |
Defined in TcHoleFitTypes occName :: HoleFitCandidate -> OccName Source # | |
NamedThing HoleFitCandidate Source # | |
Defined in TcHoleFitTypes getOccName :: HoleFitCandidate -> OccName Source # getName :: HoleFitCandidate -> Name Source # |
type CandPlugin = TypedHole -> [HoleFitCandidate] -> TcM [HoleFitCandidate] Source #
A plugin for modifying the candidate hole fits *before* they're checked.
type FitPlugin = TypedHole -> [HoleFit] -> TcM [HoleFit] Source #
A plugin for modifying hole fits *after* they've been found.
data HoleFitPlugin Source #
A HoleFitPlugin is a pair of candidate and fit plugins.
data HoleFitPluginR Source #
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.
HoleFitPluginR | |
|