freec

Safe HaskellNone
LanguageHaskell2010

FreeC.Frontend

Description

This module contains the Frontend data type and all available frontends.

Synopsis

Documentation

data Frontend Source #

Data type that represents a frontend.

Constructors

Frontend 

Fields

  • frontendName :: String

    The name of the frontend.

  • frontendParseFile :: FrontendParser decls

    The parsing function that parses the contents of an input file and converts the module header and import declarations to the intermediate representation. The remaining declarations of the module don't have to be converted in this phase.

  • frontendSimplifyModule :: FrontendSimplifier decls

    The simplification function that converts a parsed module to the intermediate representation.

    This function is applied after all input modules have been parsed and sorted topologically. Module interface files of modules that are imported by the input module are available in the environment.

type FrontendParser decls = SrcFile -> Application (ModuleOf decls) Source #

Type synonym for a parsing function of a Frontend.

type FrontendSimplifier decls = ModuleOf decls -> Application Module Source #

Type synonym for a simplification function of a Frontend.

frontends :: Map String Frontend Source #

A map of all available frontends with the name of those frontends as keys.

showFrontends :: String Source #

Shows a list of all frontends.

defaultFrontend :: String Source #

Shows the name of the default frontend.