Hi Martin,

I am not quite sure if I like your

makeAxiomList: % -> List S

because there is already

coerce: % -> List S.

I have just replaced makeAxiomList by coerce in (src/species.as.nw r107)

<<implementation: Times>>=
#if Axiom
coerce(x: %): OutputForm == {
         import from ACString, OutputForm, List OutputForm;
         coerce(hconcat coerce [coerce "(", coerce(rep(x).left),
                                       coerce ", ", coerce(rep(x).right),
                                       coerce ")"]);
}
#endif
...
@

and it still compiles.

And what I don't understand is the outer "coerce". The signature of 
hconcat is List(%)->% (defined in Axiom's outform.spad). So why there is 
another coerce?

For linear output one could try to use

    coerce(x: %): OutputForm == empty() << x;

that should do. And in order to make that look nicer, I would introduce a

macro outputForm == empty()$OutputForm;

Just look at the default definition of << in axcompat.as:

   (tw:TextWriter) << (x:%): TextWriter == hconcat(tw,x::OutputForm);

Isn't that what you want?

(Another reason to do without makeAxiomList.)

Ralf

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Aldor-combinat-devel mailing list
Aldor-combinat-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aldor-combinat-devel

Reply via email to