diff options
Diffstat (limited to 'src/interp')
-rw-r--r-- | src/interp/cattable.boot | 10 | ||||
-rw-r--r-- | src/interp/i-funsel.boot | 6 |
2 files changed, 9 insertions, 7 deletions
diff --git a/src/interp/cattable.boot b/src/interp/cattable.boot index bcffbb70..7d3198e1 100644 --- a/src/interp/cattable.boot +++ b/src/interp/cattable.boot @@ -35,10 +35,12 @@ import simpbool import g_-util namespace BOOT +module cattable where + hasCat: (%Instantiation,%Instantiation) -> %Code -hasCat(domainOrCatName,catName) == - catName is "Type" -- every domain is a Type - or constructorHasCategoryFromDB [domainOrCatName,:catName] +hasCat(dom,cat) == + cat.op is "Type" -- every domain is a Type + or constructorHasCategoryFromDB [dom.op,:cat.op] showCategoryTable con == [[b,:val] for (key :=[a,:b]) in HKEYS _*HASCATEGORY_-HASH_* @@ -123,7 +125,7 @@ simpHasPred(pred,:options) == main where IDENTP npred or null hasIdent npred => npred pred evalHas (pred := ["has",d,cat]) == - x := hasCat(first d,first cat) + x := hasCat(d,cat) y := rest cat => npred := or/[p for [args,:p] in x | y = args] => simp npred false --if not there, it is false diff --git a/src/interp/i-funsel.boot b/src/interp/i-funsel.boot index 512b0a77..ffdea965 100644 --- a/src/interp/i-funsel.boot +++ b/src/interp/i-funsel.boot @@ -1480,9 +1480,9 @@ hasCaty(d,cat,SL) == for c in cat.args while SL isnt "failed" repeat SL := hasCaty(d,c,SL) SL - x:= hasCat(opOf d,opOf cat) => - y:= KDR cat => - S := constructSubst d + x := (cons? d and cons? cat and hasCat(d,cat)) => + y := KDR cat => + S := constructSubst d for [z,:cond] in x until S1 isnt 'failed repeat S' := [[p, :mkDomPvar(p, d, z, y)] for [p,:d] in S] if $domPvar then |