Hets - the Heterogeneous Tool Set
Copyright(c) Christian Maeder and Uni Bremen 2002-2005
LicenseGPLv2 or higher, see LICENSE.txt
MaintainerChristian.Maeder@dfki.de
Stabilityprovisional
Portabilityportable
Safe HaskellNone

HasCASL.VarDecl

Description

analyse generic var (or type var) decls

Synopsis

Documentation

mkEnvForall :: Env -> Term -> Range -> Term Source #

quantify

anaType :: (Maybe Kind, Type) -> State Env (Maybe ((RawKind, Set Kind), Type)) 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 #

anaddTypeVarDecl :: TypeArg -> State Env (Maybe TypeArg) Source #

analyse a type argument

partitionOpId :: Env -> Id -> TypeScheme -> (Set OpInfo, Set OpInfo) Source #

partition information of an uninstantiated identifier

addOpId :: Id -> TypeScheme -> Set OpAttr -> OpDefn -> State Env Bool Source #

storing an operation

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

anaVarDecl :: VarDecl -> State Env (Maybe VarDecl) Source #

analyse variable declaration