From a1de530b8c7a40177f1e8c0ebf84d8e9359ef503 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Thu, 11 Aug 2011 14:12:54 +0000 Subject: * interp/define.boot (extendsCategoryBasic): Handle attribute third argument too. --- src/interp/define.boot | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/interp') diff --git a/src/interp/define.boot b/src/interp/define.boot index 493d87de..c854eb27 100644 --- a/src/interp/define.boot +++ b/src/interp/define.boot @@ -320,15 +320,20 @@ extendsCategory(dom,u,v,env) == extendsCategoryBasic(dom,u,v,env) == v is ['IF,p,['ATTRIBUTE,c],.] => - uVec := compMakeCategoryObject(u,env).expr + uVec := compMakeCategoryObject(u,env).expr or return false cons? c and isCategoryForm(c,env) => LASSOC(c,second categoryHierarchy uVec) is [=p,:.] LASSOC(c,categoryAttributes uVec) is [=p,:.] u is ["Join",:l] => or/[extendsCategoryBasic(dom,x,v,env) for x in l] u = v => true + v is ['ATTRIBUTE,c] => + cons? c and isCategoryForm(c,env) => extendsCategoryBasic(dom,u,c,env) + u is ['CATEGORY,.,:l] => or/[extendsCategoryBasic(dom,x,v,env) for x in l] + uVec := compMakeCategoryObject(u,env).expr or return false + LASSOC(c,categoryAttributes uVec) is [=true] isCategoryForm(v,env) => catExtendsCat?(u,v,env) v is ['SIGNATURE,op,sig] => - uVec := compMakeCategoryObject(u,env).expr + uVec := compMakeCategoryObject(u,env).expr or return false or/[categoryRef(uVec,i) is [[=op,=sig],:.] for i in 6..maxIndex uVec] u is ['CATEGORY,.,:l] => v is ['IF,:.] => listMember?(v,l) -- cgit v1.2.3