summaryrefslogtreecommitdiff
path: root/src/GF/Compile/CheckGrammar.hs
diff options
context:
space:
mode:
authoraarne <unknown>2005-05-09 08:45:23 +0000
committeraarne <unknown>2005-05-09 08:45:23 +0000
commit2805a8ee2cb0f431301b09443709b78699acd671 (patch)
tree1a5f0cc327393b88390f9a6f9c32020b33758ccc /src/GF/Compile/CheckGrammar.hs
parent2b059b811db03a53e8e0f8ec1a655e507851a995 (diff)
fix in CheckGrammar case exprs
Diffstat (limited to 'src/GF/Compile/CheckGrammar.hs')
-rw-r--r--src/GF/Compile/CheckGrammar.hs13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/GF/Compile/CheckGrammar.hs b/src/GF/Compile/CheckGrammar.hs
index 59c0aec0b..05227f284 100644
--- a/src/GF/Compile/CheckGrammar.hs
+++ b/src/GF/Compile/CheckGrammar.hs
@@ -5,9 +5,9 @@
-- Stability : (stable)
-- Portability : (portable)
--
--- > CVS $Date: 2005/04/28 16:42:48 $
+-- > CVS $Date: 2005/05/09 09:45:23 $
-- > CVS $Author: aarne $
--- > CVS $Revision: 1.25 $
+-- > CVS $Revision: 1.26 $
--
-- AR 4\/12\/1999 -- 1\/4\/2000 -- 8\/9\/2001 -- 15\/5\/2002 -- 27\/11\/2002 -- 18\/6\/2003
--
@@ -565,7 +565,7 @@ checkLType env trm typ0 = do
--- checkIfComplexVariantType trm typ
return (FV (map fst ttys), typ) --- typ' ?
- S tab arg -> do
+ S tab arg -> checks [ do
(tab',ty) <- infer tab
ty' <- comp ty
case ty' of
@@ -574,7 +574,12 @@ checkLType env trm typ0 = do
checkEq typ t trm
return (S tab' arg', t)
_ -> prtFail "table type expected for applied table instead of" ty'
-
+ , do
+ (arg',ty) <- infer arg
+ ty' <- comp ty
+ (tab',_) <- check tab (Table ty' typ)
+ return (S tab' arg', typ)
+ ]
Let (x,(mty,def)) body -> case mty of
Just ty -> do
(def',ty') <- check def ty