summaryrefslogtreecommitdiff
path: root/src-3.0/GF/Command
diff options
context:
space:
mode:
authorkr.angelov <kr.angelov@chalmers.se>2008-05-21 13:10:54 +0000
committerkr.angelov <kr.angelov@chalmers.se>2008-05-21 13:10:54 +0000
commitc544ef31823c7d2c28c28cae408cca5d71e6978d (patch)
treeb9693bc684d1737062e45438cedf7536cf5513d5 /src-3.0/GF/Command
parent529374caaa6d451400f57f1ff82106d89d603944 (diff)
use ByteString internally in Ident, CId and Label
Diffstat (limited to 'src-3.0/GF/Command')
-rw-r--r--src-3.0/GF/Command/Commands.hs9
-rw-r--r--src-3.0/GF/Command/PPrTree.hs4
2 files changed, 7 insertions, 6 deletions
diff --git a/src-3.0/GF/Command/Commands.hs b/src-3.0/GF/Command/Commands.hs
index d5b5a8768..7f84805f6 100644
--- a/src-3.0/GF/Command/Commands.hs
+++ b/src-3.0/GF/Command/Commands.hs
@@ -12,6 +12,7 @@ module GF.Command.Commands (
import GF.Command.AbsGFShell hiding (Tree)
import GF.Command.PPrTree
import GF.Command.ParGFShell
+import GF.GFCC.CId
import GF.GFCC.ShowLinearize
import GF.GFCC.API
import GF.GFCC.Macros
@@ -131,10 +132,10 @@ allCommands mgr = Map.fromAscList [
optLin opts t = unlines [linea lang t | lang <- optLangs opts] where
linea lang = case opts of
- _ | isOpt "all" opts -> allLinearize gr (cid lang)
- _ | isOpt "table" opts -> tableLinearize gr (cid lang)
- _ | isOpt "term" opts -> termLinearize gr (cid lang)
- _ | isOpt "record" opts -> recordLinearize gr (cid lang)
+ _ | isOpt "all" opts -> allLinearize gr (mkCId lang)
+ _ | isOpt "table" opts -> tableLinearize gr (mkCId lang)
+ _ | isOpt "term" opts -> termLinearize gr (mkCId lang)
+ _ | isOpt "record" opts -> recordLinearize gr (mkCId lang)
_ -> linearize mgr lang
diff --git a/src-3.0/GF/Command/PPrTree.hs b/src-3.0/GF/Command/PPrTree.hs
index 7372c722d..f80484799 100644
--- a/src-3.0/GF/Command/PPrTree.hs
+++ b/src-3.0/GF/Command/PPrTree.hs
@@ -21,7 +21,7 @@ tree2exp t = case t of
TStr s -> tree (AS s) []
TFloat d -> tree (AF d) []
where
- i2i (Ident s) = CId s
+ i2i (Ident s) = mkCId s
prExp :: Exp -> String
prExp = printTree . exp2tree
@@ -36,4 +36,4 @@ exp2tree (DTr xs at ts) = tabs (map i4i xs) (tapp at (map exp2tree ts))
tapp (AS i) [] = TStr i
tapp (AF i) [] = TFloat i
tapp (AM i) [] = TId (Ident "?") ----
- i4i (CId s) = Ident s
+ i4i s = Ident (prCId s)