1
0
forked from GitHub/gf-core

work with GrammarToGFCC, not complete

This commit is contained in:
aarne
2007-10-01 20:14:23 +00:00
parent 8179f5dcf9
commit 7bcf5e64d4
2 changed files with 75 additions and 85 deletions

View File

@@ -49,6 +49,9 @@ inferTerm args trm = case trm of
P t u -> do
R tys <- infer t
case u of
R [v] -> infer $ P t v
R (v:vs) -> infer $ P (head tys) (R vs) -----
C i -> if (i < length tys)
then (return $ tys !! i) -- record: index must be known
else error ("too few fields in " ++ printTree (R tys))