Dear Fabian,

I took you code into a file $HOME/mysquad/quad.spad, started fricas and then


(1) -> )compile quad.spad
   Compiling FriCAS source code from file
      /home/hemmecke/scratch/myquad/quad.spad using old system
      compiler.
   MYFORM abbreviates domain MyQuadraticForm
------------------------------------------------------------------------
   initializing NRLIB MYFORM for MyQuadraticForm
   compiling into NRLIB MYFORM
   compiling exported myQuadraticForm : SquareMatrix(n,K) -> %
Time: 0.02 SEC.

   compiling exported matrix : % -> SquareMatrix(n,K)
      MYFORM;matrix;%Sm;2 is replaced by q
Time: 0 SEC.

   compiling exported elt : (%,DirectProduct(n,K)) -> K
Time: 0 SEC.

(time taken in buildFunctor:  241)
Time: 0 SEC.


   Cumulative Statistics for Constructor MyQuadraticForm
      Time: 0.03 seconds

--------------non extending category----------------------
.. MyQuadraticForm(#1,#2) of cat
(|Join| (|AbelianGroup|)
        (CATEGORY |domain|
         (SIGNATURE |myQuadraticForm| (% (|SquareMatrix| |#1| |#2|)))
         (SIGNATURE |matrix| ((|SquareMatrix| |#1| |#2|) %))
         (SIGNATURE |elt| (|#2| % (|DirectProduct| |#1| |#2|)))))   has no
(|SquareMatrixCategory| |#1| |#2| (|DirectProduct| |#1| |#2|)
(|DirectProduct| |#1| |#2|)) finalizing NRLIB MYFORM
   Processing MyQuadraticForm for Browser database:
--------constructor---------
--------(myQuadraticForm (% (SquareMatrix n K)))---------
--------(matrix ((SquareMatrix n K) %))---------
--------(elt (K % (DirectProduct n K)))---------
; compiling file "/home/hemmecke/scratch/myquad/MYFORM.NRLIB/MYFORM.lsp" (written 22 JAN 2025 10:30:39 AM):

; file: /home/hemmecke/scratch/myquad/MYFORM.NRLIB/MYFORM.lsp
; in: SDEFUN |MYFORM;matrix;%Sm;2|
;     (BOOT::SDEFUN BOOT::|MYFORM;matrix;%Sm;2|
;                   ((BOOT::|q| (BOOT::%))
;                    (BOOT::% (BOOT::|SquareMatrix| BOOT::|n| BOOT::K)))
;                   BOOT::|q|)
; --> PROGN SB-IMPL::%DEFUN SB-IMPL::%DEFUN SB-INT:NAMED-LAMBDA
; ==>
;   #'(SB-INT:NAMED-LAMBDA BOOT::|MYFORM;matrix;%Sm;2|
;         (BOOT::|q| BOOT::%)
;       (BLOCK BOOT::|MYFORM;matrix;%Sm;2| BOOT::|q|))
;
; caught STYLE-WARNING:
;   The variable % is defined but never used.
;
; compilation unit finished
;   caught 1 STYLE-WARNING condition


; wrote /home/hemmecke/scratch/myquad/MYFORM.NRLIB/MYFORM.fasl
; compilation finished in 0:00:00.007
------------------------------------------------------------------------
   MyQuadraticForm is now explicitly exposed in frame frame1
   MyQuadraticForm will be automatically loaded when needed from
      /home/hemmecke/scratch/myquad/MYFORM.NRLIB/MYFORM


===========

Now in the HyperDoc window I clicked Browse, entered MyQuadraticForm and clicked on "constructors". The window then looks like in the attachment.


On 1/22/25 10:22, Fabian Hassler wrote:
I have to say that the steps that you propose do not work for me. Do I have
to be in any specific directory to make it work.

No.

I do start fricas from the command line (Hyperdoc opens in an xwindow). I
do compile ")compile quad.spad". Then I search for myQuadraticForm or
MyQuadraticForm but I do not find anything (even after closing and
reopening of the window).

Note that MyQuadraticForm will not be in HyperDoc after you leave fricas and start fricas again. Entering your docstrings from quad.spad to hyperdoc is done at compile-time and non-persistent.

Ralf

--
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 fricas-devel+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/fricas-devel/13137810-90f0-4a7b-9d91-daf97c04a258%40hemmecke.org.

Reply via email to