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
- 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
mkEnvForall :: Env -> Term -> Range -> Term
quantify
getTypeVars :: LocalTypeVars -> [Type] -> Range -> [TypeArg]
anaTypeScheme :: TypeScheme -> State Env (Maybe TypeScheme)
generalizeS :: TypeScheme -> State Env TypeScheme
addTypeId :: Bool -> TypeDefn -> Kind -> Id -> State Env Bool
store type id and check kind arity (warn on redeclared types)
isLiberalKind :: ClassMap -> Bool -> RawKind -> Kind -> Maybe Kind
check if the kind only misses variance indicators of the known raw kind
liberalVariance :: Bool -> Variance -> Variance -> Variance
addTypeKind :: Bool -> TypeDefn -> Id -> Kind -> State Env Bool
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)
partitionOpId :: Env -> Id -> TypeScheme -> (Set OpInfo, Set OpInfo)
partition information of an uninstantiated identifier
checkPlaceCount :: Env -> Id -> TypeScheme -> [Diagnosis]
addLocalVar :: Bool -> VarDecl -> State Env ()
add a local variable with an analysed type (if True then warn)
addGenVarDecl :: GenVarDecl -> State Env ()
add analysed local variable or type variable declaration
anaddGenVarDecl :: Bool -> GenVarDecl -> State Env (Maybe GenVarDecl)
analyse and add local variable or type variable declaration
convTypeToKind :: Type -> Maybe (Variance, Kind)
optAnaddVarDecl :: Bool -> VarDecl -> State Env (Maybe GenVarDecl)
local variable or type variable declaration
makeMonomorph :: VarDecl -> VarDecl