From 890d45579300f39d50a5a18a9f6feed8634ae8ba Mon Sep 17 00:00:00 2001 From: krasimir Date: Wed, 27 Jan 2010 09:39:14 +0000 Subject: cleanup the code of the PGF interpreter and polish the binary serialization to match the preliminary specification --- src/runtime/haskell/PGF.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/runtime/haskell/PGF.hs') 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))] -- cgit v1.2.3