curry-frontend-1.0.4: Compile the functional logic language Curry to several intermediate formats

Copyright(c) 2011 - 2013 Björn Peemöller
2016 - 2017 Finn Teegen
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 #

extensionCheck :: Monad m => Check m (Module a) Source #

Check for enabled language extensions.

  • Declarations: remain unchanged
  • Environment: The enabled language extensions are updated

typeSyntaxCheck :: Monad m => Check m (Module a) Source #

Check the type syntax of type definitions and signatures.

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

kindCheck :: Monad m => Check m (Module a) Source #

Check the kinds of type definitions and signatures.

  • Declarations: remain unchanged
  • Environment: The type constructor and class environment are updated

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 a) Source #

Check the precedences of infix operators.

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

deriveCheck :: Monad m => Check m (Module a) Source #

Check the deriving clauses.

  • Declarations: remain unchanged
  • Environment: remain unchanged

instanceCheck :: Monad m => Check m (Module a) Source #

Check the instances.

  • Declarations: remain unchanged
  • Environment: The instance environment is updated

typeCheck :: Monad m => Options -> CompEnv (Module a) -> CYT m (CompEnv (Module PredType)) Source #

Apply the correct typing of the module.

  • Declarations: Type annotations are added to all expressions.
  • Environment: The value environment is updated.

exportCheck :: Monad m => Check m (Module a) Source #

Check the export specification

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

Check the export specification

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

Check for warnings.