Copyright | (c) Martin Kuehl, Christian Maeder, Uni Bremen 2002-2006 |
---|---|
License | GPLv2 or higher, see LICENSE.txt |
Maintainer | Christian.Maeder@dfki.de |
Stability | provisional |
Portability | portable |
Safe Haskell | None |
Datatypes for options that hets understands. Useful functions to parse and check user-provided values.
- data HetcatsOpts = HcOpt {
- analysis :: AnaType
- guiType :: GuiType
- urlCatalog :: [(String, String)]
- infiles :: [FilePath]
- specNames :: [SIMPLE_ID]
- transNames :: [SIMPLE_ID]
- viewNames :: [SIMPLE_ID]
- intype :: InType
- libdirs :: [FilePath]
- modelSparQ :: FilePath
- counterSparQ :: Int
- outdir :: FilePath
- outtypes :: [OutType]
- xupdate :: FilePath
- recurse :: Bool
- verbose :: Int
- defLogic :: String
- defSyntax :: String
- outputToStdout :: Bool
- caslAmalg :: [CASLAmalgOpt]
- interactive :: Bool
- connectP :: Int
- connectH :: String
- uncolored :: Bool
- xmlFlag :: Bool
- applyAutomatic :: Bool
- computeNormalForm :: Bool
- dumpOpts :: [String]
- ioEncoding :: Enc
- useLibPos :: Bool
- unlit :: Bool
- serve :: Bool
- listen :: Int
- whitelist :: [[String]]
- blacklist :: [[String]]
- runMMT :: Bool
- fullTheories :: Bool
- outputLogicGraph :: Bool
- fileType :: Bool
- accessToken :: String
- fullSign :: Bool
- data Flag
- optionArgs :: [(String, String -> Flag)]
- optionFlags :: [(String, Flag)]
- accessTokenS :: String
- makeOpts :: HetcatsOpts -> Flag -> HetcatsOpts
- data AnaType
- = Basic
- | Structured
- | Skip
- data GuiType
- data InType
- data OWLFormat
- = Manchester
- | OwlXml
- | RdfXml
- | OBO
- | Turtle
- plainOwlFormats :: [OWLFormat]
- data OutType
- data PrettyType
- prettyList :: [PrettyType]
- data GraphType = Dot Bool
- data SPFType
- data ATType
- data Delta
- hetcatsOpts :: [String] -> IO HetcatsOpts
- isStructured :: HetcatsOpts -> Bool
- guess :: String -> InType -> InType
- rmSuffix :: FilePath -> FilePath
- envSuffix :: String
- prfSuffix :: String
- removePrfOut :: HetcatsOpts -> HetcatsOpts
- hasEnvOut :: HetcatsOpts -> Bool
- hasPrfOut :: HetcatsOpts -> Bool
- getFileNames :: [String] -> FilePath -> [FilePath]
- existsAnSource :: HetcatsOpts -> FilePath -> IO (Maybe FilePath)
- getExtensions :: HetcatsOpts -> [String]
- checkRecentEnv :: HetcatsOpts -> FilePath -> FilePath -> IO Bool
- downloadExtensions :: [String]
- defaultHetcatsOpts :: HetcatsOpts
- hetsVersion :: String
- showDiags :: HetcatsOpts -> [Diagnosis] -> IO ()
- showDiags1 :: HetcatsOpts -> ResultT IO a -> ResultT IO a
- putIfVerbose :: HetcatsOpts -> Int -> String -> IO ()
- doDump :: HetcatsOpts -> String -> IO () -> IO ()
- checkUri :: FilePath -> Bool
- defLogicIsDMU :: HetcatsOpts -> Bool
- useCatalogURL :: HetcatsOpts -> FilePath -> FilePath
- hetsIOError :: String -> IO a
Documentation
data HetcatsOpts
HetcatsOpts
is a record of all options received from the command line
optionArgs :: [(String, String -> Flag)]
options that require arguments for the wep-api excluding "translation"
optionFlags :: [(String, Flag)]
command line switches for the wep-api excluding non-dev-graph related ones
makeOpts :: HetcatsOpts -> Flag -> HetcatsOpts
makeOpts
includes a parsed Flag in a set of HetcatsOpts
data InType
InType
describes the type of input the infile contains
plainOwlFormats :: [OWLFormat]
data OutType
OutType
describes the type of outputs that we want to generate
PrettyOut PrettyType | |
GraphOut GraphType | |
Prf | |
EnvOut | |
OWLOut OWLFormat | |
CLIFOut | |
KIFOut | |
OmdocOut | |
XmlOut | development graph xml output |
JsonOut | development graph json output |
ExperimentalOut | for testing new functionality |
HaskellOut | |
FreeCADOut | |
ThyFile | isabelle theory file |
DfgFile SPFType | SPASS input file |
TPTPFile SPFType | |
ComptableXml | |
RDFOut | |
SigFile Delta | signature as text |
TheoryFile Delta | signature with sentences as text |
SymXml | |
SymsXml |
data PrettyType
PrettyType
describes the type of output we want the pretty-printer
to generate
prettyList :: [PrettyType]
hetcatsOpts :: [String] -> IO HetcatsOpts
hetcatsOpts
parses sensible HetcatsOpts from ARGV
isStructured :: HetcatsOpts -> Bool
check if structured analysis should be performed
removePrfOut :: HetcatsOpts -> HetcatsOpts
remove prf writing
hasEnvOut :: HetcatsOpts -> Bool
should env be written
hasPrfOut :: HetcatsOpts -> Bool
should prf be written
getFileNames :: [String] -> FilePath -> [FilePath]
existsAnSource :: HetcatsOpts -> FilePath -> IO (Maybe FilePath)
checks if a source file for the given file name exists
getExtensions :: HetcatsOpts -> [String]
checkRecentEnv :: HetcatsOpts -> FilePath -> FilePath -> IO Bool
gets two Paths and checks if the first file is not older than the second one and should return True for two identical files
downloadExtensions :: [String]
intypes useable for downloads
defaultHetcatsOpts :: HetcatsOpts
defaultHetcatsOpts
defines the default HetcatsOpts, which are used as
basic values when the user specifies nothing else
short version without date for ATC files
showDiags :: HetcatsOpts -> [Diagnosis] -> IO ()
show diagnostic messages (see Result.hs), according to verbosity level
showDiags1 :: HetcatsOpts -> ResultT IO a -> ResultT IO a
show diagnostic messages (see Result.hs), according to verbosity level
putIfVerbose :: HetcatsOpts -> Int -> String -> IO ()
putIfVerbose
prints a given String to StdOut when the given HetcatsOpts'
Verbosity exceeds the given level
doDump :: HetcatsOpts -> String -> IO () -> IO ()
defLogicIsDMU :: HetcatsOpts -> Bool
useCatalogURL :: HetcatsOpts -> FilePath -> FilePath
translate a given http reference using the URL catalog
hetsIOError :: String -> IO a
print error and usage and exit with code 2