purescript-0.9.3: PureScript Programming Language Compiler

Safe HaskellNone
LanguageHaskell98

Language.PureScript.TypeChecker.Kinds

Description

This module implements the kind checker

Synopsis

Documentation

kindOf :: (MonadError MultipleErrors m, MonadState CheckState m, MonadWriter MultipleErrors m) => Type -> m Kind Source #

Infer the kind of a single type

kindOfWithScopedVars :: (MonadError MultipleErrors m, MonadState CheckState m, MonadWriter MultipleErrors m) => Type -> m (Kind, [(String, Kind)]) Source #

Infer the kind of a single type, returning the kinds of any scoped type variables

kindsOf :: (MonadError MultipleErrors m, MonadState CheckState m, MonadWriter MultipleErrors m) => Bool -> ModuleName -> ProperName TypeName -> [(String, Maybe Kind)] -> [Type] -> m Kind 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, MonadWriter MultipleErrors m) => ModuleName -> [(ProperName TypeName, [(String, Maybe Kind)], Type)] -> [(ProperName TypeName, [(String, Maybe Kind)], [Type])] -> m ([Kind], [Kind]) Source #

Simultaneously infer the kinds of several mutually recursive type constructors