mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-22 01:22:51 -06:00
Transfer generation: cat constructors should not have tree types.
This commit is contained in:
@@ -49,9 +49,9 @@ cats2cat :: CIdent -- ^ the name of the Cat type
|
|||||||
-> [(A.Ident,A.Context)] -> Decl
|
-> [(A.Ident,A.Context)] -> Decl
|
||||||
cats2cat cat tree = C.DataDecl cat C.EType . map (uncurry catCons)
|
cats2cat cat tree = C.DataDecl cat C.EType . map (uncurry catCons)
|
||||||
where
|
where
|
||||||
catCons i c = C.ConsDecl (id2id i) (addTree tree $ catConsType c)
|
catCons i c = C.ConsDecl (id2id i) (catConsType c)
|
||||||
catConsType = foldr pi (C.EVar cat)
|
catConsType = foldr pi (C.EVar cat)
|
||||||
pi (i,x) t = C.EPi (id2pv i) (term2exp x) t
|
pi (i,x) t = C.EPi (id2pv i) (addTree tree $ term2exp x) t
|
||||||
|
|
||||||
funs2tree :: CIdent -- ^ the name of the Cat type
|
funs2tree :: CIdent -- ^ the name of the Cat type
|
||||||
-> CIdent -- ^ the name of the Tree type
|
-> CIdent -- ^ the name of the Tree type
|
||||||
|
|||||||
Reference in New Issue
Block a user