On Fri, May 30, 2008 at 7:01 AM, Ralf Hemmecke wrote: > > Can somebody explain how the code below can compile with SPAD. > Is SubsetCategory a built-in thing? > There is only one spad file, namely fraction.spad, which contains that > identifier. >
Yes, it is built-in to SPAD. See: interp/c-util.boot: --domain is only used for SubsetCategory resolution. interp/c-util.boot: form' is ["SubsetCategory",cat,dom] => interp/compiler.boot:compSubsetCategory: (%Form,%Mode,%Env) -> %Maybe %Triple interp/compiler.boot:compSubsetCategory(["SubsetCategory",cat,R],m,e) == interp/compiler.boot: ["SubsetCategory", :"compSubsetCategory"],_ interp/define.boot: c is ['SubsetCategory,c',.] => c' interp/hashcode.boot:-- following two lines correct bad coSig properties due to SubsetCategory interp/mark.boot: ["SubsetCategory", :"compSubsetCategory"],_ interp/nrunopt.boot: v is ["SubsetCategory",cat,d] => extendsCategory(dom,u,cat) and isSubset(dom,d,$e) interp/sys-constants.boot: SubsetCategory _ and comments therein. E.g. compSubsetCategory(["SubsetCategory",cat,R],m,e) == --1. put "Subsets" property on R to allow directly coercion to subset; -- allow automatic coercion from subset to R but not vice versa e:= put(R,"Subsets",[[$lhsOfColon,"isFalse"]],e) --2. give the subset domain modemaps of cat plus 3 new functions There is also the 'SubDomain' built-in which is similarly used in only one algebra file: algebra/integer.spad.pamphlet Regards, Bill Page. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ open-axiom-devel mailing list open-axiom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open-axiom-devel