curry-frontend-0.4.2: Lexer, parser, type checker, etc. for the Curry language

Copyright(c) 2011 - 2013 Björn Peemöller
LicenseBSD-3-clause
Maintainerbjp@informatik.uni-kiel.de
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Checks

Description

This module subsumes the different checks to be performed on a Curry module during compilation, e.g. type checking.

Synopsis

Documentation

type Check m a = Options -> CompEnv a -> CYT m (CompEnv a) Source #

interfaceCheck :: Monad m => Check m Interface Source #

importCheck :: Monad m => Interface -> Maybe ImportSpec -> CYT m (Maybe ImportSpec) Source #

kindCheck :: Monad m => Check m Module Source #

Check the kinds of type definitions and signatures.

  • Declarations: Nullary type constructors and type variables are disambiguated
  • Environment: remains unchanged

syntaxCheck :: Monad m => Check m Module Source #

Check for a correct syntax.

  • Declarations: Nullary data constructors and variables are disambiguated, variables are renamed
  • Environment: remains unchanged

precCheck :: Monad m => Check m Module Source #

Check the precedences of infix operators.

  • Declarations: Expressions are reordered according to the specified precedences
  • Environment: The operator precedence environment is updated

typeCheck :: Monad m => Check m Module Source #

Apply the correct typing of the module. The declarations remain unchanged; the type constructor and value environments are updated.

exportCheck :: Monad m => Check m Module Source #

Check the export specification

expandExports :: Monad m => Options -> CompEnv Module -> m (CompEnv Module) Source #

Check the export specification

warnCheck :: Options -> CompilerEnv -> Module -> [Message] Source #

Check for warnings.