| Safe Haskell | None | 
|---|---|
| Language | Haskell2010 | 
Wingman.Context
Synopsis
- mkContext :: Config -> [(OccName, CType)] -> TcGblEnv -> ExternalPackageState -> KnownThings -> [Evidence] -> Context
 - locallyDefinedMethods :: TcGblEnv -> [Id]
 - splitId :: Id -> (OccName, CType)
 - getFunBindId :: HsBindLR GhcTc GhcTc -> [Id]
 - getCurrentDefinitions :: MonadReader Context m => m [(OccName, CType)]
 - getKnownThing :: MonadReader Context m => (KnownThings -> a) -> m a
 - getKnownInstance :: MonadReader Context m => (KnownThings -> Class) -> [Type] -> m (Maybe (Class, PredType))
 - getInstance :: MonadReader Context m => Class -> [Type] -> m (Maybe (Class, PredType))
 - hasClassInstance :: MonadReader Context m => PredType -> m Bool
 
Documentation
mkContext :: Config -> [(OccName, CType)] -> TcGblEnv -> ExternalPackageState -> KnownThings -> [Evidence] -> Context Source #
locallyDefinedMethods :: TcGblEnv -> [Id] Source #
getCurrentDefinitions :: MonadReader Context m => m [(OccName, CType)] Source #
getKnownThing :: MonadReader Context m => (KnownThings -> a) -> m a Source #
Extract something from KnownThings.
getKnownInstance :: MonadReader Context m => (KnownThings -> Class) -> [Type] -> m (Maybe (Class, PredType)) Source #
Like getInstance, but uses a class from the KnownThings.
getInstance :: MonadReader Context m => Class -> [Type] -> m (Maybe (Class, PredType)) Source #
hasClassInstance :: MonadReader Context m => PredType -> m Bool Source #
Like getInstance, but only returns whether or not it succeeded. Can fail
 fast, and uses a cached Theta from the context.