summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoraarne <unknown>2005-05-09 14:44:59 +0000
committeraarne <unknown>2005-05-09 14:44:59 +0000
commit6a79b6fe2d3b55f1ea32aab961ecb10da4dc302d (patch)
tree348e051bd09ba3bcd0cae7eeea35fc5c3e75f3e6 /src
parent3ce7d2ca18d9a00e150b1e03b32b59a1249ad6ba (diff)
empty in pre
Diffstat (limited to 'src')
-rw-r--r--src/GF/Grammar/Compute.hs15
-rw-r--r--src/GF/Grammar/Macros.hs5
2 files changed, 12 insertions, 8 deletions
diff --git a/src/GF/Grammar/Compute.hs b/src/GF/Grammar/Compute.hs
index 3cc3c7dff..0401c2417 100644
--- a/src/GF/Grammar/Compute.hs
+++ b/src/GF/Grammar/Compute.hs
@@ -5,9 +5,9 @@
-- Stability : (stable)
-- Portability : (portable)
--
--- > CVS $Date: 2005/05/09 09:45:23 $
+-- > CVS $Date: 2005/05/09 15:44:59 $
-- > CVS $Author: aarne $
--- > CVS $Revision: 1.16 $
+-- > CVS $Revision: 1.17 $
--
-- Computation of source terms. Used in compilation and in @cc@ command.
-----------------------------------------------------------------------------
@@ -167,14 +167,17 @@ computeTerm gr = comp where
(_,Empty) -> return x
(Empty,_) -> return y
(K a, K b) -> return $ K (a ++ b)
- (K a, Alts (d,vs)) -> do
----- (_, Alts (d,vs)) -> do
+ (_, Alts (d,vs)) -> do
+---- (K a, Alts (d,vs)) -> do
let glx = Glue x
comp g $ Alts (glx d, [(glx v,c) | (v,c) <- vs])
- (Alts _, K a) -> checks [do
+ (Alts _, ka) -> checks [do
+ y' <- strsFromTerm ka
+---- (Alts _, K a) -> checks [do
x' <- strsFromTerm x -- this may fail when compiling opers
return $ variants [
- foldr1 C (map K (str2strings (glueStr v (str a)))) | v <- x']
+ foldr1 C (map K (str2strings (glueStr v u))) | v <- x', u <- y']
+---- foldr1 C (map K (str2strings (glueStr v (str a)))) | v <- x']
,return $ Glue x y
]
(FV ks,_) -> do
diff --git a/src/GF/Grammar/Macros.hs b/src/GF/Grammar/Macros.hs
index db05f95a0..89866c6bd 100644
--- a/src/GF/Grammar/Macros.hs
+++ b/src/GF/Grammar/Macros.hs
@@ -5,9 +5,9 @@
-- Stability : (stable)
-- Portability : (portable)
--
--- > CVS $Date: 2005/04/28 16:42:49 $
+-- > CVS $Date: 2005/05/09 15:45:00 $
-- > CVS $Author: aarne $
--- > CVS $Revision: 1.20 $
+-- > CVS $Revision: 1.21 $
--
-- Macros for constructing and analysing source code terms.
--
@@ -565,6 +565,7 @@ markLinFields f t = case t of
strsFromTerm :: Term -> Err [Str]
strsFromTerm t = case unComputed t of
K s -> return [str s]
+ Empty -> return [str []]
C s t -> do
s' <- strsFromTerm s
t' <- strsFromTerm t