on master help sign in
Merge pull request #82 from dobesv/patch-throws

Patch some more cases of throwing a string to throw new Error(...)

commit6ec11788d8146ff5aee43eae28c2ce1508a1ee90 authorEvan Czaplicki <info@elm-lang.org> dateTue 29 Jan 2013, 22:11 (14 years ago) parent3d1363c30319a3
5 files changed+247−247
core-js/Automaton.js+220−220 core-js/Dict.js+18−18 core-js/Graphics/Element.js+2−2 core-js/List.js+6−6 core-js/Prelude.js+1−1
core-js/Automaton.js+220−220
@@ -1,221 +1,221 @@
1−
2−(function() {
3−try{
4−
5−var $op={};
6−for(this['i'] in Elm){eval('var '+this['i']+'=Elm[this.i];');}
7−if (Elm.Automaton) throw "Module name collision, 'Automaton' is already defined.";
8−Elm.Automaton=function(){
9− try{
10− if (!(Elm.Prelude instanceof Object)) throw 'module not found';
11− } catch(e) {
12− throw ("Module 'Prelude' is missing. Compile with --make flag or load missing module in a separate JavaScript file.");
13− }
14− var hiddenVars={};
15− for (this['i'] in Elm.Prelude) {
16− if (hiddenVars[this['i']]) continue;
17− eval('var ' + this['i'] + ' = Elm.Prelude[this.i];');}
18− function Automaton_0(a1){
19− return ["Automaton",a1];}
20− var Listen_8=["Listen"];
21− var Ignore_9=["Ignore"];
22− function DragFrom_10(a1){
23− return ["DragFrom",a1];}
24− $op['>>>'] = function(a1_24){
25− return function(a2_25){
26− return function(){
27− var Automaton$m1_26=a1_24;
28− var m1_27=function(){
29− switch(Automaton$m1_26[0]){
30− case "Automaton":
31− return Automaton$m1_26[1];
32− }
33− throw "Non-exhaustive pattern match in case";}();
34− var Automaton$m2_28=a2_25;
35− var m2_29=function(){
36− switch(Automaton$m2_28[0]){
37− case "Automaton":
38− return Automaton$m2_28[1];
39− }
40− throw "Non-exhaustive pattern match in case";}();
41− return Automaton_0(function(a_32){
42− return function(){
43− var Tuple2$bm1__33=m1_27(a_32);
44− var b_34=function(){
45− switch(Tuple2$bm1__33[0]){
46− case "Tuple2":
47− return Tuple2$bm1__33[1];
48− }
49− throw "Non-exhaustive pattern match in case";}();
50− var m1__35=function(){
51− switch(Tuple2$bm1__33[0]){
52− case "Tuple2":
53− return Tuple2$bm1__33[2];
54− }
55− throw "Non-exhaustive pattern match in case";}();
56− return function(){
57− var Tuple2$cm2__40=m2_29(b_34);
58− var c_41=function(){
59− switch(Tuple2$cm2__40[0]){
60− case "Tuple2":
61− return Tuple2$cm2__40[1];
62− }
63− throw "Non-exhaustive pattern match in case";}();
64− var m2__42=function(){
65− switch(Tuple2$cm2__40[0]){
66− case "Tuple2":
67− return Tuple2$cm2__40[2];
68− }
69− throw "Non-exhaustive pattern match in case";}();
70− return ["Tuple2",c_41,$op['>>>'](m1__35)(m2__42)];}();}();});}();};};
71− $op['<<<'] = function(a2_47){
72− return function(a1_48){
73− return $op['>>>'](a1_48)(a2_47);};};
74− $op['^>>'] = function(f_49){
75− return function(a_50){
76− return $op['>>>'](pure_4(f_49))(a_50);};};
77− $op['>>^'] = function(a_51){
78− return function(f_52){
79− return $op['>>>'](a_51)(pure_4(f_52));};};
80− $op['^<<'] = function(f_53){
81− return function(a_54){
82− return $op['>>>'](a_54)(pure_4(f_53));};};
83− $op['<<^'] = function(a_55){
84− return function(f_56){
85− return $op['>>>'](pure_4(f_56))(a_55);};};
86− var count_7=init_5(0)(function(__84){
87− return function(c_85){
88− return (1+c_85);};});
89− function run_1(Automaton$m0_14){
90− return function(input_15){
91− return function(){
92− switch(Automaton$m0_14[0]){
93− case "Automaton":
94− return lift(fst)(foldp$(function(a_17){
95− return function(Tuple2$bAutomaton$m_18){
96− return function(){
97− switch(Tuple2$bAutomaton$m_18[0]){
98− case "Tuple2":
99− switch(Tuple2$bAutomaton$m_18[2][0]){
100− case "Automaton":
101− return Tuple2$bAutomaton$m_18[2][1](a_17);
102− }break;
103− }
104− throw "Non-exhaustive pattern match in case";}();};})(Automaton$m0_14[1])(input_15));
105− }
106− throw "Non-exhaustive pattern match in case";}();};}
107− function step_2(Automaton$m_21){
108− return function(a_22){
109− return function(){
110− switch(Automaton$m_21[0]){
111− case "Automaton":
112− return Automaton$m_21[1](a_22);
113− }
114− throw "Non-exhaustive pattern match in case";}();};}
115− function combine_3(autos_57){
116− return Automaton_0(function(a_58){
117− return function(){
118− var Tuple2$bsautos__59=unzip(map(function(Automaton$m_62){
119− return function(){
120− switch(Automaton$m_62[0]){
121− case "Automaton":
122− return Automaton$m_62[1](a_58);
123− }
124− throw "Non-exhaustive pattern match in case";}();})(autos_57));
125− var bs_60=function(){
126− switch(Tuple2$bsautos__59[0]){
127− case "Tuple2":
128− return Tuple2$bsautos__59[1];
129− }
130− throw "Non-exhaustive pattern match in case";}();
131− var autos__61=function(){
132− switch(Tuple2$bsautos__59[0]){
133− case "Tuple2":
134− return Tuple2$bsautos__59[2];
135− }
136− throw "Non-exhaustive pattern match in case";}();
137− return ["Tuple2",bs_60,combine_3(autos__61)];}();});}
138− function pure_4(f_68){
139− return Automaton_0(function(x_69){
140− return ["Tuple2",f_68(x_69),pure_4(f_68)];});}
141− function init_5(s_70){
142− return function(step_71){
143− return Automaton_0(function(a_72){
144− return function(){
145− var s__73=step_71(a_72)(s_70);
146− return ["Tuple2",s__73,init_5(s__73)(step_71)];}();});};}
147− function init__6(s_74){
148− return function(step_75){
149− return Automaton_0(function(a_76){
150− return function(){
151− var Tuple2$bs__77=step_75(a_76)(s_74);
152− var b_78=function(){
153− switch(Tuple2$bs__77[0]){
154− case "Tuple2":
155− return Tuple2$bs__77[1];
156− }
157− throw "Non-exhaustive pattern match in case";}();
158− var s__79=function(){
159− switch(Tuple2$bs__77[0]){
160− case "Tuple2":
161− return Tuple2$bs__77[2];
162− }
163− throw "Non-exhaustive pattern match in case";}();
164− return ["Tuple2",b_78,init__6(s__79)(step_75)];}();});};}
165− function vecSub_11(Tuple2$x1y1_86){
166− return function(Tuple2$x2y2_87){
167− return function(){
168− switch(Tuple2$x1y1_86[0]){
169− case "Tuple2":
170− return function(){
171− switch(Tuple2$x2y2_87[0]){
172− case "Tuple2":
173− return ["Tuple2",(Tuple2$x1y1_86[1]-Tuple2$x2y2_87[1]),(Tuple2$x1y1_86[2]-Tuple2$x2y2_87[2])];
174− }
175− throw "Non-exhaustive pattern match in case";}();
176− }
177− throw "Non-exhaustive pattern match in case";}();};}
178− function stepDrag_12(Tuple2$presspos_92){
179− return function(Tuple2$dsform_93){
180− return function(){
181− switch(Tuple2$presspos_92[0]){
182− case "Tuple2":
183− return function(){
184− switch(Tuple2$dsform_93[0]){
185− case "Tuple2":
186− return function(){
187− function wrap_98(ds__99){
188− return ["Tuple2",Tuple2$dsform_93[2],["Tuple2",ds__99,Tuple2$dsform_93[2]]];}
189− return function(){
190− switch(Tuple2$dsform_93[1][0]){
191− case "DragFrom":
192− return (Tuple2$presspos_92[1]?["Tuple2",uncurry(move)(vecSub_11(Tuple2$presspos_92[2])(Tuple2$dsform_93[1][1]))(Tuple2$dsform_93[2]),["Tuple2",DragFrom_10(Tuple2$dsform_93[1][1]),Tuple2$dsform_93[2]]]:function(){
193− var form__101=uncurry(move)(vecSub_11(Tuple2$presspos_92[2])(Tuple2$dsform_93[1][1]))(Tuple2$dsform_93[2]);
194− return ["Tuple2",form__101,["Tuple2",Listen_8,form__101]];}());
195− case "Ignore":
196− return wrap_98((Tuple2$presspos_92[1]?Ignore_9:Listen_8));
197− case "Listen":
198− 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)));
199− }
200− throw "Non-exhaustive pattern match in case";}();}();
201− }
202− throw "Non-exhaustive pattern match in case";}();
203− }
204− throw "Non-exhaustive pattern match in case";}();};}
205− function draggable_13(form_102){
206− return init__6(["Tuple2",Listen_8,form_102])(stepDrag_12);}
207− return {$op : {'>>>' : $op['>>>'], '<<<' : $op['<<<'], '^>>' : $op['^>>'], '>>^' : $op['>>^'], '^<<' : $op['^<<'], '<<^' : $op['<<^']},
208− run:run_1,
209− step:step_2,
210− combine:combine_3,
211− pure:pure_4,
212− init:init_5,
213− init$:init__6,
214− count:count_7,
215− draggable:draggable_13};}();
216−Elm.main=function(){
217− return Elm.Automaton.main;};
218−} catch (e) {
219−Elm.main=function() {
220−var msg = ('<br/><h2>Your browser may not be supported. Are you using a modern browser?</h2>' + '<br/><span style="color:grey">Runtime Error in Automaton module:<br/>' + e + '</span>');
1+
2+(function() {
3+try{
4+
5+var $op={};
6+for(this['i'] in Elm){eval('var '+this['i']+'=Elm[this.i];');}
7+if (Elm.Automaton) throw new Error("Module name collision, 'Automaton' is already defined.");
8+Elm.Automaton=function(){
9+ try{
10+ if (!(Elm.Prelude instanceof Object)) throw 'module not found';
11+ } catch(e) {
12+ throw ("Module 'Prelude' is missing. Compile with --make flag or load missing module in a separate JavaScript file.");
13+ }
14+ var hiddenVars={};
15+ for (this['i'] in Elm.Prelude) {
16+ if (hiddenVars[this['i']]) continue;
17+ eval('var ' + this['i'] + ' = Elm.Prelude[this.i];');}
18+ function Automaton_0(a1){
19+ return ["Automaton",a1];}
20+ var Listen_8=["Listen"];
21+ var Ignore_9=["Ignore"];
22+ function DragFrom_10(a1){
23+ return ["DragFrom",a1];}
24+ $op['>>>'] = function(a1_24){
25+ return function(a2_25){
26+ return function(){
27+ var Automaton$m1_26=a1_24;
28+ var m1_27=function(){
29+ switch(Automaton$m1_26[0]){
30+ case "Automaton":
31+ return Automaton$m1_26[1];
32+ }
33+ throw new Error("Non-exhaustive pattern match in case");}();
34+ var Automaton$m2_28=a2_25;
35+ var m2_29=function(){
36+ switch(Automaton$m2_28[0]){
37+ case "Automaton":
38+ return Automaton$m2_28[1];
39+ }
40+ throw new Error("Non-exhaustive pattern match in case");}();
41+ return Automaton_0(function(a_32){
42+ return function(){
43+ var Tuple2$bm1__33=m1_27(a_32);
44+ var b_34=function(){
45+ switch(Tuple2$bm1__33[0]){
46+ case "Tuple2":
47+ return Tuple2$bm1__33[1];
48+ }
49+ throw new Error("Non-exhaustive pattern match in case");}();
50+ var m1__35=function(){
51+ switch(Tuple2$bm1__33[0]){
52+ case "Tuple2":
53+ return Tuple2$bm1__33[2];
54+ }
55+ throw new Error("Non-exhaustive pattern match in case");}();
56+ return function(){
57+ var Tuple2$cm2__40=m2_29(b_34);
58+ var c_41=function(){
59+ switch(Tuple2$cm2__40[0]){
60+ case "Tuple2":
61+ return Tuple2$cm2__40[1];
62+ }
63+ throw new Error("Non-exhaustive pattern match in case");}();
64+ var m2__42=function(){
65+ switch(Tuple2$cm2__40[0]){
66+ case "Tuple2":
67+ return Tuple2$cm2__40[2];
68+ }
69+ throw new Error("Non-exhaustive pattern match in case");}();
70+ return ["Tuple2",c_41,$op['>>>'](m1__35)(m2__42)];}();}();});}();};};
71+ $op['<<<'] = function(a2_47){
72+ return function(a1_48){
73+ return $op['>>>'](a1_48)(a2_47);};};
74+ $op['^>>'] = function(f_49){
75+ return function(a_50){
76+ return $op['>>>'](pure_4(f_49))(a_50);};};
77+ $op['>>^'] = function(a_51){
78+ return function(f_52){
79+ return $op['>>>'](a_51)(pure_4(f_52));};};
80+ $op['^<<'] = function(f_53){
81+ return function(a_54){
82+ return $op['>>>'](a_54)(pure_4(f_53));};};
83+ $op['<<^'] = function(a_55){
84+ return function(f_56){
85+ return $op['>>>'](pure_4(f_56))(a_55);};};
86+ var count_7=init_5(0)(function(__84){
87+ return function(c_85){
88+ return (1+c_85);};});
89+ function run_1(Automaton$m0_14){
90+ return function(input_15){
91+ return function(){
92+ switch(Automaton$m0_14[0]){
93+ case "Automaton":
94+ return lift(fst)(foldp$(function(a_17){
95+ return function(Tuple2$bAutomaton$m_18){
96+ return function(){
97+ switch(Tuple2$bAutomaton$m_18[0]){
98+ case "Tuple2":
99+ switch(Tuple2$bAutomaton$m_18[2][0]){
100+ case "Automaton":
101+ return Tuple2$bAutomaton$m_18[2][1](a_17);
102+ }break;
103+ }
104+ throw new Error("Non-exhaustive pattern match in case");}();};})(Automaton$m0_14[1])(input_15));
105+ }
106+ throw new Error("Non-exhaustive pattern match in case");}();};}
107+ function step_2(Automaton$m_21){
108+ return function(a_22){
109+ return function(){
110+ switch(Automaton$m_21[0]){
111+ case "Automaton":
112+ return Automaton$m_21[1](a_22);
113+ }
114+ throw new Error("Non-exhaustive pattern match in case");}();};}
115+ function combine_3(autos_57){
116+ return Automaton_0(function(a_58){
117+ return function(){
118+ var Tuple2$bsautos__59=unzip(map(function(Automaton$m_62){
119+ return function(){
120+ switch(Automaton$m_62[0]){
121+ case "Automaton":
122+ return Automaton$m_62[1](a_58);
123+ }
124+ throw new Error("Non-exhaustive pattern match in case");}();})(autos_57));
125+ var bs_60=function(){
126+ switch(Tuple2$bsautos__59[0]){
127+ case "Tuple2":
128+ return Tuple2$bsautos__59[1];
129+ }
130+ throw new Error("Non-exhaustive pattern match in case");}();
131+ var autos__61=function(){
132+ switch(Tuple2$bsautos__59[0]){
133+ case "Tuple2":
134+ return Tuple2$bsautos__59[2];
135+ }
136+ throw new Error("Non-exhaustive pattern match in case");}();
137+ return ["Tuple2",bs_60,combine_3(autos__61)];}();});}
138+ function pure_4(f_68){
139+ return Automaton_0(function(x_69){
140+ return ["Tuple2",f_68(x_69),pure_4(f_68)];});}
141+ function init_5(s_70){
142+ return function(step_71){
143+ return Automaton_0(function(a_72){
144+ return function(){
145+ var s__73=step_71(a_72)(s_70);
146+ return ["Tuple2",s__73,init_5(s__73)(step_71)];}();});};}
147+ function init__6(s_74){
148+ return function(step_75){
149+ return Automaton_0(function(a_76){
150+ return function(){
151+ var Tuple2$bs__77=step_75(a_76)(s_74);
152+ var b_78=function(){
153+ switch(Tuple2$bs__77[0]){
154+ case "Tuple2":
155+ return Tuple2$bs__77[1];
156+ }
157+ throw new Error("Non-exhaustive pattern match in case");}();
158+ var s__79=function(){
159+ switch(Tuple2$bs__77[0]){
160+ case "Tuple2":
161+ return Tuple2$bs__77[2];
162+ }
163+ throw new Error("Non-exhaustive pattern match in case");}();
164+ return ["Tuple2",b_78,init__6(s__79)(step_75)];}();});};}
165+ function vecSub_11(Tuple2$x1y1_86){
166+ return function(Tuple2$x2y2_87){
167+ return function(){
168+ switch(Tuple2$x1y1_86[0]){
169+ case "Tuple2":
170+ return function(){
171+ switch(Tuple2$x2y2_87[0]){
172+ case "Tuple2":
173+ return ["Tuple2",(Tuple2$x1y1_86[1]-Tuple2$x2y2_87[1]),(Tuple2$x1y1_86[2]-Tuple2$x2y2_87[2])];
174+ }
175+ throw new Error("Non-exhaustive pattern match in case");}();
176+ }
177+ throw new Error("Non-exhaustive pattern match in case");}();};}
178+ function stepDrag_12(Tuple2$presspos_92){
179+ return function(Tuple2$dsform_93){
180+ return function(){
181+ switch(Tuple2$presspos_92[0]){
182+ case "Tuple2":
183+ return function(){
184+ switch(Tuple2$dsform_93[0]){
185+ case "Tuple2":
186+ return function(){
187+ function wrap_98(ds__99){
188+ return ["Tuple2",Tuple2$dsform_93[2],["Tuple2",ds__99,Tuple2$dsform_93[2]]];}
189+ return function(){
190+ switch(Tuple2$dsform_93[1][0]){
191+ case "DragFrom":
192+ return (Tuple2$presspos_92[1]?["Tuple2",uncurry(move)(vecSub_11(Tuple2$presspos_92[2])(Tuple2$dsform_93[1][1]))(Tuple2$dsform_93[2]),["Tuple2",DragFrom_10(Tuple2$dsform_93[1][1]),Tuple2$dsform_93[2]]]:function(){
193+ var form__101=uncurry(move)(vecSub_11(Tuple2$presspos_92[2])(Tuple2$dsform_93[1][1]))(Tuple2$dsform_93[2]);
194+ return ["Tuple2",form__101,["Tuple2",Listen_8,form__101]];}());
195+ case "Ignore":
196+ return wrap_98((Tuple2$presspos_92[1]?Ignore_9:Listen_8));
197+ case "Listen":
198+ 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)));
199+ }
200+ throw new Error("Non-exhaustive pattern match in case");}();}();
201+ }
202+ throw new Error("Non-exhaustive pattern match in case");}();
203+ }
204+ throw new Error("Non-exhaustive pattern match in case");}();};}
205+ function draggable_13(form_102){
206+ return init__6(["Tuple2",Listen_8,form_102])(stepDrag_12);}
207+ return {$op : {'>>>' : $op['>>>'], '<<<' : $op['<<<'], '^>>' : $op['^>>'], '>>^' : $op['>>^'], '^<<' : $op['^<<'], '<<^' : $op['<<^']},
208+ run:run_1,
209+ step:step_2,
210+ combine:combine_3,
211+ pure:pure_4,
212+ init:init_5,
213+ init$:init__6,
214+ count:count_7,
215+ draggable:draggable_13};}();
216+Elm.main=function(){
217+ return Elm.Automaton.main;};
218+} catch (e) {
219+Elm.main=function() {
220+var msg = ('<br/><h2>Your browser may not be supported. Are you using a modern browser?</h2>' + '<br/><span style="color:grey">Runtime Error in Automaton module:<br/>' + e + '</span>');
221221document.body.innerHTML = Elm.Text.monospace(msg);throw e;};}}());
core-js/Dict.js+18−18
@@ -28,7 +28,7 @@ Elm.Dict=function(){
2828 }
2929 return min_6(t_42[4]);
3030 }
31− throw "Non-exhaustive pattern match in case";}();}
31+ throw new Error("Non-exhaustive pattern match in case");}();}
3232 function lookup_7(k_46){
3333 return function(t_47){
3434 return function(){
@@ -46,9 +46,9 @@ Elm.Dict=function(){
4646 case 'LT':
4747 return lookup_7(k_46)(t_47[4]);
4848 }
49− throw "Non-exhaustive pattern match in case";}();
49+ throw new Error("Non-exhaustive pattern match in case");}();
5050 }
51− throw "Non-exhaustive pattern match in case";}();};}
51+ throw new Error("Non-exhaustive pattern match in case");}();};}
5252 function findWithDefault_8(base_52){
5353 return function(k_53){
5454 return function(t_54){
@@ -67,9 +67,9 @@ Elm.Dict=function(){
6767 case 'LT':
6868 return findWithDefault_8(base_52)(k_53)(t_54[4]);
6969 }
70− throw "Non-exhaustive pattern match in case";}();
70+ throw new Error("Non-exhaustive pattern match in case");}();
7171 }
72− throw "Non-exhaustive pattern match in case";}();};};}
72+ throw new Error("Non-exhaustive pattern match in case");}();};};}
7373 function member_9(k_59){
7474 return function(t_60){
7575 return isJust(lookup_7(k_59)(t_60));};}
@@ -133,7 +133,7 @@ Elm.Dict=function(){
133133 case 'Red':
134134 return Black_1;
135135 }
136− throw "Non-exhaustive pattern match in case";}();}
136+ throw new Error("Non-exhaustive pattern match in case");}();}
137137 function color_flip_15(t_84){
138138 return function(){
139139 switch(t_84[0]){
@@ -199,10 +199,10 @@ Elm.Dict=function(){
199199 case 'LT':
200200 return RBNode_2(t_109[1])(t_109[2])(t_109[3])(ins_108(t_109[4]))(t_109[5]);
201201 }
202− throw "Non-exhaustive pattern match in case";}();
202+ throw new Error("Non-exhaustive pattern match in case");}();
203203 return fixUp_17(h_115);}();
204204 }
205− throw "Non-exhaustive pattern match in case";}();}
205+ throw new Error("Non-exhaustive pattern match in case");}();}
206206 return ensureBlackRoot_18(ins_108(t_107));}();};};}
207207 function singleton_20(k_116){
208208 return function(v_117){
@@ -322,7 +322,7 @@ Elm.Dict=function(){
322322 case 'RBNode':
323323 return fixUp_17(RBNode_2(case198[1])(case198[2])(case198[3])(del_135(case198[4]))(case198[5]));
324324 }
325− throw "Non-exhaustive pattern match in case";}();}();}
325+ throw new Error("Non-exhaustive pattern match in case");}();}();}
326326 return ensureBlackRoot_18(del_135(t_134));}();}
327327 function remove_31(k_142){
328328 return function(t_143){
@@ -353,7 +353,7 @@ Elm.Dict=function(){
353353 case 'RBNode':
354354 return fixUp_17(RBNode_2(case216[1])(case216[2])(case216[3])(del_149(case216[4]))(case216[5]));
355355 }
356− throw "Non-exhaustive pattern match in case";}();}
356+ throw new Error("Non-exhaustive pattern match in case");}();}
357357 function delEQ_147(t_160){
358358 return function(){
359359 switch(t_160[0]){
@@ -367,16 +367,16 @@ Elm.Dict=function(){
367367 case 'Tuple2':
368368 return Tuple2$k_v__164[1];
369369 }
370− throw "Non-exhaustive pattern match in case";}();
370+ throw new Error("Non-exhaustive pattern match in case");}();
371371 var v__166=function(){
372372 switch(Tuple2$k_v__164[0]){
373373 case 'Tuple2':
374374 return Tuple2$k_v__164[2];
375375 }
376− throw "Non-exhaustive pattern match in case";}();
376+ throw new Error("Non-exhaustive pattern match in case");}();
377377 return fixUp_17(RBNode_2(t_160[1])(k__165)(v__166)(t_160[4])(deleteMin_30(t_160[5])));}();
378378 }
379− throw "Non-exhaustive pattern match in case";}();}
379+ throw new Error("Non-exhaustive pattern match in case");}();}
380380 function delGT_148(t_171){
381381 return function(){
382382 switch(t_171[0]){
@@ -385,7 +385,7 @@ Elm.Dict=function(){
385385 case 'RBNode':
386386 return fixUp_17(RBNode_2(t_171[1])(t_171[2])(t_171[3])(t_171[4])(del_149(t_171[5])));
387387 }
388− throw "Non-exhaustive pattern match in case";}();}
388+ throw new Error("Non-exhaustive pattern match in case");}();}
389389 function del_149(t_177){
390390 return function(){
391391 switch(t_177[0]){
@@ -398,7 +398,7 @@ Elm.Dict=function(){
398398 var t__180=moveRedRightIfNeeded_29(t_177);
399399 return (eq_145(t__180)?delEQ_147(t__180):delGT_148(t__180));}());}());
400400 }
401− throw "Non-exhaustive pattern match in case";}();}
401+ throw new Error("Non-exhaustive pattern match in case");}();}
402402 return (member_9(k_142)(t_143)?ensureBlackRoot_18(del_149(t_143)):t_143);}();};}
403403 function map_32(f_181){
404404 return function(t_182){
@@ -409,7 +409,7 @@ Elm.Dict=function(){
409409 case 'RBNode':
410410 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]));
411411 }
412− throw "Non-exhaustive pattern match in case";}();};}
412+ throw new Error("Non-exhaustive pattern match in case");}();};}
413413 function foldl_33(f_188){
414414 return function(acc_189){
415415 return function(t_190){
@@ -420,7 +420,7 @@ Elm.Dict=function(){
420420 case 'RBNode':
421421 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]);
422422 }
423− throw "Non-exhaustive pattern match in case";}();};};}
423+ throw new Error("Non-exhaustive pattern match in case");}();};};}
424424 function foldr_34(f_195){
425425 return function(acc_196){
426426 return function(t_197){
@@ -431,7 +431,7 @@ Elm.Dict=function(){
431431 case 'RBNode':
432432 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]);
433433 }
434− throw "Non-exhaustive pattern match in case";}();};};}
434+ throw new Error("Non-exhaustive pattern match in case");}();};};}
435435 function union_35(t1_202){
436436 return function(t2_203){
437437 return foldl_33(insert_19)(t2_203)(t1_202);};}
core-js/Graphics/Element.js+2−2
@@ -481,7 +481,7 @@ Elm.Graphics = function() {
481481 var case1 = case0[1], case2 = case0[2], case3 = case0[3], case4 = case0[4];
482482 return Form_84(t_212 + case1)(case2)(case3)(case4)
483483 }
484− throw"Non-exhaustive pattern match in case";
484+ throw new Error("Non-exhaustive pattern match in case");
485485 }(Form$thetascaleposform_213)
486486 }
487487 }
@@ -505,7 +505,7 @@ Elm.Graphics = function() {
505505 }
506506 break
507507 }
508− throw"Non-exhaustive pattern match in case";
508+ throw new Error("Non-exhaustive pattern match in case");
509509 }(Form$thetascaleTuple2$pxpyform_226)
510510 }
511511 }
core-js/List.js+6−6
@@ -1,7 +1,7 @@
11Elm.List = function() {
22
33 var throwError = function(f) {
4− throw "Function '" + f + "' expecting a list!";
4+ throw new Error("Function '" + f + "' expecting a list!");
55 }
66
77 function length(xs) {
@@ -46,19 +46,19 @@ Elm.List = function() {
4646 var minimum = foldl1(function(x) { return function(y) { return Math.min(x,y) } });
4747 function head(v) {
4848 if (v[0] !== "Cons") {
49− throw "Error: 'head' only accepts lists of length greater than one.";
49+ throw new Error("Error: 'head' only accepts lists of length greater than one.");
5050 }
5151 return v[1];
5252 }
5353 function tail(v) {
5454 if (v[0] !== "Cons") {
55− throw "Error: 'tail' only accepts lists of length greater than one.";
55+ throw new Error("Error: 'tail' only accepts lists of length greater than one.");
5656 }
5757 return v[2];
5858 }
5959 function last(v) {
6060 if (v[0] !== "Cons") {
61− throw "Error: 'last' only accepts lists of length greater than one.";
61+ throw new Error("Error: 'last' only accepts lists of length greater than one.");
6262 }
6363 var out = v[1];
6464 while (v[0] === "Cons") {
@@ -129,7 +129,7 @@ Elm.List = function() {
129129 }
130130 function foldr1(f) {
131131 return function(xs) {
132− if (xs[0] === "Nil") { throw "'foldr1' requires an non-empty list." }
132+ if (xs[0] === "Nil") { throw new Error("'foldr1' requires an non-empty list.") }
133133 if (xs[0] !== "Cons") { throwError('foldr1'); }
134134 var arr = [];
135135 while (xs[0] === "Cons") {
@@ -165,7 +165,7 @@ Elm.List = function() {
165165 function scanl1(f) {
166166 return function(xs) {
167167 if (xs[0] !== "Cons") {
168− throw "Error: 'scanl1' requires a list of at least length 1.";
168+ throw new Error("Error: 'scanl1' requires a list of at least length 1.");
169169 }
170170 return scanl(f)(xs[1])(xs[2]);
171171 }
core-js/Prelude.js+1−1
@@ -37,7 +37,7 @@ Elm.Prelude = function() {
3737 };
3838 var uncurry = function(f) { return function(p) {
3939 if (p[0] !== "Tuple2") {
40− throw "Function was uncurry'd but was not given a pair.";
40+ throw new Error("Function was uncurry'd but was not given a pair.");
4141 }
4242 return f(p[1])(p[2]); };
4343 };