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
Synopsis
- anaKindM :: Kind -> ClassMap -> Result RawKind
- getFunKinds :: MonadFail 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 :: MonadFail 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 :: MonadFail m => ClassMap -> Kind -> m (Set Kind) Source #
get minimal function kinds of (class) 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
lesserVariance :: Variance -> Variance -> Bool Source #
revVariance :: Variance -> Variance Source #
revert variance
lesserKind :: ClassMap -> Kind -> Kind -> Bool Source #
check subkinding (kinds with variances are greater)
lesserRawKind :: RawKind -> RawKind -> Bool Source #
compare raw kinds
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