The attached program only compiles, if I uncomment ")fin".
It is also problematic if I remove the "if R has Field then" part, i.e. make the export and default implementation unconditional.

Any idea what the problem is?

Ralf

%%% (144) -> )co ../foo.spad
   Compiling FriCAS source code from file
      /home/hemmecke/backup/git/qeta/tmp/../foo.spad using old system
      compiler.
   Illegal NRLIB
   FOONRLIB claims that its constructor name is the domain Foo but Foo
      is already known to be the for category FOO .
   FOO abbreviates domain Foo
------------------------------------------------------------------------
   initializing NRLIB FOO for Foo
   compiling into NRLIB FOO

;;;     ***       |Foo| REDEFINED
WARNING: redefining BOOT::|Foo| in DEFUN
WARNING: redefining BOOT::|Foo;| in DEFUN
Time: 0 SEC.

   FOO- abbreviates domain Foo&

   >> System error:
   The variable R is unbound.

--
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 view this discussion visit 
https://groups.google.com/d/msgid/fricas-devel/ed082176-ed9a-43a1-b2a1-2e4b365c5e97%40hemmecke.org.
)abbrev domain FOO Foo
Foo(R: OrderedRing): Category ==
  Join(SetCategory, CoercibleFrom R) with
    coerce: R -> %
    width: % -> R
    if R has Field then unit?: % -> Boolean
--)fin
   add -- default implementation
    if R has Field then unit?(x: %): Boolean == true
  • [fricas-devel] cannot... 'Ralf Hemmecke' via FriCAS - computer algebra system

Reply via email to