summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoraarne <unknown>2003-11-10 15:16:28 +0000
committeraarne <unknown>2003-11-10 15:16:28 +0000
commita931676d902033fdef17e7e086c40f5c753e9844 (patch)
tree1a66aa622a378c2b36d718387d8662e25150c3b9 /src
parent7a44450b34f80b156b8d663d3310e33aa7519910 (diff)
flags
Diffstat (limited to 'src')
-rw-r--r--src/GF/Compile/ShellState.hs4
-rw-r--r--src/GF/Grammar/Compute.hs7
-rw-r--r--src/GF/Shell/JGF.hs1
-rw-r--r--src/Today.hs2
4 files changed, 10 insertions, 4 deletions
diff --git a/src/GF/Compile/ShellState.hs b/src/GF/Compile/ShellState.hs
index 1f3078c48..4e84bd248 100644
--- a/src/GF/Compile/ShellState.hs
+++ b/src/GF/Compile/ShellState.hs
@@ -142,7 +142,7 @@ updateShellState opts sh (gr,(sgr,rts)) = do
prShellStateInfo :: ShellState -> String
prShellStateInfo sh = unlines [
- "main abstract : " +++ maybe "(none)" P.prt (abstract sh),
+ "main abstract : " +++ abstractName sh,
"main concrete : " +++ maybe "(none)" P.prt (concrete sh),
"all concretes : " +++ unwords (map (P.prt . fst) (concretes sh)),
"canonical modules :" +++ unwords (map (P.prt .fst) (M.modules (canModules sh))),
@@ -150,6 +150,8 @@ prShellStateInfo sh = unlines [
"global options : " +++ prOpts (gloptions sh)
]
+abstractName sh = maybe "(none)" P.prt (abstract sh)
+
-- throw away those abstracts that are not needed --- could be more aggressive
filterAbstracts :: Maybe Ident -> CanonGrammar -> CanonGrammar
diff --git a/src/GF/Grammar/Compute.hs b/src/GF/Grammar/Compute.hs
index 3dd90012d..5bcc5dd1e 100644
--- a/src/GF/Grammar/Compute.hs
+++ b/src/GF/Grammar/Compute.hs
@@ -113,6 +113,9 @@ computeTerm gr = comp where
_ -> returnC $ S t' v'
+ -- normalize away empty tokens
+ K "" -> return Empty
+
-- glue if you can
Glue x0 y0 -> do
x <- comp g x0
@@ -123,8 +126,8 @@ computeTerm gr = comp where
(S (T i cs) e, s) -> prawitz g i (flip Glue s) cs e
(s, S (T i cs) e) -> prawitz g i (Glue s) cs e
- (_,K "") -> return x
- (K "",_) -> return y
+ (_,Empty) -> return x
+ (Empty,_) -> return y
(K a, K b) -> return $ K (a ++ b)
(K a, Alts (d,vs)) -> do
let glx = Glue x
diff --git a/src/GF/Shell/JGF.hs b/src/GF/Shell/JGF.hs
index 215ad3e3e..93c0868ac 100644
--- a/src/GF/Shell/JGF.hs
+++ b/src/GF/Shell/JGF.hs
@@ -51,6 +51,7 @@ welcome =
initEditMsgJavaX env = encodeUTF8 $ unlines $ tagXML "gfinit" $
tagsXML "newcat" [["n" +++ cat] | (_,cat) <- newCatMenu env] ++
+ tagXML "topic" [abstractName env] ++
tagXML "language" [prLanguage langAbstract] ++
concat [tagAttrXML "language" ("file",file) [prLanguage lang] |
(file,lang) <- zip (allGrammarFileNames env) (allLanguages env)]
diff --git a/src/Today.hs b/src/Today.hs
index 1ed560bc7..a0a8c2fdc 100644
--- a/src/Today.hs
+++ b/src/Today.hs
@@ -1 +1 @@
-module Today where today = "Mon Nov 10 16:45:46 CET 2003"
+module Today where today = "Mon Nov 10 17:00:26 CET 2003"