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

Safe HaskellNone
LanguageHaskell2010

FreeC.Frontend.Haskell.Parser

Contents

Description

This module contains functions for parsing Haskell modules and other nodes of the Haskell AST.

We are using the haskell-src-ext package for parsing. This module just provides an interface for the actual parser and configures the parser appropriately.

Synopsis

Documentation

parseHaskell Source #

Arguments

:: (Functor ast, Parseable (ast SrcSpanInfo), MonadReporter r) 
=> SrcFile

The name and contents of the Haskell source file.

-> r (ast SrcSpan) 

Parses a node of the Haskell AST.

Modules

parseHaskellModule Source #

Arguments

:: MonadReporter r 
=> SrcFile

The name and contents of the Haskell source file.

-> r (Module SrcSpan) 

Parses a Haskell module.

Syntax errors cause a fatal error message to be reported.

parseHaskellModuleWithComments Source #

Arguments

:: MonadReporter r 
=> SrcFile

The name and contents of the Haskell source file.

-> r (Module SrcSpan, [Comment]) 

Like parseHaskellModule but returns the comments in addition to the AST.

parseHaskellModuleFile Source #

Arguments

:: (MonadIO r, MonadReporter r) 
=> FilePath

The name of the Haskell source file.

-> r (Module SrcSpan) 

Loads and parses a Haskell module from the file with the given name.

parseHaskellModuleFileWithComments Source #

Arguments

:: (MonadIO r, MonadReporter r) 
=> FilePath

The name of the Haskell source file.

-> r (Module SrcSpan, [Comment]) 

Like parseHaskellModuleFile but returns the comments in addition to the AST.