hets -- a heterogenous Specification (CASL) tool setContentsIndex
Options
Portability non-portable(DevGraph)
Stability provisional
Maintainer hets@tzi.de
Description

Datatypes for options, a list of options hetcats understands. Useful functions to parse and check the user-provided functions and for filling in default values.

A record datatype for fast and easy access and modification extension of the options.

Synopsis
data HetcatsOpts = HcOpt {
analysis :: AnaType
gui :: GuiType
infiles :: [FilePath]
intype :: InType
libdir :: FilePath
outdir :: FilePath
outtypes :: [OutType]
rawopts :: [RawOpt]
verbose :: Int
}
makeOpts :: HetcatsOpts -> Flag -> HetcatsOpts
defaultHetcatsOpts :: HetcatsOpts
data Flag
= Analysis AnaType
| Gui GuiType
| Help
| InType InType
| LibDir FilePath
| OutDir FilePath
| OutTypes [OutType]
| Quiet
| Raw [RawOpt]
| Verbose Int
| Version
data AnaType
= Basic
| Structured
| Skip
data GuiType
= Only
| Also
| Not
data InType
= ATermIn ATType
| ASTreeIn ATType
| CASLIn
| HetCASLIn
| HaskellIn
| GuessIn
data ATType
= BAF
| NonBAF
data OutType
= PrettyOut PrettyType
| HetCASLOut HetOutType HetOutFormat
| GraphOut GraphType
data PrettyType
= PrettyAscii
| PrettyLatex
| PrettyHtml
data HetOutType
= OutASTree
| OutDGraph Flattening Bool
data Flattening
= Flattened
| HidingOutside
| Full
data HetOutFormat
= OutAscii
| OutTerm
| OutTaf
| OutHtml
| OutXml
data GraphType
= Dot
| PostScript
| Davinci
data RawOpt
= RawAscii String
| RawLatex String
data ErrorSource
= User
| Intern
options :: [OptDescr Flag]
parseVerbosity :: Maybe String -> Flag
inTypes :: [(String, (InType, Bool))]
downloadExtensions :: [String]
existsAnSource :: FilePath -> IO (Maybe FilePath)
checkRecentEnv :: FilePath -> FilePath -> IO Bool
parseInType :: String -> Flag
parseInType1 :: String -> InType
parseOutTypes :: String -> Flag
parseOutType :: String -> Maybe OutType
parseRawOpts :: String -> Flag
guess :: String -> InType -> InType
guessInType :: FilePath -> InType
hetcatsOpts :: [String] -> IO HetcatsOpts
checkFlags :: [Flag] -> IO [Flag]
checkInFiles :: [String] -> IO [FilePath]
checkInFile :: FilePath -> IO Bool
checkOutDirs :: [Flag] -> IO [Flag]
checkOutDir :: String -> IO Bool
noPerms :: Permissions
collectOutDirs :: [Flag] -> IO [Flag]
collectVerbosity :: [Flag] -> [Flag]
collectOutTypes :: [Flag] -> [Flag]
collectRawOpts :: [Flag] -> [Flag]
hetsError :: forall a . ErrorSource -> String -> a
hetsUsage :: String
putIfVerbose :: HetcatsOpts -> Int -> String -> IO ()
doIfVerbose :: HetcatsOpts -> Int -> IO () -> IO ()
showDiags :: HetcatsOpts -> [Diagnosis] -> IO ()
Documentation
data HetcatsOpts
HetcatsOpts is a record set of all options received from the command line
Constructors
HcOpt
analysis :: AnaType
gui :: GuiType
infiles :: [FilePath]
intype :: InType
libdir :: FilePath
outdir :: FilePath
outtypes :: [OutType]
rawopts :: [RawOpt]
verbose :: Int
Instances
Show HetcatsOpts
Eq HetcatsOpts
makeOpts :: HetcatsOpts -> Flag -> HetcatsOpts
makeOpts includes a parsed Flag in a set of HetcatsOpts
defaultHetcatsOpts :: HetcatsOpts
defaultHetcatsOpts defines the default HetcatsOpts, which are used as basic values when the user specifies nothing else
data Flag
every Flag describes a raw option
Constructors
Analysis AnaType
Gui GuiType
Help
InType InType
LibDir FilePath
OutDir FilePath
OutTypes [OutType]
Quiet
Raw [RawOpt]
Verbose Int
Version
Instances
Show Flag
Eq Flag
data AnaType
AnaType describes the type of analysis we want performed
Constructors
Basic
Structured
Skip
Instances
Show AnaType
Eq AnaType
data GuiType
GuiType determines if we want the GUI shown
Constructors
Only
Also
Not
Instances
Show GuiType
Eq GuiType
data InType
InType describes the type of input the infile contains
Constructors
ATermIn ATType
ASTreeIn ATType
CASLIn
HetCASLIn
HaskellIn
GuessIn
Instances
Show InType
Eq InType
data ATType
ATType describes distinct types of ATerms
Constructors
BAF
NonBAF
Instances
Show ATType
Eq ATType
data OutType
OutType describes the type of Output that we want generated
Constructors
PrettyOut PrettyType
HetCASLOut HetOutType HetOutFormat
GraphOut GraphType
Instances
Show OutType
Eq OutType
data PrettyType
PrettyType describes the type of Output we want the Pretty-Printer to generate
Constructors
PrettyAscii
PrettyLatex
PrettyHtml
Instances
Show PrettyType
Eq PrettyType
data HetOutType
HetOutType describes the type of Output we want Hets to create
Constructors
OutASTree
OutDGraph Flattening Bool
Instances
Show HetOutType
Eq HetOutType
data Flattening
Flattening describes how flat the Earth really is (TODO: add comment)
Constructors
Flattened
HidingOutside
Full
Instances
Show Flattening
Eq Flattening
data HetOutFormat
HetOutFormat describes the format of Output that HetCASL shall create
Constructors
OutAscii
OutTerm
OutTaf
OutHtml
OutXml
Instances
Show HetOutFormat
Eq HetOutFormat
data GraphType
GraphType describes the type of Graph that we want generated
Constructors
Dot
PostScript
Davinci
Instances
Show GraphType
Eq GraphType
data RawOpt
RawOpt describes the options we want to be passed to the Pretty-Printer
Constructors
RawAscii String
RawLatex String
Instances
Show RawOpt
Eq RawOpt
data ErrorSource
ErrorSource describes possible sources of errors: user input or internal errors
Constructors
User
Intern
Instances
Show ErrorSource
Eq ErrorSource
options :: [OptDescr Flag]
options describes all available options and is used to generate usage information
parseVerbosity :: Maybe String -> Flag
parseVerbosity parses a Verbose Flag from user input
inTypes :: [(String, (InType, Bool))]
possible input types. Boolean flag is true if intype is useable for downloads.
downloadExtensions :: [String]
existsAnSource :: FilePath -> IO (Maybe FilePath)
checks if a source file for the given base exists
checkRecentEnv :: FilePath -> FilePath -> IO Bool
gets two Paths and checks if the first file is more recent than the second one
parseInType :: String -> Flag
parseInType parses an InType Flag from user input
parseInType1 :: String -> InType
parseInType1 parses an InType Flag from a String
parseOutTypes :: String -> Flag
parseOutType :: String -> Maybe OutType
parseRawOpts :: String -> Flag
parseRawOpts parses a Raw Flag from user input
guess :: String -> InType -> InType
guesses the InType
guessInType :: FilePath -> InType
guessInType parses an InType from the FilePath to our InFile
hetcatsOpts :: [String] -> IO HetcatsOpts
hetcatsOpts parses sensible HetcatsOpts from ARGV
checkFlags :: [Flag] -> IO [Flag]
checkFlags checks all parsed Flags for sanity
checkInFiles :: [String] -> IO [FilePath]
checkInFiles checks all given InFiles for sanity
checkInFile :: FilePath -> IO Bool
checkInFile checks a single InFile for sanity
checkOutDirs :: [Flag] -> IO [Flag]
checkOutDirs checks a list of OutDir for sanity
checkOutDir :: String -> IO Bool
checkOutDir checks a single OutDir for sanity
noPerms :: Permissions
collectOutDirs :: [Flag] -> IO [Flag]
collectVerbosity :: [Flag] -> [Flag]
collectOutTypes :: [Flag] -> [Flag]
collectRawOpts :: [Flag] -> [Flag]
hetsError :: forall a . ErrorSource -> String -> a
hetsError is a generic Error messaging function that prints the Error and usage information, if the user caused the Error
hetsUsage :: String
hetsUsage generates usage information for the commandline
putIfVerbose :: HetcatsOpts -> Int -> String -> IO ()
putIfVerbose prints a given String to StdOut when the given HetcatsOpts' Verbosity exceeds the given level
doIfVerbose :: HetcatsOpts -> Int -> IO () -> IO ()
doIfVerbose executes a given function when the given HetcatsOpts' Verbosity exceeds the given level
showDiags :: HetcatsOpts -> [Diagnosis] -> IO ()
show diagnostic messages (see Result.hs), according to verbosity level
Produced by Haddock version 0.6