mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 11:42:49 -06:00
one step deeper into records in PGF generation
This commit is contained in:
@@ -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,[LVar v]),(typ,toInteger (mx + v))) | v <- [0,1]] ++ ---- 1 or 2 vars
|
||||||
[((cat,[lab,lab2]),(ty,j)) |
|
[((cat,[lab,lab2]),(ty,j)) |
|
||||||
rs <- getRec typ, ((lab2, ty),j) <- zip rs [0..]]
|
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]
|
(cat,ls) <- lincats, ((lab, typ),i) <- zip ls [0..], let mx = length ls]
|
||||||
-- go to tables recursively
|
-- go to tables recursively
|
||||||
---- TODO: even go to deeper records
|
---- ... TODO: go to deeper records
|
||||||
where
|
where
|
||||||
getRec typ = case typ of
|
getRec typ = case typ of
|
||||||
RecType rs -> [rs] ---- [unlockTyp rs] -- (sort (unlockTyp ls))
|
RecType rs -> [rs] ---- [unlockTyp rs] -- (sort (unlockTyp ls))
|
||||||
|
|||||||
Reference in New Issue
Block a user