Merge branch 'master' of https://github.com/evancz/Elm
This commit is contained in:
commit
cd3571976c
5 changed files with 247 additions and 247 deletions
|
@ -4,7 +4,7 @@ try{
|
|||
|
||||
var $op={};
|
||||
for(this['i'] in Elm){eval('var '+this['i']+'=Elm[this.i];');}
|
||||
if (Elm.Automaton) throw "Module name collision, 'Automaton' is already defined.";
|
||||
if (Elm.Automaton) throw new Error("Module name collision, 'Automaton' is already defined.");
|
||||
Elm.Automaton=function(){
|
||||
try{
|
||||
if (!(Elm.Prelude instanceof Object)) throw 'module not found';
|
||||
|
@ -30,14 +30,14 @@ Elm.Automaton=function(){
|
|||
case "Automaton":
|
||||
return Automaton$m1_26[1];
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();
|
||||
throw new Error("Non-exhaustive pattern match in case");}();
|
||||
var Automaton$m2_28=a2_25;
|
||||
var m2_29=function(){
|
||||
switch(Automaton$m2_28[0]){
|
||||
case "Automaton":
|
||||
return Automaton$m2_28[1];
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();
|
||||
throw new Error("Non-exhaustive pattern match in case");}();
|
||||
return Automaton_0(function(a_32){
|
||||
return function(){
|
||||
var Tuple2$bm1__33=m1_27(a_32);
|
||||
|
@ -46,13 +46,13 @@ Elm.Automaton=function(){
|
|||
case "Tuple2":
|
||||
return Tuple2$bm1__33[1];
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();
|
||||
throw new Error("Non-exhaustive pattern match in case");}();
|
||||
var m1__35=function(){
|
||||
switch(Tuple2$bm1__33[0]){
|
||||
case "Tuple2":
|
||||
return Tuple2$bm1__33[2];
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();
|
||||
throw new Error("Non-exhaustive pattern match in case");}();
|
||||
return function(){
|
||||
var Tuple2$cm2__40=m2_29(b_34);
|
||||
var c_41=function(){
|
||||
|
@ -60,13 +60,13 @@ Elm.Automaton=function(){
|
|||
case "Tuple2":
|
||||
return Tuple2$cm2__40[1];
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();
|
||||
throw new Error("Non-exhaustive pattern match in case");}();
|
||||
var m2__42=function(){
|
||||
switch(Tuple2$cm2__40[0]){
|
||||
case "Tuple2":
|
||||
return Tuple2$cm2__40[2];
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();
|
||||
throw new Error("Non-exhaustive pattern match in case");}();
|
||||
return ["Tuple2",c_41,$op['>>>'](m1__35)(m2__42)];}();}();});}();};};
|
||||
$op['<<<'] = function(a2_47){
|
||||
return function(a1_48){
|
||||
|
@ -101,9 +101,9 @@ Elm.Automaton=function(){
|
|||
return Tuple2$bAutomaton$m_18[2][1](a_17);
|
||||
}break;
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();};})(Automaton$m0_14[1])(input_15));
|
||||
throw new Error("Non-exhaustive pattern match in case");}();};})(Automaton$m0_14[1])(input_15));
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();};}
|
||||
throw new Error("Non-exhaustive pattern match in case");}();};}
|
||||
function step_2(Automaton$m_21){
|
||||
return function(a_22){
|
||||
return function(){
|
||||
|
@ -111,7 +111,7 @@ Elm.Automaton=function(){
|
|||
case "Automaton":
|
||||
return Automaton$m_21[1](a_22);
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();};}
|
||||
throw new Error("Non-exhaustive pattern match in case");}();};}
|
||||
function combine_3(autos_57){
|
||||
return Automaton_0(function(a_58){
|
||||
return function(){
|
||||
|
@ -121,19 +121,19 @@ Elm.Automaton=function(){
|
|||
case "Automaton":
|
||||
return Automaton$m_62[1](a_58);
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();})(autos_57));
|
||||
throw new Error("Non-exhaustive pattern match in case");}();})(autos_57));
|
||||
var bs_60=function(){
|
||||
switch(Tuple2$bsautos__59[0]){
|
||||
case "Tuple2":
|
||||
return Tuple2$bsautos__59[1];
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();
|
||||
throw new Error("Non-exhaustive pattern match in case");}();
|
||||
var autos__61=function(){
|
||||
switch(Tuple2$bsautos__59[0]){
|
||||
case "Tuple2":
|
||||
return Tuple2$bsautos__59[2];
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();
|
||||
throw new Error("Non-exhaustive pattern match in case");}();
|
||||
return ["Tuple2",bs_60,combine_3(autos__61)];}();});}
|
||||
function pure_4(f_68){
|
||||
return Automaton_0(function(x_69){
|
||||
|
@ -154,13 +154,13 @@ Elm.Automaton=function(){
|
|||
case "Tuple2":
|
||||
return Tuple2$bs__77[1];
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();
|
||||
throw new Error("Non-exhaustive pattern match in case");}();
|
||||
var s__79=function(){
|
||||
switch(Tuple2$bs__77[0]){
|
||||
case "Tuple2":
|
||||
return Tuple2$bs__77[2];
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();
|
||||
throw new Error("Non-exhaustive pattern match in case");}();
|
||||
return ["Tuple2",b_78,init__6(s__79)(step_75)];}();});};}
|
||||
function vecSub_11(Tuple2$x1y1_86){
|
||||
return function(Tuple2$x2y2_87){
|
||||
|
@ -172,9 +172,9 @@ Elm.Automaton=function(){
|
|||
case "Tuple2":
|
||||
return ["Tuple2",(Tuple2$x1y1_86[1]-Tuple2$x2y2_87[1]),(Tuple2$x1y1_86[2]-Tuple2$x2y2_87[2])];
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();
|
||||
throw new Error("Non-exhaustive pattern match in case");}();
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();};}
|
||||
throw new Error("Non-exhaustive pattern match in case");}();};}
|
||||
function stepDrag_12(Tuple2$presspos_92){
|
||||
return function(Tuple2$dsform_93){
|
||||
return function(){
|
||||
|
@ -197,11 +197,11 @@ Elm.Automaton=function(){
|
|||
case "Listen":
|
||||
return wrap_98((not(Tuple2$presspos_92[1])?Listen_8:(isWithin(Tuple2$presspos_92[2])(Tuple2$dsform_93[2])?DragFrom_10(Tuple2$presspos_92[2]):Ignore_9)));
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();}();
|
||||
throw new Error("Non-exhaustive pattern match in case");}();}();
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();
|
||||
throw new Error("Non-exhaustive pattern match in case");}();
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();};}
|
||||
throw new Error("Non-exhaustive pattern match in case");}();};}
|
||||
function draggable_13(form_102){
|
||||
return init__6(["Tuple2",Listen_8,form_102])(stepDrag_12);}
|
||||
return {$op : {'>>>' : $op['>>>'], '<<<' : $op['<<<'], '^>>' : $op['^>>'], '>>^' : $op['>>^'], '^<<' : $op['^<<'], '<<^' : $op['<<^']},
|
||||
|
|
|
@ -28,7 +28,7 @@ Elm.Dict=function(){
|
|||
}
|
||||
return min_6(t_42[4]);
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();}
|
||||
throw new Error("Non-exhaustive pattern match in case");}();}
|
||||
function lookup_7(k_46){
|
||||
return function(t_47){
|
||||
return function(){
|
||||
|
@ -46,9 +46,9 @@ Elm.Dict=function(){
|
|||
case 'LT':
|
||||
return lookup_7(k_46)(t_47[4]);
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();
|
||||
throw new Error("Non-exhaustive pattern match in case");}();
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();};}
|
||||
throw new Error("Non-exhaustive pattern match in case");}();};}
|
||||
function findWithDefault_8(base_52){
|
||||
return function(k_53){
|
||||
return function(t_54){
|
||||
|
@ -67,9 +67,9 @@ Elm.Dict=function(){
|
|||
case 'LT':
|
||||
return findWithDefault_8(base_52)(k_53)(t_54[4]);
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();
|
||||
throw new Error("Non-exhaustive pattern match in case");}();
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();};};}
|
||||
throw new Error("Non-exhaustive pattern match in case");}();};};}
|
||||
function member_9(k_59){
|
||||
return function(t_60){
|
||||
return isJust(lookup_7(k_59)(t_60));};}
|
||||
|
@ -133,7 +133,7 @@ Elm.Dict=function(){
|
|||
case 'Red':
|
||||
return Black_1;
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();}
|
||||
throw new Error("Non-exhaustive pattern match in case");}();}
|
||||
function color_flip_15(t_84){
|
||||
return function(){
|
||||
switch(t_84[0]){
|
||||
|
@ -199,10 +199,10 @@ Elm.Dict=function(){
|
|||
case 'LT':
|
||||
return RBNode_2(t_109[1])(t_109[2])(t_109[3])(ins_108(t_109[4]))(t_109[5]);
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();
|
||||
throw new Error("Non-exhaustive pattern match in case");}();
|
||||
return fixUp_17(h_115);}();
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();}
|
||||
throw new Error("Non-exhaustive pattern match in case");}();}
|
||||
return ensureBlackRoot_18(ins_108(t_107));}();};};}
|
||||
function singleton_20(k_116){
|
||||
return function(v_117){
|
||||
|
@ -322,7 +322,7 @@ Elm.Dict=function(){
|
|||
case 'RBNode':
|
||||
return fixUp_17(RBNode_2(case198[1])(case198[2])(case198[3])(del_135(case198[4]))(case198[5]));
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();}();}
|
||||
throw new Error("Non-exhaustive pattern match in case");}();}();}
|
||||
return ensureBlackRoot_18(del_135(t_134));}();}
|
||||
function remove_31(k_142){
|
||||
return function(t_143){
|
||||
|
@ -353,7 +353,7 @@ Elm.Dict=function(){
|
|||
case 'RBNode':
|
||||
return fixUp_17(RBNode_2(case216[1])(case216[2])(case216[3])(del_149(case216[4]))(case216[5]));
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();}
|
||||
throw new Error("Non-exhaustive pattern match in case");}();}
|
||||
function delEQ_147(t_160){
|
||||
return function(){
|
||||
switch(t_160[0]){
|
||||
|
@ -367,16 +367,16 @@ Elm.Dict=function(){
|
|||
case 'Tuple2':
|
||||
return Tuple2$k_v__164[1];
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();
|
||||
throw new Error("Non-exhaustive pattern match in case");}();
|
||||
var v__166=function(){
|
||||
switch(Tuple2$k_v__164[0]){
|
||||
case 'Tuple2':
|
||||
return Tuple2$k_v__164[2];
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();
|
||||
throw new Error("Non-exhaustive pattern match in case");}();
|
||||
return fixUp_17(RBNode_2(t_160[1])(k__165)(v__166)(t_160[4])(deleteMin_30(t_160[5])));}();
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();}
|
||||
throw new Error("Non-exhaustive pattern match in case");}();}
|
||||
function delGT_148(t_171){
|
||||
return function(){
|
||||
switch(t_171[0]){
|
||||
|
@ -385,7 +385,7 @@ Elm.Dict=function(){
|
|||
case 'RBNode':
|
||||
return fixUp_17(RBNode_2(t_171[1])(t_171[2])(t_171[3])(t_171[4])(del_149(t_171[5])));
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();}
|
||||
throw new Error("Non-exhaustive pattern match in case");}();}
|
||||
function del_149(t_177){
|
||||
return function(){
|
||||
switch(t_177[0]){
|
||||
|
@ -398,7 +398,7 @@ Elm.Dict=function(){
|
|||
var t__180=moveRedRightIfNeeded_29(t_177);
|
||||
return (eq_145(t__180)?delEQ_147(t__180):delGT_148(t__180));}());}());
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();}
|
||||
throw new Error("Non-exhaustive pattern match in case");}();}
|
||||
return (member_9(k_142)(t_143)?ensureBlackRoot_18(del_149(t_143)):t_143);}();};}
|
||||
function map_32(f_181){
|
||||
return function(t_182){
|
||||
|
@ -409,7 +409,7 @@ Elm.Dict=function(){
|
|||
case 'RBNode':
|
||||
return RBNode_2(t_182[1])(t_182[2])(f_181(t_182[3]))(map_32(f_181)(t_182[4]))(map_32(f_181)(t_182[5]));
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();};}
|
||||
throw new Error("Non-exhaustive pattern match in case");}();};}
|
||||
function foldl_33(f_188){
|
||||
return function(acc_189){
|
||||
return function(t_190){
|
||||
|
@ -420,7 +420,7 @@ Elm.Dict=function(){
|
|||
case 'RBNode':
|
||||
return foldl_33(f_188)(f_188(t_190[2])(t_190[3])(foldl_33(f_188)(acc_189)(t_190[4])))(t_190[5]);
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();};};}
|
||||
throw new Error("Non-exhaustive pattern match in case");}();};};}
|
||||
function foldr_34(f_195){
|
||||
return function(acc_196){
|
||||
return function(t_197){
|
||||
|
@ -431,7 +431,7 @@ Elm.Dict=function(){
|
|||
case 'RBNode':
|
||||
return foldr_34(f_195)(f_195(t_197[2])(t_197[3])(foldr_34(f_195)(acc_196)(t_197[5])))(t_197[4]);
|
||||
}
|
||||
throw "Non-exhaustive pattern match in case";}();};};}
|
||||
throw new Error("Non-exhaustive pattern match in case");}();};};}
|
||||
function union_35(t1_202){
|
||||
return function(t2_203){
|
||||
return foldl_33(insert_19)(t2_203)(t1_202);};}
|
||||
|
|
|
@ -481,7 +481,7 @@ Elm.Graphics = function() {
|
|||
var case1 = case0[1], case2 = case0[2], case3 = case0[3], case4 = case0[4];
|
||||
return Form_84(t_212 + case1)(case2)(case3)(case4)
|
||||
}
|
||||
throw"Non-exhaustive pattern match in case";
|
||||
throw new Error("Non-exhaustive pattern match in case");
|
||||
}(Form$thetascaleposform_213)
|
||||
}
|
||||
}
|
||||
|
@ -505,7 +505,7 @@ Elm.Graphics = function() {
|
|||
}
|
||||
break
|
||||
}
|
||||
throw"Non-exhaustive pattern match in case";
|
||||
throw new Error("Non-exhaustive pattern match in case");
|
||||
}(Form$thetascaleTuple2$pxpyform_226)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Elm.List = function() {
|
||||
|
||||
var throwError = function(f) {
|
||||
throw "Function '" + f + "' expecting a list!";
|
||||
throw new Error("Function '" + f + "' expecting a list!");
|
||||
}
|
||||
|
||||
function length(xs) {
|
||||
|
@ -46,19 +46,19 @@ Elm.List = function() {
|
|||
var minimum = foldl1(function(x) { return function(y) { return Math.min(x,y) } });
|
||||
function head(v) {
|
||||
if (v[0] !== "Cons") {
|
||||
throw "Error: 'head' only accepts lists of length greater than one.";
|
||||
throw new Error("Error: 'head' only accepts lists of length greater than one.");
|
||||
}
|
||||
return v[1];
|
||||
}
|
||||
function tail(v) {
|
||||
if (v[0] !== "Cons") {
|
||||
throw "Error: 'tail' only accepts lists of length greater than one.";
|
||||
throw new Error("Error: 'tail' only accepts lists of length greater than one.");
|
||||
}
|
||||
return v[2];
|
||||
}
|
||||
function last(v) {
|
||||
if (v[0] !== "Cons") {
|
||||
throw "Error: 'last' only accepts lists of length greater than one.";
|
||||
throw new Error("Error: 'last' only accepts lists of length greater than one.");
|
||||
}
|
||||
var out = v[1];
|
||||
while (v[0] === "Cons") {
|
||||
|
@ -129,7 +129,7 @@ Elm.List = function() {
|
|||
}
|
||||
function foldr1(f) {
|
||||
return function(xs) {
|
||||
if (xs[0] === "Nil") { throw "'foldr1' requires an non-empty list." }
|
||||
if (xs[0] === "Nil") { throw new Error("'foldr1' requires an non-empty list.") }
|
||||
if (xs[0] !== "Cons") { throwError('foldr1'); }
|
||||
var arr = [];
|
||||
while (xs[0] === "Cons") {
|
||||
|
@ -165,7 +165,7 @@ Elm.List = function() {
|
|||
function scanl1(f) {
|
||||
return function(xs) {
|
||||
if (xs[0] !== "Cons") {
|
||||
throw "Error: 'scanl1' requires a list of at least length 1.";
|
||||
throw new Error("Error: 'scanl1' requires a list of at least length 1.");
|
||||
}
|
||||
return scanl(f)(xs[1])(xs[2]);
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ Elm.Prelude = function() {
|
|||
};
|
||||
var uncurry = function(f) { return function(p) {
|
||||
if (p[0] !== "Tuple2") {
|
||||
throw "Function was uncurry'd but was not given a pair.";
|
||||
throw new Error("Function was uncurry'd but was not given a pair.");
|
||||
}
|
||||
return f(p[1])(p[2]); };
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue