ddc-driver-0.4.1.3: Disciplined Disciple Compiler top-level driver.

Safe HaskellNone

DDC.Driver.Command.Load

Synopsis

Documentation

cmdLoadFromFileSource

Arguments

:: Config

Driver config.

-> Maybe String

Simplifier specification.

-> [FilePath]

More modules to use as inliner templates.

-> FilePath

Module file name.

-> ErrorT String IO () 

Load and transform a module. The result is printed to stdout. Any errors are thrown in the ErrorT monad.

This function handle fragments of Disciple Core, as well as Source Tetra modules. The language to use is determined by inspecting the file name extension.

We also take the specification of a simplifier to apply to the module.

cmdLoadSourceTetraFromFileSource

Arguments

:: Config

Driver config.

-> FilePath

Module file path.

-> ErrorT String IO () 

Load a Disciple Source Tetra module from a file. The result is printed to stdout. Any errors are thrown in the ErrorT monad.

cmdLoadSourceTetraFromStringSource

Arguments

:: Config

Driver config.

-> Source

Source of the code.

-> String

Program module text.

-> ErrorT String IO () 

Load a Disciple Source Tetra module from a string. The result is printed to stdout. Any errors are thrown in the ErrorT monad.

cmdLoadCoreFromFileSource

Arguments

:: Config

Driver config.

-> Language

Core language definition.

-> FilePath

Module file path

-> ErrorT String IO () 

Load a Disciple Core module from a file. The result is printed to stdout.

cmdLoadCoreFromStringSource

Arguments

:: Config

Driver config.

-> Language

Language definition

-> Source

Source of the code.

-> String

Program module text.

-> ErrorT String IO () 

Load a Disciple Core module from a string. The result it printed to stdout.

cmdLoadSimplifierSource

Arguments

:: Config

Driver config.

-> Language

Language definition.

-> String

Simplifier specification.

-> [FilePath]

Modules to use as inliner templates.

-> ErrorT String IO Language 

Parse the simplifier defined in this string, and load it and all the inliner templates into the language bundle.