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

Safe HaskellNone
LanguageHaskell98

DDC.Driver.Command.Load

Synopsis

Documentation

cmdLoadFromFile Source

Arguments

:: Config

Driver config.

-> Store

Interface store.

-> Maybe String

Simplifier specification.

-> [FilePath]

More modules to use as inliner templates.

-> FilePath

Module file name.

-> ExceptT String IO () 

Load and transform source code, interface, or build file.

The result is printed to stdout. Any errors are thrown in the ExceptT 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.

For Source Tetra modules, dependent modules will be compiled, or their interfaces loaded as needed.

cmdLoadSourceTetraFromFile Source

Arguments

:: Config

Driver config.

-> Store

Interface store.

-> Bundle Int Name Error

Tetra language bundle.

-> FilePath

Module file path.

-> ExceptT String IO () 

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

cmdLoadSourceTetraFromString Source

Arguments

:: Config

Driver config.

-> Store

Interface store.

-> Bundle Int Name Error

Tetra language bundle.

-> Source

Source of the code.

-> String

Program module text.

-> ExceptT String IO () 

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

cmdLoadCoreFromFile Source

Arguments

:: Config

Driver config.

-> Language

Core language definition.

-> FilePath

Module file path

-> ExceptT String IO () 

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

cmdLoadCoreFromString Source

Arguments

:: Config

Driver config.

-> Language

Language definition

-> Source

Source of the code.

-> String

Program module text.

-> ExceptT String IO () 

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

cmdLoadSimplifier Source

Arguments

:: Config

Driver config.

-> Language

Language definition.

-> String

Simplifier specification.

-> [FilePath]

Modules to use as inliner templates.

-> ExceptT String IO Language 

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

cmdLoadSimplifierIntoBundle Source

Arguments

:: (Ord n, Show n, NFData n, Pretty n, Pretty (err (AnTEC SourcePos n))) 
=> Config

Driver config.

-> Bundle s n err

Language bundle

-> String

Simplifier specification.

-> [FilePath]

Modules to use as inliner templates.

-> ExceptT String IO (Bundle s n err) 

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