UNPKG

minigrace

Version:

A compiler for the Grace programming language

871 lines (870 loc) 103 kB
let gracecode_pattern__43__typeBundle_sourceFile = "/Users/black/Development/mg/gracelang/minigrace/pattern+typeBundle.grace"; let gracecode_pattern__43__typeBundle_sha256 = "0f4e33f2004415c63dfd098ec38b76e334e0eef827174e117fd3b64e122a5878"; let gracecode_pattern__43__typeBundle_minigraceRevision = "b57591d29fc5ee5270d114920bf671367b8c3ecb"; let gracecode_pattern__43__typeBundle_minigraceGeneration = "5171"; if (typeof gctCache !== "undefined") gctCache["pattern+typeBundle"] = "dialect:\nfreshScopes:\n $102 trait\n $103 trait\n $104 trait\n $105 trait\n $106 trait\n $108 trait\n $109 trait\n $110\n $111\n $112\n $113 trait\n $114 trait\n $115\nmodules:\n collections\n equalityBundle\n intrinsic\npath:\n /Users/black/Development/mg/gracelang/minigrace/pattern+typeBundle.grace\nscope:$102:\n &(1) Unknown (mth) $scope_done\n asDebugString String (go) $scope_string\n asString String (go) $scope_string\n basicAsString String (go) $scope_string\n isMe(1) Boolean (go) $scope_boolean\n isType Unknown (mth) $scope_done\n myIdentityHash Number (go) $scope_number\n prefix\u00ac Unknown (mth) $scope_done\n setTypeName(1) Unknown (mth) $scope_done confidential\n |(1) Unknown (mth) $scope_done\nscope:$103:\n ::(1) Unknown (mth) $scope_done\n ==(1) Unknown (mth) $scope_done\n asDebugString String (go) $scope_string\n asString String (go) $scope_string\n basicAsString String (go) $scope_string\n hash Unknown (mth) $scope_done\n isMe(1) Boolean (go) $scope_boolean\n myIdentityHash Number (go) $scope_number\n prefix== Unknown (mth) $scope_done\n prefix\u2260 Unknown (mth) $scope_done\n \u2260(1) Unknown (mth) $scope_done\nscope:$104:\n &(1) Unknown (mth) $scope_done\n asDebugString String (go) $scope_string\n asString String (go) $scope_string\n basicAsString String (go) $scope_string\n isMe(1) Boolean (go) $scope_boolean\n isType Unknown (mth) $scope_done\n matches(1) Unknown (mth) $scope_done\n myIdentityHash Number (go) $scope_number\n prefix\u00ac Unknown (mth) $scope_done\n setTypeName(1) Unknown (mth) $scope_done confidential\n |(1) Unknown (mth) $scope_done\nscope:$105:\n &(1) Unknown (mth) $scope_done\n -(1) Unknown (mth) $scope_done\n ::(1) Unknown (mth) $scope_done\n ==(1) Unknown (mth) $scope_done\n asDebugString String (go) $scope_string\n asString Unknown (mth) $scope_done\n basicAsString String (go) $scope_string\n hash Unknown (mth) $scope_done\n interfaces Unknown (req) $scopeUniv required\n isInterface Unknown (mth) $scope_done\n isMe(1) Boolean (go) $scope_boolean\n isNone Unknown (mth) $scope_done\n isType Unknown (mth) $scope_done\n matchHook(1) Unknown (req) $scopeUniv required\n matches(1) Unknown (mth) $scope_done\n myIdentityHash Number (go) $scope_number\n name Unknown (req) $scopeUniv required\n name:=(1) Unknown (req) $scopeUniv required\n prefix== Unknown (mth) $scope_done\n prefix\u00ac Unknown (mth) $scope_done\n prefix\u2260 Unknown (mth) $scope_done\n setName(1) Unknown (mth) $scope_done confidential\n setTypeName(1) Unknown (mth) $scope_done confidential\n typeParameterNames Unknown (mth) $scope_done\n |(1) Unknown (mth) $scope_done\n \u2260(1) Unknown (mth) $scope_done\nscope:$106:\n &(1) Unknown (mth) $scope_done\n asDebugString String (go) $scope_string\n asString String (go) $scope_string\n basicAsString String (go) $scope_string\n isMe(1) Boolean (go) $scope_boolean\n isType Unknown (mth) $scope_done\n matches(1) Unknown (mth) $scope_done\n myIdentityHash Number (go) $scope_number\n prefix\u00ac Unknown (mth) $scope_done\n setTypeName(1) Unknown (mth) $scope_done confidential\n |(1) Unknown (mth) $scope_done\nscope:$107:\n abstract Unknown (mth) $scope_done\n annotation Unknown (mth) $scope_done\n asDebugString String (go) $scope_string\n asString String (go) $scope_string\n basicAsString String (go) $scope_string\n confidential Unknown (mth) $scope_done\n isMe(1) Boolean (go) $scope_boolean\n myIdentityHash Number (go) $scope_number\n open Unknown (mth) $108\n override Unknown (mth) $scope_done\n public Unknown (mth) $scope_done\n readable Unknown (mth) $scope_done\n required Unknown (mth) $scope_done\n writable Unknown (mth) $scope_done\nscope:$108:\n AndPattern(2) Unknown (mth) $104\n AndType(2) Unknown (mth) $110\n BarType(2) Unknown (mth) $111\n BasePattern Unknown (mth) $102\n BaseType Unknown (mth) $105\n NotPattern(1) Unknown (mth) $109\n OrPattern(2) Unknown (mth) $106\n TypeExclusion(2) Unknown (mth) $112\n TypeIntersection(2) Unknown (mth) $scope_done\n TypeVariant(2) Unknown (mth) $scope_done\n asDebugString String (go) $scope_string\n asString String (go) $scope_string\n basicAsString String (go) $scope_string\n binding Unknown (mth) $113\n equality Unknown (mth) $114\n identityEquality Unknown (mth) $103\n isMe(1) Boolean (go) $scope_boolean\n myIdentityHash Number (go) $scope_number\nscope:$109:\n &(1) Unknown (mth) $scope_done\n asDebugString String (go) $scope_string\n asString String (go) $scope_string\n basicAsString String (go) $scope_string\n isMe(1) Boolean (go) $scope_boolean\n isType Unknown (mth) $scope_done\n matches(1) Unknown (mth) $scope_done\n myIdentityHash Number (go) $scope_number\n prefix\u00ac Unknown (mth) $scope_done\n setTypeName(1) Unknown (mth) $scope_done confidential\n |(1) Unknown (mth) $scope_done\nscope:$110:\n &(1) Unknown (mth) $scope_done\n -(1) Unknown (mth) $scope_done\n ::(1) Unknown (mth) $scope_done\n ==(1) Unknown (mth) $scope_done\n asDebugString Unknown (mth) $scope_done\n asString Unknown (mth) $scope_done\n basicAsString String (go) $scope_string\n hash Unknown (mth) $scope_done\n interfaces Unknown (def) $scope_done readable\n isInterface Unknown (mth) $scope_done\n isMe(1) Boolean (go) $scope_boolean\n isNone Unknown (mth) $scope_done\n isType Unknown (mth) $scope_done\n matchHook(1) Unknown (mth) $scope_done\n matches(1) Unknown (mth) $scope_done\n myIdentityHash Number (go) $scope_number\n name Unknown (var) $scopeEmpty readable\n name:=(1) Unknown (var) $scopeEmpty readable\n prefix== Unknown (mth) $scope_done\n prefix\u00ac Unknown (mth) $scope_done\n prefix\u2260 Unknown (mth) $scope_done\n setName(1) Unknown (mth) $scope_done confidential\n setTypeName(1) Unknown (mth) $scope_done confidential\n typeParameterNames Unknown (mth) $scope_done\n |(1) Unknown (mth) $scope_done\n \u2260(1) Unknown (mth) $scope_done\nscope:$111:\n &(1) Unknown (mth) $scope_done\n -(1) Unknown (mth) $scope_done\n ::(1) Unknown (mth) $scope_done\n ==(1) Unknown (mth) $scope_done\n asDebugString String (go) $scope_string\n asString Unknown (mth) $scope_done\n basicAsString String (go) $scope_string\n hash Unknown (mth) $scope_done\n interfaces Unknown (mth) $scope_done\n isInterface Unknown (mth) $scope_done\n isMe(1) Boolean (go) $scope_boolean\n isNone Unknown (mth) $scope_done\n isType Unknown (mth) $scope_done\n matchHook(1) Unknown (mth) $scope_done\n matches(1) Unknown (mth) $scope_done\n myIdentityHash Number (go) $scope_number\n name Unknown (var) $scopeEmpty readable\n name:=(1) Unknown (var) $scopeEmpty readable\n prefix== Unknown (mth) $scope_done\n prefix\u00ac Unknown (mth) $scope_done\n prefix\u2260 Unknown (mth) $scope_done\n setName(1) Unknown (mth) $scope_done confidential\n setTypeName(1) Unknown (mth) $scope_done confidential\n typeParameterNames Unknown (mth) $scope_done\n |(1) Unknown (mth) $scope_done\n \u2260(1) Unknown (mth) $scope_done\nscope:$112:\n &(1) Unknown (mth) $scope_done\n -(1) Unknown (mth) $scope_done\n ::(1) Unknown (mth) $scope_done\n ==(1) Unknown (mth) $scope_done\n asDebugString String (go) $scope_string\n asString Unknown (mth) $scope_done\n basicAsString String (go) $scope_string\n hash Unknown (mth) $scope_done\n interfaces Unknown (mth) $scope_done\n isInterface Unknown (mth) $scope_done\n isMe(1) Boolean (go) $scope_boolean\n isNone Unknown (mth) $scope_done\n isType Unknown (mth) $scope_done\n matchHook(1) Unknown (req) $scopeUniv required\n matches(1) Unknown (mth) $scope_done\n myIdentityHash Number (go) $scope_number\n name Unknown (var) $scopeEmpty readable\n name:=(1) Unknown (var) $scopeEmpty readable\n prefix== Unknown (mth) $scope_done\n prefix\u00ac Unknown (mth) $scope_done\n prefix\u2260 Unknown (mth) $scope_done\n setName(1) Unknown (mth) $scope_done confidential\n setTypeName(1) Unknown (mth) $scope_done confidential\n typeParameterNames Unknown (mth) $scope_done\n |(1) Unknown (mth) $scope_done\n \u2260(1) Unknown (mth) $scope_done\nscope:$113:\n asDebugString String (go) $scope_string\n asString Unknown (mth) $scope_done\n basicAsString String (go) $scope_string\n isMe(1) Boolean (go) $scope_boolean\n key(1)value(1) Unknown (mth) $115\n myIdentityHash Number (go) $scope_number\nscope:$114:\n ::(1) Unknown (mth) $scope_done\n ==(1) Unknown (req) $scopeUniv\n asDebugString String (go) $scope_string\n asString String (go) $scope_string\n basicAsString String (go) $scope_string\n hash Unknown (req) $scopeUniv\n isMe(1) Boolean (go) $scope_boolean\n myIdentityHash Number (go) $scope_number\n prefix== Unknown (mth) $scope_done\n prefix\u2260 Unknown (mth) $scope_done\n \u2260(1) Unknown (mth) $scope_done\nscope:$115:\n ::(1) Unknown (mth) $scope_done\n ==(1) Unknown (mth) $scope_done\n asDebugString Unknown (mth) $scope_done\n asString Unknown (mth) $scope_done\n basicAsString String (go) $scope_string\n hash Unknown (mth) $scope_done\n isMe(1) Boolean (go) $scope_boolean\n key Unknown (def) $scopeEmpty\n myIdentityHash Number (go) $scope_number\n prefix== Unknown (mth) $scope_done\n prefix\u2260 Unknown (mth) $scope_done\n value Unknown (def) $scopeEmpty\n \u2260(1) Unknown (mth) $scope_done\nself:\n $107\ntypes:\n"; if (typeof originalSourceLines !== "undefined") { originalSourceLines["pattern+typeBundle"] = [ "dialect \"none\"", "import \"equalityBundle\" as equalityBundle", "import \"collections\" as coll", "import \"intrinsic\" as intrinsic", "", "// This module _defines_ the & and | operations on types. Hence, we", "// _cannot_ define or use here any types made with & or |.", "", "def ic = intrinsic.controlStructures", "use intrinsic.annotations", "", "trait open {", "", " use equalityBundle.open", "", " trait BasePattern {", " method &(o) {", " AndPattern(self, o)", " }", " method |(o) {", " OrPattern(self, o)", " }", " method prefix ¬ {", " NotPattern(self)", " }", " method isType { false }", " method setTypeName(_) is confidential {", " // This method exists so that if compiled code tries to setTypeName", " // on a pattern, we will get a nicer error than NoSuchMethod.", " // It is confidetial so that it does not show up in the Pattern type.", " intrinsic.constants.TypeError.raise \"{self} is a Pattern, but not a Type\"", " }", " }", "", " trait AndPattern(p1, p2) {", " use BasePattern", " method matches(obj) {", " if (p1.matches(obj)) then { p2.matches(obj) } else { false }", " }", " }", "", " trait OrPattern(p1, p2) {", " use BasePattern", " method matches(o) {", " if (p1.matches(o)) then { true } else { p2.matches(o) }", " }", " }", "", " trait NotPattern(p) {", " use BasePattern", " method matches(o) {", " p.matches(o).not", " }", " }", "", " trait BaseType {", " use identityEquality", "", " method &(o) { TypeIntersection(self, o) }", " method |(o) { TypeVariant(self, o) }", " method -(o) { TypeExclusion(self, o) }", " method prefix ¬ { NotPattern(self) }", " method asString { \"type {self.name}\" }", " method setName(nu) is confidential {", " self.name := nu", " self // for chaining", " }", " method setTypeName(nu) is confidential {", " // requested from compiled code when a named type is declared", " self.name := nu", " self // for chaining", " }", " method name:=(nu) is required", " method name is required", " method matchHook(obj) is required // does the actual matching", " method matches(obj) {", " // this caches the result of matchHook, under the assumption", " // that two objects with the same classUid will have the same type", " native \"js\" code ‹", " if (! this.matchCache) this.matchCache = [];", " let key = var_obj.classUid;", " result = this.matchCache[key];", " if (result) return result;", " result = selfRequest(this, \"matchHook(1)\", [1], var_obj);", " this.matchCache[key] = result;", " return result;", " ›", " }", " method isNone { false }", " method isType { true }", " method typeParameterNames {", " native \"js\" code ‹", " if (! this.typeParamNames) {", " return new GraceSequence([]);", " }", " return new GraceSequence(this.typeParamNames.map(", " nm => new GraceString(nm)));", " ›", " }", " method interfaces is required", " method isInterface { false }", " }", "", "", " method TypeIntersection (t1, t2) {", " if (t2.isType.not) then { return t2 & t1 } // double-dispatch to Pattern t2", " if (t2.isNone) then {return t2} // if t1.isNone, we won't come here", " AndType (t1, t2)", " }", " class AndType (t1, t2) {", " // Objects of this class are used to represent Self & <an interface> and", " // Unknown & <an interface>, becuase apb doesn't yet know what else to do.", " // The & of two interfaces generates another \"Interface-built-in\", and", " // not an instance of this class.", " use AndPattern (t1, t2)", " alias matchHook(_) = matches(_)", " exclude &(_)", " exclude |(_)", " exclude matches(_)", " exclude isType", " exclude setTypeName(_)", " exclude prefix ¬", " use BaseType", " // t1 can't be a GraceInterface (from gracelib) — it must be an", " // exclusion", " var name is readable := \"{t1.name} & {t2.name}\"", " def interfaces is readable = coll.sequence.withAll( // because map is lazy", " t1.interfaces.map { each -> each & t2 }", " )", " method asDebugString {", " var result := \"\"", " interfaces.do { each -> result := result ++ each.name }", " separatedBy { result := result ++ \" | \" }", " result", " }", " }", "", "", "", " method TypeVariant (t1, t2) {", " if (t2.isType.not) then { return t2 | t1 } // double-dispatch to Pattern t2", " if (t1.isNone) then {return t2}", " if (t2.isNone) then {return t1}", " BarType(t1, t2)", " }", " class BarType(t1, t2) {", " use OrPattern (t1, t2)", " alias matchHook(_) = matches(_)", " exclude &(_)", " exclude |(_)", " exclude matches(_)", " exclude isType", " exclude setTypeName(_)", " exclude prefix ¬", " use BaseType", " var name is readable := { // not a once method, because", " // compiled code uses name:=(_) to set the name", " def t1Name = if (t1.name.startsWith \"(\") then { t1.name }", " elseif { t1.name.contains \"&\" } then { \"({t1.name})\" }", " else { t1.name }", "", " def t2Name = if (t2.name.startsWith \"(\") then { t2.name }", " elseif { t2.name.contains \"&\" } then { \"({t2.name})\" }", " else { t2.name }", "", " \"{t1Name} | {t2Name}\"", " }.apply", " once method interfaces {", " def result = t1.interfaces >> coll.list", " t2.interfaces.do { each ->", " if (! result.contains(each)) then {", " result.addLast(each)", " }", " }", " result >> coll.sequence", " }", " method isInterface { false }", " }", "", " class TypeExclusion (t1, t2) {", " use BaseType", " var name is readable := \"{t1} - {t2}\"", " if (t2.isInterface.not) then {", " intrinsic.constants.TypeError.raise", " \"right-hand argument to `-` operator is not an interface\"", " }", "", " once method interfaces {", " coll.sequence.withAll( // because map is lazy", " t1.interfaces.map { each -> each - t2 }", " )", " }", " }", "", "}" ]; } function gracecode_pattern__43__typeBundle() { importedModules["pattern+typeBundle"] = this; const var_$module = this; this.definitionModule = "pattern+typeBundle"; this.definitionLine = 1; setLineNumber(1); // compilenode dialect // Dialect "none" const var_$dialect = new GraceModule("none"); this.outer = var_$dialect; setLineNumber(2); // compilenode import // Import of "equalityBundle" as equalityBundle if (typeof gracecode_equalityBundle == "undefined") throw new GraceExceptionPacket(EnvironmentExceptionObject, new GraceString("could not find module equalityBundle")); var var_equalityBundle = do_import("equalityBundle", gracecode_equalityBundle); var func0 = function(argcv) { // accessor method equalityBundle, line 2 const numArgs = arguments.length - 1; if (numArgs > 0) raiseTypeArgError("equalityBundle", 0, numArgs - 0); return var_equalityBundle; }; // end of method equalityBundle this.methods["equalityBundle"] = func0; func0.methodName = "equalityBundle"; func0.paramCounts = [0]; func0.paramNames = []; func0.definitionLine = 2; func0.definitionModule = "pattern+typeBundle"; func0.debug = "import"; func0.confidential = true; setLineNumber(3); // compilenode import // Import of "collections" as coll if (typeof gracecode_collections == "undefined") throw new GraceExceptionPacket(EnvironmentExceptionObject, new GraceString("could not find module collections")); var var_coll = do_import("collections", gracecode_collections); var func1 = function(argcv) { // accessor method coll, line 3 const numArgs = arguments.length - 1; if (numArgs > 0) raiseTypeArgError("coll", 0, numArgs - 0); return var_coll; }; // end of method coll this.methods["coll"] = func1; func1.methodName = "coll"; func1.paramCounts = [0]; func1.paramNames = []; func1.definitionLine = 3; func1.definitionModule = "pattern+typeBundle"; func1.debug = "import"; func1.confidential = true; setLineNumber(4); // compilenode import // Import of "intrinsic" as intrinsic if (typeof gracecode_intrinsic == "undefined") throw new GraceExceptionPacket(EnvironmentExceptionObject, new GraceString("could not find module intrinsic")); var var_intrinsic = do_import("intrinsic", gracecode_intrinsic); var func2 = function(argcv) { // accessor method intrinsic, line 4 const numArgs = arguments.length - 1; if (numArgs > 0) raiseTypeArgError("intrinsic", 0, numArgs - 0); return var_intrinsic; }; // end of method intrinsic this.methods["intrinsic"] = func2; func2.methodName = "intrinsic"; func2.paramCounts = [0]; func2.paramNames = []; func2.definitionLine = 4; func2.definitionModule = "pattern+typeBundle"; func2.debug = "import"; func2.confidential = true; this.closureKeys = this.closureKeys || []; this.closureKeys.push("outer_pattern__43__typeBundle_1"); this.outer_pattern__43__typeBundle_1 = var_$dialect; setLineNumber(10); // reuse call var initFun3 = request(var_intrinsic, "annotations$build(3)", [null], this, [], []); // compileReuseCall var func4 = function(argcv) { // method open, line 12 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 0) && (numArgs !== 0)) { raiseTypeArgError("open", 0, numArgs - 0); } var ouc = emptyGraceObject("open", "pattern+typeBundle", 12); var ouc_init = this.methods["open$build(3)"].call(this, null, ouc, [], []); ouc_init.call(ouc); return ouc; }; // end of method open this.methods["open"] = func4; func4.methodName = "open"; func4.paramCounts = [0]; func4.paramNames = []; func4.definitionLine = 12; func4.definitionModule = "pattern+typeBundle"; var func5 = function(argcv, inheritingObject, aliases, exclusions) { // method open$build(_,_,_), line 12 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 4; if ((numArgs > 0) && (numArgs !== 0)) { raiseTypeArgError("open", 0, numArgs - 0); } var obj6_build = function(ignore, outerObj, aliases, exclusions) { this.closureKeys = this.closureKeys || []; this.closureKeys.push("outer_pattern__43__typeBundle_12"); this.outer_pattern__43__typeBundle_12 = outerObj; const inheritedExclusions = { }; for (var eix = 0, eLen = exclusions.length; eix < eLen; eix ++) { const exMeth = exclusions[eix]; inheritedExclusions[exMeth] = this.methods[exMeth]; }; setLineNumber(14); // reuse call var initFun7 = request(var_equalityBundle, "open$build(3)", [null], this, [], []); // compileReuseCall var func8 = function(argcv) { // method BasePattern, line 16 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 0) && (numArgs !== 0)) { raiseTypeArgError("BasePattern", 0, numArgs - 0); } var ouc = emptyGraceObject("open.BasePattern", "pattern+typeBundle", 16); var ouc_init = this.methods["BasePattern$build(3)"].call(this, null, ouc, [], []); ouc_init.call(ouc); return ouc; }; // end of method BasePattern this.methods["BasePattern"] = func8; func8.methodName = "BasePattern"; func8.paramCounts = [0]; func8.paramNames = []; func8.definitionLine = 16; func8.definitionModule = "pattern+typeBundle"; var func9 = function(argcv, inheritingObject, aliases, exclusions) { // method BasePattern$build(_,_,_), line 16 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 4; if ((numArgs > 0) && (numArgs !== 0)) { raiseTypeArgError("BasePattern", 0, numArgs - 0); } var obj10_build = function(ignore, outerObj, aliases, exclusions) { this.closureKeys = this.closureKeys || []; this.closureKeys.push("outer_pattern__43__typeBundle_16"); this.outer_pattern__43__typeBundle_16 = outerObj; const inheritedExclusions = { }; for (var eix = 0, eLen = exclusions.length; eix < eLen; eix ++) { const exMeth = exclusions[eix]; inheritedExclusions[exMeth] = this.methods[exMeth]; }; var func11 = function(argcv, var_o) { // method &(_), line 17 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 1) && (numArgs !== 1)) { raiseTypeArgError("&(_)", 0, numArgs - 1); } setLineNumber(18); // compilenode yourself var call12 = selfRequest(this.outer_pattern__43__typeBundle_16, "AndPattern(2)", [2], this, var_o); return call12; }; // end of method &(_) this.methods["&(1)"] = func11; func11.methodName = "&(1)"; func11.paramCounts = [1]; func11.paramNames = ["o"]; func11.definitionLine = 17; func11.definitionModule = "pattern+typeBundle"; var func13 = function(argcv, var_o) { // method |(_), line 20 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 1) && (numArgs !== 1)) { raiseTypeArgError("|(_)", 0, numArgs - 1); } setLineNumber(21); // compilenode yourself var call14 = selfRequest(this.outer_pattern__43__typeBundle_16, "OrPattern(2)", [2], this, var_o); return call14; }; // end of method |(_) this.methods["|(1)"] = func13; func13.methodName = "|(1)"; func13.paramCounts = [1]; func13.paramNames = ["o"]; func13.definitionLine = 20; func13.definitionModule = "pattern+typeBundle"; var func15 = function(argcv) { // method prefix¬, line 23 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 0) && (numArgs !== 0)) { raiseTypeArgError("prefix¬", 0, numArgs - 0); } setLineNumber(24); // compilenode yourself var call16 = selfRequest(this.outer_pattern__43__typeBundle_16, "NotPattern(1)", [1], this); return call16; }; // end of method prefix¬ this.methods["prefix\u00ac"] = func15; func15.methodName = "prefix\u00ac"; func15.paramCounts = [0]; func15.paramNames = []; func15.definitionLine = 23; func15.definitionModule = "pattern+typeBundle"; var func17 = function(argcv) { // method isType, line 26 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 0) && (numArgs !== 0)) { raiseTypeArgError("isType", 0, numArgs - 0); } setLineNumber(26); // compilenode member return GraceFalse; }; // end of method isType this.methods["isType"] = func17; func17.methodName = "isType"; func17.paramCounts = [0]; func17.paramNames = []; func17.definitionLine = 26; func17.definitionModule = "pattern+typeBundle"; var func19 = function(argcv, var___95____95__1) { // method setTypeName(_), line 27 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 1) && (numArgs !== 1)) { raiseTypeArgError("setTypeName(_)", 0, numArgs - 1); } setLineNumber(31); // compilenode string var string22 = new GraceString(" is a Pattern, but not a Type"); // call case 4: other requests // call case 4: other requests var concat23 = request(GraceEmptyString, "++(1)", [1], this); var concat21 = request(concat23, "++(1)", [1], string22); // call case 4: other requests // call case 4: other requests // call case 4: other requests var call25 = request(var_intrinsic, "constants", [0]); var call24 = request(call25, "TypeError", [0]); var call20 = request(call24, "raise(1)", [1], concat21); return call20; }; // end of method setTypeName(_) func19.confidential = true; this.methods["setTypeName(1)"] = func19; func19.methodName = "setTypeName(1)"; func19.paramCounts = [1]; func19.paramNames = ["__1"]; func19.definitionLine = 27; func19.definitionModule = "pattern+typeBundle"; const overridenByAliases = { }; for (let aix = 0, aLen = aliases.length; aix < aLen; aix ++) { const a = aliases[aix]; const newNm = a.newName; const oldNm = a.oldName; overridenByAliases[newNm] = this.methods[newNm]; const m = confidentialVersion(overridenByAliases[oldNm] || this.methods[oldNm], newNm); m.definitionLine = 16; m.definitionModule = "pattern+typeBundle"; this.methods[newNm] = m; } for (let exName in inheritedExclusions) { if (inheritedExclusions.hasOwnProperty(exName)) { if (inheritedExclusions[exName]) { this.methods[exName] = inheritedExclusions[exName]; } else { delete this.methods[exName]; } } } var obj10_init = function() { // init of object on line 16 }; return obj10_init; // from compileBuildAndInitFunctions(_)inMethod(_) }; var obj10_init = obj10_build.call(inheritingObject, null, this, aliases, exclusions); return obj10_init; // from compileBuildMethodFor(_)withObjCon(_)inside(_) }; // end of method BasePattern$build(_,_,_) this.methods["BasePattern$build(3)"] = func9; func9.methodName = "BasePattern$build(3)"; func9.paramCounts = [0]; func9.paramNames = []; func9.definitionLine = 16; func9.definitionModule = "pattern+typeBundle"; var func26 = function(argcv, var_p1, var_p2) { // method AndPattern(_,_), line 35 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 2) && (numArgs !== 2)) { raiseTypeArgError("AndPattern(_,_)", 0, numArgs - 2); } var ouc = emptyGraceObject("open.AndPattern(_,_)", "pattern+typeBundle", 35); var ouc_init = this.methods["AndPattern(2)$build(3)"].call(this, null, var_p1, var_p2, ouc, [], []); ouc_init.call(ouc); return ouc; }; // end of method AndPattern(_,_) this.methods["AndPattern(2)"] = func26; func26.methodName = "AndPattern(2)"; func26.paramCounts = [2]; func26.paramNames = ["p1", "p2"]; func26.definitionLine = 35; func26.definitionModule = "pattern+typeBundle"; var func27 = function(argcv, var_p1, var_p2, inheritingObject, aliases, exclusions) { // method AndPattern(_,_)$build(_,_,_), line 35 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 4; if ((numArgs > 2) && (numArgs !== 2)) { raiseTypeArgError("AndPattern(_,_)", 0, numArgs - 2); } var obj28_build = function(ignore, var_p1, var_p2, outerObj, aliases, exclusions) { this.closureKeys = this.closureKeys || []; this.closureKeys.push("outer_pattern__43__typeBundle_35"); this.outer_pattern__43__typeBundle_35 = outerObj; const inheritedExclusions = { }; for (var eix = 0, eLen = exclusions.length; eix < eLen; eix ++) { const exMeth = exclusions[eix]; inheritedExclusions[exMeth] = this.methods[exMeth]; }; setLineNumber(36); // compilenode yourself var initFun29 = selfRequest(this.outer_pattern__43__typeBundle_35, "BasePattern$build(3)", [null], this, [], []); // compileReuseCall var func30 = function(argcv, var_obj) { // method matches(_), line 37 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 1) && (numArgs !== 1)) { raiseTypeArgError("matches(_)", 0, numArgs - 1); } var if31 = GraceDone; setLineNumber(38); // compilenode call // call case 4: other requests var call32 = request(var_p1, "matches(1)", [1], var_obj); if (Grace_isTrue(call32)) { // call case 4: other requests var call33 = request(var_p2, "matches(1)", [1], var_obj); if31 = call33; } else { if31 = GraceFalse; } return if31; }; // end of method matches(_) this.methods["matches(1)"] = func30; func30.methodName = "matches(1)"; func30.paramCounts = [1]; func30.paramNames = ["obj"]; func30.definitionLine = 37; func30.definitionModule = "pattern+typeBundle"; const overridenByAliases = { }; for (let aix = 0, aLen = aliases.length; aix < aLen; aix ++) { const a = aliases[aix]; const newNm = a.newName; const oldNm = a.oldName; overridenByAliases[newNm] = this.methods[newNm]; const m = confidentialVersion(overridenByAliases[oldNm] || this.methods[oldNm], newNm); m.definitionLine = 35; m.definitionModule = "pattern+typeBundle"; this.methods[newNm] = m; } for (let exName in inheritedExclusions) { if (inheritedExclusions.hasOwnProperty(exName)) { if (inheritedExclusions[exName]) { this.methods[exName] = inheritedExclusions[exName]; } else { delete this.methods[exName]; } } } var obj28_init = function() { // init of object on line 35 }; return obj28_init; // from compileBuildAndInitFunctions(_)inMethod(_) }; var obj28_init = obj28_build.call(inheritingObject, null, var_p1, var_p2, this, aliases, exclusions); return obj28_init; // from compileBuildMethodFor(_)withObjCon(_)inside(_) }; // end of method AndPattern(_,_)$build(_,_,_) this.methods["AndPattern(2)$build(3)"] = func27; func27.methodName = "AndPattern(2)$build(3)"; func27.paramCounts = [2]; func27.paramNames = ["p1", "p2"]; func27.definitionLine = 35; func27.definitionModule = "pattern+typeBundle"; var func35 = function(argcv, var_p1, var_p2) { // method OrPattern(_,_), line 42 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 2) && (numArgs !== 2)) { raiseTypeArgError("OrPattern(_,_)", 0, numArgs - 2); } var ouc = emptyGraceObject("open.OrPattern(_,_)", "pattern+typeBundle", 42); var ouc_init = this.methods["OrPattern(2)$build(3)"].call(this, null, var_p1, var_p2, ouc, [], []); ouc_init.call(ouc); return ouc; }; // end of method OrPattern(_,_) this.methods["OrPattern(2)"] = func35; func35.methodName = "OrPattern(2)"; func35.paramCounts = [2]; func35.paramNames = ["p1", "p2"]; func35.definitionLine = 42; func35.definitionModule = "pattern+typeBundle"; var func36 = function(argcv, var_p1, var_p2, inheritingObject, aliases, exclusions) { // method OrPattern(_,_)$build(_,_,_), line 42 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 4; if ((numArgs > 2) && (numArgs !== 2)) { raiseTypeArgError("OrPattern(_,_)", 0, numArgs - 2); } var obj37_build = function(ignore, var_p1, var_p2, outerObj, aliases, exclusions) { this.closureKeys = this.closureKeys || []; this.closureKeys.push("outer_pattern__43__typeBundle_42"); this.outer_pattern__43__typeBundle_42 = outerObj; const inheritedExclusions = { }; for (var eix = 0, eLen = exclusions.length; eix < eLen; eix ++) { const exMeth = exclusions[eix]; inheritedExclusions[exMeth] = this.methods[exMeth]; }; setLineNumber(43); // compilenode yourself var initFun38 = selfRequest(this.outer_pattern__43__typeBundle_42, "BasePattern$build(3)", [null], this, [], []); // compileReuseCall var func39 = function(argcv, var_o) { // method matches(_), line 44 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 1) && (numArgs !== 1)) { raiseTypeArgError("matches(_)", 0, numArgs - 1); } var if40 = GraceDone; setLineNumber(45); // compilenode call // call case 4: other requests var call41 = request(var_p1, "matches(1)", [1], var_o); if (Grace_isTrue(call41)) { if40 = GraceTrue; } else { // call case 4: other requests var call43 = request(var_p2, "matches(1)", [1], var_o); if40 = call43; } return if40; }; // end of method matches(_) this.methods["matches(1)"] = func39; func39.methodName = "matches(1)"; func39.paramCounts = [1]; func39.paramNames = ["o"]; func39.definitionLine = 44; func39.definitionModule = "pattern+typeBundle"; const overridenByAliases = { }; for (let aix = 0, aLen = aliases.length; aix < aLen; aix ++) { const a = aliases[aix]; const newNm = a.newName; const oldNm = a.oldName; overridenByAliases[newNm] = this.methods[newNm]; const m = confidentialVersion(overridenByAliases[oldNm] || this.methods[oldNm], newNm); m.definitionLine = 42; m.definitionModule = "pattern+typeBundle"; this.methods[newNm] = m; } for (let exName in inheritedExclusions) { if (inheritedExclusions.hasOwnProperty(exName)) { if (inheritedExclusions[exName]) { this.methods[exName] = inheritedExclusions[exName]; } else { delete this.methods[exName]; } } } var obj37_init = function() { // init of object on line 42 }; return obj37_init; // from compileBuildAndInitFunctions(_)inMethod(_) }; var obj37_init = obj37_build.call(inheritingObject, null, var_p1, var_p2, this, aliases, exclusions); return obj37_init; // from compileBuildMethodFor(_)withObjCon(_)inside(_) }; // end of method OrPattern(_,_)$build(_,_,_) this.methods["OrPattern(2)$build(3)"] = func36; func36.methodName = "OrPattern(2)$build(3)"; func36.paramCounts = [2]; func36.paramNames = ["p1", "p2"]; func36.definitionLine = 42; func36.definitionModule = "pattern+typeBundle"; var func44 = function(argcv, var_p) { // method NotPattern(_), line 49 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 1) && (numArgs !== 1)) { raiseTypeArgError("NotPattern(_)", 0, numArgs - 1); } var ouc = emptyGraceObject("open.NotPattern(_)", "pattern+typeBundle", 49); var ouc_init = this.methods["NotPattern(1)$build(3)"].call(this, null, var_p, ouc, [], []); ouc_init.call(ouc); return ouc; }; // end of method NotPattern(_) this.methods["NotPattern(1)"] = func44; func44.methodName = "NotPattern(1)"; func44.paramCounts = [1]; func44.paramNames = ["p"]; func44.definitionLine = 49; func44.definitionModule = "pattern+typeBundle"; var func45 = function(argcv, var_p, inheritingObject, aliases, exclusions) { // method NotPattern(_)$build(_,_,_), line 49 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 4; if ((numArgs > 1) && (numArgs !== 1)) { raiseTypeArgError("NotPattern(_)", 0, numArgs - 1); } var obj46_build = function(ignore, var_p, outerObj, aliases, exclusions) { this.closureKeys = this.closureKeys || []; this.closureKeys.push("outer_pattern__43__typeBundle_49"); this.outer_pattern__43__typeBundle_49 = outerObj; const inheritedExclusions = { }; for (var eix = 0, eLen = exclusions.length; eix < eLen; eix ++) { const exMeth = exclusions[eix]; inheritedExclusions[exMeth] = this.methods[exMeth]; }; setLineNumber(50); // compilenode yourself var initFun47 = selfRequest(this.outer_pattern__43__typeBundle_49, "BasePattern$build(3)", [null], this, [], []); // compileReuseCall var func48 = function(argcv, var_o) { // method matches(_), line 51 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 1) && (numArgs !== 1)) { raiseTypeArgError("matches(_)", 0, numArgs - 1); } setLineNumber(52); // compilenode member // call case 4: other requests // call case 4: other requests var call50 = request(var_p, "matches(1)", [1], var_o); var call49 = request(call50, "not", [0]); return call49; }; // end of method matches(_) this.methods["matches(1)"] = func48; func48.methodName = "matches(1)"; func48.paramCounts = [1]; func48.paramNames = ["o"]; func48.definitionLine = 51; func48.definitionModule = "pattern+typeBundle"; const overridenByAliases = { }; for (let aix = 0, aLen = aliases.length; aix < aLen; aix ++) { const a = aliases[aix]; const newNm = a.newName; const oldNm = a.oldName; overridenByAliases[newNm] = this.methods[newNm]; const m = confidentialVersion(overridenByAliases[oldNm] || this.methods[oldNm], newNm); m.definitionLine = 49; m.definitionModule = "pattern+typeBundle"; this.methods[newNm] = m; } for (let exName in inheritedExclusions) { if (inheritedExclusions.hasOwnProperty(exName)) { if (inheritedExclusions[exName]) { this.methods[exName] = inheritedExclusions[exName]; } else { delete this.methods[exName]; } } } var obj46_init = function() { // init of object on line 49 }; return obj46_init; // from compileBuildAndInitFunctions(_)inMethod(_) }; var obj46_init = obj46_build.call(inheritingObject, null, var_p, this, aliases, exclusions); return obj46_init; // from compileBuildMethodFor(_)withObjCon(_)inside(_) }; // end of method NotPattern(_)$build(_,_,_) this.methods["NotPattern(1)$build(3)"] = func45; func45.methodName = "NotPattern(1)$build(3)"; func45.paramCounts = [1]; func45.paramNames = ["p"]; func45.definitionLine = 49; func45.definitionModule = "pattern+typeBundle"; var func51 = function(argcv) { // method BaseType, line 56 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 0) && (numArgs !== 0)) { raiseTypeArgError("BaseType", 0, numArgs - 0); } var ouc = emptyGraceObject("open.BaseType", "pattern+typeBundle", 56); var ouc_init = this.methods["BaseType$build(3)"].call(this, null, ouc, [], []); ouc_init.call(ouc); return ouc; }; // end of method BaseType this.methods["BaseType"] = func51; func51.methodName = "BaseType"; func51.paramCounts = [0]; func51.paramNames = []; func51.definitionLine = 56; func51.definitionModule = "pattern+typeBundle"; var func52 = function(argcv, inheritingObject, aliases, exclusions) { // method BaseType$build(_,_,_), line 56 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 4; if ((numArgs > 0) && (numArgs !== 0)) { raiseTypeArgError("BaseType", 0, numArgs - 0); } var obj53_build = function(ignore, outerObj, aliases, exclusions) { this.closureKeys = this.closureKeys || []; this.closureKeys.push("outer_pattern__43__typeBundle_56"); this.outer_pattern__43__typeBundle_56 = outerObj; const inheritedExclusions = { }; for (var eix = 0, eLen = exclusions.length; eix < eLen; eix ++) { const exMeth = exclusions[eix]; inheritedExclusions[exMeth] = this.methods[exMeth]; }; setLineNumber(57); // compilenode yourself var initFun54 = selfRequest(this.outer_pattern__43__typeBundle_56, "identityEquality$build(3)", [null], this, [], []); // compileReuseCall var func55 = function(argcv, var_o) { // method &(_), line 59 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 1) && (numArgs !== 1)) { raiseTypeArgError("&(_)", 0, numArgs - 1); } setLineNumber(59); // compilenode yourself var call56 = selfRequest(this.outer_pattern__43__typeBundle_56, "TypeIntersection(2)", [2], this, var_o); return call56; }; // end of method &(_) this.methods["&(1)"] = func55; func55.methodName = "&(1)"; func55.paramCounts = [1]; func55.paramNames = ["o"]; func55.definitionLine = 59; func55.definitionModule = "pattern+typeBundle"; var func57 = function(argcv, var_o) { // method |(_), line 60 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 1) && (numArgs !== 1)) { raiseTypeArgError("|(_)", 0, numArgs - 1); } setLineNumber(60); // compilenode yourself var call58 = selfRequest(this.outer_pattern__43__typeBundle_56, "TypeVariant(2)", [2], this, var_o); return call58; }; // end of method |(_) this.methods["|(1)"] = func57; func57.methodName = "|(1)"; func57.paramCounts = [1]; func57.paramNames = ["o"]; func57.definitionLine = 60; func57.definitionModule = "pattern+typeBundle"; var func59 = function(argcv, var_o) { // method -(_), line 61 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 1) && (numArgs !== 1)) { raiseTypeArgError("-(_)", 0, numArgs - 1); } setLineNumber(61); // compilenode yourself var call60 = selfRequest(this.outer_pattern__43__typeBundle_56, "TypeExclusion(2)", [2], this, var_o); return call60; }; // end of method -(_) this.methods["-(1)"] = func59; func59.methodName = "-(1)"; func59.paramCounts = [1]; func59.paramNames = ["o"]; func59.definitionLine = 61; func59.definitionModule = "pattern+typeBundle"; var func61 = function(argcv) { // method prefix¬, line 62 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 0) && (numArgs !== 0)) { raiseTypeArgError("prefix¬", 0, numArgs - 0); } setLineNumber(62); // compilenode yourself var call62 = selfRequest(this.outer_pattern__43__typeBundle_56, "NotPattern(1)", [1], this); return call62; }; // end of method prefix¬ this.methods["prefix\u00ac"] = func61; func61.methodName = "prefix\u00ac"; func61.paramCounts = [0]; func61.paramNames = []; func61.definitionLine = 62; func61.definitionModule = "pattern+typeBundle"; var func63 = function(argcv) { // method asString, line 63 var returnTarget = invocationCount; invocationCount++; const numArgs = arguments.length - 1; if ((numArgs > 0) && (numArgs !== 0)) { raiseTypeArgError("asString", 0, numArgs - 0); } setLineNumber(63); // compilenode string // call case 4: other requests var call66 = selfRequest(this, "name", [0]); // call case 4: other requests var string67 = new GraceString("type "); var concat65 = request(string67, "++(1)", [1], call66); var concat64 = request(concat65, "++(1)", [1], GraceEmptyString); return concat64; }; // end of method asString this.methods["asString"] = func63; func63.methodName = "asString"; func63.paramCounts = [0]; func63.paramNames = [];