Gaby, Thank you. That's very interesting to me. I just built OpenAxiom from trunk and I get:
page@asus:~/open-axiom-build$ open-axiom OpenAxiom: The Open Scientific Computation Platform Version: OpenAxiom 1.4.0-2011-04-20 Built on Sunday April 24, 2011 at 13:29:12 ----------------------------------------------------------------------------- Issue )copyright to view copyright notices. Issue )summary for a summary of useful system commands. Issue )quit to leave OpenAxiom and return to shell. ----------------------------------------------------------------------------- (1) -> )sh MappingCategory The )show system command is used to display information about types or partial types. For example, )show Integer will show information about Integer . MappingCategory is not the name of a known type constructor. If you want to see information about any operations named MappingCategory , issue )display operations MappingCategory If I try Hyperdoc I get: (1) -> >> System error: The value _ is not of type CHARACTER. and Hyperdoc crashes. Maybe somehow MappingCategory is not known to the interpreter? I wonder what MappingCategory exports? But your example code does compile for me: (1) -> )sys cat MyFunction.spad )abbrev domain MYFUN MyFunction MyFunction(T: Type): Public == Private where Public == MappingCategory(T,T) with myFunction: ((T,T) -> T) -> % Private == add Rep == Mapping(T,T,T) myFunction f == per f elt(f,x) == (rep f)(x,x) (1) -> )co MyFunction.spad Compiling OpenAxiom source code from file /home/page/MyFunction.spad using Spad compiler. MYFUN abbreviates domain MyFunction ------------------------------------------------------------------------ initializing NRLIB MYFUN for MyFunction compiling into NRLIB MYFUN Adding $ modemaps Adding T$ modemaps compiling exported myFunction : (T,T) -> T -> % MYFUN;myFunction;M$;1 is replaced by f Time: 0.01 SEC. compiling exported elt : (%,T) -> T Time: 0 SEC. (time taken in buildFunctor: 0) ;;; *** |MyFunction| REDEFINED ;;; *** |MyFunction| REDEFINED Time: 0 SEC. Cumulative Statistics for Constructor MyFunction Time: 0.01 seconds finalizing NRLIB MYFUN Processing MyFunction for Browser database: --->-->MyFunction((myFunction (% (Mapping T$ T$ T$)))): Not documented!!!! --->-->MyFunction(constructor): Not documented!!!! --->-->MyFunction: Missing Description ; compiling file "/home/page/MYFUN.NRLIB/code.lsp" (written 24 APR 2011 04:35:11 PM): ; compiling (/VERSIONCHECK 2) ; compiling (PUT (QUOTE |MYFUN;myFunction;M$;1|) ...) ; compiling (DEFUN |MYFUN;myFunction;M$;1| ...) ; compiling (DEFUN |MYFUN;elt;$2T$;2| ...) ; file: /home/page/MYFUN.NRLIB/code.lsp ; in: DEFUN |MYFUN;elt;$2T$;2| ; (DEFUN BOOT::|MYFUN;elt;$2T$;2| (BOOT::|f| BOOT::|x| BOOT::$) ; (BOOT::SPADCALL BOOT::|x| BOOT::|x| BOOT::|f|)) ; --> PROGN EVAL-WHEN ; ==> ; (SB-IMPL::%DEFUN 'BOOT::|MYFUN;elt;$2T$;2| ; (SB-INT:NAMED-LAMBDA BOOT::|MYFUN;elt;$2T$;2| ; (BOOT::|f| BOOT::|x| BOOT::$) ; (BLOCK BOOT::|MYFUN;elt;$2T$;2| ; (BOOT::SPADCALL BOOT::|x| BOOT::|x| BOOT::|f|))) ; NIL 'NIL (SB-C:SOURCE-LOCATION)) ; ; caught STYLE-WARNING: ; The variable $ is defined but never used. ; compiling (DEFUN |MyFunction| ...) ; compiling (DEFUN |MyFunction;| ...) ; compiling (MAKEPROP (QUOTE |MyFunction|) ...); ; compilation unit finished ; caught 1 STYLE-WARNING condition ; /home/page/MYFUN.NRLIB/code.fasl written ; compilation finished in 0:00:00.178 ------------------------------------------------------------------------ MyFunction is now explicitly exposed in frame frame791 MyFunction will be automatically loaded when needed from /home/page/MYFUN.NRLIB/code.fasl (1) -> Is this a temporary problem? Am I missing something? page@asus:~/open-axiom-build$ cd ../open-axiom-src page@asus:~/open-axiom-src$ svn info Path: . URL: https://open-axiom.svn.sf.net/svnroot/open-axiom/trunk Repository Root: https://open-axiom.svn.sf.net/svnroot/open-axiom Repository UUID: f499efd5-9937-0410-b36a-d3739c31ded8 Revision: 2080 Node Kind: directory Schedule: normal Last Changed Author: dos-reis Last Changed Rev: 2080 Last Changed Date: 2011-04-24 12:14:17 -0400 (Sun, 24 Apr 2011) page@asus:~/open-axiom-src$ sbcl --version SBCL 1.0.40.0.debian Regards, Bill Page. On Sun, Apr 24, 2011 at 10:16 AM, Gabriel Dos Reis <g...@cs.tamu.edu> wrote: > ... > There is an n-ary MappingCategory category constructor in OpenAxiom. > I just did not get around to fix the instantiation of Mapping ot use it. > Is that what you had in mind? Yes I plan to fix related issues. > > The attached works for me. > > -- Gaby > > )abbrev domain MYFUN MyFunction > MyFunction(T: Type): Public == Private where > Public == MappingCategory(T,T) with > myFunction: ((T,T) -> T) -> % > Private == add > Rep == Mapping(T,T,T) > myFunction f == per f > elt(f,x) == (rep f)(x,x) > > ------------------------------------------------------------------------------ Fulfilling the Lean Software Promise Lean software platforms are now widely adopted and the benefits have been demonstrated beyond question. Learn why your peers are replacing JEE containers with lightweight application servers - and what you can gain from the move. http://p.sf.net/sfu/vmware-sfemails _______________________________________________ open-axiom-devel mailing list open-axiom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open-axiom-devel