On Mon, Jul 7, 2008 at 6:59 PM, Ralf Hemmecke <[EMAIL PROTECTED]> wrote: > On 07/08/2008 01:06 AM, Gabriel Dos Reis wrote: >> >> On Mon, Jul 7, 2008 at 4:49 PM, Yixin Cao <[EMAIL PROTECTED]> >> wrote: >>> >>> Howdy, >>> >>> When I define >>> (1) -> a:Category := Ring >>> Category is a category, not a domain, and declarations require >>> domains. >> >> I consider this to be a bug -- as discussed with Bill recently. > > Gaby, when I read your comment, I cannot really interpret it. What exactly > do you consider as a bug?
The fact that the interpreter rejects a: Category := Ring or b: Ring := Integer [...] >>> while >>> )abbrev domain FOO Foo >>> Foo(): Public == Private where >>> Public ==> with >>> f1: () -> Domain >>> f2: () -> Domain -- compilation failed if "Category" used here!! >> >> That is a bug. >> >>> Private ==> add >>> f1 == Integer >> >> OK. > > Why? Why not requiring f1 == ()+->Integer? I could have defined f1 as > > f1 = () +-> (printSomething(); Integer) > > But maybe the nullary function vs. constant is something for later or > another thread. Anyway, if f: () -> X and h: X then they are clearly > different since they have different types. > > Looks like the SPAD compiler is silently inserting "()+->" in a definition > > random: () -> Integer > > random == 42 This has been so since the base AXIOM system. OpenAxiom added the ability to write 1: % instead of 1: constant -> % in categories. The base AXIOM system has the tendency of taking the view that everything is a function, even constants and sometime blurring the disctinction between a nullary function and a constant (which can be justified from some theoretical point of view). > > Ooops, Axiom doesn't let me define constants? > http://axiom-wiki.newsynthesis.org/SandboxNullaryVsConstant OpenAxiom does. > > Ralf > ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ open-axiom-devel mailing list open-axiom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open-axiom-devel