Hets - the Heterogeneous Tool Set

Copyright(c) Christian Maeder and Uni Bremen 2003-2005
LicenseGPLv2 or higher, see LICENSE.txt
MaintainerChristian.Maeder@dfki.de
Stabilityexperimental
Portabilityportable
Safe HaskellNone

HasCASL.ClassAna

Contents

Description

analyse kinds using a class map

Synopsis

analyse kinds

anaKindM :: Kind -> ClassMap -> Result RawKind Source #

check the kind and compute the raw kind

getFunKinds :: Monad m => ClassMap -> Kind -> m (Set Kind) Source #

get minimal function kinds of (class) kind

kindArity :: RawKind -> Int Source #

compute arity from a raw kind

cyclicClassId :: ClassMap -> Id -> Kind -> Bool Source #

check if a class occurs in one of its super kinds

subkinding

keepMinKinds :: ClassMap -> [Set Kind] -> Set Kind Source #

keep only minimal elements according to lesserKind

newKind :: ClassMap -> Kind -> Set Kind -> Bool Source #

no kind of the set is lesser than the new kind

addNewKind :: ClassMap -> Kind -> Set Kind -> Set Kind Source #

add a new kind to a set

revVariance :: Variance -> Variance Source #

revert variance

minVariance :: Variance -> Variance -> Variance Source #

compute the minimal variance

lesserKind :: ClassMap -> Kind -> Kind -> Bool Source #

check subkinding (kinds with variances are greater)

lesserRawKind :: RawKind -> RawKind -> Bool Source #

compare raw kinds

minRawKind :: Monad m => String -> RawKind -> RawKind -> m RawKind Source #

diagnostic messages

diffKindString :: String -> RawKind -> RawKind -> String Source #

create message for different kinds

diffKindDiag :: (GetRange a, Pretty a) => a -> RawKind -> RawKind -> [Diagnosis] Source #

create diagnostic for different kinds

checkKinds :: (GetRange a, Pretty a) => a -> RawKind -> RawKind -> [Diagnosis] Source #

check if raw kinds are compatible

anaClassDecls :: ClassDecl -> State Env ClassDecl Source #

analyse class decls

addClassDecl :: RawKind -> Kind -> Id -> State Env () Source #

store a class