free-compiler-0.3.0.0: A Haskell to Coq compiler.

Safe HaskellNone
LanguageHaskell2010

FreeC.Pass.DefineDeclPass

Description

This module contains passes for inserting data type, constructor and type synonym declarations as well as function declarations into the environment.

Subsequent passes can still modify entries added by this pass. For example, which effects are used by which functions is determined after this pass (see FreeC.Pass.EffectAnalysisPass).

Specification

Preconditions

The argument and return types and type arguments of function declarations are annotated.

Translation

No changes are made to the declarations.

Postconditions

There are entries for the given declarations in the environment.

Error cases

  • The user is informed if a different name is assigned to an entry.
Synopsis

Documentation

defineTypeDeclsPass :: DependencyAwarePass TypeDecl Source #

Inserts all data type declarations and type synonyms in the given strongly connected component into the environment.

defineFuncDeclsPass :: DependencyAwarePass FuncDecl Source #

Inserts all function declarations in the given strongly connected component into the environment.

If any function in the component uses a partial function, all of the functions in the component are marked as partial.