On Mon, 13 Aug 2007, Ralf Hemmecke wrote:

| > > > I'm saying that the parameter S of the default package
| > > > Monad& -- generated for the default implementation of the
| > > > category Monad -- is of the named category Monad.
| 
| Sorry, I am too lazy to go back where all began. But let me quote that piece
| of code here.
| 
| Monad(): Category == SetCategory with
|       "*": (%,%) -> %
|       "**": (%,PositiveInteger) -> %
|       ...
|     add
|       import RepeatedSquaring(%)
|       x:% ** n:PositiveInteger == expt(x,n)
|       ...
| 

One question is why the compiler does not error out at the import
line.  It turns out that the compiler does something akin to macro
substitution without typeck checking or very minimal typecheck.  See the
function compImport.

-- Gaby


_______________________________________________
Axiom-developer mailing list
Axiom-developer@nongnu.org
http://lists.nongnu.org/mailman/listinfo/axiom-developer

Reply via email to