Safe Haskell | None |
---|
Documentation
data Environment Source
Environment | |
|
bindNames :: MonadState CheckState m => Map (ModuleName, Ident) (Type, NameKind) -> m a -> m aSource
bindTypes :: MonadState CheckState m => Map (ModuleName, ProperName) (Kind, TypeDeclarationKind) -> m a -> m aSource
withTypeClassDictionaries :: MonadState CheckState m => [TypeClassDictionaryInScope] -> m a -> m aSource
getTypeClassDictionaries :: (Functor m, MonadState CheckState m) => m [TypeClassDictionaryInScope]Source
bindLocalVariables :: (Functor m, MonadState CheckState m) => ModuleName -> [(Ident, Type)] -> m a -> m aSource
bindLocalTypeVariables :: (Functor m, MonadState CheckState m) => ModuleName -> [(ProperName, Kind)] -> m a -> m aSource
lookupVariable :: (Functor m, MonadState CheckState m, MonadError String m) => ModuleName -> Qualified Ident -> m TypeSource
lookupTypeVariable :: (Functor m, MonadState CheckState m, MonadError String m) => ModuleName -> Qualified ProperName -> m KindSource
canonicalize :: ModuleName -> Environment -> Qualified Ident -> (ModuleName, Ident)Source
canonicalizeType :: ModuleName -> Environment -> Qualified ProperName -> (ModuleName, ProperName)Source
data CheckState Source
getEnv :: (Functor m, MonadState CheckState m) => m EnvironmentSource
putEnv :: MonadState CheckState m => Environment -> m ()Source
modifyEnv :: MonadState CheckState m => (Environment -> Environment) -> m ()Source
guardWith :: MonadError e m => e -> Bool -> m ()Source
rethrow :: MonadError e m => (e -> e) -> m a -> m aSource
newtype Substitution Source
Substitution | |
|
newtype SubstContext Source
Subst | |
|
runSubst :: SubstContext -> Subst a -> Check (a, Substitution)Source
substituteWith :: Typeable t => (Unknown t -> t) -> SubstitutionSource
substituteOne :: Unifiable t => Unknown t -> t -> SubstitutionSource
class (Typeable t, Data t, Show t) => Unifiable t whereSource
occursCheck :: Unifiable t => Unknown s -> t -> Subst ()Source
qualifyAllUnqualifiedNames :: Data d => ModuleName -> Environment -> d -> dSource