-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Utilities for writing GHC type-checker plugins
--   
--   Utilities for writing GHC type-checker plugins, such as creating
--   constraints, with a stable API covering multiple GHC releases.
@package ghc-tcplugins-extra
@version 0.2


module GHC.TcPluginM.Extra

-- | Create a new [W]anted constraint.
newWanted :: CtLoc -> PredType -> TcPluginM CtEvidence

-- | Create a new [G]iven constraint, with the supplied evidence. This must
--   not be invoked from <a>tcPluginInit</a> or <a>tcPluginStop</a>, or it
--   will panic.
newGiven :: CtLoc -> PredType -> EvTerm -> TcPluginM CtEvidence

-- | Create a new [D]erived constraint.
newDerived :: CtLoc -> PredType -> TcPluginM CtEvidence

-- | The <a>EvTerm</a> equivalent for <a>unsafeCoerce</a>
evByFiat :: String -> Type -> Type -> EvTerm

-- | Find a module
lookupModule :: ModuleName -> FastString -> TcPluginM Module

-- | Find a <a>Name</a> in a <a>Module</a> given an <a>OccName</a>
lookupName :: Module -> OccName -> TcPluginM Name

-- | Print out extra information about the initialisation, stop, and every
--   run of the plugin when <tt>-ddump-tc-trace</tt> is enabled.
tracePlugin :: String -> TcPlugin -> TcPlugin
