Safe Haskell | None |
---|---|
Language | Haskell98 |
- data CommandLineOptions = Options {
- optProgramName :: String
- optInputFile :: Maybe FilePath
- optIncludeDirs :: IncludeDirs
- optShowVersion :: Bool
- optShowHelp :: Bool
- optInteractive :: Bool
- optRunTests :: Bool
- optGHCiInteraction :: Bool
- optCompile :: Bool
- optCompileNoMain :: Bool
- optEpicCompile :: Bool
- optJSCompile :: Bool
- optCompileDir :: Maybe FilePath
- optGenerateVimFile :: Bool
- optGenerateLaTeX :: Bool
- optGenerateHTML :: Bool
- optDependencyGraph :: Maybe FilePath
- optLaTeXDir :: FilePath
- optHTMLDir :: FilePath
- optCSSFile :: Maybe FilePath
- optIgnoreInterfaces :: Bool
- optForcing :: Bool
- optGhcFlags :: [String]
- optPragmaOptions :: PragmaOptions
- optEpicFlags :: [String]
- optSafe :: Bool
- data PragmaOptions = PragmaOptions {
- optShowImplicit :: Bool
- optShowIrrelevant :: Bool
- optVerbose :: Verbosity
- optProofIrrelevance :: Bool
- optAllowUnsolved :: Bool
- optDisablePositivity :: Bool
- optTerminationCheck :: Bool
- optTerminationDepth :: CutOff
- optCompletenessCheck :: Bool
- optUniverseCheck :: Bool
- optSizedTypes :: Bool
- optInjectiveTypeConstructors :: Bool
- optGuardingTypeConstructors :: Bool
- optUniversePolymorphism :: Bool
- optIrrelevantProjections :: Bool
- optExperimentalIrrelevance :: Bool
- optWithoutK :: Bool
- optCopatterns :: Bool
- optPatternMatching :: Bool
- type OptionsPragma = [String]
- type Flag opts = opts -> Either String opts
- type Verbosity = Trie String Int
- type IncludeDirs = Either [FilePath] [AbsolutePath]
- checkOpts :: Flag CommandLineOptions
- parseStandardOptions :: [String] -> Either String CommandLineOptions
- parsePragmaOptions :: [String] -> CommandLineOptions -> Either String PragmaOptions
- parsePluginOptions :: [String] -> [OptDescr (Flag opts)] -> Flag opts
- defaultOptions :: CommandLineOptions
- defaultInteractionOptions :: PragmaOptions
- defaultVerbosity :: Verbosity
- defaultCutOff :: CutOff
- standardOptions_ :: [OptDescr ()]
- unsafePragmaOptions :: PragmaOptions -> [String]
- isLiterate :: FilePath -> Bool
- mapFlag :: (String -> String) -> OptDescr a -> OptDescr a
- usage :: [OptDescr ()] -> [(String, String, [String], [OptDescr ()])] -> String -> String
- tests :: IO Bool
- defaultLibDir :: IO FilePath
- inputFlag :: FilePath -> Flag CommandLineOptions
- standardOptions :: [OptDescr (Flag CommandLineOptions)]
- getOptSimple :: [String] -> [OptDescr (Flag opts)] -> (String -> Flag opts) -> Flag opts
Documentation
data CommandLineOptions Source
Options | |
|
data PragmaOptions Source
Options which can be set in a pragma.
PragmaOptions | |
|
type OptionsPragma = [String] Source
The options from an OPTIONS
pragma.
In the future it might be nice to switch to a more structured representation. Note that, currently, there is not a one-to-one correspondence between list elements and options.
type Flag opts = opts -> Either String opts Source
f :: Flag opts
is an action on the option record that results from
parsing an option. f opts
produces either an error message or an
updated options record
type IncludeDirs Source
= Either [FilePath] [AbsolutePath] |
|
checkOpts :: Flag CommandLineOptions Source
Checks that the given options are consistent.
parseStandardOptions :: [String] -> Either String CommandLineOptions Source
Parse the standard options.
:: [String] | Pragma options. |
-> CommandLineOptions | Command-line options which should be updated. |
-> Either String PragmaOptions |
Parse options from an options pragma.
parsePluginOptions :: [String] -> [OptDescr (Flag opts)] -> Flag opts Source
Parse options for a plugin.
defaultCutOff :: CutOff Source
The default termination depth.
standardOptions_ :: [OptDescr ()] Source
Used for printing usage info.
unsafePragmaOptions :: PragmaOptions -> [String] Source
isLiterate :: FilePath -> Bool Source
This should probably go somewhere else.
mapFlag :: (String -> String) -> OptDescr a -> OptDescr a Source
Map a function over the long options. Also removes the short options. Will be used to add the plugin name to the plugin options.
usage :: [OptDescr ()] -> [(String, String, [String], [OptDescr ()])] -> String -> String Source
The usage info message. The argument is the program name (probably agda).
defaultLibDir :: IO FilePath Source
Returns the absolute default lib dir. This directory is used to store the Primitive.agda file.