axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] Re: "has" and "with" and bug


From: Gabriel Dos Reis
Subject: [Axiom-developer] Re: "has" and "with" and bug
Date: Mon, 13 Aug 2007 12:54:59 -0500 (CDT)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]