Dear Gaby, > Every functor in AXIOM has a type. You get it by executing > > )boot getConstructorSignature ctor
Yes:(1) - > )boot getConstructorSignature 'List (EVAL-WHEN (EVAL LOAD) (PROG () (RETURN (|getConstructorSignature| '|List|)))) Value = ((|Join| (|ListAggregate| |#1|) (CATEGORY |domain| (SIGNATURE |nil| ($)) (SIGNATURE |null| ((|Boolean|) $)) (SIGNATURE |cons| ($ |#1| $)) (SIGNATURE |append| ($ $ $)) (IF (|has| |#1| (|SetCategory|)) (PROGN (SIGNATURE |setUnion| ($ $ $)) (SIGNATURE |setIntersection| ($ $ $)) (SIGNATURE |setDifference| ($ $ $))) |noBranch|) (IF (|has| |#1| (|OpenMath|)) (ATTRIBUTE (|OpenMath|)) |noBranch|))) (|Type|)) > 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) > )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) > | 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 ii) constructors like List are also coded in BOOT, and there is no (know to me, you, any?) way to do this in SPAD 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).... Cheers BF. -- % PD Dr Bertfried Fauser % Research Fellow, School of Computer Science, Univ. of Birmingham % Honorary Associate, University of Tasmania % Privat Docent: University of Konstanz, Physics Dept <http://www.uni-konstanz.de> % contact |-> URL : http://www.cs.bham.ac.uk/~fauserb/ % Phone : +44-121-41-42795 -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To post to this group, send email to fricas-devel@googlegroups.com. To unsubscribe from this group, send email to fricas-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/fricas-devel?hl=en.