Bertfried Fauser <bertfried.fau...@googlemail.com> writes: [...]
| > where <ctor> is the name of the constructor you want, e.g. 'List, | > 'Integer, etc. You get the target type by | No: | (1) -> )boot getConstructorSignature('List).source | (EVAL-WHEN (EVAL LOAD) | (PROG () (RETURN (|getConstructorSignature| (CDR '|List|))))) | | >> System error: | The value |List| is not of type LIST. | (at least in FriCAS) well, that is a "bug" in FriCAS's Boot parser (and I suspect in other AXIOMs) that parses f(x).t as f(x.t) OpenAxiom's Boot parser parses f(x).t the same way that the Spad compiler and the interperter do. So, a workaround that but would be to write )boot (getConstructorSignature('List)).source | > )boot getConstructorSignature(ctor).target | No: | (1) -> )boot getConstructorSignature('List).target | (EVAL-WHEN (EVAL LOAD) | (PROG () (RETURN (|getConstructorSignature| (CAR '|List|))))) | | >> System error: | The value |List| is not of type LIST. | | (I have tried to replace 'List by LIST, 'LIST etc but that fails too) Same remark here as above. | > | For example in OpenAxiom you have a Maybe domain presumably modeled | > | after Haskell (or perhaps modeled after whatever the Haskell Maybe | > | type is modeled after). In Haskell Maybe is an example of a monad. | | Do I understand that you have implemented the Maybe 'monad' in OpenAxiom, and | that: | i) Maybe is implemented in BOOT Maybe is a functor in the OpenAxiom library, implemented in Spad. See the definition here: http://svn.open-axiom.org/viewvc/open-axiom/1.4.x/src/algebra/any.spad.pamphlet?revision=2189&view=markup | ii) constructors like List are also coded in BOOT, and there is no | (know to me, you, any?) | way to do this in SPAD I would not say that a constructor like List is coded in Boot. They are implemented in Spad, with help of some intrinsic functions. http://svn.open-axiom.org/viewvc/open-axiom/1.4.x/src/algebra/list.spad.pamphlet?revision=2457&view=markup | In this case, one should possibly try to implement Monad in a similar | way in BOOT, not | in SPAD, as such constructions as List, Fraction etc. Unfortunately I | don't know anything | about BOOT (Lisp anyhow).... Hmm, I am still unsure the issue has to do with Boot versus Spad. The real issue has to do with how to interpret type forms at the Spad level. There is an underlying assumption in the current semantics (and in all AXIOM compilers) that at Spad level a domain form that is not a variable is introduced by instantiating a constructor. You are right that since Boot is very low level, one would not face that issue. One would face a different one: how to connect that semantics with the higher level Spad semantics. I suspect that would have just displaced the issue, without actually solving it. N Notice that having a functor Monad is just a tiny fraction of what is being discussed. Once one has a Monad what does one do with it? As it was found very quickly, one gets into some peculiar programming style (which is not at all obviously better than what one currently has in Spad). To solve that peculiar problem, the "do"-notation was introduced. -- Gaby ------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ open-axiom-devel mailing list open-axiom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open-axiom-devel