That's really weird, indeed.

In fact, I am somehow even against both versions. "has" uses a domain as its first argument and a category as its second.

But a signature like "sqrt: %->%" is not itself a category. In fact, a signature has no type in the system. For convenience one could agree to let the interpreter accept that and translate it into

AN has (with sqrt:%->%)

fur further processing. In the compiler "with" should always be necessary.

Waldek, I guess, that will result in quite a number of rewrites in the algebra files, but it would remove yet another hack. I'm willing to look through all files and transform the .spad files if you find an easy way to ensure that the signature of "has" always is

  has: (DOMAIN, CATEGORY) -> Boolean

and forbid signatures as the second argument.

Of course, that is somehow orthogonal to the $ vs. % issue, but I think equally worth to be considered.

Actually the question arises, why we still have $. Wouldn't that be easy to remove altogether?

Ralf

On 03/28/2011 03:17 PM, Prof. Dr. Johannes Grabmeier wrote:
Is there any reason, that compiler and interpreter can not be synchronised here:

(49) ->  AN has sqrt: $ ->  $

    (49)  true
                                                                 Type: Boolean
(50) ->  AN has sqrt: % ->  %

    (50)  false
                                                                 Type: Boolean

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