Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module implements the kind checker
Synopsis
- kindOf :: (MonadError MultipleErrors m, MonadState CheckState m) => SourceType -> m SourceKind
- kindOfWithScopedVars :: (MonadError MultipleErrors m, MonadState CheckState m) => SourceType -> m (SourceKind, [(Text, SourceKind)])
- kindsOf :: (MonadError MultipleErrors m, MonadState CheckState m) => Bool -> ModuleName -> ProperName TypeName -> [(Text, Maybe SourceKind)] -> [SourceType] -> m SourceKind
- kindsOfAll :: (MonadError MultipleErrors m, MonadState CheckState m) => ModuleName -> [(SourceAnn, ProperName TypeName, [(Text, Maybe SourceKind)], SourceType)] -> [(SourceAnn, ProperName TypeName, [(Text, Maybe SourceKind)], [SourceType])] -> m ([SourceKind], [SourceKind])
Documentation
kindOf :: (MonadError MultipleErrors m, MonadState CheckState m) => SourceType -> m SourceKind Source #
Infer the kind of a single type
kindOfWithScopedVars :: (MonadError MultipleErrors m, MonadState CheckState m) => SourceType -> m (SourceKind, [(Text, SourceKind)]) Source #
Infer the kind of a single type, returning the kinds of any scoped type variables
kindsOf :: (MonadError MultipleErrors m, MonadState CheckState m) => Bool -> ModuleName -> ProperName TypeName -> [(Text, Maybe SourceKind)] -> [SourceType] -> m SourceKind Source #
Infer the kind of a type constructor with a collection of arguments and a collection of associated data constructors
kindsOfAll :: (MonadError MultipleErrors m, MonadState CheckState m) => ModuleName -> [(SourceAnn, ProperName TypeName, [(Text, Maybe SourceKind)], SourceType)] -> [(SourceAnn, ProperName TypeName, [(Text, Maybe SourceKind)], [SourceType])] -> m ([SourceKind], [SourceKind]) Source #
Simultaneously infer the kinds of several mutually recursive type constructors