Skip to content

Commit 4c24fc9

Browse files
committed
another case for evaluation under a table
1 parent 81d4722 commit 4c24fc9

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/compiler/api/GF/Compile/Compute/Concrete2.hs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,13 +755,22 @@ value2termM flat xs (VS v1 v2 vs) =
755755
case v1 of
756756
VT vty env s cs -> do
757757
ty <- value2termM flat xs vty
758+
g <- globals
758759
cs <- forM cs $ \(p,t) -> do
759760
let (_,xs',env') = pattVars (length xs,xs,env) p
760-
g <- globals
761761
t <- value2termM flat xs' (eval g env' s t vs)
762762
return (p,t)
763763
t2 <- value2termM flat xs v2
764764
return (S (T (TTyped ty) cs) t2)
765+
766+
VV vty vs' -> do
767+
ty <- value2termM flat xs vty
768+
g <- globals
769+
ts <- forM vs' $ \v ->
770+
value2termM flat xs (apply g v vs)
771+
t2 <- value2termM flat xs v2
772+
return (S (V ty ts) t2)
773+
765774
v1 -> do
766775
t1 <- value2termM flat xs v1
767776
t2 <- value2termM flat xs v2

0 commit comments

Comments
 (0)