Ralf Hemmecke wrote:
> 
> > do_with_modes(f, x, dom) ==
> >     $InteractiveMode: local:= true
> >     $dontDisplayEquatnum: local:= true
> >     SPADCALL(x, dom, f)
> 
> 
> This tells me how I would, for example call outputTran

Well, you need to get hold of Spad function.  In this
case function is passed via parameter, so this is easy.
To get named function do something like:

  tf := '(TexFormat)
  formatFn :=
    getFunctionFromDomain("convert",tf,[$OutputForm,$Integer])
  of := SPADCALL(expr,$IOindex,formatFn)


> 
> OutputFoo: with
>     outputTran: OutputForm -> OutputForm
>   == add
>     outputTran(x: OutputForm): OutputForm ==
>         outputTran(x)$Lisp pretend OutputForm
> 
> from within boot code.
> 
> However, I currently have the problem that I don't exactly know which
> functions can I really take out of i-output.boot.
> 
> Suppose, I've moved outputTran's code completely to SPAD, so I could
> replace any call to outputTran in boot code by some SPADCALL construction.
> 
> But can I really replace every call? For example, there is
> 
> https://github.com/hemmecke/fricas-svn/blob/master/src/interp/i-analy.boot#L563
> 
> in the boot function bottomUpForm0.

AFAICS this is error handling branch.  OutputForm is passed to
routine responsible for printing errors, and eventually gets
passed to SAY.  This needs to be cleaned up, to go trough
appropriate formatter.

BTW: You asked about use of OutputForm in HyperDoc.  One
good example is 'dbOuttran'.  When constructor has non-type
parameters 'dbOuttran' converts them to OutputForm and
calls 'mathform2HtString' which tries a few ad hoc tricks
and calls 'fortexp0' in fortran formatter as "general"
case.  IMO converting type parameters to OutputForm
is right thing to do.  'mathform2HtString' needs
cleanup (or rather proper implementation).  For printing
type parameters we probably need some good heuristics
to truncate/abbreviate output.

> By which method can I decide whether the spad compiler is already
> present and my package OutputFoo has already been translated before
> bottomUpForm0 is called for the first time?

During normal run this is not a problem: Spad runtime will
automatically load needed domains.  There is a problem
during bootstrap: we will need to keep Lisp version
of code needed for compiler and use it to compile
itself and the rest.  Currently compiler needs basic
command line handling (parts of i-syscmd.boot and
int-top.boot), but the rest is not needed.

-- 
                              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.

Reply via email to