Copyright | (c) Christian Maeder and Uni Bremen 2003-2005 |
---|---|
License | GPLv2 or higher, see LICENSE.txt |
Maintainer | Christian.Maeder@dfki.de |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
analyse kinds using a class map
- anaKindM :: Kind -> ClassMap -> Result RawKind
- getFunKinds :: Monad m => ClassMap -> Kind -> m (Set Kind)
- kindArity :: RawKind -> Int
- cyclicClassId :: ClassMap -> Id -> Kind -> Bool
- keepMinKinds :: ClassMap -> [Set Kind] -> Set Kind
- newKind :: ClassMap -> Kind -> Set Kind -> Bool
- addNewKind :: ClassMap -> Kind -> Set Kind -> Set Kind
- lesserVariance :: Variance -> Variance -> Bool
- revVariance :: Variance -> Variance
- minVariance :: Variance -> Variance -> Variance
- lesserKind :: ClassMap -> Kind -> Kind -> Bool
- lesserRawKind :: RawKind -> RawKind -> Bool
- minRawKind :: Monad m => String -> RawKind -> RawKind -> m RawKind
- rawToKind :: RawKind -> Kind
- diffKindString :: String -> RawKind -> RawKind -> String
- diffKindDiag :: (GetRange a, Pretty a) => a -> RawKind -> RawKind -> [Diagnosis]
- checkKinds :: (GetRange a, Pretty a) => a -> RawKind -> RawKind -> [Diagnosis]
- anaClassDecls :: ClassDecl -> State Env ClassDecl
- addClassDecl :: RawKind -> Kind -> Id -> State Env ()
analyse kinds
getFunKinds :: Monad m => ClassMap -> Kind -> m (Set Kind)
get minimal function kinds of (class) 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
lesserVariance :: Variance -> Variance -> Bool
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