Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
The top-level type checker, which checks all declarations in a module.
Synopsis
- module Language.PureScript.TypeChecker.Types
- module Language.PureScript.TypeChecker.Synonyms
- module Language.PureScript.TypeChecker.Roles
- module Language.PureScript.TypeChecker.Monad
- module Language.PureScript.TypeChecker.Kinds
- module Data.Text
- typeCheckModule :: forall m. (MonadSupply m, MonadState CheckState m, MonadError MultipleErrors m, MonadWriter MultipleErrors m) => Map ModuleName Exports -> Module -> m Module
- checkNewtype :: forall m. MonadError MultipleErrors m => ProperName 'TypeName -> [DataConstructorDeclaration] -> m (DataConstructorDeclaration, (Ident, SourceType))
Documentation
module Data.Text
typeCheckModule :: forall m. (MonadSupply m, MonadState CheckState m, MonadError MultipleErrors m, MonadWriter MultipleErrors m) => Map ModuleName Exports -> Module -> m Module Source #
Type check an entire module and ensure all types and classes defined within the module that are required by exported members are also exported.
checkNewtype :: forall m. MonadError MultipleErrors m => ProperName 'TypeName -> [DataConstructorDeclaration] -> m (DataConstructorDeclaration, (Ident, SourceType)) Source #
Check that a newtype has just one data constructor with just one field, or
throw an error. If the newtype is valid, this function returns the single
data constructor declaration and the single field, as a proof
that the
newtype was indeed a valid newtype.