Safe Haskell | None |
---|---|
Language | Haskell2010 |
Convenient common interface for command line Futhark compilers. Using this module ensures that all compilers take the same options. A small amount of flexibility is provided for backend-specific options.
Synopsis
- compilerMain :: cfg -> [CompilerOption cfg] -> String -> String -> Pipeline SOACS lore -> (cfg -> CompilerMode -> FilePath -> Prog lore -> FutharkM ()) -> String -> [String] -> IO ()
- type CompilerOption cfg = OptDescr (Either (IO ()) (cfg -> cfg))
- data CompilerMode
Documentation
:: cfg | Initial configuration. |
-> [CompilerOption cfg] | Options that affect the configuration. |
-> String | The short action name (e.g. "compile to C"). |
-> String | The longer action description. |
-> Pipeline SOACS lore | The pipeline to use. |
-> (cfg -> CompilerMode -> FilePath -> Prog lore -> FutharkM ()) | The action to take on the result of the pipeline. |
-> String | Program name |
-> [String] | Command line arguments. |
-> IO () |
Run a parameterised Futhark compiler, where cfg
is a user-given
configuration type. Call this from main
.
type CompilerOption cfg = OptDescr (Either (IO ()) (cfg -> cfg)) Source #
An option that modifies the configuration of type cfg
.
data CompilerMode Source #
Are we compiling a library or an executable?
Instances
Eq CompilerMode Source # | |
Defined in Futhark.Compiler.CLI (==) :: CompilerMode -> CompilerMode -> Bool # (/=) :: CompilerMode -> CompilerMode -> Bool # | |
Ord CompilerMode Source # | |
Defined in Futhark.Compiler.CLI compare :: CompilerMode -> CompilerMode -> Ordering # (<) :: CompilerMode -> CompilerMode -> Bool # (<=) :: CompilerMode -> CompilerMode -> Bool # (>) :: CompilerMode -> CompilerMode -> Bool # (>=) :: CompilerMode -> CompilerMode -> Bool # max :: CompilerMode -> CompilerMode -> CompilerMode # min :: CompilerMode -> CompilerMode -> CompilerMode # | |
Show CompilerMode Source # | |
Defined in Futhark.Compiler.CLI showsPrec :: Int -> CompilerMode -> ShowS # show :: CompilerMode -> String # showList :: [CompilerMode] -> ShowS # |