> The argument for evalDomainOpPred is complicated
> ( htpProperty(htPage,'domname) ), I don't know how to fix this problem
> further.
Oops, the argument for evalDomainOpPred is not complicated
at all, it's just (eval '(|List| (|Type|))) .
But still, this bug took me a long time to fix.
First, I removed SUBLIS from getOplistWithUniqueSignatures
(which only used by getOplistForConstructorForm, which only
used by reportOpsFromUnitDirectly). Because it interferes
with evalDomainOpPred:
(5) -> )lisp (|evalDomainOpPred| (eval '(|List| (|Integer|))) '(|has|
|Integer| (|OpenMath|)))
Value = NIL
(5) -> )lisp (|evalDomainOpPred| (eval '(|List| (|Integer|))) '(|has| |#1|
(|OpenMath|)))
Value = T
Second, the core of this patch is:
sigList := [x for x in sigList | evalDomainOpPred(unit, CADR x)]
Third, I moved a few printing lines and added:
sayBrightly ['" ", numOfNames, '" Names for ", #sigList,
'" Operations in this Domain."]
So that you can compare with HyperDoc results.
Finally, please test:
)read database.boot
)read i-syscmd.boot
)read br-op1.boot
)show somedomain
And compare with HyperDoc ("Browse"->"Constructors" -> "Operations")
diff --git a/src/interp/database.boot b/src/interp/database.boot
index 9bdb20e..323b398 100644
--- a/src/interp/database.boot
+++ b/src/interp/database.boot
@@ -484,7 +484,7 @@
getOplistWithUniqueSignatures(op,pairlis,signatureAlist) ==
alist:= nil
for [sig,:[slotNumber,pred,kind]] in signatureAlist | kind ~= 'Subsumed
repeat
alist:= insertAlist(SUBLIS(pairlis,[op,sig]),
- SUBLIS(pairlis,[pred,[kind,nil,slotNumber]]),
+ [pred,[kind,nil,slotNumber]],
alist)
alist
diff --git a/src/interp/i-syscmd.boot b/src/interp/i-syscmd.boot
index 2b2d889..42a8a11 100644
--- a/src/interp/i-syscmd.boot
+++ b/src/interp/i-syscmd.boot
@@ -2254,10 +2254,6 @@ reportOpsFromUnitDirectly unitForm ==
for [opt] in $options repeat
opt := selectOptionLC(opt,$showOptions,'optionError)
opt = 'operations =>
- $commentedOps: local := 0
- --new form is (<op> <signature> <slotNumber> <condition> <kind>)
- centerAndHighlight('"Operations",$LINELENGTH,specialChar 'hbar)
- sayBrightly '""
if isRecordOrUnion
then
constructorFunction:= GETL(top,"makeFunctionList") or
@@ -2268,7 +2264,20 @@ reportOpsFromUnitDirectly unitForm ==
[a,b,c] in funlist]
else
sigList:= REMDUP MSORT getOplistForConstructorForm unitForm
- say2PerLine [formatOperation(x,unit) for x in sigList]
+
+ $predicateList: local := GETDATABASE(top, 'PREDICATES)
+ -- CADR x is the type predicate of operation x
+ sigList := [x for x in sigList | evalDomainOpPred(unit, CADR x)]
+ -- CAAR x is the name of operation x
+ numOfNames := # REMDUP [CAAR x for x in sigList]
+ sayBrightly ['" ", numOfNames, '" Names for ", #sigList,
+ '" Operations in this Domain."]
+
+ $commentedOps: local := 0
+ --new form is (<op> <signature> <slotNumber> <condition> <kind>)
+ centerAndHighlight('"Operations",$LINELENGTH,specialChar 'hbar)
+ sayBrightly '""
+ say2PerLine [formatOperation(x, unit) for x in sigList]
if $commentedOps ~= 0 then
sayBrightly
['"Functions that are not yet implemented are preceded by",
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.