diff options
| author | krasimir <krasimir@chalmers.se> | 2010-10-02 13:03:57 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2010-10-02 13:03:57 +0000 |
| commit | cb8795c222ae86e4561e1009c382fe0b87e22b62 (patch) | |
| tree | eddba3e578a812347060f5f640cc49e58dc5b263 /src/compiler/GF/Infra | |
| parent | 72cc4ddb594599a5e3768a7b3921975542c3591a (diff) | |
refactor the API for random generation again. Now PGF contains probabilities in the abstract syntax
Diffstat (limited to 'src/compiler/GF/Infra')
| -rw-r--r-- | src/compiler/GF/Infra/Option.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/GF/Infra/Option.hs b/src/compiler/GF/Infra/Option.hs index a45d46a39..aac652768 100644 --- a/src/compiler/GF/Infra/Option.hs +++ b/src/compiler/GF/Infra/Option.hs @@ -155,7 +155,7 @@ data Flags = Flags { optGFLibPath :: Maybe FilePath, optRecomp :: Recomp, optPrinter :: [Printer], - optProb :: Bool, + optProbsFile :: Maybe FilePath, optRetainResource :: Bool, optName :: Maybe String, optAbsName :: Maybe String, @@ -255,7 +255,7 @@ defaultFlags = Flags { optGFLibPath = Nothing, optRecomp = RecompIfNewer, optPrinter = [], - optProb = False, + optProbsFile = Nothing, optRetainResource = False, optName = Nothing, @@ -329,7 +329,7 @@ optDescr = Option [] ["strip"] (NoArg (printer PrinterStrip)) "Remove name qualifiers when pretty-printing.", Option [] ["retain"] (NoArg (set $ \o -> o { optRetainResource = True })) "Retain opers.", - Option [] ["prob"] (NoArg (prob True)) "Read probabilities from '--# prob' pragmas.", + Option [] ["probs"] (ReqArg probsFile "file.probs") "Read probabilities from file.", Option ['n'] ["name"] (ReqArg name "NAME") (unlines ["Use NAME as the name of the output. This is used in the output file names, ", "with suffixes depending on the formats, and, when relevant, ", @@ -399,7 +399,7 @@ optDescr = gfLibPath x = set $ \o -> o { optGFLibPath = Just x } recomp x = set $ \o -> o { optRecomp = x } printer x = set $ \o -> o { optPrinter = x : optPrinter o } - prob x = set $ \o -> o { optProb = x } + probsFile x = set $ \o -> o { optProbsFile = Just x } name x = set $ \o -> o { optName = Just x } absName x = set $ \o -> o { optAbsName = Just x } |
