Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Language.Drasil.Code.Imperative.Build.AST
Synopsis
- type CommandFragment = MakeString
- data BuildName
- data Ext
- data BuildDependencies
- data BuildConfig = BuildConfig ([CommandFragment] -> CommandFragment -> CommandFragment -> [BuildCommand]) (Maybe BuildName) (Maybe BuildName) BuildDependencies
- data RunType
- data Runnable = Runnable BuildName NameOpts RunType
- data DocConfig = DocConfig Dependencies [Command]
- data NameOpts = NameOpts {
- packSep :: String
- includeExt :: Bool
- nameOpts :: NameOpts
- type BuildCommand = [CommandFragment]
- type InterpreterCommand = String
- type InterpreterOption = String
- asFragment :: String -> CommandFragment
- osClassDefault :: String -> String -> String -> CommandFragment
- buildAll :: ([CommandFragment] -> CommandFragment -> [BuildCommand]) -> BuildName -> Maybe BuildConfig
- buildAllAdditionalName :: ([CommandFragment] -> CommandFragment -> CommandFragment -> [BuildCommand]) -> BuildName -> BuildName -> Maybe BuildConfig
- buildSingle :: ([CommandFragment] -> CommandFragment -> [BuildCommand]) -> BuildName -> BuildName -> Maybe BuildConfig
- nativeBinary :: Maybe Runnable
- executable :: BuildName
- sharedLibrary :: BuildName
- interp :: BuildName -> NameOpts -> InterpreterCommand -> [InterpreterOption] -> Maybe Runnable
- interpMM :: InterpreterCommand -> Maybe Runnable
- mainModule :: BuildName
- mainModuleFile :: BuildName
- inCodePackage :: BuildName -> BuildName
- withExt :: BuildName -> String -> BuildName
- cCompiler :: CommandFragment
- cppCompiler :: CommandFragment
- doxygenDocConfig :: FilePath -> DocConfig
Documentation
type CommandFragment = MakeString Source #
Used to build commands. Type synonym of a MakeString
for clarity.
Type for holding the build name.
data BuildDependencies Source #
Builds may only require themselves or have a dependency.
data BuildConfig Source #
Build configuration. In the function parameter, the first parameter is the list of inputs,
2nd parameter is the output file, 3rd parameter is additional name if needed.
The two Maybe
BuildName
s are the output file and the additional name.
Also holds the build dependencies.
Constructors
BuildConfig ([CommandFragment] -> CommandFragment -> CommandFragment -> [BuildCommand]) (Maybe BuildName) (Maybe BuildName) BuildDependencies |
Run commands as they are or through an interpreter.
Constructors
Standalone | |
Interpreter [CommandFragment] |
Contains all the information needed to run a command.
Configures a document based on dependencies and commands.
Constructors
DocConfig Dependencies [Command] |
Naming options. Includes a package separator and an option for including extensions.
Constructors
NameOpts | |
Fields
|
Default name options. Packages separately by "/" and includes extension.
type BuildCommand = [CommandFragment] Source #
Build commands. Made up of CommandFragment
s.
type InterpreterCommand = String Source #
Interpreter commands are made up of a String
.
type InterpreterOption = String Source #
Interpreter options are made up of a String
.
asFragment :: String -> CommandFragment Source #
Translates a String
into a command fragment.
osClassDefault :: String -> String -> String -> CommandFragment Source #
OS default variable (Windows). Calls mkWindowsVar
.
buildAll :: ([CommandFragment] -> CommandFragment -> [BuildCommand]) -> BuildName -> Maybe BuildConfig Source #
Constructor for a build configuration. No additional name included.
buildAllAdditionalName :: ([CommandFragment] -> CommandFragment -> CommandFragment -> [BuildCommand]) -> BuildName -> BuildName -> Maybe BuildConfig Source #
Constructor for a build configuration with an additional name included.
buildSingle :: ([CommandFragment] -> CommandFragment -> [BuildCommand]) -> BuildName -> BuildName -> Maybe BuildConfig Source #
Constructor for a build configuration. No additional name included, but takes in a single dependency.
nativeBinary :: Maybe Runnable Source #
Default runnable information.
executable :: BuildName Source #
Default target extension is ".exe".
sharedLibrary :: BuildName Source #
Default library has the extentions ".dll, .dylib, .so".
interp :: BuildName -> NameOpts -> InterpreterCommand -> [InterpreterOption] -> Maybe Runnable Source #
Constructor for a runnable command that goes through an interpreter.
interpMM :: InterpreterCommand -> Maybe Runnable Source #
Constructs a runnable command that goes through an interpreter (for main module file).
mainModule :: BuildName Source #
Main module.
mainModuleFile :: BuildName Source #
Main module with a default code extension.
inCodePackage :: BuildName -> BuildName Source #
Module for an in-code package.
cCompiler :: CommandFragment Source #
C compiler command fragment.
cppCompiler :: CommandFragment Source #
C++ compiler command fragment.
doxygenDocConfig :: FilePath -> DocConfig Source #
Helper for configuring doxygen documentation.