mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 03:32:51 -06:00
Allow multiple output formats in GF.Devel.GFC.Options. Suggested by peb.
This commit is contained in:
@@ -72,7 +72,7 @@ data Options = Options {
|
|||||||
optShowCPUTime :: Bool,
|
optShowCPUTime :: Bool,
|
||||||
optEmitGFC :: Bool,
|
optEmitGFC :: Bool,
|
||||||
optGFCDir :: FilePath,
|
optGFCDir :: FilePath,
|
||||||
optOutputFormat :: OutputFormat,
|
optOutputFormats :: [OutputFormat],
|
||||||
optOutputFile :: Maybe FilePath,
|
optOutputFile :: Maybe FilePath,
|
||||||
optLibraryPath :: [FilePath],
|
optLibraryPath :: [FilePath],
|
||||||
optForceRecomp :: Bool,
|
optForceRecomp :: Bool,
|
||||||
@@ -92,7 +92,7 @@ defaultOptions = Options {
|
|||||||
optShowCPUTime = False,
|
optShowCPUTime = False,
|
||||||
optEmitGFC = True,
|
optEmitGFC = True,
|
||||||
optGFCDir = ".",
|
optGFCDir = ".",
|
||||||
optOutputFormat = FmtGFCC,
|
optOutputFormats = [FmtGFCC],
|
||||||
optOutputFile = Nothing,
|
optOutputFile = Nothing,
|
||||||
optLibraryPath = [],
|
optLibraryPath = [],
|
||||||
optForceRecomp = False,
|
optForceRecomp = False,
|
||||||
@@ -157,7 +157,7 @@ optDescr =
|
|||||||
cpu x o = return $ o { optShowCPUTime = x }
|
cpu x o = return $ o { optShowCPUTime = x }
|
||||||
emitGFC x o = return $ o { optEmitGFC = x }
|
emitGFC x o = return $ o { optEmitGFC = x }
|
||||||
gfcDir x o = return $ o { optGFCDir = x }
|
gfcDir x o = return $ o { optGFCDir = x }
|
||||||
outFmt x o = readOutputFormat x >>= \f -> return $ o { optOutputFormat = f }
|
outFmt x o = readOutputFormat x >>= \f -> return $ o { optOutputFormats = optOutputFormats o ++ [f] }
|
||||||
outFile x o = return $ o { optOutputFile = Just x }
|
outFile x o = return $ o { optOutputFile = Just x }
|
||||||
addLibDir x o = return $ o { optLibraryPath = x:optLibraryPath o }
|
addLibDir x o = return $ o { optLibraryPath = x:optLibraryPath o }
|
||||||
setLibPath x o = return $ o { optLibraryPath = splitSearchPath x }
|
setLibPath x o = return $ o { optLibraryPath = splitSearchPath x }
|
||||||
|
|||||||
Reference in New Issue
Block a user