On Thu, May 16, 2024 at 01:13:22PM +0200, Ralf Hemmecke wrote:
> Further experiments. It seems that the name "coerce" is treated differently
> by the compiler.
> 
> You can compile the attached program with "xxx ==> bar", but not with
> "xxx ==> coerce".

Actually, difference is that condition on 'coerce' is redundant.
Spad compiler uses 'false' to mark conditianal signatures with
conditions that are not known to be true.  In conditional part
when condition is true condition in the signature is effectively
replaced by true.  That worked for 'bar'.  But Spad compiler
knew that condition is true so did not bother with replacement
for 'coerce'.  I have commited a patch so that code handling
conditions allows false condition, so now this extra signature
causes no trouble.

> 
> Ralf
> 
> -- 
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/fricas-devel/4c02fab8-c770-431d-90b0-04dac78e7ce9%40hemmecke.org.

> xxx ==> bar
> )abbrev package FOO Foo
> Foo(C: Ring): Exports == Implementation where
>   Exports ==> with
>     if C has xxx: Integer -> C then
>       foo: () -> C
>   Implementation ==> add
>     if C has xxx: Integer -> C then
>         blah(x: Integer): C == xxx x
>         foo(): C == 1


-- 
                              Waldek Hebisch

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/ZkjucP06HpI_8EUE%40fricas.org.

Reply via email to