On 17/09/16 06:00, oldk1331 wrote:
I want to have
print "a string"
insead of
print("a string"::OutputForm)
when I am debugging.
I tried to add a "print : String -> Void", but not successful.
What's the right way to do it?
I also asked about something like this in thread here:
https://groups.google.com/forum/?hl=en#!topic/fricas-devel/ouZg285DTcI
In this thread I think the long term solution is given by Waldek:
Waldek Hebisch wrote:
> I thought about easier debugging printouts
> from Spad and I see the following possibilities:
>
> - teach Spad compiler to allow "open types", that is types
> for which compiler can infer type of parameter. That
> would allow something like:
>
> print(x)
>
> with Spad compiler automatically choosing appropriate
> overloaded version of 'print' matching type of 'x',
> after a single import like:
>
> import from PrintPackage1(?)
>
> where '?' means that we allow all types of arguments.
>
> - Use infix operator plus overloading for printing, like:
>
> d_out << "abc" << 1
>
> with overloaded versions of '<<' it could print any type.
> Note: to avoid a lot of imports that requires either adding
> '<<' to all domains or "open types" like above.
>
> "open types" would require change to Spad compiler. Using '<<'
> with explicit import is just matter of writing appropriate
> package. In principle we could add '<<' to SetCategory or
> even to 'CoercibleTo(OutputForm)' (using conditional export
> in 'CoercibleTo').
I hope a solutions like these can be implemented, I don't have the
knowledge to do anything myself.
Martin B
--
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 post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.