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/runtime/haskell/PGF.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/runtime/haskell/PGF.hs')
| -rw-r--r-- | src/runtime/haskell/PGF.hs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/runtime/haskell/PGF.hs b/src/runtime/haskell/PGF.hs index 85b661c3d..9bc5c6567 100644 --- a/src/runtime/haskell/PGF.hs +++ b/src/runtime/haskell/PGF.hs @@ -103,7 +103,7 @@ import PGF.VisualizeTree import PGF.Macros import PGF.Expr (Tree) import PGF.Morphology -import PGF.Data hiding (functions) +import PGF.Data import PGF.Binary import qualified PGF.Parse as Parse @@ -252,10 +252,12 @@ generateAllDepth pgf cat = generate pgf cat abstractName pgf = absname pgf -languages pgf = cncnames pgf +languages pgf = Map.keys (concretes pgf) languageCode pgf lang = - fmap (replace '_' '-') $ lookConcrFlag pgf lang (mkCId "language") + case lookConcrFlag pgf lang (mkCId "language") of + Just (LStr s) -> Just (replace '_' '-' s) + _ -> Nothing categories pgf = [c | (c,hs) <- Map.toList (cats (abstract pgf))] |
