diff options
| author | bjorn <bjorn@bringert.net> | 2008-09-03 15:42:11 +0000 |
|---|---|---|
| committer | bjorn <bjorn@bringert.net> | 2008-09-03 15:42:11 +0000 |
| commit | 207ddc4cb687159d714e14ad0e90444b393c268a (patch) | |
| tree | 4ee2d35da28c1b38deddf60df007175c7252d7f0 /src/GF/Infra | |
| parent | 74826158cbe6ad87c0cdfaef7814820c547a3306 (diff) | |
Added --haskell-prefix option for changing the constructor prefix in generated Haskell modules.
Diffstat (limited to 'src/GF/Infra')
| -rw-r--r-- | src/GF/Infra/Option.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/GF/Infra/Option.hs b/src/GF/Infra/Option.hs index ed8551957..dfb2a2aa0 100644 --- a/src/GF/Infra/Option.hs +++ b/src/GF/Infra/Option.hs @@ -150,6 +150,7 @@ data Flags = Flags { optGFODir :: FilePath, optOutputFormats :: [OutputFormat], optSISR :: Maybe SISRFormat, + optHaskellPrefix :: String, optOutputFile :: Maybe FilePath, optOutputDir :: Maybe FilePath, optRecomp :: Recomp, @@ -294,6 +295,7 @@ defaultFlags = Flags { optGFODir = ".", optOutputFormats = [FmtPGF], optSISR = Nothing, + optHaskellPrefix = "G", optOutputFile = Nothing, optOutputDir = Nothing, optRecomp = RecompIfNewer, @@ -401,6 +403,8 @@ optDescr = Option [] ["sisr"] (ReqArg sisrFmt "FMT") (unlines ["Include SISR tags in generated speech recognition grammars.", "FMT can be one of: old, 1.0"]), + Option [] ["haskell-prefix"] (ReqArg hsPrefix "PREFIX") + "Constructor prefix for generated Haskell code. Default: G", Option ['o'] ["output-file"] (ReqArg outFile "FILE") "Save output in FILE (default is out.X, where X depends on output format.", Option ['D'] ["output-dir"] (ReqArg outDir "DIR") @@ -432,6 +436,7 @@ optDescr = "old" -> set $ \o -> o { optSISR = Just SISR_WD20030401 } "1.0" -> set $ \o -> o { optSISR = Just SISR_1_0 } _ -> fail $ "Unknown SISR format: " ++ show x + hsPrefix x = set $ \o -> o { optHaskellPrefix = x } outFile x = set $ \o -> o { optOutputFile = Just x } outDir x = set $ \o -> o { optOutputDir = Just x } recomp x = set $ \o -> o { optRecomp = x } |
