| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Development.Shake.ATS
- atsBin :: ATSTarget -> Rules ()
- cgen :: ATSToolConfig -> [FilePath] -> [FilePath] -> FilePath -> FilePattern -> Rules ()
- genATS :: FilePath -> FilePattern -> Bool -> Rules ()
- atsLex :: FilePath -> FilePattern -> Rules ()
- cabalForeign :: CCompiler -> ForeignCabal -> Rules ()
- hsAts :: ATSGen -> Rules ()
- cleanATS :: Action ()
- getSubdirs :: FilePath -> IO [FilePath]
- ccToDir :: CCompiler -> String
- withPF :: Action (Exit, Stderr String, Stdout String) -> Action (Exit, Stderr String, Stdout String)
- patscc :: ATSToolConfig -> String
- patsopt :: ATSToolConfig -> String
- data ForeignCabal = ForeignCabal {
- projectFile :: Maybe Text
- cabalFile :: Text
- objectFile :: Text
- data ATSTarget = ATSTarget {
- _cFlags :: [String]
- _toolConfig :: ATSToolConfig
- _gc :: Bool
- _libs :: [String]
- _src :: [FilePath]
- _hsLibs :: [ForeignCabal]
- _genTargets :: [ATSGen]
- _linkTargets :: [HATSGen]
- _binTarget :: FilePath
- _otherDeps :: [FilePath]
- _tgtType :: ArtifactType
- _strip :: Bool
- data ATSToolConfig = ATSToolConfig {
- _patsHome :: String
- _patsHomeLocs :: String
- _hasPretty :: Bool
- _cc :: CCompiler
- _linkStatic :: Bool
- _solver :: Solver
- _linkATSLib :: Bool
- _patsFlags :: [String]
- data CCompiler :: * where
- data ArtifactType
- data ATSGen = ATSGen {}
- data HATSGen = HATSGen {}
- data Solver
Shake Rules
atsBin :: ATSTarget -> Rules () Source #
Rules for generating binaries or libraries from ATS code. This is very
general; use defaultATSTarget for sensible defaults that can be modified
with the provided lenses.
Arguments
| :: ATSToolConfig | |
| -> [FilePath] | Extra files to track |
| -> [FilePath] | ATS source that may be generated. |
| -> FilePath | ATS source |
| -> FilePattern | Pattern for C file to be generated |
| -> Rules () |
Generate C code from ATS code.
Arguments
| :: FilePath | Haskell source |
| -> FilePattern |
|
| -> Bool | Whether to call cpphs preprocessor |
| -> Rules () |
Given a plain Haskell source file, generate a .sats file containing
the equivalent types.
Arguments
| :: FilePath | Filepath of |
| -> FilePattern | File pattern for generated output |
| -> Rules () |
Build a .lats file using atslex.
cabalForeign :: CCompiler -> ForeignCabal -> Rules () Source #
These rules take a .cabal file and the .o file to be produced from
them, building the .o file.
Shake actions
Helper functions
ccToDir :: CCompiler -> String Source #
Given a C compiler, return the appropriate directory for its globally installed artifacts. This is used to keep libraries built for different platforms separate.
Arguments
| :: Action (Exit, Stderr String, Stdout String) | |
| -> Action (Exit, Stderr String, Stdout String) |
Filter any generated errors with pats-filter.
Environment/configuration
patscc :: ATSToolConfig -> String Source #
Absolute path to patscc
patsopt :: ATSToolConfig -> String Source #
Absolute path to patsopt
Types
data ForeignCabal Source #
Data type containing information about Haskell components of a build. Any functions exposed in the object file will be callable in C or ATS code.
Constructors
| ForeignCabal | |
Fields
| |
Instances
Type for binary and library builds with ATS.
Constructors
| ATSTarget | |
Fields
| |
data ATSToolConfig Source #
Information about where to find patscc and patsopt.
Constructors
| ATSToolConfig | |
Fields
| |
Instances
A data type representing the C compiler to be used.
Constructors
| ATSGen | |
Constructors
| HATSGen | |