Note: I assumed that there is a function to convert integers to
strings.  ATM one has to do something like

    toString(i : Integer) : String == FORMAT(nil, "~d", i)$Lisp

or

    toString(i : Integer) : String == unparse(i::InputForm)$InputForm

Looking into the implementation of the function "latex" also suggests

  toString(i: Integer): String == string(i)$String

Case of Product is easier:

ProductUnparser(A : SetCategory, B : SetCategory,
                 UA : UnparserCategory(A), UB : UnparserCategory(B)) _
                : UnparserCategory(Product(A, B))
  == add

    show(x) ==
        concat("[", concat(show(first(x))$UA, concat(", ", _
           concat(show(second(x)$UB, "]")))))

Oh, yes, Waldek, you are right. That should currently be the way to go.
Though, I somehow agree with Sergei, that extend *is* something reasonable.

The argument that there will be name clashes is no problem in my eyes, because (1) extend can be used locally and so the user can take care of clashes, and (2) if user code eventually enters the "official" repository, name clashes can be dealt with before the code goes in.

I am sure you agree that doing this "workaround" is more cumbersome than a simple "extend".

Ralf

--
You received this message because you are subscribed to the Google Groups "FriCAS - 
computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en.

Reply via email to