| Copyright | (C) 2015-2016 University of Twente |
|---|---|
| License | BSD2 (see the file LICENSE) |
| Maintainer | Christiaan Baaij <christiaan.baaij@gmail.com> |
| Safe Haskell | None |
| Language | Haskell2010 |
| Extensions |
|
GHC.TcPluginM.Extra
Description
- newWanted :: CtLoc -> PredType -> TcPluginM CtEvidence
- newGiven :: CtLoc -> PredType -> EvTerm -> TcPluginM CtEvidence
- newDerived :: CtLoc -> PredType -> TcPluginM CtEvidence
- evByFiat :: String -> Type -> Type -> EvTerm
- lookupModule :: ModuleName -> FastString -> TcPluginM Module
- lookupName :: Module -> OccName -> TcPluginM Name
- tracePlugin :: String -> TcPlugin -> TcPlugin
Create new constraints
newGiven :: CtLoc -> PredType -> EvTerm -> TcPluginM CtEvidence Source #
Create a new [G]iven constraint, with the supplied evidence. This must not
be invoked from tcPluginInit or tcPluginStop, or it will panic.
newDerived :: CtLoc -> PredType -> TcPluginM CtEvidence Source #
Create a new [D]erived constraint.
Creating evidence
Arguments
| :: String | Name the coercion should have |
| -> Type | The LHS of the equivalence relation (~) |
| -> Type | The RHS of the equivalence relation (~) |
| -> EvTerm |
The EvTerm equivalent for unsafeCoerce
Lookup
Arguments
| :: ModuleName | Name of the module |
| -> FastString | Name of the package containing the module |
| -> TcPluginM Module |
Find a module