login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Submitted by : (unknown) at: 2007-11-17T22:56:20-08:00 (16 years ago)
Name :
Axiom Version :
Category : Severity : Status :
Optional subject :  
Optional comment :

axiom
*(A: Set INT, B: Set INT): Set INT == set concat [[(a*b)$Integer for a in members A] for b in members B]
Function declaration ?*? : (Set(Integer),Set(Integer)) -> Set( Integer) has been added to workspace.
Type: Void
axiom
2*3
axiom
Compiling function * with type (Set(Integer),Set(Integer)) -> Set(
      Integer) 
   Conversion failed in the compiled user function * .
Cannot convert from type Integer to Set(Integer) for value 2

This problem is not related to *.

axiom
mulset(A: Set INT, B: Set INT): Set INT == set concat [[(a*b)$Integer for a in members A] for b in members B]
Function declaration mulset : (Set(Integer),Set(Integer)) -> Set( Integer) has been added to workspace.
Type: Void
axiom
mulset(2,3)
axiom
Compiling function mulset with type (Set(Integer),Set(Integer)) -> 
      Set(Integer) 
   Conversion failed in the compiled user function mulset .
Cannot convert from type Integer to Set(Integer) for value 2

It works if conversion from Integer to set is explicit.

axiom
set [2] * set [3]

\label{eq1}\left\{ 6 \right\}(1)
Type: Set(Integer)

overloading an operation in the interpreter is a problem --kratt6, Mon, 29 Oct 2007 08:53:07 -0600 reply
Why doesn't axiom find *: (INT, INT) -> INT anymore?

that is a problem. :-)

But you have overridden the default behaviour in the interpreter. It is ok if you are explicit:

axiom
(2*3)$Integer

\label{eq2}6(2)
Type: Integer

So I think probably the current behavior is sensible.

better title --kratt6, Mon, 29 Oct 2007 09:19:05 -0600 reply
Name: #387 redefining * => #387 overloading functions in the interpreter does not work




  Subject: (replying)   Be Bold !!
  ( 14 subscribers )  
Please rate this page: