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

Safe HaskellNone
LanguageHaskell98

DDC.Driver.Command.Compile

Synopsis

Documentation

cmdCompileRecursive Source

Arguments

:: Config

Build driver config.

-> Bool

Build an exectable.

-> Store

Interface store.

-> FilePath

Path to file to compile

-> ExceptT String IO () 

Recursively compile source modules into .o files, or load existing interfaces if we have them and the .o file is still fresh.

  • Interface files that are loaded or generated during compilation are added to the interface store.

cmdCompileRecursiveDS Source

Arguments

:: Config

Build driver config.

-> Bool

Build an executable.

-> Store

Inferface store.

-> [FilePath]

Names of source files still to load.

-> [FilePath]

Names of source files currently blocked.

-> ExceptT String IO () 

Recursively compile .ds source modules into .o files, or load existing interfaces if we have them and the .o file is still fresh.

  • Interface files that are loaded or generated during compilation are added to the interface store.

cmdLoadOrCompile Source

Arguments

:: Config

Build driver config.

-> Bool

Build an exeecutable.

-> Store

Interface store.

-> FilePath

Path to source file.

-> ExceptT String IO () 

Load the interface correponding to a source file, or re-compile the source if it's fresher than the interface.

  • Interfaces for dependent modules must already be in the interface store.

cmdCompile Source

Arguments

:: Config

Build driver config.

-> Bool

Build an executable.

-> Store

Interface store.

-> FilePath

Path to source file.

-> ExceptT String IO () 

Compile a source module into a .o file.

  • Interfaces for dependent modules must already be in the interface store.
  • This produces an .o file next to the source file, and may also produce a .di interface, depending on what sort of source file we're compiling.
  • If compilation produces an interface then it is added to the existing store.

getModificationTimeIfExists :: FilePath -> IO (Maybe UTCTime) Source

If the given file exists then get its modification time, otherwise Nothing.