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

Safe HaskellNone
LanguageHaskell2010

FreeC.Backend.Coq.Converter.Module

Description

This module contains functions for converting Haskell modules to Coq.

Synopsis

Documentation

convertModule :: Module -> Converter [Sentence] Source #

Converts an IR module to Gallina sentences.

convertDecls :: [TypeDecl] -> [FuncDecl] -> Converter [Sentence] Source #

Converts the given declarations of an IR module.

convertTypeDecls :: [TypeDecl] -> Converter [Sentence] Source #

Converts the given data type or type synonym declarations.

convertImportDecls :: [ImportDecl] -> Converter [Sentence] Source #

Converts the given import declarations to Coq.

convertImportDecl :: ImportDecl -> Converter [Sentence] Source #

Convert an import declaration.

generateImport :: ModuleIdent -> ModName -> Converter [Sentence] Source #

Generates a Coq import sentence for the module with the given name from the given library.

Modules from the base library are imported via From Base Require Import sentences. Other external modules are imported via From … Require sentences, which means that references to these modules' contents must be qualified in the code. For such an external module there is also an Export … .QualifiedSmartConstructorModule sentence added if necessary, to give access to the notations for qualified smart constructors.