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

check the kind and compute the raw kind

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

get minimal function kinds of (class) kind

kindArity :: RawKind -> Int

compute arity from a raw kind

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

check if a class occurs in one of its super kinds

subkinding

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

keep only minimal elements according to lesserKind

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

no kind of the set is lesser than the new kind

addNewKind :: ClassMap -> Kind -> Set Kind -> Set Kind

add a new kind to a set

revVariance :: Variance -> Variance

revert variance

minVariance :: Variance -> Variance -> Variance

compute the minimal variance

lesserKind :: ClassMap -> Kind -> Kind -> Bool

check subkinding (kinds with variances are greater)

lesserRawKind :: RawKind -> RawKind -> Bool

compare raw kinds

diagnostic messages

diffKindString :: String -> RawKind -> RawKind -> String

create message for different kinds

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

create diagnostic for different kinds

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

check if raw kinds are compatible

anaClassDecls :: ClassDecl -> State Env ClassDecl

analyse class decls

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

store a class