summaryrefslogtreecommitdiff
path: root/src/GF/Compile/Evaluate.hs
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2006-11-12 13:24:13 +0000
committeraarne <aarne@cs.chalmers.se>2006-11-12 13:24:13 +0000
commit52bb034d8ea07433e03de4c320db013b7c62aee7 (patch)
treef86295a7bdf23ba3cbb4cb4237cbc9bbe7aceaa4 /src/GF/Compile/Evaluate.hs
parent69dba72a3e0352e433b4cac6726c8e3359bfd5c7 (diff)
thread EEnv into ShellState
Diffstat (limited to 'src/GF/Compile/Evaluate.hs')
-rw-r--r--src/GF/Compile/Evaluate.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/GF/Compile/Evaluate.hs b/src/GF/Compile/Evaluate.hs
index bb5ece46b..1f8c328dc 100644
--- a/src/GF/Compile/Evaluate.hs
+++ b/src/GF/Compile/Evaluate.hs
@@ -12,7 +12,7 @@
-- Computation of source terms. Used in compilation and in @cc@ command.
-----------------------------------------------------------------------------
-module GF.Compile.Evaluate (appEvalConcrete) where
+module GF.Compile.Evaluate (appEvalConcrete, EEnv, emptyEEnv) where
import GF.Data.Operations
import GF.Grammar.Grammar
@@ -98,7 +98,7 @@ apps t = case t of
App f a -> (f',xs ++ [a]) where (f',xs) = apps f
_ -> (t,[])
-appEvalConcrete gr bt = liftM fst $ appSTM (evalConcrete gr bt) emptyEEnv
+appEvalConcrete gr bt env = appSTM (evalConcrete gr bt) env
evalConcrete :: SourceGrammar -> BinTree Ident Info -> STM EEnv (BinTree Ident Info)
evalConcrete gr mo = mapMTree evaldef mo where
@@ -350,6 +350,9 @@ evalConcrete gr mo = mapMTree evaldef mo where
(R rs, R ss) -> stmErr $ plusRecord r' s'
(RecType rs, RecType ss) -> stmErr $ plusRecType r' s'
+
+ (_, FV ss) -> liftM FV $ mapM (comp g) [ExtR t u | u <- ss]
+
_ -> return $ ExtR r' s'
-- case-expand tables