Safe Haskell | None |
---|---|
Language | Haskell2010 |
- cleanATS :: Action ()
- atsBin :: ATSTarget -> Rules ()
- cgen :: ATSToolConfig -> [FilePath] -> [FilePath] -> FilePath -> FilePattern -> Rules ()
- genATS :: FilePath -> FilePattern -> Bool -> Rules ()
- atsLex :: FilePath -> FilePattern -> Rules ()
- getSubdirs :: FilePath -> IO [FilePath]
- ccToDir :: CCompiler -> String
- withPF :: Action (Exit, Stderr String, Stdout String) -> Action (Exit, Stderr String, Stdout String)
- defaultATSTarget :: [FilePath] -> ArtifactType -> FilePath -> ATSTarget
- defaultATSToolConfig :: ATSToolConfig
- patscc :: MonadIO m => ATSToolConfig -> m String
- patsopt :: MonadIO m => ATSToolConfig -> m 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 :: [(FilePath, FilePath)]
- _binTarget :: FilePath
- _otherDeps :: [FilePath]
- _tgtType :: ArtifactType
- data ATSToolConfig = ATSToolConfig {
- _libVersion :: Version
- _compilerVer :: Version
- _hasPretty :: Bool
- _cc :: CCompiler
- _linkStatic :: Bool
- data CCompiler :: * where
- data ArtifactType
- data ATSGen = ATSGen {}
- atsTarget :: Lens' ATSGen FilePath
- cFlags :: Lens' ATSTarget [String]
- binTarget :: Lens' ATSTarget FilePath
- cc :: Lens' ATSToolConfig CCompiler
- compilerVer :: Lens' ATSToolConfig Version
- genTargets :: Lens' ATSTarget [ATSGen]
- hsLibs :: Lens' ATSTarget [ForeignCabal]
- libVersion :: Lens' ATSToolConfig Version
- libs :: Lens' ATSTarget [String]
- linkStatic :: Lens' ATSToolConfig Bool
- linkTargets :: Lens' ATSTarget [(FilePath, FilePath)]
- otherDeps :: Lens' ATSTarget [FilePath]
- src :: Lens' ATSTarget [FilePath]
- tgtType :: Lens' ATSTarget ArtifactType
- toolConfig :: Lens' ATSTarget ATSToolConfig
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.
:: 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.
:: 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.
:: FilePath | Filepath of |
-> FilePattern | File pattern for generated output |
-> Rules () |
Build a .lats
file.
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.
Filter any generated errors with pats-filter
.
:: [FilePath] | ATS source files |
-> ArtifactType | |
-> FilePath | Target |
-> ATSTarget |
Environment/configuration
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.
ForeignCabal | |
|
Type for binary and library builds with ATS.
ATSTarget | |
|
data ATSToolConfig Source #
Information about where to find patscc
and patsopt
.
ATSToolConfig | |
|
A data type representing the C compiler to be used.
data ArtifactType Source #