Copyright | (c) Christian Maeder and Uni Bremen 2002-2005 |
---|---|
License | GPLv2 or higher, see LICENSE.txt |
Maintainer | Christian.Maeder@dfki.de |
Stability | provisional |
Portability | portable |
Safe Haskell | None |
analyse generic var (or type var) decls
Synopsis
- mkEnvForall :: Env -> Term -> Range -> Term
- getTypeVars :: LocalTypeVars -> [Type] -> Range -> [TypeArg]
- anaStarType :: Type -> State Env (Maybe Type)
- anaType :: (Maybe Kind, Type) -> State Env (Maybe ((RawKind, Set Kind), Type))
- anaTypeScheme :: TypeScheme -> State Env (Maybe TypeScheme)
- generalizeS :: TypeScheme -> State Env TypeScheme
- addTypeId :: Bool -> TypeDefn -> Kind -> Id -> State Env Bool
- isLiberalKind :: ClassMap -> Bool -> RawKind -> Kind -> Maybe Kind
- liberalVariance :: Bool -> Variance -> Variance -> Variance
- anaKind :: Kind -> State Env RawKind
- addTypeKind :: Bool -> TypeDefn -> Id -> Kind -> State Env Bool
- nonUniqueKind :: (GetRange a, Pretty a) => Set Kind -> RawKind -> a -> (Kind -> State Env (Maybe b)) -> State Env (Maybe b)
- anaddTypeVarDecl :: TypeArg -> State Env (Maybe TypeArg)
- partitionOpId :: Env -> Id -> TypeScheme -> (Set OpInfo, Set OpInfo)
- checkUnusedTypevars :: TypeScheme -> State Env TypeScheme
- checkPlaceCount :: Env -> Id -> TypeScheme -> [Diagnosis]
- addOpId :: Id -> TypeScheme -> Set OpAttr -> OpDefn -> State Env Bool
- addLocalVar :: Bool -> VarDecl -> State Env ()
- addGenVarDecl :: GenVarDecl -> State Env ()
- anaddGenVarDecl :: Bool -> GenVarDecl -> State Env (Maybe GenVarDecl)
- convTypeToKind :: Type -> Maybe (Variance, Kind)
- convertTypeToKind :: Env -> Type -> Result (Variance, Kind)
- optAnaddVarDecl :: Bool -> VarDecl -> State Env (Maybe GenVarDecl)
- makeMonomorph :: VarDecl -> VarDecl
- monoType :: Type -> Type
- anaVarDecl :: VarDecl -> State Env (Maybe VarDecl)
Documentation
getTypeVars :: LocalTypeVars -> [Type] -> Range -> [TypeArg] Source #
anaTypeScheme :: TypeScheme -> State Env (Maybe TypeScheme) Source #
generalizeS :: TypeScheme -> State Env TypeScheme Source #
addTypeId :: Bool -> TypeDefn -> Kind -> Id -> State Env Bool Source #
store type id and check kind arity (warn on redeclared types)
isLiberalKind :: ClassMap -> Bool -> RawKind -> Kind -> Maybe Kind Source #
check if the kind only misses variance indicators of the known raw kind
addTypeKind :: Bool -> TypeDefn -> Id -> Kind -> State Env Bool Source #
store type as is (warn on redeclared types)
nonUniqueKind :: (GetRange a, Pretty a) => Set Kind -> RawKind -> a -> (Kind -> State Env (Maybe b)) -> State Env (Maybe b) Source #
partitionOpId :: Env -> Id -> TypeScheme -> (Set OpInfo, Set OpInfo) Source #
partition information of an uninstantiated identifier
checkPlaceCount :: Env -> Id -> TypeScheme -> [Diagnosis] Source #
addLocalVar :: Bool -> VarDecl -> State Env () Source #
add a local variable with an analysed type (if True then warn)
addGenVarDecl :: GenVarDecl -> State Env () Source #
add analysed local variable or type variable declaration
anaddGenVarDecl :: Bool -> GenVarDecl -> State Env (Maybe GenVarDecl) Source #
analyse and add local variable or type variable declaration
optAnaddVarDecl :: Bool -> VarDecl -> State Env (Maybe GenVarDecl) Source #
local variable or type variable declaration
makeMonomorph :: VarDecl -> VarDecl Source #