diff options
| author | aarne <aarne@chalmers.se> | 2010-12-07 16:05:37 +0000 |
|---|---|---|
| committer | aarne <aarne@chalmers.se> | 2010-12-07 16:05:37 +0000 |
| commit | 978e2e4241c02ef015e7cca274bebb0a19966191 (patch) | |
| tree | 46981f75d838e5ca5c1a85d384897e7288d65220 /src/compiler/GF/Command/Commands.hs | |
| parent | b39d69eeae15e105255610f1884304921a18c01f (diff) | |
shell command pg -pgf writes current pgf into a file
Diffstat (limited to 'src/compiler/GF/Command/Commands.hs')
| -rw-r--r-- | src/compiler/GF/Command/Commands.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/GF/Command/Commands.hs b/src/compiler/GF/Command/Commands.hs index fbcefcba8..17099be68 100644 --- a/src/compiler/GF/Command/Commands.hs +++ b/src/compiler/GF/Command/Commands.hs @@ -34,6 +34,7 @@ import GF.Command.Messages import GF.Text.Lexing import GF.Text.Transliterations import GF.Quiz +import GFC (writePGF) import GF.Command.TreeOperations ---- temporary place for typecheck and compute @@ -555,6 +556,7 @@ allCommands env@(pgf, mos) = Map.fromList [ ("fullform", "print the fullform lexicon"), ("funs", "show just the names and types of abstract syntax functions"), ("missing","show just the names of functions that have no linearization"), + ("pgf", "write current pgf image in file"), ("words", "print the list of words") ], examples = [ @@ -1075,6 +1077,7 @@ allCommands env@(pgf, mos) = Map.fromList [ _ -> fromExprs es prGrammar opts + | isOpt "pgf" opts = dieIOE (writePGF noOptions pgf) >> return void ---- opts | isOpt "cats" opts = return $ fromString $ unwords $ map showCId $ categories pgf | isOpt "funs" opts = return $ fromString $ unlines $ map showFun $ funsigs pgf | isOpt "fullform" opts = return $ fromString $ concatMap (morpho "" prFullFormLexicon) $ optLangs opts |
