Copyright | (c) 2011 - 2013 Björn Peemöller 2016 - 2017 Finn Teegen |
---|---|
License | BSD-3-clause |
Maintainer | bjp@informatik.uni-kiel.de |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
This module subsumes the different checks to be performed on a Curry module during compilation, e.g. type checking.
Synopsis
- type Check m a = Options -> CompEnv a -> CYT m (CompEnv a)
- interfaceCheck :: Monad m => Check m Interface
- importCheck :: Monad m => Interface -> Maybe ImportSpec -> CYT m (Maybe ImportSpec)
- extensionCheck :: Monad m => Check m (Module a)
- typeSyntaxCheck :: Monad m => Check m (Module a)
- kindCheck :: Monad m => Check m (Module a)
- syntaxCheck :: Monad m => Check m (Module ())
- precCheck :: Monad m => Check m (Module a)
- deriveCheck :: Monad m => Check m (Module a)
- instanceCheck :: Monad m => Check m (Module a)
- typeCheck :: Monad m => Options -> CompEnv (Module a) -> CYT m (CompEnv (Module PredType))
- exportCheck :: Monad m => Check m (Module a)
- expandExports :: Monad m => Options -> CompEnv (Module a) -> m (CompEnv (Module a))
- warnCheck :: Options -> CompilerEnv -> Module a -> [Message]
Documentation
importCheck :: Monad m => Interface -> Maybe ImportSpec -> CYT m (Maybe ImportSpec) 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.