{-# LANGUAGE ExistentialQuantification #-}
module GHC.Tc.Errors.Hole.Plugin(CandPlugin, FitPlugin, HoleFitPlugin (..), HoleFitPluginR (..)) where
import GHC.Tc.Errors.Hole.FitTypes
import GHC.Tc.Types ( TcRef, TcM )
type CandPlugin = TypedHole -> [HoleFitCandidate] -> TcM [HoleFitCandidate]
type FitPlugin = TypedHole -> [HoleFit] -> TcM [HoleFit]
data HoleFitPlugin = HoleFitPlugin
{ HoleFitPlugin -> CandPlugin
candPlugin :: CandPlugin
, HoleFitPlugin -> FitPlugin
fitPlugin :: FitPlugin }
data HoleFitPluginR = forall s. HoleFitPluginR
{ ()
hfPluginInit :: TcM (TcRef s)
, ()
hfPluginRun :: TcRef s -> HoleFitPlugin
, ()
hfPluginStop :: TcRef s -> TcM ()
}