summaryrefslogtreecommitdiff
path: root/src/GF/Grammar
diff options
context:
space:
mode:
Diffstat (limited to 'src/GF/Grammar')
-rw-r--r--src/GF/Grammar/Compute.hs4
-rw-r--r--src/GF/Grammar/Refresh.hs2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/GF/Grammar/Compute.hs b/src/GF/Grammar/Compute.hs
index 705b81ded..e400bce4e 100644
--- a/src/GF/Grammar/Compute.hs
+++ b/src/GF/Grammar/Compute.hs
@@ -172,6 +172,10 @@ computeTerm gr = comp where
_ -> return $ ExtR r' s'
-- case-expand tables
+ T i@(TComp _) cs -> do
+ cs' <- mapPairsM (comp g) cs
+ return $ T i cs'
+
T i cs -> do
pty0 <- getTableType i
ptyp <- comp g pty0
diff --git a/src/GF/Grammar/Refresh.hs b/src/GF/Grammar/Refresh.hs
index ff4c9b8af..b89897dfb 100644
--- a/src/GF/Grammar/Refresh.hs
+++ b/src/GF/Grammar/Refresh.hs
@@ -86,7 +86,7 @@ refreshGrammar = liftM (MGrammar . snd) . foldM refreshModule (0,[]) . modules
refreshModule :: (Int,[SourceModule]) -> SourceModule -> Err (Int,[SourceModule])
refreshModule (k,ms) mi@(i,m) = case m of
- ModMod mo@(Module mt fs st me ops js) | (isModCnc mo || mt == MTResource) -> do
+ ModMod mo@(Module mt fs st me ops js) | (isModCnc mo || isModRes mo) -> do
(k',js') <- foldM refreshRes (k,[]) $ tree2list js
return (k', (i, ModMod(Module mt fs st me ops (buildTree js'))) : ms)
_ -> return (k, mi:ms)