diff options
| author | krasimir <krasimir@chalmers.se> | 2010-01-27 09:39:14 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2010-01-27 09:39:14 +0000 |
| commit | 890d45579300f39d50a5a18a9f6feed8634ae8ba (patch) | |
| tree | 056af80026eea5d67b68ef74f50ee5931566c822 /src/compiler/GF/Compile/Export.hs | |
| parent | b206aa3464bf8b766b61a31efb72d03c7dd3c1a9 (diff) | |
cleanup the code of the PGF interpreter and polish the binary serialization to match the preliminary specification
Diffstat (limited to 'src/compiler/GF/Compile/Export.hs')
| -rw-r--r-- | src/compiler/GF/Compile/Export.hs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/compiler/GF/Compile/Export.hs b/src/compiler/GF/Compile/Export.hs index 463a48aa6..943231a36 100644 --- a/src/compiler/GF/Compile/Export.hs +++ b/src/compiler/GF/Compile/Export.hs @@ -1,7 +1,6 @@ module GF.Compile.Export where -import PGF.CId -import PGF.Data (PGF(..)) +import PGF import PGF.Printer import GF.Compile.PGFtoHaskell import GF.Compile.PGFtoProlog @@ -48,17 +47,17 @@ exportPGF opts fmt pgf = FmtRegExp -> single "rexp" regexpPrinter FmtFA -> single "dot" slfGraphvizPrinter where - name = fromMaybe (showCId (absname pgf)) (flag optName opts) + name = fromMaybe (showCId (abstractName pgf)) (flag optName opts) multi :: String -> (PGF -> String) -> [(FilePath,String)] multi ext pr = [(name <.> ext, pr pgf)] single :: String -> (PGF -> CId -> String) -> [(FilePath,String)] - single ext pr = [(showCId cnc <.> ext, pr pgf cnc) | cnc <- cncnames pgf] + single ext pr = [(showCId cnc <.> ext, pr pgf cnc) | cnc <- languages pgf] -- | Get the name of the concrete syntax to generate output from. -- FIXME: there should be an option to change this. outputConcr :: PGF -> CId -outputConcr pgf = case cncnames pgf of +outputConcr pgf = case languages pgf of [] -> error "No concrete syntax." cnc:_ -> cnc |
