On Thu, May 16, 2024 at 09:12:01AM +0200, Ralf Hemmecke wrote:
> When I compile the attached program, I get the error below. Does that mean
> that I cannot use "if C is Integer then ..." in the category part of a
> domain?
Yes, this is limitation of current compiler. It would be relatively
easy to allow more general conditions, but important part of
current handling involves inference and inference is only
implemented for 'has' and boolean combinations of 'has' conditions.
> %%% (295) -> )co ../foo.spad
> Compiling FriCAS source code from file
> /home/hemmecke/backup/git/qeta/tmp/../foo.spad using old system
> compiler.
> FOO abbreviates package Foo
> ------------------------------------------------------------------------
> initializing NRLIB FOO for Foo
> compiling into NRLIB FOO
>
> >> System error:
> formatPred
>
> --
> 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...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/1be66a29-5f1d-4bea-8793-2e0fadf85eb6%40hemmecke.org.
> )abbrev package FOO Foo
> Foo(C): Exports == Implementation where
> C: Field
> Exports ==> with
> foobar: () -> Pol C
> if C is Integer then
> foo: C -> Pol C
> Implementation ==> add
> foobar(): Pol C == error "FOO"
--
Waldek Hebisch