Ralf Hemmecke wrote:
>
> > I have now a patch which modifies coercion to OutputForm so that
> > just 'tex(mersenne::OutputForm)' works. As a nice byproducts
> > it avoids some of abuses of 'OutputForm'.
>
> OK, but I haven't seen that patch yet.
Commited now.
> >> (9) -> Integer
> >>
> >> (9) Integer
> >> Type:
> >> Type
> >> (10) -> UnivariatePolynomial('x, Fraction Integer)
> >>
> >> (10) UnivariatePolynomial(x,Fraction(Integer))
> >> Type:
> >> Type
> >
> > Types also have special routine to print them. More precisely,
> > there is ad hoc function 'outputDomainConstructor' which produces
> > corresponding output form. In principle this function could be
> > used to coerce types to 'OutputForm'. However, AFAICS 'Category'
> > has no way to add operations, so there is no place to hook it...
>
> That doesn't always do what I want.
>
> (1) -> outputDomainConstructor(UnivariatePolynomial('x, Fraction
> Integer))$Lisp
>
> >> System error:
> The variable |x| is unbound.
This seems to be some interpreter weirdness, probably related
to how types are internaly handled. However, at interpreter
level just using '::' works:
(125) -> uP := UnivariatePolynomial('x, Fraction Integer)
(125) UnivariatePolynomial(x,Fraction(Integer))
Type: Type
(126) -> uP::OutputForm
(126) UnivariatePolynomial(x,Fraction(Integer()))
Type: OutputForm
(127) -> tex(uP::OutputForm)
(127)
[
"UnivariatePolynomial \left( {x, \: {Fraction \left( {{Integer()}} \right)}
} \right)"
]
Type: List(String)
--
Waldek Hebisch
[email protected]
--
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 http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.