Hello,

I cannot compile the following program, but I don't actually want to export coerce: %->X.

---rhxBEGIN tst.spad
)abbrev domain MEX MExpression
X ==> Integer
MExpression: with
    coerce: X -> %
  == add
    Rep == X
    coerce(a: X): % == a pretend %
    coerce(a: %): X == a pretend X
---rhxEND tst.spad

Well, renaming the offending coerce into localcoerce, makes the program compile, but it would be much nicer if I don't have to do this. These functions are distinguishable not only by there result type, but already by their input type.

Ralf


(18) -> )co tst.spad
   Compiling FriCAS source code from file
      /home/hemmecke/v/git/projektwoche/tst.spad using old system
      compiler.
   MEX abbreviates domain MExpression
------------------------------------------------------------------------
   initializing NRLIB MEX for MExpression
   compiling into NRLIB MEX
(converted function Rep to macro)
   compiling exported coerce : Integer -> $
      MEX;coerce;I$;1 is replaced by a
Time: 0.00 SEC.

   compiling local coerce : $ -> Integer

   >> Apparent user error:
    coerce  is local and exported

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