diff options
| author | hallgren <hallgren@chalmers.se> | 2014-11-10 15:23:02 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2014-11-10 15:23:02 +0000 |
| commit | 33571ba44f2a42502722a3b025b448efe1f0ab88 (patch) | |
| tree | 7a34727f7cf11a0bb9e1b2cee1a0b785ae71240c /src/compiler/GF/Infra | |
| parent | cabafd68a66c05478ecdd301ed9cf1564c57a3c5 (diff) | |
Some work to improve the structure of the haddock documenation
Diffstat (limited to 'src/compiler/GF/Infra')
| -rw-r--r-- | src/compiler/GF/Infra/Option.hs | 15 | ||||
| -rw-r--r-- | src/compiler/GF/Infra/UseIO.hs | 15 |
2 files changed, 16 insertions, 14 deletions
diff --git a/src/compiler/GF/Infra/Option.hs b/src/compiler/GF/Infra/Option.hs index 9785f6895..6bcbe3851 100644 --- a/src/compiler/GF/Infra/Option.hs +++ b/src/compiler/GF/Infra/Option.hs @@ -1,6 +1,7 @@ module GF.Infra.Option ( - -- ** Option types + -- ** Command line options + -- *** Option types Options, Flags(..), Mode(..), Phase(..), Verbosity(..), @@ -8,21 +9,21 @@ module GF.Infra.Option SISRFormat(..), Optimization(..), CFGTransform(..), HaskellOption(..), Dump(..), Pass(..), Recomp(..), outputFormatsExpl, - -- ** Option parsing + -- *** Option parsing parseOptions, parseModuleOptions, fixRelativeLibPaths, - -- ** Option pretty-printing + -- *** Option pretty-printing optionsGFO, optionsPGF, - -- ** Option manipulation + -- *** Option manipulation addOptions, concatOptions, noOptions, modifyFlags, helpMessage, - -- ** Checking specific options + -- *** Checking specific options flag, cfgTransform, haskellOption, readOutputFormat, isLexicalCat, isLiteralCat, renameEncoding, getEncoding, defaultEncoding, - -- ** Setting specific options + -- *** Setting specific options setOptimization, setCFGTransform, - -- ** Convenience methods for checking options + -- *** Convenience methods for checking options verbAtLeast, dump ) where diff --git a/src/compiler/GF/Infra/UseIO.hs b/src/compiler/GF/Infra/UseIO.hs index b9ff9c2e5..b5ef38f49 100644 --- a/src/compiler/GF/Infra/UseIO.hs +++ b/src/compiler/GF/Infra/UseIO.hs @@ -12,8 +12,9 @@ -- (Description of the module) ----------------------------------------------------------------------------- -module GF.Infra.UseIO(module GF.Infra.UseIO, - -- ** Reused +module GF.Infra.UseIO(-- ** Files and IO + module GF.Infra.UseIO, + -- *** Reused MonadIO(..),liftErr) where import Prelude hiding (catch) @@ -40,7 +41,7 @@ import Control.Exception(evaluate) --putIfVerb :: MonadIO io => Options -> String -> io () putIfVerb opts msg = when (verbAtLeast opts Verbose) $ putStrLnE msg --- ** GF files path and library path manipulation +-- *** GF files path and library path manipulation type FileName = String type InitPath = String -- ^ the directory portion of a pathname @@ -123,7 +124,7 @@ splitInModuleSearchPath s = case break isPathSep s of -- --- ** IO monad with error; adapted from state monad +-- *** Error handling in the IO monad -- | Was: @newtype IOE a = IOE { appIOE :: IO (Err a) }@ type IOE a = IO a @@ -177,7 +178,7 @@ die :: String -> IO a die s = do hPutStrLn stderr s exitFailure --- ** Diagnostic output +-- *** Diagnostic output class Monad m => Output m where ePutStr, ePutStrLn, putStrE, putStrLnE :: String -> m () @@ -215,7 +216,7 @@ ioErrorText e = if isUserError e then ioeGetErrorString e else show e --- ** Timing +-- *** Timing timeIt act = do t1 <- liftIO $ getCPUTime @@ -223,7 +224,7 @@ timeIt act = t2 <- liftIO $ getCPUTime return (t2-t1,a) --- ** File IO +-- *** File IO writeUTF8File :: FilePath -> String -> IO () writeUTF8File fpath content = |
