This repository has been archived by the owner on Mar 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathWebBits-BrownPLT.JavaScript-min.js
233 lines (208 loc) · 89 KB
/
WebBits-BrownPLT.JavaScript-min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
/*
JavaScript analysis tools based on JSParsec
http://code.google.com/p/jshaskell/
Copyright (c) 2010 Balazs Endresz ([email protected])
Dual licensed under the MIT and GPL licenses.
This is a port of the WebBits library (BrownPLT.JavaScript):
http://hackage.haskell.org/package/WebBits-2.0
Copyright (c) 2007-2009 Arjun Guha, Claudiu Saftoiu, and Spiridon Eliopoulos
------------------------------------------------------------
JSParsec - A parser combinator library for JavaScript
http://code.google.com/p/jshaskell/
Copyright (c) 2010 Balazs Endresz ([email protected])
Dual licensed under the MIT and GPL licenses.
The initial implementation of some combinators,
and the memoization technique is derived from:
http://www.bluishcoder.co.nz/2007/10/javascript-parser-combinators.html
Most functions should behave like their counterparts in Parsec 3:
http://www.haskell.org/haskellwiki/Parsec
------------------------------------------------------------
pretty - A JavaScript port of the Haskell pretty package
http://code.google.com/p/jshaskell/
Copyright (c) 2010 Balazs Endresz ([email protected])
Dual licensed under the MIT and GPL licenses.
Original implementation and license:
http://hackage.haskell.org/package/pretty-1.0.1.1
------------------------------------------------------------
JSHaskell - Some Haskell language features for JavaScript
http://code.google.com/p/jshaskell/
Copyright (c) 2010 Balazs Endresz ([email protected])
Dual licensed under the MIT and GPL licenses.
------------------------------------------------------------
*/
(function(){(function(){function V(h,l){return yb[h]=l||{}}function qb(h,l){for(var p=yb[h],v=0,F=l.length;v<F;++v){var S=yb[h+"_"+l[v]];for(var O in S)p[O]=S[O]}}function da(h){return zb.call(h)=="[object Array]"}function Gb(h){return h!==Wa}function oa(h,l){return h===l}function Ea(h,l){return h!==l}function Ra(h,l){return h+l}function Z(h,l){return h-l}function ca(h,l){return h*l}function Fa(h,l){return h/l}function A(h,l){return h<l}function ea(h,l){return h<=l}function Ab(h,l){return h>l}function Hb(h,
l){return h>=l}function Ib(h){return-h}function $a(h){var l=h.constructor;if(l)return l;h=typeof h;return h=="string"?String:h=="number"?Number:h=="boolean"?Boolean:h=="function"?Function:Wa}function Ga(h){function l(){var p=Sa(arguments);return p.length>=(h._length===Wa?h.length:h._length)?h.apply(null,p):function(){return l.apply(null,p.concat(Sa(arguments)))}}return l}function Va(h){var l=Sa(arguments,1);return function(){return h.apply(null,l)}}function Ta(){function h(l){return!l?[]:[[l.name||
l._name||l,l.arguments]].concat(h(l.caller))}return h(arguments.callee.caller)}function Aa(h){var l=(h instanceof Function?h.name||h._name:null)||h||"Unspecified error from "+arguments.callee.caller.name+" <- "+arguments.callee.caller.caller.name,p=new Error(l);try{p.stackTrace=Ta()}catch(v){}p.message=l;throw p;}function Kb(h,l){for(var p in l)h[p]=l[p];return h}function ra(h,l){if(l.indexOf)return l.indexOf(h);var p=l.length;if(!p)return-1;for(var v=0;v<p;v++)if(l[v]===h)return v;return-1}function La(h,
l){if(l.lastIndexOf)return l.lastIndexOf(h);var p=l.length;if(!p)return-1;for(p=p-1;p>-1;--p)if(l[p]===h)return p;return-1}function Lb(h){var l=h.charAt;h=Mb(h);h.sort();return l?h.join(""):h}function Mb(h){if(!h.charAt)return ka.call(h,0);for(var l=[],p=0,v=h.length;p<v;++p)l.push(h.charAt(p));return l}function ab(h,l){return{indexOf:function(p){return p>=h&&p<=l?true:-1},toString:function(){return"range("+h+", "+l+")"}}}function Bb(h,l){function p(){var v=100*l;do h=h();while(--v&&h&&h.call);setTimeout(p,
1)}if(!l||l==Infinity){do h=h();while(h&&h.call);return h}p()}function Ub(h,l){return l?l[h]:function(p){return p[h]}}function Rb(){}function Ha(){}function bb(h){return function(){var l=[],p=this._recordset;if(p&&p.constructor!=Array){for(var v in p){var F=h?p[v].name||p[v]:this[v];if(!h&&F instanceof Function)F=F.constructor!=Function?F.constructor.name:"Function("+F.name+")";l.push(v+(h?" :: ":" = ")+F)}p=replicate(this._dataConstructor.length+2," ").join("");l="{"+l.join("\n"+p+",")+"\n"+p+"}"}else{for(v=
0;v in this;v++)l.push(h?p[v].name||p[v]:this[v]);l=l.join(" ")}return"("+this._dataConstructor+(l?" ":"")+l+")"}}function ta(h,l,p,v,F){Aa("Type error: expecting "+h.name+" instead of "+l.name+" in the argument '"+p+"' of "+v+"."+F)}function Xb(h,l){function p(la,Xa){function Q(rb,$){var Ya=rb instanceof Rb,pa=new h,ga,ua;pa.constructor=h;pa._recordset=H&&Xa[0]||Xa;pa._dataConstructor=la;pa[la]=true;if(Ya)for(var wa in $){Ya=$[wa];H||Aa("Records are not defined for "+v+"."+la);wa in T||Aa("The accessor '"+
wa+"' is not defined for "+v+"."+la);ua=T[wa];if(typeof ua!="string"){ga=$a(Ya);ga!=ua&&ta(ua,ga,wa,v,la)}pa[wa]=Ya;pa[Ma[wa]]=Ya}else{wa=arguments;for(var X=0,Ia=wa.length;X<Ia;++X){Ya=wa[X];ua=Xa[X];if(typeof ua!="string"){ga=$a(Ya);ga!=ua&&ta(ua,ga,X,v,la)}pa[X]=Ya;if(H)pa[Sb[X]]=Ya}}pa.update=function(lb){var Vb={};for(var aa in T)Vb[aa]=aa in lb?lb[aa]:this[aa];return Q(sb,Vb)};return pa}var H=Xa&&typeof Xa[0]=="object",T=H&&Xa[0];if(H){var Ja=0,K,Ma={},Sb={};for(K in T){var Cb=K.charAt(0);if(Cb==
"_"||Cb==Cb.toUpperCase())throw v+"."+qa+"."+K+": record names can't start with underscore or uppercase letters";if(K in{update:1})throw v+"."+qa+"."+K+": record name is invalid";Ma[K]=Ja;Sb[Ja]=K;Ja++}}return Q}var v=h.name;if(h._constructors)throw"Type constructor has been already defined: '"+v+"'";h._constructors=l;h.prototype=new Ha;for(var F=0,S=l.length;F<S;++F){var O=typeof l[F]!="object",qa=O?l[F]:l[F][0];if(qa in h)throw"The name of the data constructor ("+v+"."+qa+") is invalid!";h[qa]=
O?p(qa)():p(qa,Sa(l[F],1));if(!O)h[qa]._length=l[F].length-1}}function mb(h){return h._dataConstructor}function tb(){this.keys=[];this.values=[]}function Na(h,l){var p={};p._context=[];p._name=h;p._dict=new tb;p.context=function(){this._context=Sa(arguments);delete p.context;return this};p.types=function(v){this._fnTypes=v;delete p.types;return this};p.impl=function(v){this._default=v;for(var F in p._fnTypes)(function(S,O){p[S]=O!==Wa&&O.constructor!=Array?(typeof v=="function"?v():v)[S]:function(){var qa=
arguments,la;if(O===Wa||O===Oa)Aa("There's no type signature for "+p._name+"."+S+", it can be accessed only by: getInstance("+p._name+", SomeType)."+S);var Xa,Q=Db(function(H,T){T=O[T];if(Xa||T==Oa)return Xa=true;H=$a(H);if(T==l){la=la||H;return la==H}else return H==T},qa);!Xa&&Q.length!=O.length-1&&Aa("Type error in "+p._name+"."+S);(Q=p._dict.get(la))||Aa("No "+p._name+" instance for "+(la.name||la._name));return Q[S].apply(null,qa)}})(F,p._fnTypes[F]);delete p.impl;return this};return p}function ub(h,
l,p){Ka(function(O){if(!O._dict.get(l))throw"No "+(O._name||"")+" instance for "+(l.name||l._name);},h._context);var v={};v._type=l;h._dict.put(l,v);p=typeof p=="function"?p(v):p||{};var F=h._default;F=typeof F=="function"?F(v):F;for(var S in h._fnTypes)v[S]=p[S]||F[S];return v}function Nb(h,l){return h._dict.get(l)}function xa(h,l,p){return h._dict.get($a(p))[l]}function Eb(h){return["l",h]}function gb(h){return["r",h]}function U(h){return["x",h]}function Tb(h){if(h)if(!h._String){var l=Ba[h];if(h._Op&&
!l)return"l";return l&&(l.fixity[0]||"l")}}function Jb(h){if(h)if(!h._String){var l=Ba[h];if(h._Op&&!l)return 9;return l&&(Gb(l.fixity[1])?l.fixity[1]:9)}}function hb(){}function J(h,l,p){var v;if(h[l]._Op){delete h[l]._Op;v=h[l]}else v=Ba[h[l]].func;v=v(h[l-1],h[l+1]);h.splice(l-1,3,v);return Y(h,p)}function Zb(h){if(typeof h=="string"){h=new String(h);h._String=true;return h}else{h._Array=true;return h}}function ya(h){h._Op=true;return h}function Y(h,l){h=Ka(function(la){if(!la)return la;if(la._Array){delete la._Array;
return la}return la.constructor==Array?Y(la,l):la.CallStream?la.resolve(l):la},h);if(l)h=Ka(function(la){return la instanceof hb?l:la},h);for(var p=[],v=[],F=0,S=h.length;F<S;++F){var O=h[F],qa=false;if(Ba[O])qa=true;if(O&&O._String){qa=false;O=O.toString()}if(O&&O._Op)qa=true;if(!qa&&F!=S-1)p.push(O);else{F==S-1&&p.push(O);p=p.length>1?p[0].apply(null,p.slice(1)):p[0];v.push(p);F!=S-1&&v.push(O);p=[]}}h=v;v=Ka(Tb,h);S=Ka(Jb,h);O=Db(Gb,S).sort().pop();F=ra(O,S);S=La(O,S);return v[F]=="l"?J(h,F,l):
v[S]=="r"?J(h,S,l):v[F]=="x"?J(h,F,l):h[0]}function P(h){return function(){function l(){return F.apply(null,arguments)}function p(){return(S?F:p.resolve()).apply(null,arguments)}var v=arguments,F,S;p.resolve=function(O){if(S)return F;F=Y(v,O||l);v=null;S=true;return F};p.CallStream=true;p.constructor=h;return p}}function nb(){return Y(Sa(arguments))}function cb(h){this.scope=h}function Wb(h){return function(){function l(){return F.apply(null,arguments)}function p(O){if(S||O instanceof cb)return(S?
F:p.resolve()).apply(null,arguments);v.push(Y(arguments,l));return p}var v=[],F,S;v.push(Y(arguments,l));p.resolve=function(){if(S)return F;F=h.do_.apply(null,v);S=true;v=null;return F};p.CallStream=true;p.constructor=h._type;return p}}var ia=function(){return this}()||window,yb=ia.NS||(ia.NS={}),Wa,zb={}.toString,ka=[].slice,db=[].map,w=[].filter;(function(){return this}).toString().indexOf("this");(function(){var h={9:1,d:1,b:1,0:1,a:1,c:1},l=[9,"d","b",0,"a","c"],p=0;for(var v in h)if(v!=l[p++])return false;
return true})();ia.global=ia;ia.namespace=V;ia.importSubmodules=qb;var Sa="a"[0]?function(h,l){return ka.call(h,l||0)}:function(h,l){if(typeof h=="string"){h=h.split("");if(!l)return h}return ka.call(h,l||0)},Ka=db?function(h,l){return db.call(l,h)}:function(h,l){for(var p=[],v=0,F=l.length;v<F;++v)p[v]=h(l[v],v,l);return p},Db=w?function(h,l){return w.call(l,h)}:function(h,l){for(var p=[],v=0,F=l.length;v<F;++v)h(l[v],v,l)&&p.push(l[v]);return p};V("Haskell_Main",{Bool:Boolean,isArray:da,isDefined:Gb,
slice:Sa,imap:Ka,ifilter:Db,indexOf:ra,lastIndexOf:La,isort:Lb,range:ab,extend:Kb,namespace:V,typeOf:$a,strictEq:oa,strictNe:Ea,unsafeAdd:Ra,unsafeSub:Z,unsafeMul:ca,unsafeDiv:Fa,lt:A,le:ea,gt:Ab,ge:Hb,negate:Ib,evalThunks:Bb,toArray:Mb,curry:Ga,error:Aa,eta:Va});var sb=new Rb;Ha.prototype.toString=bb();Ha.prototype.dataConstructorToString=bb(true);Ha.prototype.update=Va(Aa);V("Haskell_DataType",{data:Xb,ADT:Ha,record:sb,accessor:Ub,accessors:{},showConstrOf:mb});tb.prototype.put=function(h,l){this.keys.push(h);
this.values.push(l)};tb.prototype.get=function(h){h=ra(h,this.keys);if(h!=-1)return this.values[h]};var Oa={};V("Haskell_TypeClass",{typeclass:Na,VARARG:Oa,instance:ub,getInstance:Nb,asTypeOf:xa});var Ba={};ia=new hb;V("Haskell_Expression",{operators:Ba,infix:U,infixl:Eb,infixr:gb,op:ya,no:Zb,resolve:Y,recurse:ia,Recurse:hb,exl:P,exs:nb});V("Haskell_Do",{createDo:Wb,Scope:cb})})();(function(){namespace("Haskell");importSubmodules("Haskell",["Main","DataType","TypeClass","Expression","Do"])})();(function(){function V(){}
function qb(a){a.constructor=Ca["Tuple"+a.length];return a}function da(){}function Gb(a,c){return a===true?c:a===false?false:X(Y)}function oa(a,c){return a===true?true:a===false?c:X(P)}function Ea(a){return a===true?false:a===false?true:X(Ea)}function Ra(a){return a.charAt?"":[]}function Z(a,c){if(a.charAt&&c.charAt)return a+c;return[a].concat(c)}function ca(a,c){if(a.charAt&&c.charAt)return a+c;return a+c.join("")}function Fa(a){var c=a.charAt,m=c?a.charAt(0):a[0];a=c?a.substr(1):H(a,1);c=[m,a];
c.head=m;c.tail=a;c.constructor=Ca.Tuple2;return c}function A(a,c){for(var m=c.charAt,z=[],ma=0,fa=c.length;ma<fa;++ma)z[ma]=a(m?c.charAt(ma):c[ma]);return z}function ea(a,c,m){for(var z=m.charAt,ma=m.length-1;ma>-1;--ma)c=a(z?m.charAt(ma):m[ma],c);return c}function Ab(a,c){var m=a.charAt,z=c.charAt;if(m)return a.concat(z?c:c.join(""));if(z)return(m?a:a.join("")).concat(c);return a.concat(c)}function Hb(a){return a.charCodeAt(0)}function Ib(a){return function(){return a().apply(null,arguments)}}function $a(a,
c){!ignoreAsserts&&!a&&X("AssertionFailed");return c}function Ga(a){return function(){return a}}function Va(a,c){return function(m){var z=H(arguments,1);z.unshift(c(m));return a.apply(null,z)}}function Ta(a,c){return function(){return a(c.apply(null,arguments))}}function Aa(a){return function(c,m){return a(m,c)}}function Kb(a,c,m){return a(m)?m:Kb(a,c,c(m))}function ra(a,c){var m=c.length;if(!m)return ab.Nothing;for(var z=!!c.charAt,ma=bc(ha,Sb(z?c.charAt(0):c[0])),fa=0;fa<m;++fa)if(ma.eq(z?c.charAt(fa):
c[fa],a))return ab.Just(fa);return ab.Nothing}function La(a,c){return a===c?da.EQ:a<=c?da.LT:da.GT}function Lb(a){return parseInt(a.join?a.join(""):a,16)}function Mb(a){return parseInt(a.join?a.join(""):a,8)}function ab(){}function Bb(a){a.length||Oa("head");return a.charAt?a.charAt(0):a[0]}function Ub(a){a.length||Oa("tail");return a.substr?a.substr(1):H(a,1)}function Rb(a){var c=a.length;c||Oa("last");c=c-1;return a.charAt?a.charAt(c):a[c]}function Ha(a){var c=a.length;c||Oa("init");c=c-1;return a.substring?
a.substring(0,c):[].slice.call(a,0,c)}function bb(a){return!a.length}function ta(a){return a.length}function Xb(a,c){for(var m=[],z=0,ma=c.length,fa=c.charAt;z<ma;++z)if(a(fa?c.charAt(z):c[z]))m.push(c[z]);return fa?m.join(""):m}function mb(a,c,m){for(var z=0,ma=m.length,fa=m.charAt;z<ma;++z)c=a(c,fa?m.charAt(z):m[z]);return c}function tb(a,c,m){if(m.length){m=Fa(m);a=tb(a,a(c,m.head),m.tail)}else a=Ra(m);return Z(c,a)}function Na(a,c){if(!c.length)return Ra(c);c=Fa(c);return tb(a,c.head,c.tail)}
function ub(a,c){var m=c.length;m==0&&Oa("foldr1");if(m==1)return c.charAt?c.charAt(0):c[0];c=Fa(c);return a(c.head,ub(a,c.tail))}function Nb(a,c,m){if(!m.length)return Z(c,Ra(m));m=Fa(m);c=Nb(a,c,m.tail);return Z(a(m.head,c.head),c)}function xa(a,c){var m=c.length;if(m==0)return Ra(c);if(m==1)return Z(c.charAt?c.charAt(0):c[0],Ra(c));c=Fa(c);m=xa(a,c.tail);return Z(a(c.head,m.head),m)}function Eb(a,c){for(var m=[],z=0;z<a;++z)m[z]=c;return m}function gb(a,c){for(var m=!!c.charAt,z=0,ma=c.length;z<
ma;++z)if(!a(m?c.charAt(z):c[z]))break;return m?c.substring(0,z):[].slice.call(c,0,z)}function U(a,c){for(var m=!!c.charAt,z=0,ma=c.length;z<ma;++z)if(!a(m?c.charAt(z):c[z]))break;return m?c.substr(z):H(c,z)}function Tb(a,c){return c.substring?c.substring(0,a):[].slice.call(c,0,a)}function Jb(a,c){return c.substring?c.substring(a):[].slice.call(c,a)}function hb(a,c){a=[Tb(a,c),Jb(a,c)];a.constructor=Ca.Tuple2;return a}function J(a,c){a=[gb(a,c),U(a,c)];a.constructor=Ca.Tuple2;return a}function Zb(a,
c){return J(function(m){return!a(m)},c)}function ya(a){a=a.charAt;var c=ua(c);c.reverse();return a?c.join(""):c}function Y(a){return ea(Gb,true,a)}function P(a){return ea(oa,false,a)}function nb(a,c){return P(A(a,c))}function cb(a,c){return Y(A(a,c))}function Wb(a,c){return Ja(a,c)!=-1}function ia(a,c){return Ja(a,c)==-1}function yb(a,c){var m=c.length;if(!m)return ab.Nothing;for(var z=!!c.charAt,ma=ib(ha,"eq",a),fa=0;fa<m;++fa){var L=z?c.charAt(fa):c[fa];if(ma(L[0],a))return ab.Just(L[1])}return ab.Nothing}
function Wa(a,c){return ea(function(m,z){return Ab(a(m),z)},[],c)}function zb(a){return ea(Ab,[],a)}function ka(a,c){return a.charAt?a.charAt(c):a[c]}function db(a,c){for(var m=[],z=a.charAt,ma=c.charAt,fa=0,L=Math.min(a.length,c.length);fa<L;++fa)m[fa]=[z?a.charAt(fa):a[fa],ma?c.charAt(fa):c[fa]];return m}function w(a,c,m){for(var z=[],ma=a.charAt,fa=c.charAt,L=m.charAt,za=0,jb=Math.min(a.length,c.length);za<jb;++za)z[za]=[ma?a.charAt(za):a[za],fa?c.charAt(za):c[za],L?m.charAt(za):m[za]];return z}
function Sa(a,c,m){for(var z=[],ma=c.charAt,fa=m.charAt,L=0,za=Math.min(c.length,m.length);L<za;++L)z[L]=a(ma?c.charAt(L):c[L],fa?m.charAt(L):m[L]);return z}function Ka(a,c,m,z){for(var ma=[],fa=c.charAt,L=m.charAt,za=z.charAt,jb=0,d=Math.min(c.length,m.length);jb<d;++jb)ma[jb]=a(fa?c.charAt(jb):c[jb],L?m.charAt(jb):m[jb],za?z.charAt(jb):z[jb]);return ma}function Db(a){return ea(function(c,m){return[Z(c[0],m[0]),Z(c[1],m[1])]},[[],[]],a)}function sb(a){return ea(function(c,m){return[Z(c[0],m[0]),
Z(c[1],m[1]),Z(c[2],m[2])]},[[],[],[]],a)}function Oa(a){return X("Prelude."+a+": empty list")}function Ba(a){return/^\s$/.test(a)}function h(a){return a.toUpperCase()==a}function l(a){return a.toLowerCase()==a}function p(a){return/^\w$/.test(a)&&/^\D$/.test(a)}function v(a){return/^\w$/.test(a)}function F(a){return/^\d$/.test(a)}function S(a){return/^[0-7]$/.test(a)}function O(a){return/^[0-9A-Fa-f]$/.test(a)}function qa(a){return a.toUpperCase()}function la(a){return a.toLowerCase()}function Xa(a){return a.toUpperCase()}
var Q=NS.Haskell.Bool,H=NS.Haskell.slice,T=NS.Haskell.imap,Ja=NS.Haskell.indexOf,K=NS.Haskell.extend,Ma=NS.Haskell.namespace,Sb=NS.Haskell.typeOf,Cb=NS.Haskell.strictEq,rb=NS.Haskell.strictNe,$=NS.Haskell.lt,Ya=NS.Haskell.le,pa=NS.Haskell.gt,ga=NS.Haskell.ge,ua=NS.Haskell.toArray,wa=NS.Haskell.curry,X=NS.Haskell.error,Ia=NS.Haskell.data,lb=NS.Haskell.typeclass,Vb=NS.Haskell.VARARG,aa=NS.Haskell.instance,bc=NS.Haskell.getInstance,ib=NS.Haskell.asTypeOf,ec=NS.Haskell.operators,ja=NS.Haskell.infixr,
N=NS.Haskell.createDo,t=NS.Haskell.Scope;Ia(V,["Unit"]);Ma("GHC_Unit",{Unit:V,unit:V.Unit});var Ca={};T(function(a){var c="Tuple"+a;Ca[c]=function(){};Ca[c]._name=c;Ca["tuple"+a]=function(m){m.constructor=Ca[c];return m}},[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]);Ca.tuple=qb;Ma("GHC_Tuple",{Tuple:Ca,tuple:qb});Ia(da,["LT","EQ","GT"]);Ma("GHC_Ordering",{Ordering:da});var ha=lb("Eq","a").types({eq:["a","a",Boolean],ne:["a","a",Boolean]}).impl(function(a){return{eq:function(c,m){return!a.ne(c,m)},ne:function(c,
m){return!a.eq(c,m)}}});T=lb("Ord","a").context(ha).types({compare:["a","a",da],"<":["a","a",Boolean],"<=":["a","a",Boolean],">":["a","a",Boolean],">=":["a","a",Boolean],max:["a","a","a"],min:["a","a","a"]}).impl(function(a){var c=bc(ha,a._type).eq;return{compare:function(m,z){return c(m,z)?da.EQ:a["<="](m,z)?da.LT:da.GT},"<":function(m,z){return a.compare(m,z).LT?true:false},"<=":function(m,z){return a.compare(m,z).GT?false:true},">":function(m,z){return a.compare(m,z).GT?true:false},">=":function(m,
z){return a.compare(m,z).LT?false:true},max:function(m,z){return a["<="](m,z)?z:m},min:function(m,z){return a["<="](m,z)?m:z}}});Ma("GHC_Classes",{Eq:ha,Ord:T,andOp:Gb,orOp:oa,not:Ea});var eb=lb("Functor","f").types({fmap:[Function,"f","f"],"<$":["a","f","f"]}).impl(function(a){return{"<$":function(c,m){return a.fmap(Ga(c),m)}}});Vb=lb("Monad","m").types({">>=":["m",Function,"m"],">>":["m","m","m"],return_:["a","m"],fail:[String,"m"],do_:Vb,do$:Vb,run:Vb}).impl(function(a){return{">>":function(c,
m){c=a[">>="](c,Ga(m));c.constructor=a._type;return c},fail:function(c){return X(c)},do_:function(){function c(ma){for(var fa=new t(ma),L=1,za=m.length,jb=m[0];L<za;++L)jb=z(jb,m[L]);L=_slice.call(arguments,1);L.unshift(fa);return jb.apply(null,L)}var m=arguments,z=a[">>"];c.constructor=a._type;return c},run:function(c){var m=H(arguments,1);m.unshift(new t);return c.apply(null,m)},do$:N(a)}});var ob=Z;aa(ha,Boolean,{eq:Cb,ne:rb});aa(T,Boolean,{compare:function(a,c){return a===true&&c===false?da.LT:
a===false&&c===true?da.GT:da.EQ}});aa(ha,da,{eq:function(a,c){return a.EQ&&c.EQ?true:a.LT&&c.LT?true:a.GT&&c.GT?true:false}});aa(T,da,{"<=":function(a,c){return a.LT?true:c.LT?false:a.EQ?true:c.EQ?false:a.GT&&c.GT?true:X()}});aa(ha,String,{eq:Cb,ne:rb});var Pa=String.fromCharCode,Ob=Number.MIN_VALUE,vb=Number.MAX_VALUE;aa(ha,Number,{eq:Cb,ne:rb});aa(T,Number,{compare:function(a,c){return a===c?da.EQ:a<=c?da.LT:da.GT},"<":$,"<=":Ya,">":pa,">=":ga,max:function(a,c){return a<=c?c:a},min:function(a,c){return a<=
c?a:c}});rb=function(a){return a};wa=wa(function(a,c){return a(c)});aa(ha,RegExp,{eq:function(a,c){return a.source===c.source&&a.global===c.global&&a.ignoreCase===c.ignoreCase&&a.multiline===c.multiline}});aa(ha,Array,{eq:function(a,c){var m=a.length;if(m!=c.length)return false;for(var z=0;z<m;++z)if(!ha.eq(a[z],c[z]))return false;return true}});aa(ha,Object,{eq:function(a,c){var m,z={};for(m in a)z[m]=true;for(m in c)z[m]=true;for(m in z)if(!ha.eq(a[m],c[m]))return false;return true}});$=Math.round;
Ya=parseInt;K(ec,{$:{func:wa,fixity:ja(0)},".":{func:Va,fixity:ja(9)},":":{func:Z,fixity:ja(5)},"++":{func:Ab,fixity:ja(5)}});Ma("GHC_Base",{Unit:V,Tuple:Ca,Bool:Q,Ordering:da,Eq:ha,Ord:T,andOp:Gb,orOp:oa,not:Ea,Functor:eb,Monad:Vb,emptyListOf:Ra,cons:Z,consJoin:ca,uncons:Fa,augment:ob,map:A,foldr:ea,append:Ab,otherwise:true,ord:Hb,chr:Pa,eqString:Cb,minInt:Ob,maxInt:vb,id:rb,lazy:Ib,assert:$a,const_:Ga,compose1:Va,compose:Ta,flip:Aa,call:wa,until:Kb,asTypeOf:ib,elemIndex:ra,unsafeCompare:La,readHex:Lb,
readOct:Mb,round:$,toInteger:Ya,fromInteger:rb,fromIntegral:rb});var Za=lb("Show","a").types({show:["a",String]}).impl({show:function(a){return a.toString()}});aa(Za,V,{show:function(){return"()"}});aa(Za,Boolean);aa(Za,String,{show:function(a){return'"'+a.toString()+'"'}});aa(Za,Number);aa(Za,RegExp);aa(Za,Function,{show:function(a){var c=a.name||a._name||"\u03bb";if(a.constructor)return c+" :: "+a.constructor.name;a=(a=a.toString().match(/\([^\)]*\)/))&&a[0]||"";return c+a}});aa(Za,Array,{show:function(a){return typeof a[0]==
String?'"'+a.join("")+'"':"["+A(Za.show,a).join(", ")+"]"}});aa(Za,Object,{show:function(a){var c=[];for(var m in a)c.push(" "+m+": "+Za.show(a[m]));return"{\n"+a.join(",\n")+"\n}"}});Ma("GHC_Show",{Show:Za});Ia(ab,[["Just","a"],"Nothing"]);Ma("GHC_Maybe",{Maybe:ab});Ma("GHC_List",{map:A,append:Ab,filter:Xb,concat:zb,head:Bb,last:Rb,tail:Ub,init:Ha,null_:bb,length:ta,index:ka,foldl:mb,scanl:tb,scanl1:Na,foldr:ea,foldr1:ub,scanr:Nb,scanr1:xa,replicate:Eb,take:Tb,drop:Jb,splitAt:hb,takeWhile:gb,dropWhile:U,
span:J,break_:Zb,reverse:ya,and:Y,or:P,any:nb,all:cb,elem:Wb,notElem:ia,lookup:yb,concatMap:Wa,zip:db,zip3:w,zipWith:Sa,zipWith3:Ka,unzip:Db,unzip3:sb,errorEmptyList:Oa});Ma("GHC_Unicode",{isSpace:Ba,isUpper:h,isLower:l,isAlpha:p,isAlphaNum:v,isDigit:F,isHexDigit:O,isOctDigit:S,toUpper:qa,toLower:la,toTitle:Xa})})();(function(){function V(){}function qb(b,g,n){return n.Left?b(n[0]):n.Right?g(n[0]):ib(qb)}function da(b){for(var g=[],n=0,C=b.length;n<C;++n){var W=b[n];W.Left&&g.push(W[0])}return g}
function Gb(b){for(var g=[],n=0,C=b.length;n<C;++n){var W=b[n];W.Right&&g.push(W[0])}return g}function oa(b){function g(C){return function(W){return[H(C,W[0]),W[1]]}}function n(C){return function(W){return[W[0],H(C,W[1])]}}return K(function(C,W){return qb(g,n,C)(W)},[[],[]],b)}function Ea(b){return b[0]}function Ra(b){return b[1]}function Z(b){return function(g,n){g=[g,n];g.constructor=v.Tuple2;return b(g)}}function ca(b){return function(g){return b(g[0],g[1])}}function Fa(b,g,n){if(n.Nothing)return b;
if(n.Just)return g(n[0])}function A(b){return!!b.Just}function ea(b){return!!b.Nothing}function Ab(b){return b.Nothing?ib("Maybe.fromJust: Nothing"):b.Just?b[0]:ib()}function Hb(b,g){return g.Nothing?b:g.Just?g[0]:ib(Hb)}function Ib(b){return b.Nothing?[]:b.Just?[b[0]]:ib(Ib)}function $a(b){if(!b.length)return Q(b);return N.Just(b[0])}function Ga(b){for(var g=[],n=0,C=b.length;n<C;++n)b[n].Just&&g.push(b[n][0]);return g}function Va(b,g){var n=T(g);g=Va(b,n.tail);b=b(n.head);return b.Nothing?g:b.Just?
H(r,g):ib(Va)}function Ta(b,g){if(!b.length)return N.Just(g);b=T(b);g=T(g);if(b.head===g.head)return Ta(b.tail,g.tail);return N.Nothing}function Aa(b,g){return La(function(){return O.eq(b)},g)}function Kb(b,g){return Lb(function(){return O.eq(b)},g)}function ra(b,g){return $a(t(b,g))}function La(b,g){return $a(Lb(b,g))}function Lb(b,g){function n(C,W){if(!g.length)return g;return b(x)?H(C,n(C+1,W)):n(C+1,W)}return n(0,g)}function Mb(b,g){if(!b.length)return true;if(!g.length)return false;b=T(b);g=
T(g);return b.head===g.head&&Mb(b.tail,g.tail)}function ab(b,g){return Mb(Qa(b),Qa(g))}function Bb(b,g){return ba(function(n){return Mb(b,n)},ia(g))}function Ub(b){function g(n,C){var W=T(n);return!n.length?Q(n):i(W.head,C)?g(W.tail,C):H(W.head,g(W.tail,H(W.head,C)))}return g(b,Q(b))}function Rb(b,g){return nub_(g,Q(g))}function Ha(b,g){return bb(O.eq,b,g)}function bb(b,g,n){if(!n.length)return Q(n);n=T(n);return b(g,n.head)?n.tail:H(n.head,bb(b,g,n.tail))}function ta(b,g){return Za(Ya(Ha),b,g)}function Xb(b,
g){return mb(O.eq,b,g)}function mb(b,g,n){return Ma(g,Za(function(C,W){return bb(b,W,C)},Rb(b,n),g))}function tb(b,g){return Na(O.eq,b,g)}function Na(b,g,n){return t(function(C){return ba(function(W){return b(C,W)},n)},g)}function ub(b,g){if(!g.length)return Q(g);if(g.length==1)return H(ha(g),Q(g));g=T(g);return H(g.head,H(b,ub(b,g.tail)))}function Nb(b,g){return Ca(ub(b,g))}function xa(b){if(!b.length)return Q(b);b=T(b);if(!b.head.length)return xa(b.tail);var g=T(b.head),n=g.head;g=g.tail;b=b.tail;
return T(T(n,Ja(ha,b)),xa(T(g,Ja(eb,b))))}function Eb(b,g){return K(function(n,C){return gb(b,n,C)},[Q(g),Q(g)],g)}function gb(b,g,n){var C=n[0];n=n[1];return b(g)?[H(g,C),n]:[C,H(g,n)]}function U(b,g,n){if(!n.length)return[g,Q(n)];n=T(n);var C=b(g,x);g=C[1];b=U(b,C[0],n.tail);return[b[0],H(g,b[1])]}function Tb(b,g,n){if(!n.length)return[g,Q(n)];n=T(n);n=Tb(b,g,n.tail);g=n[1];b=b(n[0],x);return[b[0],H(b[1],g)]}function Jb(b,g){var n=ja(qa,Ia(b));return hb(n.compare,b,g)}function hb(b,g,n){if(!n.length)return H(g,
Q(n));n=T(n);return b(g,n.head).GT?H(n.head,hb(b,g,n.tail)):H(g,n.tail)}function J(b){if(!b.length)return wb("maximum");var g=ja(qa,Ia(ha(b)));return Sa(g.max,b)}function Zb(b){if(!b.length)return wb("minimum");var g=ja(qa,Ia(ha(b)));return Sa(g.min,b)}function ya(b,g){function n(C,W){return b(C,W).GT?C:W}if(!g.length)return wb("maximumBy");return Sa(n,g)}function Y(b,g){function n(C,W){return b(C,W).GT?W:C}if(!g.length)return wb("minimumBy");return Sa(n,g)}function P(b,g,n){return Za(function(C,
W){return bb(b,W,C)},g,n)}function nb(b){return cb(O.eq,b)}function cb(b,g){if(!g.length)return Q(g);var n=T(g);g=B(function(C){return b(x,C)},g);return H(H(n.head,g.ys),cb(b,g.zs))}function Wb(b){if(!b.length)return[Q(b)];return Ma([Q(b)],Ja(function(g){return H(x,g)},Wb(b)))}function ia(b){if(!xs.length)return[Q(b)];return H(b,ia(eb(b)))}function yb(b){return H([],Wa(b))}function Wa(b){function g(C,W){return H(C,H(H(n.head,C),W))}var n=T(b);return H(n.head,K(g,[],Wa(n.tail)))}function zb(b){function g(n,
C){function W(hc,$b){return Da(rb,hc,$b)[1]}function Da(hc,$b,Fb){if(!$b.length)return[kb.tail,Fb];var jc=T($b).head;Fb=Da($(hc,function(kc){H(jc,kc)}),$b,Fb);$b=Fb[0];Fb=Fb[1];return[H(jc,$b),H(hc(H(kb.head,H(jc,$b))),Fb)]}if(!n.length)return Q(n);var kb=T(n);return K(W,g(kb.tail,H(kb.head,C)),zb(C))}return H(b,g(b,[]))}function ka(b){var g=ja(qa,Ia(b.charAt?b.charAt(0):b[0]));return db(g.compare,b)}function db(b,g){function n(C,W){C=b(C,W);return C.LT?-1:C.GT?1:C.EQ?0:ib(ka)}if(g.sort)return g.sort(n);
return wa(g).sort(n).join("")}function w(b,g){g=b(g);return g.Just?H(g[0][0],w(b,g[0][1])):g.Nothing?[]:ib()}function Sa(b,g){if(!g.length)return wb("foldl1");g=T(g);return Za(b,g.head,g.tail)}function Ka(b){return Za(aa,0,b)}function Db(b){return Za(bc,1,b)}function sb(b){b=b.split("\n");b[b.length-1]==""&&b.pop();return b}function Oa(b){return b.join("\n")}function Ba(b){b=b.split(/\s+/);b[0]==""&&b.shift();b[b.length-1]==""&&b.pop();return b}function h(b){return b.join(" ")}function l(b){b=parseInt(b,
16);return isNaN(b)?ib(l):b}var p=NS.GHC_Base.Unit,v=NS.GHC_Base.Tuple,F=NS.GHC_Base.Bool,S=NS.GHC_Base.Ordering,O=NS.GHC_Base.Eq,qa=NS.GHC_Base.Ord;p=NS.GHC_Base.andOp;p=NS.GHC_Base.orOp;p=NS.GHC_Base.not;var la=NS.GHC_Base.Functor,Xa=NS.GHC_Base.Monad,Q=NS.GHC_Base.emptyListOf,H=NS.GHC_Base.cons,T=NS.GHC_Base.uncons,Ja=NS.GHC_Base.map,K=NS.GHC_Base.foldr,Ma=NS.GHC_Base.append,Sb=NS.GHC_Base.ord,Cb=NS.GHC_Base.chr,rb=NS.GHC_Base.id,$=NS.GHC_Base.compose1,Ya=NS.GHC_Base.flip,pa=NS.GHC_Base.asTypeOf;
Aa=NS.GHC_Base.elemIndex;var ga=NS.Haskell_DataType.data,ua=NS.Haskell_DataType.ADT;ua=NS.Haskell_DataType.record;ua=NS.Haskell_DataType.accessor;ua=NS.Haskell_DataType.accessors;ua=NS.Haskell_DataType.showConstrOf;F=NS.Haskell_Main.Bool;F=NS.Haskell_Main.isArray;F=NS.Haskell_Main.isDefined;var wa=NS.Haskell_Main.slice;F=NS.Haskell_Main.imap;var X=NS.Haskell_Main.ifilter;X=NS.Haskell_Main.indexOf;X=NS.Haskell_Main.lastIndexOf;X=NS.Haskell_Main.isort;X=NS.Haskell_Main.range;X=NS.Haskell_Main.extend;
X=NS.Haskell_Main.namespace;var Ia=NS.Haskell_Main.typeOf,lb=NS.Haskell_Main.strictEq,Vb=NS.Haskell_Main.strictNe,aa=NS.Haskell_Main.unsafeAdd;ga=NS.Haskell_Main.unsafeSub;var bc=NS.Haskell_Main.unsafeMul;ga=NS.Haskell_Main.unsafeDiv;ga=NS.Haskell_Main.lt;ga=NS.Haskell_Main.le;ga=NS.Haskell_Main.gt;ga=NS.Haskell_Main.ge;ga=NS.Haskell_Main.negate;ga=NS.Haskell_Main.evalThunks;ga=NS.Haskell_Main.toArray;ga=NS.Haskell_Main.curry;var ib=NS.Haskell_Main.error;ga=NS.Haskell_Main.eta;O=NS.GHC_Classes.Eq;
qa=NS.GHC_Classes.Ord;p=NS.GHC_Classes.andOp;p=NS.GHC_Classes.orOp;p=NS.GHC_Classes.not;S=NS.GHC_Ordering.Ordering;v=NS.GHC_Tuple.Tuple;p=NS.GHC_Unit.Unit;var ec=NS.GHC_Unit.unit;F=NS.Haskell.Bool;F=NS.Haskell.isArray;F=NS.Haskell.isDefined;wa=NS.Haskell.slice;F=NS.Haskell.imap;X=NS.Haskell.ifilter;X=NS.Haskell.indexOf;X=NS.Haskell.lastIndexOf;X=NS.Haskell.isort;X=NS.Haskell.range;X=NS.Haskell.extend;X=NS.Haskell.namespace;Ia=NS.Haskell.typeOf;lb=NS.Haskell.strictEq;Vb=NS.Haskell.strictNe;aa=NS.Haskell.unsafeAdd;
ga=NS.Haskell.unsafeSub;bc=NS.Haskell.unsafeMul;ga=NS.Haskell.unsafeDiv;ga=NS.Haskell.lt;ga=NS.Haskell.le;ga=NS.Haskell.gt;ga=NS.Haskell.ge;ga=NS.Haskell.negate;ga=NS.Haskell.evalThunks;ga=NS.Haskell.toArray;ga=NS.Haskell.curry;ib=NS.Haskell.error;ga=NS.Haskell.eta;ga=NS.Haskell.data;ua=NS.Haskell.ADT;ua=NS.Haskell.record;ua=NS.Haskell.accessor;ua=NS.Haskell.accessors;ua=NS.Haskell.showConstrOf;ua=NS.Haskell.instance;var ja=NS.Haskell.getInstance;pa=NS.Haskell.asTypeOf;var N=NS.GHC_Maybe.Maybe;Ja=
NS.GHC_List.map;Ma=NS.GHC_List.append;var t=NS.GHC_List.filter,Ca=NS.GHC_List.concat,ha=NS.GHC_List.head;pa=NS.GHC_List.last;var eb=NS.GHC_List.tail,ob=NS.GHC_List.init,Pa=NS.GHC_List.null_,Ob=NS.GHC_List.length,vb=NS.GHC_List.index,Za=NS.GHC_List.foldl,a=NS.GHC_List.scanl,c=NS.GHC_List.scanl1;K=NS.GHC_List.foldr;var m=NS.GHC_List.foldr1,z=NS.GHC_List.scanr,ma=NS.GHC_List.scanr1,fa=NS.GHC_List.replicate,L=NS.GHC_List.take,za=NS.GHC_List.drop,jb=NS.GHC_List.splitAt,d=NS.GHC_List.takeWhile,f=NS.GHC_List.dropWhile,
B=NS.GHC_List.span,R=NS.GHC_List.break_,Qa=NS.GHC_List.reverse,fb=NS.GHC_List.and,pb=NS.GHC_List.or,ba=NS.GHC_List.any,na=NS.GHC_List.all,i=NS.GHC_List.elem,s=NS.GHC_List.notElem,I=NS.GHC_List.lookup,u=NS.GHC_List.concatMap,va=NS.GHC_List.zip,M=NS.GHC_List.zip3,sa=NS.GHC_List.zipWith,Yb=NS.GHC_List.zipWith3,mc=NS.GHC_List.unzip,oc=NS.GHC_List.unzip3,wb=NS.GHC_List.errorEmptyList,tc=NS.GHC_Unicode.isSpace,uc=NS.GHC_Unicode.isUpper,vc=NS.GHC_Unicode.isLower,Bc=NS.GHC_Unicode.isAlpha,wc=NS.GHC_Unicode.isAlphaNum,
e=NS.GHC_Unicode.isDigit,k=NS.GHC_Unicode.isHexDigit,o=NS.GHC_Unicode.isOctDigit,E=NS.GHC_Unicode.toUpper,G=NS.GHC_Unicode.toLower,q=NS.GHC_Unicode.toTitle;ga(V,[["Left","a"],["Right","b"]]);X("Data_Either",{Either:V,either:qb,lefts:da,rights:Gb,partitionEithers:oa});ua(O,p,{eq:lb,ne:Vb});ua(qa,p,{"<=":function(){return true},"<":function(){return false},">=":function(){return true},">":function(){return false},max:function(){return ec},min:function(){return ec},compare:function(){return S.EQ}});
X("Data_Tuple",{fst:Ea,snd:Ra,curry_:Z,uncurry:ca});ua(la,N,{fmap:function(b,g){return g.Nothing?N.Nothing:g.Just?N.Just(b(g[0])):ib("Functor.Maybe.fmap")}});ua(Xa,N,{">>=":function(b,g){return b.Just?g(b[0]):b.Nothing?N.Nothing:ib("Monad.Maybe.>>=")},">>":function(b,g){return b.Just?g:b.Nothing?N.Nothing:ib("Monad.Maybe.>>")},return_:N.Just,fail:N.Nothing});X("Data_Maybe",{Maybe:N,maybe:Fa,isJust:A,isNothing:ea,fromJust:Ab,fromMaybe:Hb,listToMaybe:$a,maybeToList:Ib,catMaybes:Ga,mapMaybe:Va});var D=
{};F(function(b){D["zip"+b]=function(){return D["zipWith"+b](v["tuple"+b](wa(arguments)))};D["zipWith"+b]=function(g){var n=Ja(T,wa(arguments,1)),C=Ja(Ea,n);n=Ja(Ra,n);return H(g.apply(null,C),D["zipWith"+b].apply(null,[g].concat(n)))};D["unzip"+b]=function(g){return K(function(n,C){return Ja(H,n,C)},fa(b,[]),g)}},[4,5,6,7]);X("Data_List",{append:Ma,head:ha,last:pa,tail:eb,init:ob,null_:Pa,length:Ob,map:Ja,reverse:Qa,intersperse:ub,intercalate:Nb,transpose:xa,subsequences:yb,permutations:zb,foldl:Za,
foldl1:Sa,foldr:K,foldr1:m,concat:Ca,concatMap:u,and:fb,or:pb,any:ba,all:na,sum:Ka,product:Db,maximum:J,minimum:Zb,scanl:a,scanl1:c,scanr:z,scanr1:ma,mapAccumL:U,mapAccumR:Tb,replicate:fa,unfoldr:w,take:L,drop:za,splitAt:jb,takeWhile:d,dropWhile:f,span:B,break_:R,stripPrefix:Ta,group:nb,inits:Wb,tails:ia,isPrefixOf:Mb,isSuffixOf:ab,isInfixOf:Bb,elem:i,notElem:s,lookup:I,find:ra,filter:t,partition:Eb,index:vb,elemIndex:Aa,elemIndices:Kb,findIndex:La,findIndices:Lb,zip:va,zip3:M,zip4:D.zip4,zip5:D.zip5,
zip6:D.zip6,zip7:D.zip7,zipWith:sa,zipWith3:Yb,zipWith4:D.zipWith4,zipWith5:D.zipWith5,zipWith6:D.zipWith6,zipWith7:D.zipWith7,unzip:mc,unzip3:oc,unzip4:D.unzip4,unzip5:D.unzip5,unzip6:D.unzip6,unzip7:D.unzip7,lines:sb,words:Ba,unlines:Oa,unwords:h,nub:Ub,delete_:Ha,difference:ta,union:Xb,intersect:tb,sort:ka,insert:Jb,nubBy:Rb,deleteBy:bb,deleteFirstsBy:P,unionBy:mb,intersectBy:Na,groupBy:cb,sortBy:db,insertBy:hb,maximumBy:ya,minimumBy:Y});X("Data_Char",{String:String,ord:Sb,chr:Cb,isSpace:tc,isUpper:uc,
isLower:vc,isAlpha:Bc,isAlphaNum:wc,isDigit:e,isHexDigit:k,isOctDigit:o,toUpper:E,toLower:G,toTitle:q,digitToInt:l})})();(function(){var V=NS.Data_Maybe.Maybe,qb=NS.Data_Maybe.maybe,da=NS.Data_List.append,Gb=NS.Data_List.head,oa=NS.Data_List.last,Ea=NS.Data_List.tail,Ra=NS.Data_List.init,Z=NS.Data_List.null_,ca=NS.Data_List.length,Fa=NS.Data_List.map,A=NS.Data_List.reverse,ea=NS.Data_List.foldl,Ab=NS.Data_List.foldl1,Hb=NS.Data_List.foldr,Ib=NS.Data_List.foldr1,$a=NS.Data_List.concat,Ga=NS.Data_List.concatMap,
Va=NS.Data_List.and,Ta=NS.Data_List.or,Aa=NS.Data_List.any,Kb=NS.Data_List.all,ra=NS.Data_List.sum,La=NS.Data_List.product,Lb=NS.Data_List.maximum,Mb=NS.Data_List.minimum,ab=NS.Data_List.scanl,Bb=NS.Data_List.scanl1,Ub=NS.Data_List.scanr,Rb=NS.Data_List.scanr1,Ha=NS.Data_List.replicate,bb=NS.Data_List.take,ta=NS.Data_List.drop,Xb=NS.Data_List.splitAt,mb=NS.Data_List.takeWhile,tb=NS.Data_List.dropWhile,Na=NS.Data_List.span,ub=NS.Data_List.break_,Nb=NS.Data_List.elem,xa=NS.Data_List.notElem,Eb=NS.Data_List.lookup,
gb=NS.Data_List.filter,U=NS.Data_List.index,Tb=NS.Data_List.elemIndex,Jb=NS.Data_List.zip,hb=NS.Data_List.zip3,J=NS.Data_List.zipWith,Zb=NS.Data_List.zipWith3,ya=NS.Data_List.unzip,Y=NS.Data_List.unzip3,P=NS.Data_List.lines,nb=NS.Data_List.words,cb=NS.Data_List.unlines,Wb=NS.Data_List.unwords,ia=NS.Data_Tuple.fst,yb=NS.Data_Tuple.snd,Wa=NS.Data_Tuple.curry_,zb=NS.Data_Tuple.uncurry,ka=NS.Data_Either.Either,db=NS.Data_Either.either,w=NS.GHC_Show.Show,Sa=NS.GHC_Base.Bool,Ka=NS.GHC_Base.Ordering,Db=
NS.GHC_Base.Eq,sb=NS.GHC_Base.Ord,Oa=NS.GHC_Base.andOp,Ba=NS.GHC_Base.orOp,h=NS.GHC_Base.not,l=NS.GHC_Base.Functor,p=NS.GHC_Base.Monad,v=NS.GHC_Base.emptyListOf,F=NS.GHC_Base.cons,S=NS.GHC_Base.consJoin,O=NS.GHC_Base.uncons;Fa=NS.GHC_Base.map;Hb=NS.GHC_Base.foldr;da=NS.GHC_Base.append;var qa=NS.GHC_Base.otherwise,la=NS.GHC_Base.id,Xa=NS.GHC_Base.const_,Q=NS.GHC_Base.compose1,H=NS.GHC_Base.compose,T=NS.GHC_Base.flip,Ja=NS.GHC_Base.call,K=NS.GHC_Base.until,Ma=NS.GHC_Base.asTypeOf;Tb=NS.GHC_Base.elemIndex;
var Sb=NS.GHC_Base.unsafeCompare,Cb=NS.GHC_Base.readHex,rb=NS.GHC_Base.readOct,$=NS.GHC_Base.round,Ya=NS.GHC_Base.toInteger,pa=NS.GHC_Base.fromInteger,ga=NS.GHC_Base.fromIntegral;Sa=NS.Haskell.Bool;var ua=NS.Haskell.namespace,wa=NS.Haskell.curry,X=NS.Haskell.error;Ma=NS.Haskell.asTypeOf;ua("Prelude",{cons:F,consJoin:S,uncons:O,elemIndex:Tb,unsafeCompare:Sb,emptyListOf:v,readHex:Cb,readOct:rb,round:$,toInteger:Ya,fromInteger:pa,fromIntegral:ga,Bool:Sa,andOp:Oa,orOp:Ba,not:h,otherwise:qa,Maybe:V,maybe:qb,
Either:ka,either:db,Ordering:Ka,String:String,fst:ia,snd:yb,curry:wa,curry_:Wa,uncurry:zb,Eq:Db,Ord:sb,fromIntegral:ga,Monad:p,Functor:l,id:la,const_:Xa,compose:H,compose1:Q,flip:T,call:Ja,until:K,asTypeOf:Ma,error:X,map:Fa,append:da,filter:gb,head:Gb,last:oa,tail:Ea,init:Ra,null_:Z,length:ca,index:U,reverse:A,foldl:ea,foldl1:Ab,foldr:Hb,foldr1:Ib,and:Va,or:Ta,any:Aa,all:Kb,sum:ra,product:La,concat:$a,concatMap:Ga,maximum:Lb,minimum:Mb,scanl:ab,scanl1:Bb,scanr:Ub,scanr1:Rb,replicate:Ha,take:bb,drop:ta,
splitAt:Xb,takeWhile:mb,dropWhile:tb,span:Na,break_:ub,elem:Nb,notElem:xa,lookup:Eb,zip:Jb,zip3:hb,zipWith:J,zipWith3:Zb,unzip:ya,unzip3:Y,lines:P,words:nb,unlines:cb,unwords:Wb,Show:w})})();(function(){function V(d,f){return d/f>>0}function qb(){}function da(){}function Gb(d){return d.mode}function oa(d){return d.lineLength}function Ea(d){return d.ribbonsPerLine}function Ra(){}function Z(){}function ca(d){return Hb(Sb(T(ea)(false),ob,d))}function Fa(d){return Hb(Sb(T(ea)(true),ob,d))}function A(d){return Hb(Sb(T(Ab)(true),
ob,d))}function ea(d,f,B){if(B.Empty)return f;return t(f,d,B)}function Ab(d,f,B){if(B.Empty)return f;return Ca(f,d,B)}function Hb(d){if(d.Above&&d[0].Empty)return d[2];if(d.Beside&&d[0].Empty)return d[2];return d}function Ib(d,f,B){return Tb([d,Rb(f,B)])}function $a(d,f){function B(R,Qa){if(!Qa.length)return S(R,qa(Qa));Qa=O(Qa);return S(xa(R,d),B(Qa.head,Qa.tail))}if(!f.length)return qa(f);f=O(f);return B(f.head,f.tail)}function Ga(d){if(d.Beside)return gb(d[0],d[1],Ga(d[2]));if(d.Above)return tb(d[0],
d[1],Ga(d[2]));return d}function Va(d){return bc(d)}function Ta(d,f,B){return ib(d,f,B)}function Aa(d,f){return ec(d,f)}function Kb(d,f){return ja(d,f)}function ra(d){return!!d.Empty}function La(d){return Ta(Ia(d),1,aa)}function Lb(d){return Ta(lb(d),d.length,aa)}function Mb(d){return Ta(Vb(d),d.length,aa)}function ab(d){return Ta(lb(d),0,aa)}function Bb(d){return Lb(Cb.show(d))}function Ub(d,f){return function(B){return xa(xa(La(d),B),La(f))}}function Rb(d,f){return Ha(d,Ga(f))}function Ha(d,f){return f.Nest?
Ha(d+f[0],f[1]):f.NoDoc?N:f.Empty?aa:d===0?f:Aa(d,f)}function bb(d,f){return d.Empty?aa:Kb(d,f)}function ta(d,f,B){return B.Empty?d:d.Empty?B:Ca(d,f,B)}function Xb(d,f){return ta(d,false,f)}function mb(d,f){return ta(d,true,f)}function tb(d,f,B){return d.Above?tb(d[0],d[1],tb(d[2],f,B)):d.Besdie?Na(Ga(d),f,0,Ga(B)):Na(d,f,0,Ga(B))}function Na(d,f,B,R){return d.NoDoc?N:d.Union?Kb(Na(d[0],f,B,R),Na(d[1],f,B,R)):d.Empty?Ha(B,R):d.Nest?Aa(k1,Na(d[1],f,B-d[0],R)):d.NilAbove?Va(Na(d[0],f,B,R)):d.TextBeside?
Ta(d[0],d[1],d[2].Empty?ub(f,B-d[1],R):Na(d[2],f,B-d[1],R)):d.Above?K("aboveNest Above"):d.Beside?K("aboveNest Beside"):K()}function ub(d,f,B){return B.Empty?aa:B.Nest?ub(d,f+B[0],B[1]):!d&&f>0?Ta(lb(F(f)),f,B):Va(Ha(f,B))}function Nb(d,f,B){return B.Empty?d:d.Empty?B:t(d,f,B)}function xa(d,f){return Nb(d,false,f)}function Eb(d,f){return Nb(d,true,f)}function gb(d,f,B){return d.NoDoc?N:d.Union?Kb(gb(d[0],f,B),gb(d[1],f,B)):d.Empty?B:d.Nest?Aa(d[0],gb(d[1],f,B)):d.Beside?d[1]==f?gb(d[0],d[1],gb(d[2],
f,B)):gb(Ga(d),f,B):d.Above?gb(Ga(d),f,B):d.NilAbove?Va(gb(d[0],f,B)):d.TextBeside?Ta(d[0],d[1],d[2].Empty?U(f,B):gb(d[2],f,B)):K()}function U(d,f){return f.Empty?aa:f.Nest?U(d,f[1]):d?Ta(ha,1,f):f}function Tb(d){return hb(true,d)}function Jb(d){return hb(false,d)}function hb(d,f){if(!f.length)return ob;f=O(f);return J(d,Ga(f.head),0,f.tail)}function J(d,f,B,R){return f.NoDoc?N:f.Union?Kb(J(d,f[0],f[1],R),Na(f[1],False,B,Ga(A(R)))):f.Empty?Ha(B,hb(d,R)):f.Nest?Aa(f[0],J(d,f[1],B-f[0],R)):f.NilAbove?
Va(Na(f[0],False,B,Ga(A(R)))):f.TextBeside?Ta(f[0],f[1],Zb(d,f[2],B-f[1],R)):f.Above?K("sep1 Above"):f.Beside?K("sep1 Beside"):K()}function Zb(d,f,B,R){return f.Nest?Zb(d,f[1],B,R):f.Empty?bb(Ka(U(d,Ga(d?Fa(R):ca(R)))),ub(true,B,Ga(A(R)))):K()}function ya(d){return P(true,d)}function Y(d){return P(false,d)}function P(d,f){if(!f.length)return ob;f=O(f);return nb(d,Ga(f.head),0,f.tail)}function nb(d,f,B,R){return f.NoDoc?N:f.Union?Kb(nb(d,f[0],B,R),Na(f[1],false,B,P(d,R))):f.Empty?Ha(B,P(d,R)):f.Nest?
Aa(f[0],nb(d,f[1],B-f[0],R)):f.NilAbove?Va(Na(f[0],false,B,P(d,R))):f.TextBeside?Ta(f[0],f[1],cb(d,f[2],B-f[1],R)):f.Above?K("fill1 Above"):f.Beside?K("fill1 Beside"):K()}function cb(d,f,B,R){if(f.Nest)return cb(d,f[1],B,R);if(f.Empty){if(!R.length)return aa;f=O(R);if(f.head.Empty)return cb(d,aa,B,f.tail);return Wb(d,B,f.head,f.tail)}return nb(d,f,B,R)}function Wb(d,f,B,R){var Qa=d?f-1:f;return bb(U(d,nb(d,ia(Ka(Ga(B))),Qa,R)),ub(true,f,P(d,S(B,R))))}function ia(d){return d.Nest?d[1]:d}function yb(d,
f,B,R){function Qa(ba){return ba.Empty?aa:ba.NoDoc?N:ba.NilAbove?Va(Qa(ba[0])):ba.TextBeside?Ta(ba[0],ba[1],Qa(ba[2])):ba.Nest?Qa(ba[1]):ba.Union?w(Qa(ba[0]),Qa(ba[1])):ba.Above?K("best OneLineMode get Above"):ba.Beside?K("best OneLineMode get Beside"):K()}function fb(ba,na){return na.Empty?aa:na.NoDoc?N:na.NilAbove?Va(fb(ba,na[0])):na.TextBeside?Ta(na[0],na[1],pb(ba,na[1],na[2])):na.Nest?Aa(na[0],fb(ba-na[0],na[1])):na.Union?Wa(ba,B,fb(ba,na[0]),fb(ba,na[1])):na.Above?K("best get Above"):na.Beside?
K("best get Beside"):K()}function pb(ba,na,i){return i.Empty?aa:i.NoDoc?N:i.NilAbove?Va(fb(ba-na,i[0])):i.TextBeside?Ta(i[0],i[1],pb(ba,na+i[1],i[2])):i.Nest?pb(ba,na,i[1]):i.Union?zb(ba,B,na,pb(ba,na,i[0]),pb(ba,na,i[1])):i.Above?K("best get1 Above"):i.Beside?K("best get1 Beside"):K()}return d.OneLineMode?Qa(R):fb(f,R)}function Wa(d,f,B,R){return zb(d,f,0,B,R)}function zb(d,f,B,R,Qa){return ka(db(wr,f)-B,R)?R:Qa}function ka(d,f){return d<0?false:f.NoDoc?false:f.Empty?true:f.NilAbove?true:f.TextBeside?
ka(d-f[1],f[2]):f.Above?K("fits Above"):f.Beside?K("fits Beside"):f.Union?K("fits Union"):f.Nest?K("fits Nest"):K()}function db(d,f){return d<f?d:f}function w(d,f){return Sa(d)?d:f}function Sa(d){return d.NoDoc?false:d.Union?true:d.Empty?true:d.NilAbove?true:d.TextBeside?Sa(d[2]):d.Nest?Sa(d[1]):d.Above?K("nonEmptySet Above"):d.Beside?K("nonEmptySet Beside"):K()}function Ka(d){return d.NoDoc?N:d.Empty?aa:d.NilAbove?N:d.TextBeside?Ta(d[0],d[1],Ka(d[2])):d.Nest?Aa(d[0],Ka(d[1])):d.Union?Ka(d[0]):d.Above?
K("oneLiner Above"):d.Beside?K("oneLiner Beside"):K()}function Db(d,f){return h(Gb(d),oa(d),Ea(d),Ba,"",f)}function sb(d){return Oa(d,"")}function Oa(d,f){return h(X,100,1.5,Ba,f,d)}function Ba(d,f){return d.Chr?S(d[0],f):d.Str?Ma(d[0],f):d.PStr?Ma(d[0],f):K()}function h(d,f,B,R,Qa,fb){B=la(Xa(f)/B);var pb=Number.MAX_VALUE;fb=yb(d,d.ZigZagMode?pb:f,B,Ga(fb));return l(d,f,B,R,Qa,fb)}function l(d,f,B,R,Qa,fb){function pb(I,u){return u.Nest?pb(I+u[0],u[1]):u.Empty?Qa:u.Above?K("display lay Above"):u.Beside?
K("display lay Beside"):u.NoDoc?K("display lay NoDoc"):u.Union?K("display lay Union"):u.NilAbove?R(eb,pb(I,u[0])):u.TextBeside?d.ZigZagMode?I>=i?R(eb,R(lb(v(s,"/")),R(eb,ba(I-s,u[0],u[1],u[2])))):I<0?R(eb,R(lb(v(s,"\\")),R(eb,ba(I+s,u[0],u[1],u[2])))):K():ba(I,u[0],u[1],u[2]):K()}function ba(I,u,va,M){return R(lb(p(I)),R(u,na(I+va,M)))}function na(I,u){return u.NilAbove?R(eb,pb(I,u[0])):u.TextBeside?R(u[0],na(I+u[1],u[2])):u.Nest?na(I,u[1]):u.Empty?Qa:u.Above?K("display lay2 Above"):u.Beside?K("display lay2 Beside"):
u.NoDoc?K("display lay2 NoDoc"):u.Union?K("display lay2 Union"):K()}var i=f-B,s=V(i,2);return pb(0,fb)}function p(d){return F(d)}function v(d,f){if(d===0)return"";return S(f,v(d-1,f))}function F(d){return d<=0?"":S(" ",F(d-1))}var S=NS.Prelude.cons,O=NS.Prelude.uncons,qa=NS.Prelude.emptyListOf,la=NS.Prelude.round,Xa=NS.Prelude.fromIntegral,Q=NS.Prelude.Bool,H=NS.Prelude.String,T=NS.Prelude.curry,Ja=NS.Prelude.asTypeOf,K=NS.Prelude.error,Ma=NS.Prelude.append,Sb=NS.Prelude.foldr,Cb=NS.Prelude.Show;
Q=NS.Haskell.Bool;var rb=NS.Haskell.extend,$=NS.Haskell.namespace;T=NS.Haskell.curry;K=NS.Haskell.error;var Ya=NS.Haskell.eta,pa=NS.Haskell.data,ga=NS.Haskell.record,ua=NS.Haskell.instance;Ja=NS.Haskell.asTypeOf;Ja=NS.Haskell.operators;var wa=NS.Haskell.infixl;pa(qb,["PageMode","ZigZagMode","LeftMode","OneLineMode"]);var X=qb.PageMode;pa(da,[["Style",{mode:qb,lineLength:Number,ribbonsPerLine:Number}]]);ga=da.Style(ga,{mode:X,lineLength:100,ribbonsPerLine:1.5});pa(Ra,[["Chr",H],["Str",H],["PStr",H]]);
var Ia=Ra.Chr,lb=Ra.Str,Vb=Ra.PStr;pa(Z,["Empty",["NilAbove",Z],["TextBeside",Ra,Number,Z],["Nest",Number,Z],["Union",Z,Z],"NoDoc",["Beside",Z,Q,Z],["Above",Z,Q,Z]]);var aa=Z.Empty,bc=Z.NilAbove,ib=Z.TextBeside,ec=Z.Nest,ja=Z.Union,N=Z.NoDoc,t=Z.Beside,Ca=Z.Above,ha=Ia(" "),eb=Ia("\n"),ob=aa;Q=La(";");H=La(":");pa=La(",");var Pa=La(" "),Ob=La("="),vb=La("("),Za=La(")"),a=La("["),c=La("]"),m=La("{"),z=La("}"),ma=Ub("'","'"),fa=Ub('"','"'),L=Ub("(",")"),za=Ub("[","]"),jb=Ub("{","}");Ya(K,"easy_display: NoDoc");
ua(Cb,Z,{show:sb});rb(Ja,{"<>":{func:xa,fixity:wa(6)},"<+>":{func:Eb,fixity:wa(6)},$$:{func:Xb,fixity:wa(5)},"$+$":{func:mb,fixity:wa(5)}});$("Text_PrettyPrint_HughesPJ",{TextDetails:Ra,Doc:Z,char_:La,text:Lb,ptext:Mb,zeroWidthText:ab,int_:Bb,integer:Bb,float_:Bb,double_:Bb,rational:Bb,semi:Q,comma:pa,colon:H,space:Pa,equals:Ob,lparen:vb,rparen:Za,lbrack:a,rbrack:c,lbrace:m,rbrace:z,parens:L,brackets:za,braces:jb,quotes:ma,doubleQuotes:fa,empty:ob,hcat:ca,hsep:Fa,vcat:A,sep:Tb,cat:Jb,fsep:ya,fcat:Y,
nest:Rb,hang:Ib,punctuate:$a,isEmpty:ra,render:sb,Style:da,style:ga,renderStyle:Db,fullRender:h,Mode:qb,TextDetails:Ra})})();(function(){function V(e,k){this.input=e;this.index=k||0;this.length=e.length-this.index;this.cache={};return this}function qb(e){return new V(e)}function da(e){return function(k,o,E){return E({ast:null,success:false,expecting:{unexpected:e}})}}function Gb(e){return function(k,o,E){return E({success:false,expecting:e})}}function oa(e,k,o){return o({success:false})}function Ea(e){return typeof e==
"string"?I(e):rb(e)?ib(e):e}function Ra(e,k,o,E,G){var q=k instanceof V?k:qb(k);ua(e(new N,q,function(D){D.state=q;delete D.index;delete D.length;if(D.success){delete D.error;delete D.expecting}else{D.error=Z(D.expecting,D.state);E&&E(D.error)}o(D)}),G)}function Z(e,k,o,E){o=o===undefined?k.index:o;if(typeof e=="string"){var G=k.input.split("\n"),q=G.length,D=k.input.substr(o).split("\n").length;q=q-D+1;G=o-G.splice(0,q-1).join("\n").length;k=E||k.input.substr(o,e.length).substr(0,6);return'Unexpected "'+
(k.length?k:"end of input")+(E?"":'", expecting "'+e)+'" at line '+q+" char "+G}if(rb(e)){e=H(function(b){return typeof b=="object"?b.expecting:b},e);return Z(e.join('" or "'),k)}else if(typeof e=="object")return Z(e.expecting,k,e.at,e.unexpected)}function ca(){}function Fa(e,k){return function(o,E,G){return function(){return e(o,E,function(q){return q.success?function(){return k(q.ast)(o,E,G)}:G(q)})}}}function A(e,k){if(e=="scope")throw"Can't use 'scope' as an identifier!";return function(o,E,G){return function(){return k(o,
E,function(q){if(q.success)o[e]=q.ast;return G(q)})}}}function ea(e,k){k&&$(arguments);return function(o,E,G){return function(){return function(){var q;if(typeof e=="string"){if(!(e in o))throw'Not in scope: "'+e+'"';q=o[e]}else q=e(o);return G({ast:q,success:true})}}}}function Ab(e){var k=$(arguments,1);return function(o){return e.apply(null,H(function(E){return o[E]},k))}}function Hb(e,k,o){return o({ast:k.index,success:true})}function Ib(e){var k=typeof e;return function(o,E,G){E.scrollTo(k=="string"?
o[e]:e);return G({success:true})}}function $a(e){return function(k,o,E){return E({ast:e,success:true})}}function Ga(e,k){return L(A("a",e),A("b",k),ea(function(o){return o.a(o.b)}))}function Va(e,k){return L(A("x1",k),za(e,"x1"))}function Ta(e,k,o){return L(A("x1",k),A("x2",o),za(e,"x1","x2"))}function Aa(e,k,o,E){return L(A("x1",k),A("x2",o),A("x3",E),za(e,"x1","x2","x3"))}function Kb(e,k){return L(A("a",e),k,ea("a"))}function ra(e,k){function o(E,G,q){return function(){return e(E,G,function(D){function b(n){var C=
n.expecting;if(C)if(C.constructor==Array)g=g.concat(C);else g.push(C);n.expecting=n.success?c:g}var g=[];b(D);return D.ast!==c?function(){return q(D)}:function(){return k(E,G,function(n){b(n);return q(n)})}})}}o.constructor=ca;return o}function La(){var e=H(Ea,arguments);return function(k,o,E){for(var G=1,q=e.length,D=e[0];G<q;++G)D=ra(D,e[G]);return D(k,o,E)}}function Lb(e){return function(k,o,E){function G(g){return function(n,C,W){return function(){return g(n,C,function(Da){q++;if(!Da.success)return W(Da);
Da.ast!==c&&D.push(Da.ast);return q<b?G(e[q])(n,C,W):W(Da)})}}}var q=0,D=[],b=e.length;return function(){return G(e[q])(k,o,function(g){var n=g.success;return E({ast:D,success:n,expecting:n?c:g.expecting})})}}}function Mb(e){return function(k){return function(o,E,G){function q(g){return function(n,C,W){return function(){return g(n,C,function(Da){if(!Da.success)return W(Da);D=true;Da.ast!==c&&b.push(Da.ast);return q(g)(n,C,W)})}}}var D=false,b=[];return function(){return q(k)(o,E,function(g){var n=
!e||D&&e;return G({ast:n?b:c,success:n,expecting:n?c:g.expecting})})}}}}function ab(e){return function(k){var o=ma++,E=function(G,q,D){G=q.index;var b=q.getCached(o);if(b!==c)return D(b);b=e(k,q,G);q.putCached(o,G,b);return D(b)};E.constructor=ca;return E}}function Bb(e){return function(k,o){var E=ma++,G=function(q,D,b){var g=D.index,n=D.getCached(E);if(n!==c)return b(n);return function(){return k(q,D,function(C){C=e(o,C,D,g);D.putCached(E,g,C);return b(C)})}};G.constructor=ca;return G}}function Ub(e){return function(k,
o,E){return e(k)(k,o,E)}}function Rb(e){function k(o,E){return L(A("x",o),A("xs",E),ea(Ab(ka,"x","xs")))}return K(k,f([]),e)}function Ha(e){return K(ra,z,e)}function bb(e,k){return ra(k,f(e))}function ta(e){return bb(Ba.Nothing,Va(Ba.Just,e))}function Xb(e){return ra(L(e,f(null)),f(null))}function mb(e,k,o){return L(e,A("x",o),k,ea("x"))}function tb(e){return L(e,na(e))}function Na(e,k){return ra(ub(e,k),f([]))}function ub(e,k){return L(A("x",e),A("xs",fb(L(k,e))),za(ka,"x","xs"))}function Nb(e,k){return L(A("x",
e),ra(L(k,A("xs",function(o,E,G){return xa(e,k)(o,E,G)}),ea(function(o){return ka(o.scope.x,o.xs)})),ea(function(o){return[o.x]})))}function xa(e,k){return ra(Nb(e,k),f([]))}function Eb(e,k){return pb(L(A("x",e),k,ea("x")))}function gb(e,k){return fb(L(A("x",e),k,ea("x")))}function U(e,k){return e<=0?f([]):Rb(Ma(e,k))}function Tb(e,k,o){return ra(J(e,k),f(o))}function Jb(e,k,o){return ra(hb(e,k),f(o))}function hb(e,k){function o(E){var G=L(A("f",k),A("y",e),function(q,D,b){return o(q.f(E,q.y))(q,
D,b)});return ra(G,f(E))}return Fa(e,o)}function J(e,k){function o(G){var q=L(A("f",k),A("y",E),ea(function(D){return D.f(G,D.y)}));return ra(q,f(G))}var E=Fa(e,o);return E}function Zb(e,k,o){e=k.at(0);if(e.length){k.scroll(1);return o({ast:e,success:true})}return o({success:false,expecting:"anyToken"})}function ya(e,k,o){return o({success:!k.length,expecting:k.length?"end of input":c})}function Y(e){return ba(ra(Fa(ba(e),da),f(null)))}function P(e,k){function o(G,q,D){return E(G,q,D)}var E=ra(L(k,
f([])),L(A("x",e),A("xs",o),za(ka,"x","xs")));return E}function nb(e){return L(A("state",jb),A("x",e),d("state"),ea("x"))}function cb(){}function Wb(){}function ia(e){function k(y){return o(I(y))}function o(y){return L(A("x",y),Lc,ea("x"))}function E(y,Ua,xb){return Mc(y,Ua,xb)}function G(y,Ua,xb){return Nc(y,Ua,xb)}function q(y,Ua,xb){return Gc(y,Ua,xb)}function D(y){return mb(k("("),k(")"),y)}function b(y){return mb(k("{"),k("}"),y)}function g(y){return mb(k("<"),k(">"),y)}function n(y){return mb(k("["),
k("]"),y)}function C(y){return Na(y,Hc)}function W(y){return Na(y,Ic)}function Da(y){return ub(y,Hc)}function kb(y){return ub(y,Ic)}function hc(y){return L(i(y[0]),f(y[1]))}function $b(y){return ba(L(I(y[0]),f(y[1])))}function Fb(y,Ua){return M("digits","<-",pb,Ua)(ea,function(xb){return Ja(function(gc,Cc){return y*gc+Ka(Za(Cc))},0,xb.digits)})}function jc(y,Ua,xb){return xc(y,Ua,xb)}function kc(y,Ua){return(Ua+sb(Za(y)))/10}function cc(y){return y<0?1/cc(-y):Db(Math.pow(10,y))}function ic(y){return sa(M("fract",
"<-",Qc)("expo","<-",bb,1,Oc)(ea,function(Ua){return Db(y+Ua.fract)*Ua.expo}),"<|>",M("expo","<-",Oc)(ea,function(Ua){return Db(y)*Ua.expo}))}function ac(y){return M("f","<-",ic,y)(za,l.Right,"f")}function pc(y){return sa(o,"$",ba,M(I(y))(Y,e.opLetter,"<?>","end of "+y))}function qc(y){return yc(Ya(e.reservedOpNames),y)}function Pb(y){function Ua(gc){return!gc.length?f(null):L(u(xb(gc[0]),""+y),Ua($(gc,1)))}function xb(gc){return eb(gc)?ra(i(gc.toLowerCase()),i(gc.toUpperCase())):i(gc)}return e.caseSensitive?
I(y):L(Ua(y),f(y))}function fc(y){return sa(o,"$",ba,M(Pb(y))(Y,e.identLetter,"<?>","end of "+y))}function yc(y,Ua){function xb(Cc){if(!Cc.length)return false;var Jc=gc(Cc[0],Ua);return Jc.LT?xb($(Cc,1)):Jc.EQ?true:Jc.GT?false:null}var gc=Sa;return xb(y)}function j(y){y=e.caseSensitive?y:y.toLowerCase();return yc(Rc,y)}if(!e.LanguageDef)throw"Type error: unexpected '"+e.constructor.name+"', expecting 'GenLanguageDef.LanguageDef'";var dc=tb(s(t)),Fc=M(ba(I(e.commentLine)))(na,s(function(y){return y!=
"\n"}))(f,null),Qb=a($(e.commentEnd+e.commentStart)),Mc=sa(L(ba(I(e.commentEnd)),f(null)),"<|>",L(tb(mc(Qb)),E),"<|>",L(Yb(Qb),E),"<?>","end of comment"),Nc=sa(L(ba(I(e.commentEnd)),f(null)),"<|>",L(q,G),"<|>",L(tb(mc(Qb)),G),"<|>",L(Yb(Qb),G),"<?>","end of comment");Qb=e.nestedComments?Nc:Mc;var Gc=L(ba(I(e.commentStart)),Qb);Qb=T(e.commentLine);var lc=T(e.commentStart),Lc=ja(Qb&&lc?[na,[dc,"<?>",""]]:Qb?[na,[dc,"<|>",Gc,"<?>",""]]:lc?[na,[dc,"<|>",Fc,"<?>",""]]:[na,[dc,"<|>",Fc,"<|>",Gc,"<?>",""]]),
Ic=k(";"),Hc=k(",");dc=k(".");Fc=k(":");Qb=Cb($("abfnrtv\\\"'"),$("a\u0008\u000c\n\r\t\u000b\\\"'"));lc=Cb(["NUL","SOH","STX","ETX","EOT","ENQ","ACK","BEL","DLE","DC1","DC2","DC3","DC4","NAK","SYN","ETB","CAN","SUB","ESC","DEL"].concat(["BS","HT","LF","VT","FF","CR","SO","SI","EM","FS","GS","RS","US","SP"]),["NUL","SOH","STX","ETX","EOT","ENQ","ACK","BEL","DLE","DC1","DC2","DC3","DC4","NAK","SYN","ETB","CAN","SUB","ESC","DEL"].concat(["BS","HT","LF","VT","FF","CR","SO","SI","EM","FS","GS","RS","US",
"SP"]));Qb=Ha(H(hc,Qb));var nc=Ha(H($b,lc));lc=s(function(y){return y!='"'&&y!="\\"&&y>"\u0016"});var zc=i("&"),Dc=M(pb,oc)(i("\\"),"<?>","end of string gap"),Ac=M("code","<-",jc,"<|>",L(i("o"),Fb(8,vc)),"<|>",L(i("x"),Fb(16,uc)))(ea(function(y){return toEnum(Db(y.code))})),rc=M(i("^"))("code","<-",wb)(ea(function(y){return toEnum(fromEnum(y.code)-fromEnum("A"))}));nc=sa(Qb,"<|>",Ac,"<|>",nc,"<|>",rc,"<?>","escape code");Qb=L(i("\\"),nc);Ac=s(function(y){return y!="'"&&y!="\\"&&y>"\u0016"});Qb=sa(Ac,
"<|>",Qb,"<?>","literal character");Qb=sa(o,[mb,i("'"),[i("'"),"<?>","end of character"],Qb],"<?>","character");zc=M(i("\\"))(L(Dc,f(Ba.Nothing)),"<|>",L(zc,f(Ba.Nothing)),"<|>",M("esc","<-",nc)(za,Ba.Just,"esc"));lc=sa(M("c","<-",lc)(za,Ba.Just,"c"),"<|>",zc,"<?>","string character");lc=sa(o,[M("str","<-",mb,i('"'),[i('"'),"<?>","end of string"],[fb,lc])(ea,function(y){return K(v(h)(S,v(ka)),"",y.str)}),"<?>","literal string"]);var xc=Fb(10,tc);zc=M(Yb,"xX")(Fb,16,uc);Dc=M(Yb,"oO")(Fb,8,vc);var Qc=
sa(M(i("."))("digits","<-",pb,tc,"<?>","fraction")(ea,function(y){return K(kc,0,y.digits)}),"<?>","fraction");nc=sa([i("-"),">>",f,ga],"<|>",[i("+"),">>",f,S],"<|>",f,S);var Oc=sa(M(Yb,"eE")("f","<-",nc)("e","<-",xc,"<?>","exponent")(za,cc,"f","e"),"<?>","exponent");Ac=M("n","<-",xc)(function(y,Ua,xb){return ic(y.n)(y,Ua,xb)});rc=M("n","<-",xc)(function(y,Ua,xb){return bb(l.Left(y.n),ac(y.n))(y,Ua,xb)});var sc=sa(M("n","<-",zc,"<|>",Dc)(za,l.Left,"n"),"<|>",rc,"<|>",ac(0),"<|>",f,l.Left(0));rc=sa(L(i("0"),
sc),"<|>",rc);sc=sa(M(i,"0")(zc,"<|>",Dc,"<|>",xc,"<|>",f,0),"<?>","");sc=ra(sc,xc);var Ec=M("f","<-",o,nc)("n","<-",sc)(ea,function(y){return y.f(y.n)});nc=ja(o,rc,"<?>","number");Ac=ja(o,Ac,"<?>","float");rc=ja(o,Ec,"<?>","integer");sc=ja(o,sc,"<?>","natural");Ec=sa(M("c","<-",e.opStart)("cs","<-",fb,e.opLetter)(za,db,"c","cs"),"<?>","operator");Ec=sa(o,"$",ba,M("name","<-",Ec)(function(y,Ua,xb){return(qc(y.name)?da("reserved operator "+y.name):f(y.name))(y,Ua,xb)}));var Kc=sa(M("c","<-",e.identStart)("cs",
"<-",fb,e.identLetter)(za,db,"c","cs"),"<?>","identifier");Kc=sa(o,"$",ba,M("name","<-",Kc)(function(y,Ua,xb){return(j(y.name)?da("reserved word "+y.name):f(y.name))(y,Ua,xb)}));var Pc=Ya(e.reservedNames),Rc=e.caseSensitive?Pc:H(function(y){return y.toLowerCase()},Pc);return Wb.TokenParser(wa,{identifier:Kc,reserved:fc,operator:Ec,reservedOp:pc,charLiteral:Qb,stringLiteral:lc,natural:sc,integer:rc,float_:Ac,naturalOrFloat:nc,decimal:xc,hexadecimal:zc,octal:Dc,symbol:k,lexeme:o,whiteSpace:Lc,parens:D,
braces:b,angles:g,brackets:n,squares:n,semi:Ic,comma:Hc,colon:Fc,dot:dc,semiSep:W,semiSep1:kb,commaSep:C,commaSep1:Da})}function yb(){}function Wa(){}function zb(e,k){function o(D,b){return function(g,n,C){return D(g[b])(g,n,C)}}function E(D,b){var g=D[0],n=b[0],C=b[1],W=b[2],Da=b[3];b=b[4];if(D.Infix){var kb=D[1];if(kb.AssocNone)return[n,C,ka(g,W),Da,b];if(kb.AssocLeft)return[n,ka(g,C),W,Da,b];if(kb.AssocRight)return[ka(g,n),C,W,Da,b]}if(D.Prefix)return[n,C,W,ka(g,Da),b];if(D.Postfix)return[n,C,
W,Da,ka(g,b)]}function G(D,b){return ba(L(b,m("ambiguous use of a "+D+" associative operator")))}function q(D,b){function g(Pb){return sa(M("f","<-",jc)("y","<-",M("z","<-",qc)(o,n,"z"))(ea,function(fc){return fc.f(Pb,fc.y)}),"<|>",ac,"<|>",pc)}function n(Pb){return ra(g(Pb),f(Pb))}function C(Pb){return sa(M("f","<-",kc)("y","<-",qc)(function(fc,yc,j){return W(fc.f(Pb,fc.y))(fc,yc,j)}),"<|>",ic,"<|>",pc)}function W(Pb){return ra(C(Pb),f(Pb))}function Da(Pb){return M("f","<-",cc)("y","<-",qc)(ic,"<|>",
ac,"<|>",pc,"<|>",ea,function(fc){return fc.f(Pb,fc.y)})}var kb=K(E,[[],[],[],[],[]],b),hc=kb[1],$b=kb[2],Fb=kb[3];b=kb[4];var jc=Ha(kb[0]),kc=Ha(hc),cc=Ha($b);kb=u(Ha(Fb),"");b=u(Ha(b),"");var ic=G("right",jc),ac=G("left",kc),pc=G("non",cc);b=ra(b,f(S));kb=ra(kb,f(S));var qc=M("pre","<-",kb)("x","<-",D)("post","<-",b)(ea,function(Pb){return Pb.post(Pb.pre(Pb.x))});return M("x","<-",qc)(o,g,"x","<|>",o,C,"x","<|>",o,Da,"x","<|>",ea,"x","<?>","operator").resolve()}return Ja(q,k,e)}var ka=NS.Prelude.cons,
db=NS.Prelude.consJoin,w=NS.Prelude.elemIndex,Sa=NS.Prelude.unsafeCompare,Ka=NS.Prelude.toInteger,Db=NS.Prelude.fromInteger,sb=NS.Prelude.fromIntegral,Oa=NS.Prelude.Bool,Ba=NS.Prelude.Maybe,h=NS.Prelude.maybe,l=NS.Prelude.Either,p=NS.Prelude.String,v=NS.Prelude.curry,F=NS.Prelude.Monad,S=NS.Prelude.id,O=NS.Prelude.const_,qa=NS.Prelude.compose,la=NS.Prelude.flip,Xa=NS.Prelude.call;p=NS.Prelude.asTypeOf;var Q=NS.Prelude.error,H=NS.Prelude.map;w=NS.Prelude.append;w=NS.Prelude.filter;w=NS.Prelude.head;
w=NS.Prelude.last;w=NS.Prelude.tail;w=NS.Prelude.init;var T=NS.Prelude.null_;w=NS.Prelude.length;w=NS.Prelude.index;w=NS.Prelude.reverse;var Ja=NS.Prelude.foldl;w=NS.Prelude.foldl1;var K=NS.Prelude.foldr;w=NS.Prelude.foldr1;w=NS.Prelude.and;w=NS.Prelude.or;w=NS.Prelude.any;w=NS.Prelude.all;w=NS.Prelude.sum;w=NS.Prelude.product;w=NS.Prelude.concat;w=NS.Prelude.concatMap;w=NS.Prelude.maximum;w=NS.Prelude.minimum;w=NS.Prelude.scanl;w=NS.Prelude.scanl1;w=NS.Prelude.scanr;w=NS.Prelude.scanr1;var Ma=NS.Prelude.replicate;
w=NS.Prelude.take;w=NS.Prelude.drop;w=NS.Prelude.splitAt;w=NS.Prelude.takeWhile;w=NS.Prelude.dropWhile;w=NS.Prelude.span;w=NS.Prelude.break_;var Sb=NS.Prelude.elem;w=NS.Prelude.notElem;w=NS.Prelude.lookup;var Cb=NS.Prelude.zip;w=NS.Prelude.zip3;w=NS.Prelude.zipWith;w=NS.Prelude.zipWith3;w=NS.Prelude.unzip;w=NS.Prelude.unzip3;w=NS.Prelude.lines;w=NS.Prelude.words;w=NS.Prelude.unlines;w=NS.Prelude.unwords;Oa=NS.Haskell.Bool;var rb=NS.Haskell.isArray,$=NS.Haskell.slice,Ya=NS.Haskell.isort,pa=NS.Haskell.extend;
Oa=NS.Haskell.namespace;var ga=NS.Haskell.negate,ua=NS.Haskell.evalThunks;v=NS.Haskell.curry;Q=NS.Haskell.error;Q=NS.Haskell.data;var wa=NS.Haskell.record,X=NS.Haskell.instance,Ia=NS.Haskell.getInstance;p=NS.Haskell.asTypeOf;var lb=NS.Haskell.operators,Vb=NS.Haskell.infix,aa=NS.Haskell.infixl,bc=NS.Haskell.infixr,ib=NS.Haskell.resolve,ec=NS.Haskell.exl,ja=NS.Haskell.exs,N=NS.Haskell.Scope;p=NS.Data_Char.String;var t=NS.Data_Char.isSpace,Ca=NS.Data_Char.isUpper,ha=NS.Data_Char.isLower,eb=NS.Data_Char.isAlpha,
ob=NS.Data_Char.isAlphaNum,Pa=NS.Data_Char.isDigit,Ob=NS.Data_Char.isHexDigit,vb=NS.Data_Char.isOctDigit,Za=NS.Data_Char.digitToInt;w=NS.Data_List.append;w=NS.Data_List.head;w=NS.Data_List.last;w=NS.Data_List.tail;w=NS.Data_List.init;T=NS.Data_List.null_;w=NS.Data_List.length;H=NS.Data_List.map;w=NS.Data_List.reverse;Ja=NS.Data_List.foldl;w=NS.Data_List.foldl1;K=NS.Data_List.foldr;w=NS.Data_List.foldr1;w=NS.Data_List.concat;w=NS.Data_List.concatMap;w=NS.Data_List.and;w=NS.Data_List.or;w=NS.Data_List.any;
w=NS.Data_List.all;w=NS.Data_List.sum;w=NS.Data_List.product;w=NS.Data_List.maximum;w=NS.Data_List.minimum;w=NS.Data_List.scanl;w=NS.Data_List.scanl1;w=NS.Data_List.scanr;w=NS.Data_List.scanr1;Ma=NS.Data_List.replicate;w=NS.Data_List.take;w=NS.Data_List.drop;w=NS.Data_List.splitAt;w=NS.Data_List.takeWhile;w=NS.Data_List.dropWhile;w=NS.Data_List.span;w=NS.Data_List.break_;Sb=NS.Data_List.elem;w=NS.Data_List.notElem;w=NS.Data_List.lookup;w=NS.Data_List.filter;w=NS.Data_List.index;w=NS.Data_List.elemIndex;
Cb=NS.Data_List.zip;w=NS.Data_List.zip3;w=NS.Data_List.zipWith;w=NS.Data_List.zipWith3;w=NS.Data_List.unzip;w=NS.Data_List.unzip3;w=NS.Data_List.lines;w=NS.Data_List.words;w=NS.Data_List.unlines;w=NS.Data_List.unwords;var a=NS.Data_List.nub,c;V.prototype={memoize:false,scrollTo:function(e){this.index=e;this.length=this.input.length-e;return this},scroll:function(e){this.index+=e;this.length-=e;return this},dropped:0,at:function(e){return this.input.charAt(this.index+e)},substring:function(e,k){return this.input.substring(e+
this.index,(k||this.length)+this.index)},substr:function(e,k){return this.input.substring(e+this.index,k||this.length)},toString:function(){var e=this.substring(0);return"PS at "+this.index+" "+(e.length?'"'+e+'"':"Empty")},getCached:function(e){if(this.memoize)if(e=this.cache[e])if(e=e[this.index]){this.index=e.index;this.length=e.length;return e}},putCached:function(e,k,o){if(!this.memoize)return false;o.index=this.index;o.length=this.length;var E=this.cache[e];E||(E=this.cache[e]={});E[k]=o},sourceLine:function(e){return(e=
this.input.substring(0,e).match(/(\r\n)|\r|\n/g))?e.length:0}};var m=Gb,z=oa;w=z;var ma=0,fa=function(e,k){function o(E,G,q){return function(){return e(E,G,function(D){return D.success?k(E,G,q):q(D)})}}o.constructor=ca;return o},L=function(){function e(o,E,G){o=new N(o);for(var q=1,D=k.length,b=k[0];q<D;++q)b=fa(b,k[q]);return b(o,E,G)}var k=H(Ea,arguments);e.constructor=ca;return e},za=qa(ea,Ab),jb=Hb,d=Ib,f=$a,B=f;qa=Va;var R=fa,Qa=ra,fb=Mb(false),pb=Mb(true),ba=Bb(function(e,k,o,E){if(k.success)return k;
o.scrollTo(E);return{ast:c,success:false,expecting:k.expecting}}),na=function(e){return Bb(function(k,o){return{ast:c,success:o.success,expecting:o.expecting}})(fb(e),null)},i=ab(function(e,k){if(k.length>0&&k.at(0)==e){k.scroll(1);return{ast:e,success:true}}return{success:false,expecting:e}}),s=ab(function(e,k){var o=k.at(0);if(k.length>0&&e(o)){k.scroll(1);return{ast:o,success:true}}return{success:false,expecting:o}}),I=function(e){return Bb(function(k,o,E,G){k=o.ast.join("");return{ast:k.length?
k:c,success:o.success,expecting:o.success?c:{at:G,expecting:e}}})(Lb(H(i,e)),null)},u=Bb(function(e,k,o,E){return k.success?k:{ast:k.ast,success:false,expecting:{at:E,expecting:e}}}),va=ab(function(e,k){if(typeof e=="string")if(k.substring(0,e.length)==e){k.scroll(e.length);return{ast:e,success:true}}else return{success:false,expecting:e};else if(e.exec){var o=new RegExp("^"+e.source),E=k.substring(0);o=(o=(o=o.exec(E))&&o[0])&&o.length;E=E.substr(0,o);if(o){k.scroll(o);return{ast:E,success:true}}else return{success:false,
expecting:e.source}}});pa(lb,{"<-":{func:A,fixity:bc(-1)},">>=":{func:Fa,fixity:aa(1)},"=<<":{func:la(Fa),fixity:bc(1)},">>":{func:R,fixity:aa(1)},"*>":{func:R,fixity:aa(4)},"<*":{func:Kb,fixity:aa(4)},"<$>":{func:qa,fixity:aa(4)},"<*>":{func:Ga,fixity:aa(4)},"<**>":{func:v(Ta)(la(Xa)),fixity:aa(4)},"<$":{func:function(e,k){return Kb(B(value),k)},fixity:aa(4)},"<|>":{func:ra,fixity:bc(1)},"<?>":{func:u,fixity:Vb(0)}});X(F,ca,function(){return{">>=":Fa,">>":fa,do_:L,return_:$a,fail:Gb,run:Ra,do$:function(){function e(q,
D,b){return E(q,D,b)}function k(q,D,b){if(G||q instanceof N)return(G?E:k.resolve())(q,D,b);o.push(ib(arguments,e));return k}var o=[],E,G;o.push(ib(arguments,e));k.resolve=function(){if(G)return E;E=L.apply(null,o);G=true;o=null;return E};k.CallStream=true;k.constructor=ca;return k}}});var M=Ia(F,ca).do$,sa=ec(ca);Oa("Text_Parsec_Prim",{sequence:Rb,run:Ra,Parser:ca,ParseState:V,ps:qb,toParser:Ea,unexpected:da,parsecMap:qa,fmap:qa,liftM:Va,liftM2:Ta,liftM3:Aa,liftA:qa,liftA2:Ta,liftA3:Aa,ap:Ga,parserBind:Fa,
parserReturn:$a,return_:f,pure:B,parserFail:Gb,fail:m,parserZero:oa,mzero:z,empty:w,parserPlus:ra,parserPlusN:La,mplus:Qa,do_:L,do$:M,do2:fa,bind:A,ret:ea,withBound:Ab,returnCall:za,getPosition:Hb,setPosition:Ib,getParserState:jb,setParserState:d,tokens:Lb,many:fb,many1:pb,string:I,char_:i,satisfy:s,label:u,try_:ba,skipMany:na,match:va,withScope:Ub,ex:sa});var Yb=function(e){return u(s(function(k){return Sb(k,e)}),"oneOf("+e+")")},mc=function(e){return u(s(function(k){return!Sb(k,e)}),"noneOf("+e+
")")},oc=ja(s,t,"<?>","space");F=ja(na,oc,"<?>","white space");la=ja(i,"\n","<?>","new-line");Xa=ja(i,"\t","<?>","tab");var wb=ja(s,Ca,"<?>","uppercase letter");ha=ja(s,ha,"<?>","lowercase letter");ob=ja(s,ob,"<?>","letter or digit");Ca=ja(s,eb,"<?>","letter");var tc=ja(s,Pa,"<?>","digit"),uc=ja(s,Ob,"<?>","hexadecimal digit"),vc=ja(s,vb,"<?>","octal digit");O=ja(s,O(true));Oa("Text_Parsec_Char",{oneOf:Yb,noneOf:mc,space:oc,spaces:F,newline:la,tab:Xa,upper:wb,lower:ha,alphaNum:ob,letter:Ca,digit:tc,
hexDigit:uc,octDigit:vc,anyChar:O});Oa("Text_Parsec_Combinator",{choice:Ha,count:U,between:mb,option:bb,optionMaybe:ta,optional:Xb,skipMany1:tb,sepBy:Na,sepBy1:ub,endBy:gb,endBy1:Eb,sepEndBy:xa,sepEndBy1:Nb,chainl:Jb,chainl1:hb,chainr:Tb,chainr1:J,eof:ya,notFollowedBy:Y,manyTill:P,lookAhead:nb,anyToken:Zb});Q(cb,[["LanguageDef",{commentStart:p,commentEnd:p,commentLine:p,nestedComments:Boolean,identStart:ca,identLetter:ca,opStart:ca,opLetter:ca,reservedNames:Array,reservedOpNames:Array,caseSensitive:Boolean}]]);
Q(Wb,[["TokenParser",{identifier:ca,reserved:Function,operator:ca,reservedOp:Function,charLiteral:ca,stringLiteral:ca,natural:ca,integer:ca,float_:ca,naturalOrFloat:ca,decimal:ca,hexadecimal:ca,octal:ca,symbol:Function,lexeme:Function,whiteSpace:ca,parens:Function,braces:Function,angles:Function,brackets:Function,squares:Function,semi:ca,comma:ca,colon:ca,dot:ca,semiSep:Function,semiSep1:Function,commaSep:Function,commaSep1:Function}]]);Oa("Text_Parsec_Token",{GenLanguageDef:cb,GenTokenParser:Wb,
makeTokenParser:ia});Pa=Yb(":!#$%&*+./<=>?@\\^|-~");O=cb.LanguageDef(wa,{commentStart:"",commentEnd:"",commentLine:"",nestedComments:true,identStart:ja(Ca,"<|>",i("_")),identLetter:ja(ob,"<|>",Yb("_'")),opStart:Pa,opLetter:Pa,reservedOpNames:[],reservedNames:[],caseSensitive:true});p=cb.LanguageDef(wa,{commentStart:"{-",commentEnd:"-}",commentLine:"--",nestedComments:true,identStart:Ca,identLetter:ja(ob,"<|>",Yb,"_'"),opStart:Pa,opLetter:Pa,reservedOpNames:[],reservedNames:[],caseSensitive:true});
Pa=cb.LanguageDef(wa,{commentStart:"/*",commentEnd:"*/",commentLine:"//",nestedComments:true,identStart:Ca,identLetter:ja(ob,"<|>",Yb,"_'"),opStart:Pa,opLetter:Pa,reservedOpNames:[],reservedNames:[],caseSensitive:false});Ob=p.update({reservedOpNames:["::","..","=","\\","|","<-","->","@","~","=>"],reservedNames:["let","in","case","of","if","then","else","data","type","class","default","deriving","do","import","infix","infixl","infixr","instance","module","newtype","where","primitive"]});var Bc=Ob.update({identLetter:ja(Ob.identLetter,
"<|>",i("#")),reservedNames:Ob.reservedNames.concat(["foreign","import","export","primitive","_ccall_","_casm_","forall"])}),wc=Pa.update({reservedNames:["case","class","default","extends","import","in","let","new","of","package"],caseSensitive:true});Oa("Text_Parsec_Language",{emptyDef:O,haskellStyle:p,javaStyle:Pa,haskellDef:Bc,mondrianDef:wc,getHaskell:function(){return ia(Bc)},getMondrian:function(){return ia(wc)}});Q(yb,["AssocNone","AssocLeft","AssocRight"]);Q(Wa,[["Infix",ca,yb],["Prefix",
ca],["Postfix",ca]]);Oa("Text_Parsec_Expr",{Assoc:yb,Operator:Wa,buildExpressionParser:zb})})();(function(){namespace("Text_Parsec");importSubmodules("Text_Parsec",["Prim","Char","Combinator","Token","Language","Expr"])})();(function(){function V(){}function qb(){}function da(){}function Gb(i){if(!(i instanceof da))throw"Type error: expecting type of 'Id' instead of "+i.constructor;return i.Id?i[1]:null}function oa(){}function Ea(){}function Ra(){}function Z(){}function ca(){}function Fa(){}function A(){}
function ea(){}function Ab(){}function Hb(){}function Ib(){}function $a(){}function Ga(i,s){for(var I=!!s.charAt,u=0,va=s.length;u<va;++u)if(!i(I?s.charAt(u):s[u]))break;return ib(s,u)}function Va(i,s,I){return function(u,va,M){return(va.sourceLine(u[i])==va.sourceLine(u[s])?Jb(xa($.Just,I),U($.Nothing)):U($.Nothing))(u,va,M)}}function Ta(i,s,I){return function(u,va,M){return(va.sourceLine(u[i])==va.sourceLine(u[s])?I:ub("end of line"))(u,va,M)}}function Aa(i,s,I){var u=s.input.substring(0,s.index-
s.dropped).match(/\s*$/);u=u&&/\n|\r/.test(u[0]);var va;if(!u){var M=s.at(0);if(M==""||M=="}")u=true;else if(M==";")va=u=true}return(u?va?t.semi:U(null):Tb("end of statement"))(i,s,I)}function Kb(i){return i==" "||i=="\t"}function ra(i){return function(s,I,u){return La(i)(s,I,u)}}function La(i){return ka([ia(i),">>",U,""],"<|>",[J(Wa,[Wb,"\\'"])("cs","<-",ra(i))(ya,function(s){return"'"+s.cs})],"<|>",[J(ia("\\"))("c","<-",B,"<|>",R,"<|>",Qa,"<|>",ia("\r"),"<|>",ia("\n"))("cs","<-",ra(i))(ya,function(s){return s.c==
"\r"||s.c=="\n"?K(s.c,Ga(Kb,s.cs)):K(s.c,s.cs)})],"<|>",[Eb,K,Oa,ra(i)])}function Lb(i,s,I){return s>=1?Lb(i,s/10,I):(i+s)*Math.pow(10,I)}function Mb(i){return ka(i,">>=",[U,".",$.Just])}function ab(i,s){return hb(Zb("pos",P),Zb("e",s),ya(function(I){return i(I.pos,I.e)}))}function Bb(i){function s(I,u){return A.DotRef(I,i,u)}return ka([t.reservedOp("."),">>",ab,s,vb],"<?>","property.ref")}function Ub(i){function s(I,u){return A.CallExpr(I,i,u)}return ka([t.parens,"$",ab,s,[Pa,ja(l),t.comma]],"<?>",
"(function application)")}function Rb(i){function s(I,u){return A.BracketRef(I,i,u)}return ka([t.brackets,"$",ab,s,Pa],"<?>","[property-ref]")}function Ha(i){if(i.Just){i=i[0];return ka(J("e_","<-",Bb(i),"<|>",Rb(i))(function(s,I,u){return Ha($.Just(s.e_))(s,I,u)}),"<|>",U(i))}if(i.Nothing)return J("e","<-",ob,"<?>","expression (3)")(function(s,I,u){return Ha($.Just(s.e))(s,I,u)})}function bb(i){if(i.Just){i=i[0];return ka(J("e_","<-",Bb(i),"<|>",Ub(i),"<|>",Rb(i))(function(s,I,u){return bb($.Just(s.e_))(s,
I,u)}),"<|>",U(i))}if(i.Nothing)return J("e","<-",ob,"<?>","expression (3)")(function(s,I,u){return bb($.Just(s.e))(s,I,u)})}function ta(i,s){i=J("pos","<-",P)(t.reservedOp(i))(ya,function(I){return function(u,va){return A.InfixExpr(I.pos,s,u,va)}});return la.Infix(i,qa.AssocLeft)}function Xb(i,s){if(s.VarRef)if(s[1].Id)return U(Fa.LVar(s[0],s[1][1]));if(s.DotRef)if(s[2].Id)return U(Fa.LDot(s[0],s[1],s[2][1]));if(s.BracketRef)return U(Fa.LBracket(s[0],s[1],s[2]));return Tb("expeceted l-value at "+
i)}function mb(i,s){return function(I){return A.UnaryAssignExpr(i,Ra[s],I)}}function tb(i,s){return function(I,u,va){var M=u.substring(0,2);if(M=="--"||M=="++"){M=u.input.substring(0,u.index-u.dropped).match(/\s*$/);return(M&&/\n|\r/.test(M[0])?s:i)(I,u,va)}else return s(I,u,va)}}var Na=NS.Text_Parsec.sequence,ub=NS.Text_Parsec.unexpected,Nb=NS.Text_Parsec.fmap,xa=NS.Text_Parsec.liftM,Eb=NS.Text_Parsec.liftM2,gb=NS.Text_Parsec.parserBind,U=NS.Text_Parsec.return_,Tb=NS.Text_Parsec.fail,Jb=NS.Text_Parsec.parserPlus,
hb=NS.Text_Parsec.do_,J=NS.Text_Parsec.do$,Zb=NS.Text_Parsec.bind,ya=NS.Text_Parsec.ret,Y=NS.Text_Parsec.returnCall,P=NS.Text_Parsec.getPosition,nb=NS.Text_Parsec.many,cb=NS.Text_Parsec.many1,Wb=NS.Text_Parsec.string,ia=NS.Text_Parsec.char_,yb=NS.Text_Parsec.label,Wa=NS.Text_Parsec.try_,zb=NS.Text_Parsec.withScope,ka=NS.Text_Parsec.ex,db=NS.Text_Parsec.oneOf,w=NS.Text_Parsec.noneOf,Sa=NS.Text_Parsec.spaces,Ka=NS.Text_Parsec.alphaNum,Db=NS.Text_Parsec.letter,sb=NS.Text_Parsec.hexDigit,Oa=NS.Text_Parsec.anyChar,
Ba=NS.Text_Parsec.option,h=NS.Text_Parsec.optionMaybe,l=NS.Text_Parsec.sepBy,p=NS.Text_Parsec.sepBy1,v=NS.Text_Parsec.sepEndBy,F=NS.Text_Parsec.notFollowedBy,S=NS.Text_Parsec.GenLanguageDef,O=NS.Text_Parsec.makeTokenParser,qa=NS.Text_Parsec.Assoc,la=NS.Text_Parsec.Operator,Xa=NS.Text_Parsec.buildExpressionParser,Q=NS.Haskell_DataType.data,H=NS.Haskell_DataType.ADT;H=NS.Haskell_DataType.record;var T=NS.Haskell_DataType.accessor;T=NS.Haskell_DataType.accessors;var Ja=NS.Haskell_DataType.showConstrOf,
K=NS.Prelude.cons,Ma=NS.Prelude.readHex,Sb=NS.Prelude.readOct,Cb=NS.Prelude.round,rb=NS.Prelude.Bool,$=NS.Prelude.Maybe,Ya=NS.Prelude.maybe,pa=NS.Prelude.String,ga=NS.Prelude.fst;Q=NS.Prelude.curry;var ua=NS.Prelude.uncurry,wa=NS.Prelude.id;T=NS.Prelude.asTypeOf;var X=NS.Prelude.error,Ia=NS.Prelude.map;Ga=NS.Prelude.dropWhile;var lb=NS.Prelude.elem,Vb=NS.Prelude.lookup,aa=NS.Prelude.Show;pa=NS.Data_Char.String;var bc=NS.Data_Char.chr;rb=NS.Haskell.Bool;var ib=NS.Haskell.slice,ec=NS.Haskell.namespace;
rb=NS.Haskell.negate;Q=NS.Haskell.curry;X=NS.Haskell.error;Q=NS.Haskell.data;H=NS.Haskell.ADT;H=NS.Haskell.record;T=NS.Haskell.accessor;T=NS.Haskell.accessors;Ja=NS.Haskell.showConstrOf;T=NS.Haskell.asTypeOf;var ja=NS.Haskell.op,N=NS.Haskell.exs;Db=Jb(Db,db("$_"));Ka=S.LanguageDef(H,{commentStart:"/*",commentEnd:"*/",commentLine:"//",nestedComments:false,identStart:Db,identLetter:Jb(Ka,db("$_")),opStart:db("{}<>()~.,?:|&^=!+-*/%!"),opLetter:db("=<>|&+"),reservedOpNames:["|=","^=","&=","<<=",">>=",
">>>=","+=","-=","*=","/=","%=","=",";",",","?",":","||","&&","|","^","&","===","==","=","!==","!=","<<","<=","<",">>>",">>",">=",">","++","--","+","-","*","/","%","!","~",".","[","]","{","}","(",")","instanceof","in"],reservedNames:["break","case","catch","const","continue","debugger","default","delete","do","else","enum","false","finally","for","function","if","instanceof","in","let","new","null","return","switch","this","throw","true","try","typeof","var","void","while","with"],caseSensitive:true});
var t=O(Ka);ec("BrownPLT_JavaScript_Lexer",{lex:t});Q(qb,[["Script","a",Array]]);Q(da,[["Id","a",pa]]);Q(oa,["OpLT","OpLEq","OpGT","OpGEq","OpIn","OpInstanceof","OpEq","OpNEq","OpStrictEq","OpStrictNEq","OpLAnd","OpLOr","OpMul","OpDiv","OpMod","OpSub","OpLShift","OpSpRShift","OpZfRShift","OpBAnd","OpBXor","OpBOr","OpAdd"]);Q(Ea,["OpAssign","OpAssignAdd","OpAssignSub","OpAssignMul","OpAssignDiv","OpAssignMod","OpAssignLShift","OpAssignSpRShift","OpAssignZfRShift","OpAssignBAnd","OpAssignBXor","OpAssignBOr"]);
Q(Ra,["PrefixInc","PrefixDec","PostfixInc","PostfixDec"]);Q(Z,["PrefixLNot","PrefixBNot","PrefixPlus","PrefixMinus","PrefixTypeof","PrefixVoid","PrefixDelete"]);Q(ca,[["PropId","a",da],["PropString","a",pa],["PropNum","a",Number]]);Q(Fa,[["LVar","a",pa],["LDot","a",A,pa],["LBracket","a",A,A]]);Q(A,[["StringLit","a",pa],["RegexpLit","a",pa,Boolean,Boolean],["NumLit","a",Number],["IntLit","a",Number],["BoolLit","a",Boolean],["NullLit","a"],["ArrayLit","a",Array],["ObjectLit","a",Array],["ThisRef","a"],
["VarRef","a",da],["DotRef","a",A,da],["BracketRef","a",A,A],["NewExpr","a",A,Array],["PrefixExpr","a",Z,A],["UnaryAssignExpr","a",Ra,Fa],["InfixExpr","a",oa,A,A],["CondExpr","a",A,A,A],["AssignExpr","a",Ea,Fa,A],["ParenExpr","a",A],["ListExpr","a",Array],["CallExpr","a",A,Array],["FuncExpr","a",$,Array,V]]);Q(ea,[["CaseClause","a",A,Array],["CaseDefault","a",Array]]);Q(Ab,[["CatchClause","a",da,V]]);Q(Hb,[["VarDecl","a",da,$]]);Q(Ib,["NoInit",["VarInit",Array],["ExprInit",A]]);Q($a,[["ForInVar",
da],["ForInNoVar",da]]);Q(V,[["BlockStmt","a",Array],["EmptyStmt","a"],["ExprStmt","a",A],["IfStmt","a",A,V,V],["IfSingleStmt","a",A,V],["SwitchStmt","a",A,Array],["WhileStmt","a",A,V],["DoWhileStmt","a",V,A],["BreakStmt","a",$],["ContinueStmt","a",$],["LabelledStmt","a",da,V],["ForInStmt","a",$a,A,V],["ForStmt","a",Ib,$,$,V],["TryStmt","a",V,Array,$],["ThrowStmt","a",A],["ReturnStmt","a",$],["WithStmt","a",A,V],["VarDeclStmt","a",Array],["FunctionStmt","a",da,Array,V]]);ec("BrownPLT_JavaScript_Syntax",
{Expression:A,CaseClause:ea,Statement:V,InfixOp:oa,CatchClause:Ab,VarDecl:Hb,JavaScript:qb,AssignOp:Ea,Id:da,PrefixOp:Z,Prop:ca,ForInit:Ib,ForInInit:$a,unId:Gb,UnaryAssignOp:Ra,LValue:Fa});var Ca=zb(function(){return Ca}),ha=zb(function(){return ha}),eb=zb(function(){return eb}),ob=zb(function(){return ob}),Pa=zb(function(){return Pa}),Ob=Pa,vb=Eb(da.Id,P,t.identifier);pa=J("pos","<-",P)(t.reserved,"if")("test","<-",eb,"<?>","parenthesized test-expression in if statement")("consequent","<-",ha,"<?>",
"true-branch of if statement")(J(t.reserved,"else")("alternate","<-",ha)(ya,function(i){return V.IfStmt(i.scope.pos,i.scope.test,i.scope.consequent,i.alternate)}),"<|>",Y(V.IfSingleStmt,"pos","test","consequent"));O=J("pos","<-",P)(t.reserved,"default")(t.colon)("statements","<-",nb,ha)(Y,ea.CaseDefault,"pos","statements");Ka=J("pos","<-",P)(t.reserved,"case")("condition","<-",Ca)(t.colon)("actions","<-",nb,ha)(Y,ea.CaseClause,"pos","condition","actions");Ka=J("pos","<-",P)(t.reserved,"switch")("test",
"<-",eb)("clauses","<-",t.braces,"$",nb,"$",O,"<|>",Ka)(Y,V.SwitchStmt,"pos","test","clauses");S=J("pos","<-",P)(t.reserved,"while")("test","<-",eb,"<?>","parenthesized test-expression in while loop")("body","<-",ha)(Y,V.WhileStmt,"pos","test","body");O=J("pos","<-",P)("statements","<-",t.braces,[nb,ha])(Y,V.BlockStmt,"pos","statements");Q=J("pos","<-",P)(t.reserved,"do")("body","<-",O)(t.reserved,"while","<?>","while at the end of a do block")("test","<-",eb,"<?>","parenthesized test-expression in do loop")(Aa)(Y,
V.DoWhileStmt,"pos","body","test");H=J("pos","<-",P)(t.reserved,"continue")("pos_","<-",P)("id","<-",Va,"pos","pos_",vb)(Aa)(Y,V.ContinueStmt,"pos","id");T=J("pos","<-",P)(t.reserved,"break")("pos_","<-",P)("id","<-",Va,"pos","pos_",vb)(Aa)(Y,V.BreakStmt,"pos","id");var Za=J("pos","<-",P)(t.semi)(Y,V.EmptyStmt,"pos"),a=J("pos","<-",P)("label","<-",Wa,J("label","<-",vb)(t.colon)(ya,"label"))("statement","<-",ha)(Y,V.LabelledStmt,"pos","label","statement"),c=J("pos","<-",P)("expr","<-",Ca)(Aa)(Y,V.ExprStmt,
"pos","expr"),m=ka([t.reserved,"var",">>",xa,$a.ForInVar,vb],"<|>",[xa,$a.ForInNoVar,vb]);m=J("pos","<-",P)("init_expr","<-",Wa,J(t.reserved,"for")(t.parens,J("init","<-",m)(t.reserved,"in")("expr","<-",Pa)(ya,function(i){return[i.init,i.expr]})))("body","<-",ha)(ya,function(i){return V.ForInStmt(i.pos,i.init_expr[0],i.init_expr[1],i.body)});var z=J("pos","<-",P)("id","<-",vb)("init","<-",[t.reservedOp("="),">>",xa,$.Just,Pa],"<|>",U($.Nothing))(Y,Hb.VarDecl,"pos","id","init"),ma=J("pos","<-",P)(t.reserved,
"var")("decls","<-",z,ja(l),t.comma)(Aa)(Y,V.VarDeclStmt,"pos","decls");z=ka([t.reserved,"var",">>",xa,Ib.VarInit,[z,ja(l),t.comma]],"<|>",[xa,Ib.ExprInit,Ca],"<|>",U(Ib.NoInit));z=J("pos","<-",P)(t.reserved,"for")(t.reservedOp("("))("init","<-",z)(t.semi)("test","<-",[xa,$.Just,Pa],"<|>",U($.Nothing))(t.semi)("iter","<-",[xa,$.Just,Ca],"<|>",U($.Nothing))(t.reservedOp(")"),"<?>","closing paren")("stmt","<-",ha)(Y,V.ForStmt,"pos","init","test","iter","stmt");var fa=J("pos","<-",P)(t.reserved,"catch")("id",
"<-",t.parens,vb)("stmt","<-",ha)(Y,Ab.CatchClause,"pos","id","stmt");fa=J(t.reserved,"try")("pos","<-",P)("guarded","<-",ha)("catches","<-",nb,fa)("finally","<-",[t.reserved,"finally",">>",xa,$.Just,ha],"<|>",U($.Nothing))(Y,V.TryStmt,"pos","guarded","catches","finally");var L=J("pos","<-",P)(t.reserved,"throw")("pos_","<-",P)("expr","<-",Ta,"pos","pos_",Pa)(Aa)(Y,V.ThrowStmt,"pos","expr"),za=J("pos","<-",P)(t.reserved,"return")("pos_","<-",P)("expr","<-",Va,"pos","pos_",Ca)(Aa)(Y,V.ReturnStmt,"pos",
"expr"),jb=J("pos","<-",P)(t.reserved,"with")("context","<-",eb)("stmt","<-",ha)(Y,V.WithStmt,"pos","context","stmt"),d=J("pos","<-",P)("name","<-",Wa,[t.reserved,"function",">>",vb])("args","<-",t.parens,[vb,ja(l),t.comma])("body","<-",O,"<?>","function body in { ... }")(Y,V.FunctionStmt,"pos","name","args","body");ha=ka(pa,"<|>",Ka,"<|>",S,"<|>",Q,"<|>",H,"<|>",T,"<|>",O,"<|>",Za,"<|>",m,"<|>",z,"<|>",fa,"<|>",L,"<|>",za,"<|>",jb,"<|>",ma,"<|>",d,"<|>",a,"<|>",c,"<?>","statement");pa=J("pos","<-",
P)(t.reserved,"this")(Y,A.ThisRef,"pos");Ka=J("pos","<-",P)(t.reserved,"null")(Y,A.NullLit,"pos");S=J("pos","<-",P)("true","<-",U,true)("false","<-",U,false)([t.reserved,"true",">>",Y(A.BoolLit,"pos","true")],"<|>",[t.reserved,"false",">>",Y(A.BoolLit,"pos","false")]);Q=Eb(A.VarRef,P,vb);H=Eb(A.ArrayLit,P,t.squares(v(Pa,t.comma)));T=J("pos","<-",P)(t.reserved,"function")("name","<-",[vb,">>=",U,".",$.Just],"<|>",U,$.Nothing)("args","<-",t.parens,[vb,ja(l),t.comma])("body","<-",O)(Y,A.FuncExpr,"pos",
"name","args","body");var f=[["'","'"],['"','"'],["\\","\\"],["b","\u0008"],["f","\u000c"],["n","\n"],["r","\r"],["t","\t"],["v","\u000b"],["/","/"],[" "," "],["0","\u0000"]];ga=Ia(ga,f);var B=J("c","<-",db(ga))(ya,function(i){return Vb(i.c,f)[0]}),R=J(ia,"x")("d1","<-",sb)("d2","<-",sb)(ya,function(i){return bc(Ma(""+i.d1+i.d2))}),Qa=J(ia,"u")(xa,[bc,".",Ma],Na([sb,sb,sb,sb]));Na=J("pos","<-",P)("str","<-",t.lexeme,"$",[ia("'"),">>=",La],"<|>",[ia('"'),">>=",La])(Y,A.StringLit,"pos","str");sb=J("flags",
"<-",nb,db("mgi"))(ya,function(i){return function(s){return s(lb("g",i.flags),lb("i",i.flags))}});ka(ia("\\"),">>",Oa).resolve();w("/");w=function(i,s,I){return fb(i,s,I)};var fb=ka([ia("/"),">>",U,""],"<|>",J(ia("\\"))("ch","<-",Oa)("rest","<-",w)(ya,function(i){return"\\"+i.ch+i.rest}),"<|>",[Eb,K,Oa,w]);Sa=J("pos","<-",P)(ia("/"))("pat","<-",fb)("flags","<-",sb)(Sa)(ya,function(i){return i.flags(function(s,I){return A.RegexpLit(i.pos,i.pat,s,I)})});ua=J("name","<-",[xa,ua(ca.PropString),[xa,function(i){return[i[0],
i[1]]},Na]],"<|>",[Eb,ca.PropId,P,vb],"<|>",[Eb,ca.PropNum,P,t.decimal])(t.colon)("val","<-",Ob)(ya,function(i){return[i.name,i.val]});v=J("pos","<-",P)("props","<-",t.braces,[ua,ja(v),t.comma],"<?>","object literal")(Y,A.ObjectLit,"pos","props");ua=J(Wa,Wb("0x"))("digits","<-",cb,db("0123456789abcdefABCDEF"))("hex","<-",Y,Ma,"digits")(ya,function(i){return[true,i.hex]});cb=J("digits","<-",Wa,"$",[ia("0"),">>",[cb,db("01234567"),"<|>",U("0")]],"<*",F,db(".89"))("oct","<-",Y,Sb,"digits")(ya,function(i){return[true,
i.oct]});Nb=J(db,"eE")([ia("+"),">>",t.decimal],"<|>",[ia("-"),">>",rb,ja(Nb),t.decimal],"<|>",t.decimal);Ba=ka(J("whole","<-",t.decimal)("mfrac","<-",Ba,$.Nothing,[Mb,[ia("."),">>",t.decimal]])("mexp","<-",Ba,$.Nothing,[Mb,Nb])(ya,function(i){return i.mfrac==$.Nothing&&i.mexp==$.Nothing?[true,i.whole]:[false,Lb(i.whole,Ya(0,wa,i.mfrac),Ya(0,wa,i.mexp))]}),"<|>",J("frac","<-",ia("."),">>",t.decimal)("exp","<-",Ba,0,Nb)(ya,function(i){return[false,Lb(0,i.frac,i.exp)]}));Ba=J("pos","<-",P)("isint_num",
"<-",t.lexeme,"$",ua,"<|>",cb,"<|>",Ba)(F,Db,"<?>","whitespace")(ya,function(i){var s=i.isint_num[1];return i.isint_num[0]?A.IntLit(i.pos,Cb(s)):A.NumLit(i.pos,s)});eb=ab(A.ParenExpr,t.parens(Ca));ka(pa,"<|>",Ka,"<|>",S,"<|>",Na,"<|>",H,"<|>",eb,"<|>",ob,"<|>",Ba,"<|>",Sa,"<|>",v,"<|>",Q);Ba=ka(pa,"<|>",Ka,"<|>",S,"<|>",Na,"<|>",H,"<|>",eb,"<|>",T,"<|>",Ba,"<|>",Sa,"<|>",v,"<|>",Q);ob=ka(J("pos","<-",P)(t.reserved,"new")("constructor_","<-",Ha,$.Nothing)("arguments","<-",[Wa,[t.parens,[Pa,ja(l),t.comma]]],
"<|>",U([]))(Y,A.NewExpr,"pos","constructor_","arguments"),"<|>",Ba);var pb=J("pos","<-",P)("op","<-",h,"$",[t.reservedOp("!"),">>",U,Z.PrefixLNot],"<|>",[t.reservedOp("~"),">>",U,Z.PrefixBNot],"<|>",[Wa,[t.lexeme,"$",ia("-"),">>",F,ia("-")],">>",U,Z.PrefixMinus],"<|>",[Wa,[t.lexeme,"$",ia("+"),">>",F,ia("+")],">>",U,Z.PrefixPlus],"<|>",[t.reserved,"typeof",">>",U,Z.PrefixTypeof],"<|>",[t.reserved,"void",">>",U,Z.PrefixVoid],"<|>",[t.reserved,"delete",">>",U,Z.PrefixDelete])(function(i,s,I){var u=
i.op,va;if(u.Nothing)va=na;if(u.Just)va=J("innerExpr","<-",pb)(ya,function(M){return A.PrefixExpr(i.pos,u[0],M.innerExpr)});return va(i,s,I)});F=[[ta("*",oa.OpMul),ta("/",oa.OpDiv),ta("%",oa.OpMod)],[ta("+",oa.OpAdd),ta("-",oa.OpSub)],[ta("<<",oa.OpLShift),ta(">>",oa.OpSpRShift),ta(">>>",oa.OpZfRShift)],[ta("<",oa.OpLT),ta("<=",oa.OpLEq),ta(">",oa.OpGT),ta(">=",oa.OpGEq),ta("instanceof",oa.OpInstanceof),ta("in",oa.OpIn)],[ta("&",oa.OpBAnd)],[ta("^",oa.OpBXor)],[ta("|",oa.OpBOr)],[ta("&&",oa.OpLAnd)],
[ta("||",oa.OpLOr)],[ta("==",oa.OpEq),ta("!=",oa.OpNEq),ta("===",oa.OpStrictEq),ta("!==",oa.OpStrictNEq)]].reverse();yb=yb(Xa(F,pb),"simple expression");var ba=J("p","<-",P)("e","<-",bb,$.Nothing)(function(i,s,I){return Xb(i.p,i.e)(i,s,I)}),na=gb(P,function(i){function s(sa){return hb(t.reservedOp("++"),xa(mb(i,"PostfixInc"),Xb(i,sa)))}function I(sa){return hb(t.reservedOp("--"),xa(mb(i,"PostfixDec"),Xb(i,sa)))}var u=hb(t.reservedOp("++"),xa(mb(i,"PrefixInc"),ba)),va=hb(t.reservedOp("--"),xa(mb(i,
"PrefixDec"),ba)),M=gb(bb($.Nothing),function(sa){return tb(Jb(s(sa),Jb(I(sa),U(sa))),U(sa))});return Jb(u,Jb(va,M))});Xa=J(t.reservedOp("?"))("l","<-",Ob)(t.colon)("r","<-",Ob)(ya,function(i){return[i.l,i.r]});h=J("e","<-",yb)("e_","<-",h,Xa)(function(i,s,I){var u=i.e_,va=i.e,M;if(u.Nothing)M=U(i.e);if(u.Just){var sa=u[0][0],Yb=u[0][1];M=J("p","<-",P)(ya,function(mc){return A.CondExpr(mc.p,va,sa,Yb)})}return M(i,s,I)});yb=ka([t.reservedOp("="),">>",U,Ea.OpAssign],"<|>",[t.reservedOp("+="),">>",U,
Ea.OpAssignAdd],"<|>",[t.reservedOp("-="),">>",U,Ea.OpAssignSub],"<|>",[t.reservedOp("*="),">>",U,Ea.OpAssignMul],"<|>",[t.reservedOp("/="),">>",U,Ea.OpAssignDiv],"<|>",[t.reservedOp("%="),">>",U,Ea.OpAssignMod],"<|>",[t.reservedOp("<<="),">>",U,Ea.OpAssignLShift],"<|>",[t.reservedOp(">>="),">>",U,Ea.OpAssignSpRShift],"<|>",[t.reservedOp(">>>="),">>",U,Ea.OpAssignZfRShift],"<|>",[t.reservedOp("&="),">>",U,Ea.OpAssignBAnd],"<|>",[t.reservedOp("^="),">>",U,Ea.OpAssignBXor],"<|>",[t.reservedOp("|="),
">>",U,Ea.OpAssignBOr]);Pa=Ob=J("p","<-",P)("lhs","<-",h)(J("op","<-",yb)("lhs","<-",zb,function(i){i.p=i.scope.p;return Xb(i.scope.p,i.scope.lhs)})("rhs","<-",zb,function(){return Ob})(Y,A.AssignExpr,"p","op","lhs","rhs"),"<|>",ya,"lhs");Ca=Eb(A.ListExpr,P,p(Ob,t.comma));Y=J(t.whiteSpace)(Eb,qb.Script,P,nb(ha));ec("BrownPLT_JavaScript_Parser",{parseScript:Y,parseExpression:Pa,parseSimpleExpr_:Ba,parseBlockStmt:O,parseStatement:ha,assignExpr:Ob});(function(){function i(j){return pc(va(j))}function s(j){return pc(k(j))}
function I(j){return j.BlockStmt?wb(j):N(C,"$+$",ic,2,wb(j),"$+$",W)}function u(j){return j.ParenExpr?k(j):Da(k(j))}function va(j){return kc(Ia(function(dc){return N(wb,dc,"<>",D)},j))}function M(j){return j.Id?q(j[1]):X()}function sa(j){return j.NoInit?Fb:j.VarInit?N(q,"var","<+>",[cc,"$",ac,b,"$",Ia(oc,j[0])]):j.ExprInit?k(j[0]):X()}function Yb(j){return j.CaseClause?N(q,"case","$+$",k(j[1]),"<+>",g,"$$",[ic,2,va(j[2])]):j.CaseDefault?N(q,"default:","$$",[ic,2,va(j[1])]):X()}function mc(j){return j.CatchClause?
N(q,"catch","<+>",Da(M(j[1])),"<+>",I(j[2])):X()}function oc(j){return j[2].Nothing?M(j[1]):j[2].Just?N(M(j[1]),"<+>",n,"<+>",k(j[2][0])):X()}function wb(j){return j.BlockStmt?N(C,"$+$",ic(2,va(j[1])),"$$",W):j.EmptyStmt?D:j.ExprStmt?k(j[1]):j.IfSingleStmt?N(q,"if","<+>",u(j[1]),"$$",wb(j[2])):j.IfStmt?N(q,"if","<+>",u(j[1]),"$$",wb(j[2]),"$$",q,"else","<+>",wb(j[3])):j.SwitchStmt?N(q,"switch","<+>",u(j[1]),"$$",hc(ic(2,kc(Ia(Yb,j[2]))))):j.WhileStmt?N(q,"while","<+>",u(j[1]),"$$",wb(j[2])):j.ReturnStmt?
j[1].Nothing?q("return"):N(q,"return","<+>",k(j[1][0])):j.DoWhileStmt?N(q,"do","$$",[wb(j[1]),"<+>",q,"while","<+>",u(j[2])]):j.BreakStmt?j[1].Nothing?q("break"):N(q,"break","<+>",M(j[1][0])):j.ContinueStmt?j[1].Nothing?q("continue"):N(q,"continue","<+>",M(j[1][0])):j.LabelledStmt?N(M(j[1]),"<>",g,"$$",wb(j[2])):j.ForInStmt?N(q,"for","<+>",Da,[forInInit(j[1]),"<+>",q,"in","<+>",k(j[2])],"$+$",wb(j[3])):j.ForStmt?N(q,"for","<+>",Da,[sa(j[1]),"<>",D,"<+>",o(j[2]),"<>",D,"<+>",o(j[3])],"$$",wb(j[4])):
j.TryStmt?N(q,"try","$$",I(j[1]),"$$",kc(Ia(mc,j[2])),"$$",ppFinally.Nothing?Fb:finally_.Just?N(q,"finally","<>",I(finally_[0])):X()):j.ThrowStmt?N(q,"throw","<+>",k(j[1])):j.WithStmt?N(q,"with","<+>",u(j[1]),"$$",wb(j[2])):j.VarDeclStmt?N(q,"var","<+>",cc(ac(b,Ia(oc,j[1])))):j.FunctionStmt?N(q,"function","<+>",M(j[1]),"<>",Da(cc(ac(b,Ia(M,j[2])))),"$$",I(j[3])):X()}function tc(j){return j.PropId?M(j[1]):j.PropString?$b(q(wc(j[1]))):j.PropNum?q(show(j[1])):X()}function uc(j){return q(qc[Ja(j)])}function vc(j){return q(Pb[Ja(j)])}
function Bc(j){return q(fc[Ja(j)])}function wc(j){for(var dc in yc)j=j.replace(yc[dc],dc);return j}function e(j){return j.LVar?q(j[1]):j.LDot?N(k(j[1]),"<>",q("."),"<>",q(j[2])):j.LBracket?N(k(j[1]),"<>",kb,k(j[2])):X()}function k(j){return j.StringLit?$b(q(wc(j[1]))):j.RegexpLit?N(q("/"),"<>",q(j[1]),"<>",q("/"),"<>",j[2]?q("g"):Fb,"<>",j[3]?q("i"):Fb):j.NumLit?q(aa.show(j[1])):j.IntLit?q(aa.show(j[1])):j.BoolLit?q(j[1]?"true":"false"):j.NullLit?q("null"):j.ArrayLit?kb(cc(ac(b,Ia(k,j[1])))):j.ObjectLit?
hc(jc(ac(b,Ia(function(dc){return N(tc(dc[0]),"<>",g,"<+>",k(dc[1]))},j[1])))):j.ThisRef?q("this"):j.VarRef?M(j[1]):j.DotRef?N(k(j[1]),"<>",q("."),"<>",M(j[2])):j.BracketRef?N(k(j[1]),"<>",kb(k(j[2]))):j.NewExpr?N(q,"new","<+>",k(j[1]),"<>",Da(cc(ac(b,Ia(k,j[2]))))):j.PrefixExpr?N(vc(j[1]),"<+>",k(j[2])):j.InfixExpr?N(k(j[2]),"<+>",uc(j[1]),"<+>",k(j[3])):j.CondExpr?N(k(j[1]),"<+>",q("?"),"<+>",k(j[2]),"<+>",g,"<+>",k(j[3])):j.AssignExpr?N(e(j[2]),"<+>",Bc(j[1]),"<+>",k(j[3])):j.UnaryAssignExpr?j[1].PrefixInc?
N(q("++"),"<>",e(j[2])):j[1].PrefixDec?N(q("--"),"<>",e(j[2])):j[1].PostfixInc?N(e(j[2]),"<>",q("++")):j[1].PostfixDec?N(e(j[2]),"<>",q("--")):X():j.ParenExpr?Da(k(j[1])):j.ListExpr?cc(ac(b,Ia(k,j[1]))):j.CallExpr?N(k(j[1]),"<>",Da(cc(ac(b,Ia(k,j[2]))))):j.FuncExpr?N(q,"function","<+>",q,Ya("",Gb,j[1]),"<+>",Da(cc(ac(b,Ia(M,j[2])))),"$$",I(j[3])):X()}function o(j){return j.Nothing?Fb:j.Just?k(j[0]):X()}function E(j){return j.Script?va(j[1]):X()}var G=NS.Text_PrettyPrint_HughesPJ,q=G.text,D=G.semi,
b=G.comma,g=G.colon,n=G.equals,C=G.lbrace,W=G.rbrace,Da=G.parens,kb=G.brackets,hc=G.braces,$b=G.doubleQuotes,Fb=G.empty,jc=G.hsep,kc=G.vcat,cc=G.cat,ic=G.nest,ac=G.punctuate,pc=G.render,qc={OpMul:"*",OpDiv:"/",OpMod:"%",OpAdd:"+",OpSub:"-",OpLShift:"<<",OpSpRShift:">>",OpZfRShift:">>>",OpLT:"<",OpLEq:"<=",OpGT:">",OpGEq:">=",OpIn:"in",OpInstanceof:"instanceof",OpEq:"==",OpNEq:"!=",OpStrictEq:"===",OpStrictNEq:"!==",OpBAnd:"&",OpBXor:"^",OpBOr:"|",OpLAnd:"&&",OpLOr:"||"},Pb={PrefixLNot:"!",PrefixBNot:"~",
PrefixPlus:"+",PrefixMinus:"-",PrefixTypeof:"typeof",PrefixVoid:"void",PrefixDelete:"delete"},fc={OpAssign:"=",OpAssignAdd:"+=",OpAssignSub:"-=",OpAssignMul:"*=",OpAssignDiv:"/=",OpAssignMod:"%=",OpAssignLShift:"<<=",OpAssignSpRShift:">>=",OpAssignZfRShift:">>>=",OpAssignBAnd:"&=",OpAssignBXor:"^=",OpAssignBOr:"|="},yc={"\\f":/\f/g,"\\n":/\n/g,"\\r":/\r/g,"\\t":/\t/g,"\\v":/\v/g,"\\'":/\'/g,'\\"':/\"/g,"\\\\":/\\/g};ec("BrownPLT_JavaScript_PrettyPrint",{stmt:wb,expr:k,javaScript:E,renderStatements:i,
renderExpression:s})})()})();(function(){namespace("BrownPLT_JavaScript");importSubmodules("BrownPLT_JavaScript",["Lexer","Syntax","Parser","PrettyPrint"])})()})();