summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraarne <aarne@chalmers.se>2009-12-16 16:25:52 +0000
committeraarne <aarne@chalmers.se>2009-12-16 16:25:52 +0000
commit6a130d2e8640727e2481eaba05fd45494bc1d416 (patch)
treece40c569e890f3ef2abede6ad8f0093fd2bcfeca
parent666fcd6566d2bafcd0f9a165ef64d5874c7f5a2c (diff)
one step deeper into records in PGF generation
-rw-r--r--src/compiler/GF/Compile/GrammarToPGF.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/compiler/GF/Compile/GrammarToPGF.hs b/src/compiler/GF/Compile/GrammarToPGF.hs
index 7cd00550a..2a4085cc3 100644
--- a/src/compiler/GF/Compile/GrammarToPGF.hs
+++ b/src/compiler/GF/Compile/GrammarToPGF.hs
@@ -414,10 +414,16 @@ paramValues cgr = (labels,untyps,typs) where
[((cat,[LVar v]),(typ,toInteger (mx + v))) | v <- [0,1]] ++ ---- 1 or 2 vars
[((cat,[lab,lab2]),(ty,j)) |
rs <- getRec typ, ((lab2, ty),j) <- zip rs [0..]]
+ ++
+ ---- one more level, but: ...
+ [((cat,[lab,lab2,lab3]),(ty,j)) |
+ rss <- getRec typ, ((lab2, ty0),j0) <- zip rss [0..],
+ (_,ty2) <- rss,
+ rs <- getRec ty2, ((lab3, ty),j) <- zip rs [0..]]
|
(cat,ls) <- lincats, ((lab, typ),i) <- zip ls [0..], let mx = length ls]
-- go to tables recursively
- ---- TODO: even go to deeper records
+ ---- ... TODO: go to deeper records
where
getRec typ = case typ of
RecType rs -> [rs] ---- [unlockTyp rs] -- (sort (unlockTyp ls))