Re: [open-axiom-devel] constants and overload resolution

2011-10-24 Thread Bill Page
Gaby, Thank you for this work. The error message reminds me of a wish: I would really like it if the compiler could pretty print the code that it displays. Reading the lisp notation is still awkward for me years later and I know that it puts off some potential new users. Even if de-compiling > (

Re: [open-axiom-devel] constants and overload resolution

2011-10-24 Thread Gabriel Dos Reis
Bill Page writes: | On Mon, Oct 24, 2011 at 7:36 PM, Gabriel Dos Reis wrote: | > ... | > Bill Page writes: | > | So it is a coincidence that the compiler happens to choose 0@P or that | > | the representation of all of these candidates is the same so that it | > | does not matter? | > | > It is m

Re: [open-axiom-devel] constants and overload resolution

2011-10-24 Thread Gabriel Dos Reis
Bill Page writes: | On Mon, Oct 24, 2011 at 6:49 PM, Gabriel Dos Reis wrote: | > ... | > Another example:  Consider the function leftLcm from | > NonCommutativeOperatorDivision(P,F)  where | >      P: MonogenicLinearOperator(F) | >      F: Field | > | > the function definition is: | > | >        

Re: [open-axiom-devel] constants and overload resolution

2011-10-24 Thread Gabriel Dos Reis
Gabriel Dos Reis writes: | The algebra is full of examples where things work by a sheer amount of | luck. Consider the function rightPower in functor MonadWithUnit: | | rightPower(a: %,n: NonNegativeInteger) == | zero? n => 1 | res := 1 | for i in 1..n repeat res :=

Re: [open-axiom-devel] constants and overload resolution

2011-10-24 Thread Gabriel Dos Reis
Bill Page writes: | Doesn't the compiler already know that the value of res is returned | from the function? No. At the point where the compiler is processing the local assignment        res := 1 it has no clue that it will be used later as the retuned value. | Therefore infers that res

Re: [open-axiom-devel] constants and overload resolution

2011-10-24 Thread Bill Page
Doesn't the compiler already know that the value of res is returned from the function? Therefore infers that res must be of type % ? Even in zero? n => 1 you have the question of what is type of 1. On Mon, Oct 24, 2011 at 6:22 PM, Gabriel Dos Reis wrote: > > The algebra is full of examples whe

[open-axiom-devel] constants and overload resolution

2011-10-24 Thread Gabriel Dos Reis
The algebra is full of examples where things work by a sheer amount of luck. Consider the function rightPower in functor MonadWithUnit: rightPower(a: %,n: NonNegativeInteger) == zero? n => 1 res := 1 for i in 1..n repeat res := res * a res What should be the