| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190311913119231193311943119531196311973119831199312003120131202312033120431205312063120731208312093121031211312123121331214312153121631217312183121931220312213122231223312243122531226312273122831229312303123131232312333123431235312363123731238312393124031241312423124331244312453124631247312483124931250312513125231253312543125531256312573125831259312603126131262312633126431265312663126731268312693127031271312723127331274312753127631277312783127931280312813128231283312843128531286312873128831289312903129131292312933129431295312963129731298312993130031301313023130331304313053130631307313083130931310313113131231313313143131531316313173131831319313203132131322313233132431325313263132731328313293133031331313323133331334313353133631337313383133931340313413134231343313443134531346313473134831349313503135131352313533135431355313563135731358313593136031361313623136331364313653136631367313683136931370313713137231373313743137531376313773137831379313803138131382313833138431385313863138731388313893139031391313923139331394313953139631397313983139931400314013140231403314043140531406314073140831409314103141131412314133141431415314163141731418314193142031421314223142331424314253142631427314283142931430314313143231433314343143531436314373143831439314403144131442314433144431445314463144731448314493145031451314523145331454314553145631457314583145931460314613146231463314643146531466314673146831469314703147131472314733147431475314763147731478314793148031481314823148331484314853148631487314883148931490314913149231493314943149531496314973149831499315003150131502315033150431505315063150731508315093151031511315123151331514315153151631517315183151931520315213152231523315243152531526315273152831529315303153131532315333153431535315363153731538315393154031541315423154331544315453154631547315483154931550315513155231553315543155531556315573155831559315603156131562315633156431565315663156731568315693157031571315723157331574315753157631577315783157931580315813158231583315843158531586315873158831589315903159131592315933159431595315963159731598315993160031601316023160331604316053160631607316083160931610316113161231613316143161531616316173161831619316203162131622316233162431625316263162731628316293163031631316323163331634316353163631637316383163931640316413164231643316443164531646316473164831649316503165131652316533165431655316563165731658316593166031661316623166331664316653166631667316683166931670316713167231673316743167531676316773167831679316803168131682316833168431685316863168731688316893169031691316923169331694316953169631697316983169931700317013170231703317043170531706317073170831709317103171131712317133171431715317163171731718317193172031721317223172331724317253172631727317283172931730317313173231733317343173531736317373173831739317403174131742317433174431745317463174731748317493175031751317523175331754317553175631757317583175931760317613176231763317643176531766317673176831769317703177131772317733177431775317763177731778317793178031781317823178331784317853178631787317883178931790317913179231793317943179531796317973179831799318003180131802318033180431805318063180731808318093181031811318123181331814318153181631817318183181931820318213182231823318243182531826318273182831829318303183131832318333183431835318363183731838318393184031841318423184331844318453184631847318483184931850318513185231853318543185531856318573185831859318603186131862318633186431865318663186731868318693187031871318723187331874318753187631877318783187931880318813188231883318843188531886318873188831889318903189131892318933189431895318963189731898318993190031901319023190331904319053190631907319083190931910319113191231913319143191531916319173191831919319203192131922319233192431925319263192731928319293193031931319323193331934319353193631937319383193931940319413194231943319443194531946319473194831949319503195131952319533195431955319563195731958319593196031961319623196331964319653196631967319683196931970319713197231973319743197531976319773197831979319803198131982319833198431985319863198731988319893199031991319923199331994319953199631997319983199932000320013200232003320043200532006320073200832009320103201132012320133201432015320163201732018320193202032021320223202332024320253202632027320283202932030320313203232033320343203532036320373203832039320403204132042320433204432045320463204732048320493205032051320523205332054320553205632057320583205932060320613206232063320643206532066320673206832069320703207132072320733207432075320763207732078320793208032081320823208332084320853208632087320883208932090320913209232093320943209532096320973209832099321003210132102321033210432105321063210732108321093211032111321123211332114321153211632117321183211932120321213212232123321243212532126321273212832129321303213132132321333213432135321363213732138321393214032141321423214332144321453214632147321483214932150321513215232153321543215532156321573215832159321603216132162321633216432165321663216732168321693217032171321723217332174321753217632177321783217932180321813218232183321843218532186321873218832189321903219132192321933219432195321963219732198321993220032201322023220332204322053220632207322083220932210322113221232213322143221532216322173221832219322203222132222322233222432225322263222732228322293223032231322323223332234322353223632237322383223932240322413224232243322443224532246322473224832249322503225132252322533225432255322563225732258322593226032261322623226332264322653226632267322683226932270322713227232273322743227532276322773227832279322803228132282322833228432285322863228732288322893229032291322923229332294322953229632297322983229932300323013230232303323043230532306323073230832309323103231132312323133231432315323163231732318323193232032321323223232332324323253232632327323283232932330323313233232333323343233532336323373233832339323403234132342323433234432345323463234732348323493235032351323523235332354323553235632357323583235932360323613236232363323643236532366323673236832369323703237132372323733237432375323763237732378323793238032381323823238332384323853238632387323883238932390323913239232393323943239532396323973239832399324003240132402324033240432405324063240732408324093241032411324123241332414324153241632417324183241932420324213242232423324243242532426324273242832429324303243132432324333243432435324363243732438324393244032441324423244332444324453244632447324483244932450324513245232453324543245532456324573245832459324603246132462324633246432465324663246732468324693247032471324723247332474324753247632477324783247932480324813248232483324843248532486324873248832489324903249132492324933249432495324963249732498324993250032501325023250332504325053250632507325083250932510325113251232513325143251532516325173251832519325203252132522325233252432525325263252732528325293253032531325323253332534325353253632537325383253932540325413254232543325443254532546325473254832549325503255132552325533255432555325563255732558325593256032561325623256332564325653256632567325683256932570325713257232573325743257532576325773257832579325803258132582325833258432585325863258732588325893259032591325923259332594325953259632597325983259932600326013260232603326043260532606326073260832609326103261132612326133261432615326163261732618326193262032621326223262332624326253262632627326283262932630326313263232633326343263532636326373263832639326403264132642326433264432645326463264732648326493265032651326523265332654326553265632657326583265932660326613266232663326643266532666326673266832669326703267132672326733267432675326763267732678326793268032681326823268332684326853268632687326883268932690326913269232693326943269532696326973269832699327003270132702327033270432705327063270732708327093271032711327123271332714327153271632717327183271932720327213272232723327243272532726327273272832729327303273132732327333273432735327363273732738327393274032741327423274332744327453274632747327483274932750327513275232753327543275532756327573275832759327603276132762327633276432765327663276732768327693277032771327723277332774327753277632777327783277932780327813278232783327843278532786327873278832789327903279132792327933279432795327963279732798327993280032801328023280332804328053280632807328083280932810328113281232813328143281532816328173281832819328203282132822328233282432825328263282732828328293283032831328323283332834328353283632837328383283932840328413284232843328443284532846328473284832849328503285132852328533285432855328563285732858328593286032861328623286332864328653286632867328683286932870328713287232873328743287532876328773287832879328803288132882328833288432885328863288732888328893289032891328923289332894328953289632897328983289932900329013290232903329043290532906329073290832909329103291132912329133291432915329163291732918329193292032921329223292332924329253292632927329283292932930329313293232933329343293532936329373293832939329403294132942329433294432945329463294732948329493295032951329523295332954329553295632957329583295932960329613296232963329643296532966329673296832969329703297132972329733297432975329763297732978329793298032981329823298332984329853298632987329883298932990329913299232993329943299532996329973299832999330003300133002330033300433005330063300733008330093301033011330123301333014330153301633017330183301933020330213302233023330243302533026330273302833029330303303133032330333303433035330363303733038330393304033041330423304333044330453304633047330483304933050330513305233053330543305533056330573305833059330603306133062330633306433065330663306733068330693307033071330723307333074330753307633077330783307933080330813308233083330843308533086330873308833089330903309133092330933309433095330963309733098330993310033101331023310333104331053310633107331083310933110331113311233113331143311533116331173311833119331203312133122331233312433125331263312733128331293313033131331323313333134331353313633137331383313933140331413314233143331443314533146331473314833149331503315133152331533315433155331563315733158331593316033161331623316333164331653316633167331683316933170331713317233173331743317533176331773317833179331803318133182331833318433185331863318733188331893319033191331923319333194331953319633197331983319933200332013320233203332043320533206332073320833209332103321133212332133321433215332163321733218332193322033221332223322333224332253322633227332283322933230332313323233233332343323533236332373323833239332403324133242332433324433245332463324733248332493325033251332523325333254332553325633257332583325933260332613326233263332643326533266332673326833269332703327133272332733327433275332763327733278332793328033281332823328333284332853328633287332883328933290332913329233293332943329533296332973329833299333003330133302333033330433305333063330733308333093331033311333123331333314333153331633317333183331933320333213332233323333243332533326333273332833329333303333133332333333333433335333363333733338333393334033341333423334333344333453334633347333483334933350333513335233353333543335533356333573335833359333603336133362333633336433365333663336733368333693337033371333723337333374333753337633377333783337933380333813338233383333843338533386333873338833389333903339133392333933339433395333963339733398333993340033401334023340333404334053340633407334083340933410334113341233413334143341533416334173341833419334203342133422334233342433425334263342733428334293343033431334323343333434334353343633437334383343933440334413344233443334443344533446334473344833449334503345133452334533345433455334563345733458334593346033461334623346333464334653346633467334683346933470334713347233473334743347533476334773347833479334803348133482334833348433485334863348733488334893349033491334923349333494334953349633497334983349933500335013350233503335043350533506335073350833509335103351133512335133351433515335163351733518335193352033521335223352333524335253352633527335283352933530335313353233533335343353533536335373353833539335403354133542335433354433545335463354733548335493355033551335523355333554335553355633557335583355933560335613356233563335643356533566335673356833569335703357133572335733357433575335763357733578335793358033581335823358333584335853358633587335883358933590335913359233593335943359533596335973359833599336003360133602336033360433605336063360733608336093361033611336123361333614336153361633617336183361933620336213362233623336243362533626336273362833629336303363133632336333363433635336363363733638336393364033641336423364333644336453364633647336483364933650336513365233653336543365533656336573365833659336603366133662336633366433665336663366733668336693367033671336723367333674336753367633677336783367933680336813368233683336843368533686336873368833689336903369133692336933369433695336963369733698336993370033701337023370333704337053370633707337083370933710337113371233713337143371533716337173371833719337203372133722337233372433725337263372733728337293373033731337323373333734337353373633737337383373933740337413374233743337443374533746337473374833749337503375133752337533375433755337563375733758337593376033761337623376333764337653376633767337683376933770337713377233773337743377533776337773377833779337803378133782337833378433785337863378733788337893379033791337923379333794337953379633797337983379933800338013380233803338043380533806338073380833809338103381133812338133381433815338163381733818338193382033821338223382333824338253382633827338283382933830338313383233833338343383533836338373383833839338403384133842338433384433845338463384733848338493385033851338523385333854338553385633857338583385933860338613386233863338643386533866338673386833869338703387133872338733387433875338763387733878338793388033881338823388333884338853388633887338883388933890338913389233893338943389533896338973389833899339003390133902339033390433905339063390733908339093391033911339123391333914339153391633917339183391933920339213392233923339243392533926339273392833929339303393133932339333393433935339363393733938339393394033941339423394333944339453394633947339483394933950339513395233953339543395533956339573395833959339603396133962339633396433965339663396733968339693397033971339723397333974339753397633977339783397933980339813398233983339843398533986339873398833989339903399133992339933399433995339963399733998339993400034001340023400334004340053400634007340083400934010340113401234013340143401534016340173401834019340203402134022340233402434025340263402734028340293403034031340323403334034340353403634037340383403934040340413404234043340443404534046340473404834049340503405134052340533405434055340563405734058340593406034061340623406334064340653406634067340683406934070340713407234073340743407534076340773407834079340803408134082340833408434085340863408734088340893409034091340923409334094340953409634097340983409934100341013410234103341043410534106341073410834109341103411134112341133411434115341163411734118341193412034121341223412334124341253412634127341283412934130341313413234133341343413534136341373413834139341403414134142341433414434145341463414734148341493415034151341523415334154341553415634157341583415934160341613416234163341643416534166341673416834169341703417134172341733417434175341763417734178341793418034181341823418334184341853418634187341883418934190341913419234193341943419534196341973419834199342003420134202342033420434205342063420734208342093421034211342123421334214342153421634217342183421934220342213422234223342243422534226342273422834229342303423134232342333423434235342363423734238342393424034241342423424334244342453424634247342483424934250342513425234253342543425534256342573425834259342603426134262342633426434265342663426734268342693427034271342723427334274342753427634277342783427934280342813428234283342843428534286342873428834289342903429134292342933429434295342963429734298342993430034301343023430334304343053430634307343083430934310343113431234313343143431534316343173431834319343203432134322343233432434325343263432734328343293433034331343323433334334343353433634337343383433934340343413434234343343443434534346343473434834349343503435134352343533435434355343563435734358343593436034361343623436334364343653436634367343683436934370343713437234373343743437534376343773437834379343803438134382343833438434385343863438734388343893439034391343923439334394343953439634397343983439934400344013440234403344043440534406344073440834409344103441134412344133441434415344163441734418344193442034421344223442334424344253442634427344283442934430344313443234433344343443534436344373443834439344403444134442344433444434445344463444734448344493445034451344523445334454344553445634457344583445934460344613446234463344643446534466344673446834469344703447134472344733447434475344763447734478344793448034481344823448334484344853448634487344883448934490344913449234493344943449534496344973449834499345003450134502345033450434505345063450734508345093451034511345123451334514345153451634517345183451934520345213452234523345243452534526345273452834529345303453134532345333453434535345363453734538345393454034541345423454334544345453454634547345483454934550345513455234553345543455534556345573455834559345603456134562345633456434565345663456734568345693457034571345723457334574345753457634577345783457934580345813458234583345843458534586345873458834589345903459134592345933459434595345963459734598345993460034601346023460334604346053460634607346083460934610346113461234613346143461534616346173461834619346203462134622346233462434625346263462734628346293463034631346323463334634346353463634637346383463934640346413464234643346443464534646346473464834649346503465134652346533465434655346563465734658346593466034661346623466334664346653466634667346683466934670346713467234673346743467534676346773467834679346803468134682346833468434685346863468734688346893469034691346923469334694346953469634697346983469934700347013470234703347043470534706347073470834709347103471134712347133471434715347163471734718347193472034721347223472334724347253472634727347283472934730347313473234733347343473534736347373473834739347403474134742347433474434745347463474734748347493475034751347523475334754347553475634757347583475934760347613476234763347643476534766347673476834769347703477134772347733477434775347763477734778347793478034781347823478334784347853478634787347883478934790347913479234793347943479534796347973479834799348003480134802348033480434805348063480734808348093481034811348123481334814348153481634817348183481934820348213482234823348243482534826348273482834829348303483134832348333483434835348363483734838348393484034841348423484334844348453484634847348483484934850348513485234853348543485534856348573485834859348603486134862348633486434865348663486734868348693487034871348723487334874348753487634877348783487934880348813488234883348843488534886348873488834889348903489134892348933489434895348963489734898348993490034901349023490334904349053490634907349083490934910349113491234913349143491534916349173491834919349203492134922349233492434925349263492734928349293493034931349323493334934349353493634937349383493934940349413494234943349443494534946349473494834949349503495134952349533495434955349563495734958349593496034961349623496334964349653496634967349683496934970349713497234973349743497534976349773497834979349803498134982349833498434985349863498734988349893499034991349923499334994349953499634997349983499935000350013500235003350043500535006350073500835009350103501135012350133501435015350163501735018350193502035021350223502335024350253502635027350283502935030350313503235033350343503535036350373503835039350403504135042350433504435045350463504735048350493505035051350523505335054350553505635057350583505935060350613506235063350643506535066350673506835069350703507135072350733507435075350763507735078350793508035081350823508335084350853508635087350883508935090350913509235093350943509535096350973509835099351003510135102351033510435105351063510735108351093511035111351123511335114351153511635117351183511935120351213512235123351243512535126351273512835129351303513135132351333513435135351363513735138351393514035141351423514335144351453514635147351483514935150351513515235153351543515535156351573515835159351603516135162351633516435165351663516735168351693517035171351723517335174351753517635177351783517935180351813518235183351843518535186351873518835189351903519135192351933519435195351963519735198351993520035201352023520335204352053520635207352083520935210352113521235213352143521535216352173521835219352203522135222352233522435225352263522735228352293523035231352323523335234352353523635237352383523935240352413524235243352443524535246352473524835249352503525135252352533525435255352563525735258352593526035261352623526335264352653526635267352683526935270352713527235273352743527535276352773527835279352803528135282352833528435285352863528735288352893529035291352923529335294352953529635297352983529935300353013530235303353043530535306353073530835309353103531135312353133531435315353163531735318353193532035321353223532335324353253532635327353283532935330353313533235333353343533535336353373533835339353403534135342353433534435345353463534735348353493535035351353523535335354353553535635357353583535935360353613536235363353643536535366353673536835369353703537135372353733537435375353763537735378353793538035381353823538335384353853538635387353883538935390353913539235393353943539535396353973539835399354003540135402354033540435405354063540735408354093541035411354123541335414354153541635417354183541935420354213542235423354243542535426354273542835429354303543135432354333543435435354363543735438354393544035441354423544335444354453544635447354483544935450354513545235453354543545535456354573545835459354603546135462354633546435465354663546735468354693547035471354723547335474354753547635477354783547935480354813548235483354843548535486354873548835489354903549135492354933549435495354963549735498354993550035501355023550335504355053550635507355083550935510355113551235513355143551535516355173551835519355203552135522355233552435525355263552735528355293553035531355323553335534355353553635537355383553935540355413554235543355443554535546355473554835549355503555135552355533555435555355563555735558355593556035561355623556335564355653556635567355683556935570355713557235573355743557535576355773557835579355803558135582355833558435585355863558735588355893559035591355923559335594355953559635597355983559935600356013560235603356043560535606356073560835609356103561135612356133561435615356163561735618356193562035621356223562335624356253562635627356283562935630356313563235633356343563535636356373563835639356403564135642356433564435645356463564735648356493565035651356523565335654356553565635657356583565935660356613566235663356643566535666356673566835669356703567135672356733567435675356763567735678356793568035681356823568335684356853568635687356883568935690356913569235693356943569535696356973569835699357003570135702357033570435705357063570735708357093571035711357123571335714357153571635717357183571935720357213572235723357243572535726357273572835729357303573135732357333573435735357363573735738357393574035741357423574335744357453574635747357483574935750357513575235753357543575535756357573575835759357603576135762357633576435765357663576735768357693577035771357723577335774357753577635777357783577935780357813578235783357843578535786357873578835789357903579135792357933579435795357963579735798357993580035801358023580335804358053580635807358083580935810358113581235813358143581535816358173581835819358203582135822358233582435825358263582735828358293583035831358323583335834358353583635837358383583935840358413584235843358443584535846358473584835849358503585135852358533585435855358563585735858358593586035861358623586335864358653586635867358683586935870358713587235873358743587535876358773587835879358803588135882358833588435885358863588735888358893589035891358923589335894358953589635897358983589935900359013590235903359043590535906359073590835909359103591135912359133591435915359163591735918359193592035921359223592335924359253592635927359283592935930359313593235933359343593535936359373593835939359403594135942359433594435945359463594735948359493595035951359523595335954359553595635957359583595935960359613596235963359643596535966359673596835969359703597135972359733597435975359763597735978359793598035981359823598335984359853598635987359883598935990359913599235993359943599535996359973599835999360003600136002360033600436005360063600736008360093601036011360123601336014360153601636017360183601936020360213602236023360243602536026360273602836029360303603136032360333603436035360363603736038360393604036041360423604336044360453604636047360483604936050360513605236053360543605536056360573605836059360603606136062360633606436065360663606736068360693607036071360723607336074360753607636077360783607936080360813608236083360843608536086360873608836089360903609136092360933609436095360963609736098360993610036101361023610336104361053610636107361083610936110361113611236113361143611536116361173611836119361203612136122361233612436125361263612736128361293613036131361323613336134361353613636137361383613936140361413614236143361443614536146361473614836149361503615136152361533615436155361563615736158361593616036161361623616336164361653616636167361683616936170361713617236173361743617536176361773617836179361803618136182361833618436185361863618736188361893619036191361923619336194361953619636197361983619936200362013620236203362043620536206362073620836209362103621136212362133621436215362163621736218362193622036221362223622336224362253622636227362283622936230362313623236233362343623536236362373623836239362403624136242362433624436245362463624736248362493625036251362523625336254362553625636257362583625936260362613626236263362643626536266362673626836269362703627136272362733627436275362763627736278362793628036281362823628336284362853628636287362883628936290362913629236293362943629536296362973629836299363003630136302363033630436305363063630736308363093631036311363123631336314363153631636317363183631936320363213632236323363243632536326363273632836329363303633136332363333633436335363363633736338363393634036341363423634336344363453634636347363483634936350363513635236353363543635536356363573635836359363603636136362363633636436365363663636736368363693637036371363723637336374363753637636377363783637936380363813638236383363843638536386363873638836389363903639136392363933639436395363963639736398363993640036401364023640336404364053640636407364083640936410364113641236413364143641536416364173641836419364203642136422364233642436425364263642736428364293643036431364323643336434364353643636437364383643936440364413644236443364443644536446364473644836449364503645136452364533645436455364563645736458364593646036461364623646336464364653646636467364683646936470364713647236473364743647536476364773647836479364803648136482364833648436485364863648736488364893649036491364923649336494364953649636497364983649936500365013650236503365043650536506365073650836509365103651136512365133651436515365163651736518365193652036521365223652336524365253652636527365283652936530365313653236533365343653536536365373653836539365403654136542365433654436545365463654736548365493655036551365523655336554365553655636557365583655936560365613656236563365643656536566365673656836569365703657136572365733657436575365763657736578365793658036581365823658336584365853658636587365883658936590365913659236593365943659536596365973659836599366003660136602366033660436605366063660736608366093661036611366123661336614366153661636617366183661936620366213662236623366243662536626366273662836629366303663136632366333663436635366363663736638366393664036641366423664336644366453664636647366483664936650366513665236653366543665536656366573665836659366603666136662366633666436665366663666736668366693667036671366723667336674366753667636677366783667936680366813668236683366843668536686366873668836689366903669136692366933669436695366963669736698366993670036701367023670336704367053670636707367083670936710367113671236713367143671536716367173671836719367203672136722367233672436725367263672736728367293673036731367323673336734367353673636737367383673936740367413674236743367443674536746367473674836749367503675136752367533675436755367563675736758367593676036761367623676336764367653676636767367683676936770367713677236773367743677536776367773677836779367803678136782367833678436785367863678736788367893679036791367923679336794367953679636797367983679936800368013680236803368043680536806368073680836809368103681136812368133681436815368163681736818368193682036821368223682336824368253682636827368283682936830368313683236833368343683536836368373683836839368403684136842368433684436845368463684736848368493685036851368523685336854368553685636857368583685936860368613686236863368643686536866368673686836869368703687136872368733687436875368763687736878368793688036881368823688336884368853688636887368883688936890368913689236893368943689536896368973689836899369003690136902369033690436905369063690736908369093691036911369123691336914369153691636917369183691936920369213692236923369243692536926369273692836929369303693136932369333693436935369363693736938369393694036941369423694336944369453694636947369483694936950369513695236953369543695536956369573695836959369603696136962369633696436965369663696736968369693697036971369723697336974369753697636977369783697936980369813698236983369843698536986369873698836989369903699136992369933699436995369963699736998369993700037001370023700337004370053700637007370083700937010370113701237013370143701537016370173701837019370203702137022370233702437025370263702737028370293703037031370323703337034370353703637037370383703937040370413704237043370443704537046370473704837049370503705137052370533705437055370563705737058370593706037061370623706337064370653706637067370683706937070370713707237073370743707537076370773707837079370803708137082370833708437085370863708737088370893709037091370923709337094370953709637097370983709937100371013710237103371043710537106371073710837109371103711137112371133711437115371163711737118371193712037121371223712337124371253712637127371283712937130371313713237133371343713537136371373713837139371403714137142371433714437145371463714737148371493715037151371523715337154371553715637157371583715937160371613716237163371643716537166371673716837169371703717137172371733717437175371763717737178371793718037181371823718337184371853718637187371883718937190371913719237193371943719537196371973719837199372003720137202372033720437205372063720737208372093721037211372123721337214372153721637217372183721937220372213722237223372243722537226372273722837229372303723137232372333723437235372363723737238372393724037241372423724337244372453724637247372483724937250372513725237253372543725537256372573725837259372603726137262372633726437265372663726737268372693727037271372723727337274372753727637277372783727937280372813728237283372843728537286372873728837289372903729137292372933729437295372963729737298372993730037301373023730337304373053730637307373083730937310373113731237313373143731537316373173731837319373203732137322373233732437325373263732737328373293733037331373323733337334373353733637337373383733937340373413734237343373443734537346373473734837349373503735137352373533735437355373563735737358373593736037361373623736337364373653736637367373683736937370373713737237373373743737537376373773737837379373803738137382373833738437385373863738737388373893739037391373923739337394373953739637397373983739937400374013740237403374043740537406374073740837409374103741137412374133741437415374163741737418374193742037421374223742337424374253742637427374283742937430374313743237433374343743537436374373743837439374403744137442374433744437445374463744737448374493745037451374523745337454374553745637457374583745937460374613746237463374643746537466374673746837469374703747137472374733747437475374763747737478374793748037481374823748337484374853748637487374883748937490374913749237493374943749537496374973749837499375003750137502375033750437505375063750737508375093751037511375123751337514375153751637517375183751937520375213752237523375243752537526375273752837529375303753137532375333753437535375363753737538375393754037541375423754337544375453754637547375483754937550375513755237553375543755537556375573755837559375603756137562375633756437565375663756737568375693757037571375723757337574375753757637577375783757937580375813758237583375843758537586375873758837589375903759137592375933759437595375963759737598375993760037601376023760337604376053760637607376083760937610376113761237613376143761537616376173761837619376203762137622376233762437625376263762737628376293763037631376323763337634376353763637637376383763937640376413764237643376443764537646376473764837649376503765137652376533765437655376563765737658376593766037661376623766337664376653766637667376683766937670376713767237673376743767537676376773767837679376803768137682376833768437685376863768737688376893769037691376923769337694376953769637697376983769937700377013770237703377043770537706377073770837709377103771137712377133771437715377163771737718377193772037721377223772337724377253772637727377283772937730377313773237733377343773537736377373773837739377403774137742377433774437745377463774737748377493775037751377523775337754377553775637757377583775937760377613776237763377643776537766377673776837769377703777137772377733777437775377763777737778377793778037781377823778337784377853778637787377883778937790377913779237793377943779537796377973779837799378003780137802378033780437805378063780737808378093781037811378123781337814378153781637817378183781937820378213782237823378243782537826378273782837829378303783137832378333783437835378363783737838378393784037841378423784337844378453784637847378483784937850378513785237853378543785537856378573785837859378603786137862378633786437865378663786737868378693787037871378723787337874378753787637877378783787937880378813788237883378843788537886378873788837889378903789137892378933789437895378963789737898378993790037901379023790337904379053790637907379083790937910379113791237913379143791537916379173791837919379203792137922379233792437925379263792737928379293793037931379323793337934379353793637937379383793937940379413794237943 |
- // modules are defined as an array
- // [ module function, map of requires ]
- //
- // map of requires is short require name -> numeric require
- //
- // anything defined in a previous bundle is accessed via the
- // orig method which is the require for previous bundles
- parcelRequire = (function (modules, cache, entry, globalName) {
- // Save the require from previous bundle to this closure if any
- var previousRequire = typeof parcelRequire === 'function' && parcelRequire;
- var nodeRequire = typeof require === 'function' && require;
- function newRequire(name, jumped) {
- if (!cache[name]) {
- if (!modules[name]) {
- // if we cannot find the module within our internal map or
- // cache jump to the current global require ie. the last bundle
- // that was added to the page.
- var currentRequire = typeof parcelRequire === 'function' && parcelRequire;
- if (!jumped && currentRequire) {
- return currentRequire(name, true);
- }
- // If there are other bundles on this page the require from the
- // previous one is saved to 'previousRequire'. Repeat this as
- // many times as there are bundles until the module is found or
- // we exhaust the require chain.
- if (previousRequire) {
- return previousRequire(name, true);
- }
- // Try the node require function if it exists.
- if (nodeRequire && typeof name === 'string') {
- return nodeRequire(name);
- }
- var err = new Error('Cannot find module \'' + name + '\'');
- err.code = 'MODULE_NOT_FOUND';
- throw err;
- }
- localRequire.resolve = resolve;
- localRequire.cache = {};
- var module = cache[name] = new newRequire.Module(name);
- modules[name][0].call(module.exports, localRequire, module, module.exports, this);
- }
- return cache[name].exports;
- function localRequire(x){
- return newRequire(localRequire.resolve(x));
- }
- function resolve(x){
- return modules[name][1][x] || x;
- }
- }
- function Module(moduleName) {
- this.id = moduleName;
- this.bundle = newRequire;
- this.exports = {};
- }
- newRequire.isParcelRequire = true;
- newRequire.Module = Module;
- newRequire.modules = modules;
- newRequire.cache = cache;
- newRequire.parent = previousRequire;
- newRequire.register = function (id, exports) {
- modules[id] = [function (require, module) {
- module.exports = exports;
- }, {}];
- };
- var error;
- for (var i = 0; i < entry.length; i++) {
- try {
- newRequire(entry[i]);
- } catch (e) {
- // Save first error but execute all entries
- if (!error) {
- error = e;
- }
- }
- }
- if (entry.length) {
- // Expose entry point to Node, AMD or browser globals
- // Based on https://github.com/ForbesLindesay/umd/blob/master/template.js
- var mainExports = newRequire(entry[entry.length - 1]);
- // CommonJS
- if (typeof exports === "object" && typeof module !== "undefined") {
- module.exports = mainExports;
- // RequireJS
- } else if (typeof define === "function" && define.amd) {
- define(function () {
- return mainExports;
- });
- // <script>
- } else if (globalName) {
- this[globalName] = mainExports;
- }
- }
- // Override the current require with this new one
- parcelRequire = newRequire;
- if (error) {
- // throw error from earlier, _after updating parcelRequire_
- throw error;
- }
- return newRequire;
- })({"../output/Browser.Runtime/foreign.js":[function(require,module,exports) {
- "use strict";
- exports.connect = function () {
- return browser.runtime.connect({
- name: name
- });
- };
- exports.postMessage = function (port) {
- return function (message) {
- return function () {
- port.postMessage(message);
- };
- };
- };
- exports.onConnectAddListener = function (fn) {
- return function () {
- return browser.runtime.onConnect.addListener(fn);
- };
- };
- exports.portOnDisconnect = function (port) {
- return function (fn) {
- return function () {
- return port.onDisconnect.addListener(fn);
- };
- };
- };
- exports.onMessageAddListener = function (port) {
- return function (fn) {
- return function () {
- return port.onMessage.addListener(fn);
- };
- };
- };
- exports.onMessageRemoveListener = function (port) {
- return function (fn) {
- return function () {
- return port.onMessage.removeListener(fn);
- };
- };
- };
- exports.portEquality = function (p1) {
- return function (p2) {
- return p1 === p2;
- };
- };
- },{}],"../output/Browser.Utils/foreign.js":[function(require,module,exports) {
- "use stricts";
- exports.mkListenerUnit = function (fn) {
- return function () {
- return function () {
- return fn();
- };
- };
- };
- exports.mkListenerOne = function (fn) {
- return function () {
- return function (one) {
- return fn(one)();
- };
- };
- };
- exports.mkListenerTwo = function (fn) {
- return function () {
- return function (one, two) {
- return fn(one)(two)();
- };
- };
- };
- },{}],"../output/Control.Apply/foreign.js":[function(require,module,exports) {
- "use strict";
- exports.arrayApply = function (fs) {
- return function (xs) {
- var l = fs.length;
- var k = xs.length;
- var result = new Array(l * k);
- var n = 0;
- for (var i = 0; i < l; i++) {
- var f = fs[i];
- for (var j = 0; j < k; j++) {
- result[n++] = f(xs[j]);
- }
- }
- return result;
- };
- };
- },{}],"../output/Control.Semigroupoid/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Semigroupoid = function Semigroupoid(compose) {
- this.compose = compose;
- };
- var semigroupoidFn = new Semigroupoid(function (f) {
- return function (g) {
- return function (x) {
- return f(g(x));
- };
- };
- });
- var compose = function compose(dict) {
- return dict.compose;
- };
- var composeFlipped = function composeFlipped(dictSemigroupoid) {
- return function (f) {
- return function (g) {
- return compose(dictSemigroupoid)(g)(f);
- };
- };
- };
- module.exports = {
- compose: compose,
- Semigroupoid: Semigroupoid,
- composeFlipped: composeFlipped,
- semigroupoidFn: semigroupoidFn
- };
- },{}],"../output/Control.Category/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
- var Category = function Category(Semigroupoid0, identity) {
- this.Semigroupoid0 = Semigroupoid0;
- this.identity = identity;
- };
- var identity = function identity(dict) {
- return dict.identity;
- };
- var categoryFn = new Category(function () {
- return Control_Semigroupoid.semigroupoidFn;
- }, function (x) {
- return x;
- });
- module.exports = {
- Category: Category,
- identity: identity,
- categoryFn: categoryFn
- };
- },{"../Control.Semigroupoid/index.js":"../output/Control.Semigroupoid/index.js"}],"../output/Data.Boolean/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var otherwise = true;
- module.exports = {
- otherwise: otherwise
- };
- },{}],"../output/Data.Function/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Data_Boolean = require("../Data.Boolean/index.js");
- var on = function on(f) {
- return function (g) {
- return function (x) {
- return function (y) {
- return f(g(x))(g(y));
- };
- };
- };
- };
- var flip = function flip(f) {
- return function (b) {
- return function (a) {
- return f(a)(b);
- };
- };
- };
- var $$const = function $$const(a) {
- return function (v) {
- return a;
- };
- };
- var applyN = function applyN(f) {
- var go = function go($copy_n) {
- return function ($copy_acc) {
- var $tco_var_n = $copy_n;
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(n, acc) {
- if (n <= 0) {
- $tco_done = true;
- return acc;
- }
- ;
- if (Data_Boolean.otherwise) {
- $tco_var_n = n - 1 | 0;
- $copy_acc = f(acc);
- return;
- }
- ;
- throw new Error("Failed pattern match at Data.Function (line 94, column 3 - line 96, column 37): " + [n.constructor.name, acc.constructor.name]);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($tco_var_n, $copy_acc);
- }
- ;
- return $tco_result;
- };
- };
- return go;
- };
- var applyFlipped = function applyFlipped(x) {
- return function (f) {
- return f(x);
- };
- };
- var apply = function apply(f) {
- return function (x) {
- return f(x);
- };
- };
- module.exports = {
- flip: flip,
- "const": $$const,
- apply: apply,
- applyFlipped: applyFlipped,
- applyN: applyN,
- on: on
- };
- },{"../Data.Boolean/index.js":"../output/Data.Boolean/index.js"}],"../output/Data.Functor/foreign.js":[function(require,module,exports) {
- "use strict";
- exports.arrayMap = function (f) {
- return function (arr) {
- var l = arr.length;
- var result = new Array(l);
- for (var i = 0; i < l; i++) {
- result[i] = f(arr[i]);
- }
- return result;
- };
- };
- },{}],"../output/Data.Unit/foreign.js":[function(require,module,exports) {
- "use strict";
- exports.unit = {};
- },{}],"../output/Data.Show/foreign.js":[function(require,module,exports) {
- "use strict";
- exports.showIntImpl = function (n) {
- return n.toString();
- };
- exports.showNumberImpl = function (n) {
- var str = n.toString();
- return isNaN(str + ".0") ? str : str + ".0";
- };
- exports.showCharImpl = function (c) {
- var code = c.charCodeAt(0);
- if (code < 0x20 || code === 0x7F) {
- switch (c) {
- case "\x07":
- return "'\\a'";
- case "\b":
- return "'\\b'";
- case "\f":
- return "'\\f'";
- case "\n":
- return "'\\n'";
- case "\r":
- return "'\\r'";
- case "\t":
- return "'\\t'";
- case "\v":
- return "'\\v'";
- }
- return "'\\" + code.toString(10) + "'";
- }
- return c === "'" || c === "\\" ? "'\\" + c + "'" : "'" + c + "'";
- };
- exports.showStringImpl = function (s) {
- var l = s.length;
- return "\"" + s.replace(/[\0-\x1F\x7F"\\]/g, // eslint-disable-line no-control-regex
- function (c, i) {
- switch (c) {
- case "\"":
- case "\\":
- return "\\" + c;
- case "\x07":
- return "\\a";
- case "\b":
- return "\\b";
- case "\f":
- return "\\f";
- case "\n":
- return "\\n";
- case "\r":
- return "\\r";
- case "\t":
- return "\\t";
- case "\v":
- return "\\v";
- }
- var k = i + 1;
- var empty = k < l && s[k] >= "0" && s[k] <= "9" ? "\\&" : "";
- return "\\" + c.charCodeAt(0).toString(10) + empty;
- }) + "\"";
- };
- exports.showArrayImpl = function (f) {
- return function (xs) {
- var ss = [];
- for (var i = 0, l = xs.length; i < l; i++) {
- ss[i] = f(xs[i]);
- }
- return "[" + ss.join(",") + "]";
- };
- };
- exports.cons = function (head) {
- return function (tail) {
- return [head].concat(tail);
- };
- };
- exports.join = function (separator) {
- return function (xs) {
- return xs.join(separator);
- };
- };
- },{}],"../output/Data.Symbol/foreign.js":[function(require,module,exports) {
- "use strict"; // module Data.Symbol
- exports.unsafeCoerce = function (arg) {
- return arg;
- };
- },{}],"../output/Data.Symbol/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var SProxy = function () {
- function SProxy() {}
- ;
- SProxy.value = new SProxy();
- return SProxy;
- }();
- var IsSymbol = function IsSymbol(reflectSymbol) {
- this.reflectSymbol = reflectSymbol;
- };
- var reifySymbol = function reifySymbol(s) {
- return function (f) {
- return $foreign.unsafeCoerce(function (dictIsSymbol) {
- return f(dictIsSymbol);
- })({
- reflectSymbol: function reflectSymbol(v) {
- return s;
- }
- })(SProxy.value);
- };
- };
- var reflectSymbol = function reflectSymbol(dict) {
- return dict.reflectSymbol;
- };
- module.exports = {
- IsSymbol: IsSymbol,
- reflectSymbol: reflectSymbol,
- reifySymbol: reifySymbol,
- SProxy: SProxy
- };
- },{"./foreign.js":"../output/Data.Symbol/foreign.js"}],"../output/Record.Unsafe/foreign.js":[function(require,module,exports) {
- "use strict";
- exports.unsafeHas = function (label) {
- return function (rec) {
- return {}.hasOwnProperty.call(rec, label);
- };
- };
- exports.unsafeGet = function (label) {
- return function (rec) {
- return rec[label];
- };
- };
- exports.unsafeSet = function (label) {
- return function (value) {
- return function (rec) {
- var copy = {};
- for (var key in rec) {
- if ({}.hasOwnProperty.call(rec, key)) {
- copy[key] = rec[key];
- }
- }
- copy[label] = value;
- return copy;
- };
- };
- };
- exports.unsafeDelete = function (label) {
- return function (rec) {
- var copy = {};
- for (var key in rec) {
- if (key !== label && {}.hasOwnProperty.call(rec, key)) {
- copy[key] = rec[key];
- }
- }
- return copy;
- };
- };
- },{}],"../output/Record.Unsafe/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- module.exports = {
- unsafeHas: $foreign.unsafeHas,
- unsafeGet: $foreign.unsafeGet,
- unsafeSet: $foreign.unsafeSet,
- unsafeDelete: $foreign.unsafeDelete
- };
- },{"./foreign.js":"../output/Record.Unsafe/foreign.js"}],"../output/Type.Data.RowList/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var RLProxy = function () {
- function RLProxy() {}
- ;
- RLProxy.value = new RLProxy();
- return RLProxy;
- }();
- module.exports = {
- RLProxy: RLProxy
- };
- },{}],"../output/Data.Show/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Data_Symbol = require("../Data.Symbol/index.js");
- var Record_Unsafe = require("../Record.Unsafe/index.js");
- var Type_Data_RowList = require("../Type.Data.RowList/index.js");
- var ShowRecordFields = function ShowRecordFields(showRecordFields) {
- this.showRecordFields = showRecordFields;
- };
- var Show = function Show(show) {
- this.show = show;
- };
- var showString = new Show($foreign.showStringImpl);
- var showRecordFieldsNil = new ShowRecordFields(function (v) {
- return function (v1) {
- return [];
- };
- });
- var showRecordFields = function showRecordFields(dict) {
- return dict.showRecordFields;
- };
- var showRecord = function showRecord(dictRowToList) {
- return function (dictShowRecordFields) {
- return new Show(function (record) {
- var v = showRecordFields(dictShowRecordFields)(Type_Data_RowList.RLProxy.value)(record);
- if (v.length === 0) {
- return "{}";
- }
- ;
- return $foreign.join(" ")(["{", $foreign.join(", ")(v), "}"]);
- });
- };
- };
- var showNumber = new Show($foreign.showNumberImpl);
- var showInt = new Show($foreign.showIntImpl);
- var showChar = new Show($foreign.showCharImpl);
- var showBoolean = new Show(function (v) {
- if (v) {
- return "true";
- }
- ;
- if (!v) {
- return "false";
- }
- ;
- throw new Error("Failed pattern match at Data.Show (line 20, column 1 - line 22, column 23): " + [v.constructor.name]);
- });
- var show = function show(dict) {
- return dict.show;
- };
- var showArray = function showArray(dictShow) {
- return new Show($foreign.showArrayImpl(show(dictShow)));
- };
- var showRecordFieldsCons = function showRecordFieldsCons(dictIsSymbol) {
- return function (dictShowRecordFields) {
- return function (dictShow) {
- return new ShowRecordFields(function (v) {
- return function (record) {
- var tail = showRecordFields(dictShowRecordFields)(Type_Data_RowList.RLProxy.value)(record);
- var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
- var focus = Record_Unsafe.unsafeGet(key)(record);
- return $foreign.cons($foreign.join(": ")([key, show(dictShow)(focus)]))(tail);
- };
- });
- };
- };
- };
- module.exports = {
- Show: Show,
- show: show,
- ShowRecordFields: ShowRecordFields,
- showRecordFields: showRecordFields,
- showBoolean: showBoolean,
- showInt: showInt,
- showNumber: showNumber,
- showChar: showChar,
- showString: showString,
- showArray: showArray,
- showRecord: showRecord,
- showRecordFieldsNil: showRecordFieldsNil,
- showRecordFieldsCons: showRecordFieldsCons
- };
- },{"./foreign.js":"../output/Data.Show/foreign.js","../Data.Symbol/index.js":"../output/Data.Symbol/index.js","../Record.Unsafe/index.js":"../output/Record.Unsafe/index.js","../Type.Data.RowList/index.js":"../output/Type.Data.RowList/index.js"}],"../output/Data.Unit/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Data_Show = require("../Data.Show/index.js");
- var showUnit = new Data_Show.Show(function (v) {
- return "unit";
- });
- module.exports = {
- showUnit: showUnit,
- unit: $foreign.unit
- };
- },{"./foreign.js":"../output/Data.Unit/foreign.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Functor/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Unit = require("../Data.Unit/index.js");
- var Functor = function Functor(map) {
- this.map = map;
- };
- var map = function map(dict) {
- return dict.map;
- };
- var mapFlipped = function mapFlipped(dictFunctor) {
- return function (fa) {
- return function (f) {
- return map(dictFunctor)(f)(fa);
- };
- };
- };
- var $$void = function $$void(dictFunctor) {
- return map(dictFunctor)(Data_Function["const"](Data_Unit.unit));
- };
- var voidLeft = function voidLeft(dictFunctor) {
- return function (f) {
- return function (x) {
- return map(dictFunctor)(Data_Function["const"](x))(f);
- };
- };
- };
- var voidRight = function voidRight(dictFunctor) {
- return function (x) {
- return map(dictFunctor)(Data_Function["const"](x));
- };
- };
- var functorFn = new Functor(Control_Semigroupoid.compose(Control_Semigroupoid.semigroupoidFn));
- var functorArray = new Functor($foreign.arrayMap);
- var flap = function flap(dictFunctor) {
- return function (ff) {
- return function (x) {
- return map(dictFunctor)(function (f) {
- return f(x);
- })(ff);
- };
- };
- };
- module.exports = {
- Functor: Functor,
- map: map,
- mapFlipped: mapFlipped,
- "void": $$void,
- voidRight: voidRight,
- voidLeft: voidLeft,
- flap: flap,
- functorFn: functorFn,
- functorArray: functorArray
- };
- },{"./foreign.js":"../output/Data.Functor/foreign.js","../Control.Semigroupoid/index.js":"../output/Control.Semigroupoid/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Control.Apply/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Control_Category = require("../Control.Category/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Apply = function Apply(Functor0, apply) {
- this.Functor0 = Functor0;
- this.apply = apply;
- };
- var applyFn = new Apply(function () {
- return Data_Functor.functorFn;
- }, function (f) {
- return function (g) {
- return function (x) {
- return f(x)(g(x));
- };
- };
- });
- var applyArray = new Apply(function () {
- return Data_Functor.functorArray;
- }, $foreign.arrayApply);
- var apply = function apply(dict) {
- return dict.apply;
- };
- var applyFirst = function applyFirst(dictApply) {
- return function (a) {
- return function (b) {
- return apply(dictApply)(Data_Functor.map(dictApply.Functor0())(Data_Function["const"])(a))(b);
- };
- };
- };
- var applySecond = function applySecond(dictApply) {
- return function (a) {
- return function (b) {
- return apply(dictApply)(Data_Functor.map(dictApply.Functor0())(Data_Function["const"](Control_Category.identity(Control_Category.categoryFn)))(a))(b);
- };
- };
- };
- var lift2 = function lift2(dictApply) {
- return function (f) {
- return function (a) {
- return function (b) {
- return apply(dictApply)(Data_Functor.map(dictApply.Functor0())(f)(a))(b);
- };
- };
- };
- };
- var lift3 = function lift3(dictApply) {
- return function (f) {
- return function (a) {
- return function (b) {
- return function (c) {
- return apply(dictApply)(apply(dictApply)(Data_Functor.map(dictApply.Functor0())(f)(a))(b))(c);
- };
- };
- };
- };
- };
- var lift4 = function lift4(dictApply) {
- return function (f) {
- return function (a) {
- return function (b) {
- return function (c) {
- return function (d) {
- return apply(dictApply)(apply(dictApply)(apply(dictApply)(Data_Functor.map(dictApply.Functor0())(f)(a))(b))(c))(d);
- };
- };
- };
- };
- };
- };
- var lift5 = function lift5(dictApply) {
- return function (f) {
- return function (a) {
- return function (b) {
- return function (c) {
- return function (d) {
- return function (e) {
- return apply(dictApply)(apply(dictApply)(apply(dictApply)(apply(dictApply)(Data_Functor.map(dictApply.Functor0())(f)(a))(b))(c))(d))(e);
- };
- };
- };
- };
- };
- };
- };
- module.exports = {
- Apply: Apply,
- apply: apply,
- applyFirst: applyFirst,
- applySecond: applySecond,
- lift2: lift2,
- lift3: lift3,
- lift4: lift4,
- lift5: lift5,
- applyFn: applyFn,
- applyArray: applyArray
- };
- },{"./foreign.js":"../output/Control.Apply/foreign.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js"}],"../output/Control.Applicative/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Apply = require("../Control.Apply/index.js");
- var Data_Unit = require("../Data.Unit/index.js");
- var Applicative = function Applicative(Apply0, pure) {
- this.Apply0 = Apply0;
- this.pure = pure;
- };
- var pure = function pure(dict) {
- return dict.pure;
- };
- var unless = function unless(dictApplicative) {
- return function (v) {
- return function (v1) {
- if (!v) {
- return v1;
- }
- ;
- if (v) {
- return pure(dictApplicative)(Data_Unit.unit);
- }
- ;
- throw new Error("Failed pattern match at Control.Applicative (line 62, column 1 - line 62, column 65): " + [v.constructor.name, v1.constructor.name]);
- };
- };
- };
- var when = function when(dictApplicative) {
- return function (v) {
- return function (v1) {
- if (v) {
- return v1;
- }
- ;
- if (!v) {
- return pure(dictApplicative)(Data_Unit.unit);
- }
- ;
- throw new Error("Failed pattern match at Control.Applicative (line 57, column 1 - line 57, column 63): " + [v.constructor.name, v1.constructor.name]);
- };
- };
- };
- var liftA1 = function liftA1(dictApplicative) {
- return function (f) {
- return function (a) {
- return Control_Apply.apply(dictApplicative.Apply0())(pure(dictApplicative)(f))(a);
- };
- };
- };
- var applicativeFn = new Applicative(function () {
- return Control_Apply.applyFn;
- }, function (x) {
- return function (v) {
- return x;
- };
- });
- var applicativeArray = new Applicative(function () {
- return Control_Apply.applyArray;
- }, function (x) {
- return [x];
- });
- module.exports = {
- Applicative: Applicative,
- pure: pure,
- liftA1: liftA1,
- unless: unless,
- when: when,
- applicativeFn: applicativeFn,
- applicativeArray: applicativeArray
- };
- },{"../Control.Apply/index.js":"../output/Control.Apply/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Data.Semigroup/foreign.js":[function(require,module,exports) {
- "use strict";
- exports.concatString = function (s1) {
- return function (s2) {
- return s1 + s2;
- };
- };
- exports.concatArray = function (xs) {
- return function (ys) {
- if (xs.length === 0) return ys;
- if (ys.length === 0) return xs;
- return xs.concat(ys);
- };
- };
- },{}],"../output/Data.Void/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Data_Show = require("../Data.Show/index.js");
- var Void = function Void(x) {
- return x;
- };
- var absurd = function absurd(a) {
- var spin = function spin($copy_v) {
- var $tco_result;
- function $tco_loop(v) {
- $copy_v = v;
- return;
- }
- ;
- while (!false) {
- $tco_result = $tco_loop($copy_v);
- }
- ;
- return $tco_result;
- };
- return spin(a);
- };
- var showVoid = new Data_Show.Show(absurd);
- module.exports = {
- absurd: absurd,
- showVoid: showVoid
- };
- },{"../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Semigroup/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Data_Symbol = require("../Data.Symbol/index.js");
- var Data_Unit = require("../Data.Unit/index.js");
- var Data_Void = require("../Data.Void/index.js");
- var Record_Unsafe = require("../Record.Unsafe/index.js");
- var Type_Data_RowList = require("../Type.Data.RowList/index.js");
- var SemigroupRecord = function SemigroupRecord(appendRecord) {
- this.appendRecord = appendRecord;
- };
- var Semigroup = function Semigroup(append) {
- this.append = append;
- };
- var semigroupVoid = new Semigroup(function (v) {
- return Data_Void.absurd;
- });
- var semigroupUnit = new Semigroup(function (v) {
- return function (v1) {
- return Data_Unit.unit;
- };
- });
- var semigroupString = new Semigroup($foreign.concatString);
- var semigroupRecordNil = new SemigroupRecord(function (v) {
- return function (v1) {
- return function (v2) {
- return {};
- };
- };
- });
- var semigroupArray = new Semigroup($foreign.concatArray);
- var appendRecord = function appendRecord(dict) {
- return dict.appendRecord;
- };
- var semigroupRecord = function semigroupRecord(dictRowToList) {
- return function (dictSemigroupRecord) {
- return new Semigroup(appendRecord(dictSemigroupRecord)(Type_Data_RowList.RLProxy.value));
- };
- };
- var append = function append(dict) {
- return dict.append;
- };
- var semigroupFn = function semigroupFn(dictSemigroup) {
- return new Semigroup(function (f) {
- return function (g) {
- return function (x) {
- return append(dictSemigroup)(f(x))(g(x));
- };
- };
- });
- };
- var semigroupRecordCons = function semigroupRecordCons(dictIsSymbol) {
- return function (dictCons) {
- return function (dictSemigroupRecord) {
- return function (dictSemigroup) {
- return new SemigroupRecord(function (v) {
- return function (ra) {
- return function (rb) {
- var tail = appendRecord(dictSemigroupRecord)(Type_Data_RowList.RLProxy.value)(ra)(rb);
- var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
- var insert = Record_Unsafe.unsafeSet(key);
- var get = Record_Unsafe.unsafeGet(key);
- return insert(append(dictSemigroup)(get(ra))(get(rb)))(tail);
- };
- };
- });
- };
- };
- };
- };
- module.exports = {
- Semigroup: Semigroup,
- append: append,
- SemigroupRecord: SemigroupRecord,
- appendRecord: appendRecord,
- semigroupString: semigroupString,
- semigroupUnit: semigroupUnit,
- semigroupVoid: semigroupVoid,
- semigroupFn: semigroupFn,
- semigroupArray: semigroupArray,
- semigroupRecord: semigroupRecord,
- semigroupRecordNil: semigroupRecordNil,
- semigroupRecordCons: semigroupRecordCons
- };
- },{"./foreign.js":"../output/Data.Semigroup/foreign.js","../Data.Symbol/index.js":"../output/Data.Symbol/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js","../Data.Void/index.js":"../output/Data.Void/index.js","../Record.Unsafe/index.js":"../output/Record.Unsafe/index.js","../Type.Data.RowList/index.js":"../output/Type.Data.RowList/index.js"}],"../output/Control.Alt/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Alt = function Alt(Functor0, alt) {
- this.Functor0 = Functor0;
- this.alt = alt;
- };
- var altArray = new Alt(function () {
- return Data_Functor.functorArray;
- }, Data_Semigroup.append(Data_Semigroup.semigroupArray));
- var alt = function alt(dict) {
- return dict.alt;
- };
- module.exports = {
- Alt: Alt,
- alt: alt,
- altArray: altArray
- };
- },{"../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js"}],"../output/Control.Plus/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Alt = require("../Control.Alt/index.js");
- var Plus = function Plus(Alt0, empty) {
- this.Alt0 = Alt0;
- this.empty = empty;
- };
- var plusArray = new Plus(function () {
- return Control_Alt.altArray;
- }, []);
- var empty = function empty(dict) {
- return dict.empty;
- };
- module.exports = {
- Plus: Plus,
- empty: empty,
- plusArray: plusArray
- };
- },{"../Control.Alt/index.js":"../output/Control.Alt/index.js"}],"../output/Control.Alternative/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Plus = require("../Control.Plus/index.js");
- var Alternative = function Alternative(Applicative0, Plus1) {
- this.Applicative0 = Applicative0;
- this.Plus1 = Plus1;
- };
- var alternativeArray = new Alternative(function () {
- return Control_Applicative.applicativeArray;
- }, function () {
- return Control_Plus.plusArray;
- });
- module.exports = {
- Alternative: Alternative,
- alternativeArray: alternativeArray
- };
- },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Plus/index.js":"../output/Control.Plus/index.js"}],"../output/Control.Bind/foreign.js":[function(require,module,exports) {
- "use strict";
- exports.arrayBind = function (arr) {
- return function (f) {
- var result = [];
- for (var i = 0, l = arr.length; i < l; i++) {
- Array.prototype.push.apply(result, f(arr[i]));
- }
- return result;
- };
- };
- },{}],"../output/Control.Bind/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Category = require("../Control.Category/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Discard = function Discard(discard) {
- this.discard = discard;
- };
- var Bind = function Bind(Apply0, bind) {
- this.Apply0 = Apply0;
- this.bind = bind;
- };
- var discard = function discard(dict) {
- return dict.discard;
- };
- var bindFn = new Bind(function () {
- return Control_Apply.applyFn;
- }, function (m) {
- return function (f) {
- return function (x) {
- return f(m(x))(x);
- };
- };
- });
- var bindArray = new Bind(function () {
- return Control_Apply.applyArray;
- }, $foreign.arrayBind);
- var bind = function bind(dict) {
- return dict.bind;
- };
- var bindFlipped = function bindFlipped(dictBind) {
- return Data_Function.flip(bind(dictBind));
- };
- var composeKleisliFlipped = function composeKleisliFlipped(dictBind) {
- return function (f) {
- return function (g) {
- return function (a) {
- return bindFlipped(dictBind)(f)(g(a));
- };
- };
- };
- };
- var composeKleisli = function composeKleisli(dictBind) {
- return function (f) {
- return function (g) {
- return function (a) {
- return bind(dictBind)(f(a))(g);
- };
- };
- };
- };
- var discardUnit = new Discard(function (dictBind) {
- return bind(dictBind);
- });
- var ifM = function ifM(dictBind) {
- return function (cond) {
- return function (t) {
- return function (f) {
- return bind(dictBind)(cond)(function (cond$prime) {
- if (cond$prime) {
- return t;
- }
- ;
- return f;
- });
- };
- };
- };
- };
- var join = function join(dictBind) {
- return function (m) {
- return bind(dictBind)(m)(Control_Category.identity(Control_Category.categoryFn));
- };
- };
- module.exports = {
- Bind: Bind,
- bind: bind,
- bindFlipped: bindFlipped,
- Discard: Discard,
- discard: discard,
- join: join,
- composeKleisli: composeKleisli,
- composeKleisliFlipped: composeKleisliFlipped,
- ifM: ifM,
- bindFn: bindFn,
- bindArray: bindArray,
- discardUnit: discardUnit
- };
- },{"./foreign.js":"../output/Control.Bind/foreign.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Function/index.js":"../output/Data.Function/index.js"}],"../output/Control.Monad/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Monad = function Monad(Applicative0, Bind1) {
- this.Applicative0 = Applicative0;
- this.Bind1 = Bind1;
- };
- var whenM = function whenM(dictMonad) {
- return function (mb) {
- return function (m) {
- return Control_Bind.bind(dictMonad.Bind1())(mb)(function (b) {
- return Control_Applicative.when(dictMonad.Applicative0())(b)(m);
- });
- };
- };
- };
- var unlessM = function unlessM(dictMonad) {
- return function (mb) {
- return function (m) {
- return Control_Bind.bind(dictMonad.Bind1())(mb)(function (b) {
- return Control_Applicative.unless(dictMonad.Applicative0())(b)(m);
- });
- };
- };
- };
- var monadFn = new Monad(function () {
- return Control_Applicative.applicativeFn;
- }, function () {
- return Control_Bind.bindFn;
- });
- var monadArray = new Monad(function () {
- return Control_Applicative.applicativeArray;
- }, function () {
- return Control_Bind.bindArray;
- });
- var liftM1 = function liftM1(dictMonad) {
- return function (f) {
- return function (a) {
- return Control_Bind.bind(dictMonad.Bind1())(a)(function (a$prime) {
- return Control_Applicative.pure(dictMonad.Applicative0())(f(a$prime));
- });
- };
- };
- };
- var ap = function ap(dictMonad) {
- return function (f) {
- return function (a) {
- return Control_Bind.bind(dictMonad.Bind1())(f)(function (f$prime) {
- return Control_Bind.bind(dictMonad.Bind1())(a)(function (a$prime) {
- return Control_Applicative.pure(dictMonad.Applicative0())(f$prime(a$prime));
- });
- });
- };
- };
- };
- module.exports = {
- Monad: Monad,
- liftM1: liftM1,
- ap: ap,
- whenM: whenM,
- unlessM: unlessM,
- monadFn: monadFn,
- monadArray: monadArray
- };
- },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js"}],"../output/Control.Monad.Cont.Class/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var MonadCont = function MonadCont(Monad0, callCC) {
- this.Monad0 = Monad0;
- this.callCC = callCC;
- };
- var callCC = function callCC(dict) {
- return dict.callCC;
- };
- module.exports = {
- MonadCont: MonadCont,
- callCC: callCC
- };
- },{}],"../output/Control.Extend/foreign.js":[function(require,module,exports) {
- "use strict";
- exports.arrayExtend = function (f) {
- return function (xs) {
- return xs.map(function (_, i, xs) {
- return f(xs.slice(i));
- });
- };
- };
- },{}],"../output/Control.Extend/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Control_Category = require("../Control.Category/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Extend = function Extend(Functor0, extend) {
- this.Functor0 = Functor0;
- this.extend = extend;
- };
- var extendFn = function extendFn(dictSemigroup) {
- return new Extend(function () {
- return Data_Functor.functorFn;
- }, function (f) {
- return function (g) {
- return function (w) {
- return f(function (w$prime) {
- return g(Data_Semigroup.append(dictSemigroup)(w)(w$prime));
- });
- };
- };
- });
- };
- var extendArray = new Extend(function () {
- return Data_Functor.functorArray;
- }, $foreign.arrayExtend);
- var extend = function extend(dict) {
- return dict.extend;
- };
- var extendFlipped = function extendFlipped(dictExtend) {
- return function (w) {
- return function (f) {
- return extend(dictExtend)(f)(w);
- };
- };
- };
- var duplicate = function duplicate(dictExtend) {
- return extend(dictExtend)(Control_Category.identity(Control_Category.categoryFn));
- };
- var composeCoKleisliFlipped = function composeCoKleisliFlipped(dictExtend) {
- return function (f) {
- return function (g) {
- return function (w) {
- return f(extend(dictExtend)(g)(w));
- };
- };
- };
- };
- var composeCoKleisli = function composeCoKleisli(dictExtend) {
- return function (f) {
- return function (g) {
- return function (w) {
- return g(extend(dictExtend)(f)(w));
- };
- };
- };
- };
- module.exports = {
- Extend: Extend,
- extend: extend,
- extendFlipped: extendFlipped,
- composeCoKleisli: composeCoKleisli,
- composeCoKleisliFlipped: composeCoKleisliFlipped,
- duplicate: duplicate,
- extendFn: extendFn,
- extendArray: extendArray
- };
- },{"./foreign.js":"../output/Control.Extend/foreign.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js"}],"../output/Data.Foldable/foreign.js":[function(require,module,exports) {
- "use strict";
- exports.foldrArray = function (f) {
- return function (init) {
- return function (xs) {
- var acc = init;
- var len = xs.length;
- for (var i = len - 1; i >= 0; i--) {
- acc = f(xs[i])(acc);
- }
- return acc;
- };
- };
- };
- exports.foldlArray = function (f) {
- return function (init) {
- return function (xs) {
- var acc = init;
- var len = xs.length;
- for (var i = 0; i < len; i++) {
- acc = f(acc)(xs[i]);
- }
- return acc;
- };
- };
- };
- },{}],"../output/Data.Eq/foreign.js":[function(require,module,exports) {
- "use strict";
- var refEq = function refEq(r1) {
- return function (r2) {
- return r1 === r2;
- };
- };
- exports.eqBooleanImpl = refEq;
- exports.eqIntImpl = refEq;
- exports.eqNumberImpl = refEq;
- exports.eqCharImpl = refEq;
- exports.eqStringImpl = refEq;
- exports.eqArrayImpl = function (f) {
- return function (xs) {
- return function (ys) {
- if (xs === ys) return true;
- if (xs.length !== ys.length) return false;
- for (var i = 0; i < xs.length; i++) {
- if (!f(xs[i])(ys[i])) return false;
- }
- return true;
- };
- };
- };
- },{}],"../output/Data.Eq/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Data_Symbol = require("../Data.Symbol/index.js");
- var Record_Unsafe = require("../Record.Unsafe/index.js");
- var Type_Data_RowList = require("../Type.Data.RowList/index.js");
- var EqRecord = function EqRecord(eqRecord) {
- this.eqRecord = eqRecord;
- };
- var Eq1 = function Eq1(eq1) {
- this.eq1 = eq1;
- };
- var Eq = function Eq(eq) {
- this.eq = eq;
- };
- var eqVoid = new Eq(function (v) {
- return function (v1) {
- return true;
- };
- });
- var eqUnit = new Eq(function (v) {
- return function (v1) {
- return true;
- };
- });
- var eqString = new Eq($foreign.eqStringImpl);
- var eqRowNil = new EqRecord(function (v) {
- return function (v1) {
- return function (v2) {
- return true;
- };
- };
- });
- var eqRecord = function eqRecord(dict) {
- return dict.eqRecord;
- };
- var eqRec = function eqRec(dictRowToList) {
- return function (dictEqRecord) {
- return new Eq(eqRecord(dictEqRecord)(Type_Data_RowList.RLProxy.value));
- };
- };
- var eqNumber = new Eq($foreign.eqNumberImpl);
- var eqInt = new Eq($foreign.eqIntImpl);
- var eqChar = new Eq($foreign.eqCharImpl);
- var eqBoolean = new Eq($foreign.eqBooleanImpl);
- var eq1 = function eq1(dict) {
- return dict.eq1;
- };
- var eq = function eq(dict) {
- return dict.eq;
- };
- var eqArray = function eqArray(dictEq) {
- return new Eq($foreign.eqArrayImpl(eq(dictEq)));
- };
- var eq1Array = new Eq1(function (dictEq) {
- return eq(eqArray(dictEq));
- });
- var eqRowCons = function eqRowCons(dictEqRecord) {
- return function (dictCons) {
- return function (dictIsSymbol) {
- return function (dictEq) {
- return new EqRecord(function (v) {
- return function (ra) {
- return function (rb) {
- var tail = eqRecord(dictEqRecord)(Type_Data_RowList.RLProxy.value)(ra)(rb);
- var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
- var get = Record_Unsafe.unsafeGet(key);
- return eq(dictEq)(get(ra))(get(rb)) && tail;
- };
- };
- });
- };
- };
- };
- };
- var notEq = function notEq(dictEq) {
- return function (x) {
- return function (y) {
- return eq(eqBoolean)(eq(dictEq)(x)(y))(false);
- };
- };
- };
- var notEq1 = function notEq1(dictEq1) {
- return function (dictEq) {
- return function (x) {
- return function (y) {
- return eq(eqBoolean)(eq1(dictEq1)(dictEq)(x)(y))(false);
- };
- };
- };
- };
- module.exports = {
- Eq: Eq,
- eq: eq,
- notEq: notEq,
- Eq1: Eq1,
- eq1: eq1,
- notEq1: notEq1,
- EqRecord: EqRecord,
- eqRecord: eqRecord,
- eqBoolean: eqBoolean,
- eqInt: eqInt,
- eqNumber: eqNumber,
- eqChar: eqChar,
- eqString: eqString,
- eqUnit: eqUnit,
- eqVoid: eqVoid,
- eqArray: eqArray,
- eqRec: eqRec,
- eq1Array: eq1Array,
- eqRowNil: eqRowNil,
- eqRowCons: eqRowCons
- };
- },{"./foreign.js":"../output/Data.Eq/foreign.js","../Data.Symbol/index.js":"../output/Data.Symbol/index.js","../Record.Unsafe/index.js":"../output/Record.Unsafe/index.js","../Type.Data.RowList/index.js":"../output/Type.Data.RowList/index.js"}],"../output/Data.HeytingAlgebra/foreign.js":[function(require,module,exports) {
- "use strict";
- exports.boolConj = function (b1) {
- return function (b2) {
- return b1 && b2;
- };
- };
- exports.boolDisj = function (b1) {
- return function (b2) {
- return b1 || b2;
- };
- };
- exports.boolNot = function (b) {
- return !b;
- };
- },{}],"../output/Type.Data.Row/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var RProxy = function () {
- function RProxy() {}
- ;
- RProxy.value = new RProxy();
- return RProxy;
- }();
- module.exports = {
- RProxy: RProxy
- };
- },{}],"../output/Data.HeytingAlgebra/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Data_Symbol = require("../Data.Symbol/index.js");
- var Data_Unit = require("../Data.Unit/index.js");
- var Record_Unsafe = require("../Record.Unsafe/index.js");
- var Type_Data_Row = require("../Type.Data.Row/index.js");
- var Type_Data_RowList = require("../Type.Data.RowList/index.js");
- var HeytingAlgebraRecord = function HeytingAlgebraRecord(conjRecord, disjRecord, ffRecord, impliesRecord, notRecord, ttRecord) {
- this.conjRecord = conjRecord;
- this.disjRecord = disjRecord;
- this.ffRecord = ffRecord;
- this.impliesRecord = impliesRecord;
- this.notRecord = notRecord;
- this.ttRecord = ttRecord;
- };
- var HeytingAlgebra = function HeytingAlgebra(conj, disj, ff, implies, not, tt) {
- this.conj = conj;
- this.disj = disj;
- this.ff = ff;
- this.implies = implies;
- this.not = not;
- this.tt = tt;
- };
- var ttRecord = function ttRecord(dict) {
- return dict.ttRecord;
- };
- var tt = function tt(dict) {
- return dict.tt;
- };
- var notRecord = function notRecord(dict) {
- return dict.notRecord;
- };
- var not = function not(dict) {
- return dict.not;
- };
- var impliesRecord = function impliesRecord(dict) {
- return dict.impliesRecord;
- };
- var implies = function implies(dict) {
- return dict.implies;
- };
- var heytingAlgebraUnit = new HeytingAlgebra(function (v) {
- return function (v1) {
- return Data_Unit.unit;
- };
- }, function (v) {
- return function (v1) {
- return Data_Unit.unit;
- };
- }, Data_Unit.unit, function (v) {
- return function (v1) {
- return Data_Unit.unit;
- };
- }, function (v) {
- return Data_Unit.unit;
- }, Data_Unit.unit);
- var heytingAlgebraRecordNil = new HeytingAlgebraRecord(function (v) {
- return function (v1) {
- return function (v2) {
- return {};
- };
- };
- }, function (v) {
- return function (v1) {
- return function (v2) {
- return {};
- };
- };
- }, function (v) {
- return function (v1) {
- return {};
- };
- }, function (v) {
- return function (v1) {
- return function (v2) {
- return {};
- };
- };
- }, function (v) {
- return function (v1) {
- return {};
- };
- }, function (v) {
- return function (v1) {
- return {};
- };
- });
- var ffRecord = function ffRecord(dict) {
- return dict.ffRecord;
- };
- var ff = function ff(dict) {
- return dict.ff;
- };
- var disjRecord = function disjRecord(dict) {
- return dict.disjRecord;
- };
- var disj = function disj(dict) {
- return dict.disj;
- };
- var heytingAlgebraBoolean = new HeytingAlgebra($foreign.boolConj, $foreign.boolDisj, false, function (a) {
- return function (b) {
- return disj(heytingAlgebraBoolean)(not(heytingAlgebraBoolean)(a))(b);
- };
- }, $foreign.boolNot, true);
- var conjRecord = function conjRecord(dict) {
- return dict.conjRecord;
- };
- var heytingAlgebraRecord = function heytingAlgebraRecord(dictRowToList) {
- return function (dictHeytingAlgebraRecord) {
- return new HeytingAlgebra(conjRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value), disjRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value), ffRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value)(Type_Data_Row.RProxy.value), impliesRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value), notRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value), ttRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value)(Type_Data_Row.RProxy.value));
- };
- };
- var conj = function conj(dict) {
- return dict.conj;
- };
- var heytingAlgebraFunction = function heytingAlgebraFunction(dictHeytingAlgebra) {
- return new HeytingAlgebra(function (f) {
- return function (g) {
- return function (a) {
- return conj(dictHeytingAlgebra)(f(a))(g(a));
- };
- };
- }, function (f) {
- return function (g) {
- return function (a) {
- return disj(dictHeytingAlgebra)(f(a))(g(a));
- };
- };
- }, function (v) {
- return ff(dictHeytingAlgebra);
- }, function (f) {
- return function (g) {
- return function (a) {
- return implies(dictHeytingAlgebra)(f(a))(g(a));
- };
- };
- }, function (f) {
- return function (a) {
- return not(dictHeytingAlgebra)(f(a));
- };
- }, function (v) {
- return tt(dictHeytingAlgebra);
- });
- };
- var heytingAlgebraRecordCons = function heytingAlgebraRecordCons(dictIsSymbol) {
- return function (dictCons) {
- return function (dictHeytingAlgebraRecord) {
- return function (dictHeytingAlgebra) {
- return new HeytingAlgebraRecord(function (v) {
- return function (ra) {
- return function (rb) {
- var tail = conjRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value)(ra)(rb);
- var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
- var insert = Record_Unsafe.unsafeSet(key);
- var get = Record_Unsafe.unsafeGet(key);
- return insert(conj(dictHeytingAlgebra)(get(ra))(get(rb)))(tail);
- };
- };
- }, function (v) {
- return function (ra) {
- return function (rb) {
- var tail = disjRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value)(ra)(rb);
- var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
- var insert = Record_Unsafe.unsafeSet(key);
- var get = Record_Unsafe.unsafeGet(key);
- return insert(disj(dictHeytingAlgebra)(get(ra))(get(rb)))(tail);
- };
- };
- }, function (v) {
- return function (row) {
- var tail = ffRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value)(row);
- var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
- var insert = Record_Unsafe.unsafeSet(key);
- return insert(ff(dictHeytingAlgebra))(tail);
- };
- }, function (v) {
- return function (ra) {
- return function (rb) {
- var tail = impliesRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value)(ra)(rb);
- var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
- var insert = Record_Unsafe.unsafeSet(key);
- var get = Record_Unsafe.unsafeGet(key);
- return insert(implies(dictHeytingAlgebra)(get(ra))(get(rb)))(tail);
- };
- };
- }, function (v) {
- return function (row) {
- var tail = notRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value)(row);
- var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
- var insert = Record_Unsafe.unsafeSet(key);
- var get = Record_Unsafe.unsafeGet(key);
- return insert(not(dictHeytingAlgebra)(get(row)))(tail);
- };
- }, function (v) {
- return function (row) {
- var tail = ttRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value)(row);
- var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
- var insert = Record_Unsafe.unsafeSet(key);
- return insert(tt(dictHeytingAlgebra))(tail);
- };
- });
- };
- };
- };
- };
- module.exports = {
- HeytingAlgebra: HeytingAlgebra,
- tt: tt,
- ff: ff,
- implies: implies,
- conj: conj,
- disj: disj,
- not: not,
- HeytingAlgebraRecord: HeytingAlgebraRecord,
- ffRecord: ffRecord,
- ttRecord: ttRecord,
- impliesRecord: impliesRecord,
- conjRecord: conjRecord,
- disjRecord: disjRecord,
- notRecord: notRecord,
- heytingAlgebraBoolean: heytingAlgebraBoolean,
- heytingAlgebraUnit: heytingAlgebraUnit,
- heytingAlgebraFunction: heytingAlgebraFunction,
- heytingAlgebraRecord: heytingAlgebraRecord,
- heytingAlgebraRecordNil: heytingAlgebraRecordNil,
- heytingAlgebraRecordCons: heytingAlgebraRecordCons
- };
- },{"./foreign.js":"../output/Data.HeytingAlgebra/foreign.js","../Data.Symbol/index.js":"../output/Data.Symbol/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js","../Record.Unsafe/index.js":"../output/Record.Unsafe/index.js","../Type.Data.Row/index.js":"../output/Type.Data.Row/index.js","../Type.Data.RowList/index.js":"../output/Type.Data.RowList/index.js"}],"../output/Control.MonadZero/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Alternative = require("../Control.Alternative/index.js");
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Monad = require("../Control.Monad/index.js");
- var Control_Plus = require("../Control.Plus/index.js");
- var Data_Unit = require("../Data.Unit/index.js");
- var MonadZero = function MonadZero(Alternative1, Monad0) {
- this.Alternative1 = Alternative1;
- this.Monad0 = Monad0;
- };
- var monadZeroArray = new MonadZero(function () {
- return Control_Alternative.alternativeArray;
- }, function () {
- return Control_Monad.monadArray;
- });
- var guard = function guard(dictMonadZero) {
- return function (v) {
- if (v) {
- return Control_Applicative.pure(dictMonadZero.Alternative1().Applicative0())(Data_Unit.unit);
- }
- ;
- if (!v) {
- return Control_Plus.empty(dictMonadZero.Alternative1().Plus1());
- }
- ;
- throw new Error("Failed pattern match at Control.MonadZero (line 54, column 1 - line 54, column 52): " + [v.constructor.name]);
- };
- };
- module.exports = {
- MonadZero: MonadZero,
- guard: guard,
- monadZeroArray: monadZeroArray
- };
- },{"../Control.Alternative/index.js":"../output/Control.Alternative/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Control.Plus/index.js":"../output/Control.Plus/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Data.Bounded/foreign.js":[function(require,module,exports) {
- "use strict";
- exports.topInt = 2147483647;
- exports.bottomInt = -2147483648;
- exports.topChar = String.fromCharCode(65535);
- exports.bottomChar = String.fromCharCode(0);
- exports.topNumber = Number.POSITIVE_INFINITY;
- exports.bottomNumber = Number.NEGATIVE_INFINITY;
- },{}],"../output/Data.Ord/foreign.js":[function(require,module,exports) {
- "use strict";
- var unsafeCompareImpl = function unsafeCompareImpl(lt) {
- return function (eq) {
- return function (gt) {
- return function (x) {
- return function (y) {
- return x < y ? lt : x === y ? eq : gt;
- };
- };
- };
- };
- };
- exports.ordBooleanImpl = unsafeCompareImpl;
- exports.ordIntImpl = unsafeCompareImpl;
- exports.ordNumberImpl = unsafeCompareImpl;
- exports.ordStringImpl = unsafeCompareImpl;
- exports.ordCharImpl = unsafeCompareImpl;
- exports.ordArrayImpl = function (f) {
- return function (xs) {
- return function (ys) {
- var i = 0;
- var xlen = xs.length;
- var ylen = ys.length;
- while (i < xlen && i < ylen) {
- var x = xs[i];
- var y = ys[i];
- var o = f(x)(y);
- if (o !== 0) {
- return o;
- }
- i++;
- }
- if (xlen === ylen) {
- return 0;
- } else if (xlen > ylen) {
- return -1;
- } else {
- return 1;
- }
- };
- };
- };
- },{}],"../output/Data.Ordering/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var LT = function () {
- function LT() {}
- ;
- LT.value = new LT();
- return LT;
- }();
- var GT = function () {
- function GT() {}
- ;
- GT.value = new GT();
- return GT;
- }();
- var EQ = function () {
- function EQ() {}
- ;
- EQ.value = new EQ();
- return EQ;
- }();
- var showOrdering = new Data_Show.Show(function (v) {
- if (v instanceof LT) {
- return "LT";
- }
- ;
- if (v instanceof GT) {
- return "GT";
- }
- ;
- if (v instanceof EQ) {
- return "EQ";
- }
- ;
- throw new Error("Failed pattern match at Data.Ordering (line 26, column 1 - line 29, column 17): " + [v.constructor.name]);
- });
- var semigroupOrdering = new Data_Semigroup.Semigroup(function (v) {
- return function (v1) {
- if (v instanceof LT) {
- return LT.value;
- }
- ;
- if (v instanceof GT) {
- return GT.value;
- }
- ;
- if (v instanceof EQ) {
- return v1;
- }
- ;
- throw new Error("Failed pattern match at Data.Ordering (line 21, column 1 - line 24, column 18): " + [v.constructor.name, v1.constructor.name]);
- };
- });
- var invert = function invert(v) {
- if (v instanceof GT) {
- return LT.value;
- }
- ;
- if (v instanceof EQ) {
- return EQ.value;
- }
- ;
- if (v instanceof LT) {
- return GT.value;
- }
- ;
- throw new Error("Failed pattern match at Data.Ordering (line 33, column 1 - line 33, column 31): " + [v.constructor.name]);
- };
- var eqOrdering = new Data_Eq.Eq(function (v) {
- return function (v1) {
- if (v instanceof LT && v1 instanceof LT) {
- return true;
- }
- ;
- if (v instanceof GT && v1 instanceof GT) {
- return true;
- }
- ;
- if (v instanceof EQ && v1 instanceof EQ) {
- return true;
- }
- ;
- return false;
- };
- });
- module.exports = {
- LT: LT,
- GT: GT,
- EQ: EQ,
- invert: invert,
- eqOrdering: eqOrdering,
- semigroupOrdering: semigroupOrdering,
- showOrdering: showOrdering
- };
- },{"../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Ring/foreign.js":[function(require,module,exports) {
- "use strict";
- exports.intSub = function (x) {
- return function (y) {
- /* jshint bitwise: false */
- return x - y | 0;
- };
- };
- exports.numSub = function (n1) {
- return function (n2) {
- return n1 - n2;
- };
- };
- },{}],"../output/Data.Semiring/foreign.js":[function(require,module,exports) {
- "use strict";
- exports.intAdd = function (x) {
- return function (y) {
- /* jshint bitwise: false */
- return x + y | 0;
- };
- };
- exports.intMul = function (x) {
- return function (y) {
- /* jshint bitwise: false */
- return x * y | 0;
- };
- };
- exports.numAdd = function (n1) {
- return function (n2) {
- return n1 + n2;
- };
- };
- exports.numMul = function (n1) {
- return function (n2) {
- return n1 * n2;
- };
- };
- },{}],"../output/Data.Semiring/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Data_Symbol = require("../Data.Symbol/index.js");
- var Data_Unit = require("../Data.Unit/index.js");
- var Record_Unsafe = require("../Record.Unsafe/index.js");
- var Type_Data_Row = require("../Type.Data.Row/index.js");
- var Type_Data_RowList = require("../Type.Data.RowList/index.js");
- var SemiringRecord = function SemiringRecord(addRecord, mulRecord, oneRecord, zeroRecord) {
- this.addRecord = addRecord;
- this.mulRecord = mulRecord;
- this.oneRecord = oneRecord;
- this.zeroRecord = zeroRecord;
- };
- var Semiring = function Semiring(add, mul, one, zero) {
- this.add = add;
- this.mul = mul;
- this.one = one;
- this.zero = zero;
- };
- var zeroRecord = function zeroRecord(dict) {
- return dict.zeroRecord;
- };
- var zero = function zero(dict) {
- return dict.zero;
- };
- var semiringUnit = new Semiring(function (v) {
- return function (v1) {
- return Data_Unit.unit;
- };
- }, function (v) {
- return function (v1) {
- return Data_Unit.unit;
- };
- }, Data_Unit.unit, Data_Unit.unit);
- var semiringRecordNil = new SemiringRecord(function (v) {
- return function (v1) {
- return function (v2) {
- return {};
- };
- };
- }, function (v) {
- return function (v1) {
- return function (v2) {
- return {};
- };
- };
- }, function (v) {
- return function (v1) {
- return {};
- };
- }, function (v) {
- return function (v1) {
- return {};
- };
- });
- var semiringNumber = new Semiring($foreign.numAdd, $foreign.numMul, 1.0, 0.0);
- var semiringInt = new Semiring($foreign.intAdd, $foreign.intMul, 1, 0);
- var oneRecord = function oneRecord(dict) {
- return dict.oneRecord;
- };
- var one = function one(dict) {
- return dict.one;
- };
- var mulRecord = function mulRecord(dict) {
- return dict.mulRecord;
- };
- var mul = function mul(dict) {
- return dict.mul;
- };
- var addRecord = function addRecord(dict) {
- return dict.addRecord;
- };
- var semiringRecord = function semiringRecord(dictRowToList) {
- return function (dictSemiringRecord) {
- return new Semiring(addRecord(dictSemiringRecord)(Type_Data_RowList.RLProxy.value), mulRecord(dictSemiringRecord)(Type_Data_RowList.RLProxy.value), oneRecord(dictSemiringRecord)(Type_Data_RowList.RLProxy.value)(Type_Data_Row.RProxy.value), zeroRecord(dictSemiringRecord)(Type_Data_RowList.RLProxy.value)(Type_Data_Row.RProxy.value));
- };
- };
- var add = function add(dict) {
- return dict.add;
- };
- var semiringFn = function semiringFn(dictSemiring) {
- return new Semiring(function (f) {
- return function (g) {
- return function (x) {
- return add(dictSemiring)(f(x))(g(x));
- };
- };
- }, function (f) {
- return function (g) {
- return function (x) {
- return mul(dictSemiring)(f(x))(g(x));
- };
- };
- }, function (v) {
- return one(dictSemiring);
- }, function (v) {
- return zero(dictSemiring);
- });
- };
- var semiringRecordCons = function semiringRecordCons(dictIsSymbol) {
- return function (dictCons) {
- return function (dictSemiringRecord) {
- return function (dictSemiring) {
- return new SemiringRecord(function (v) {
- return function (ra) {
- return function (rb) {
- var tail = addRecord(dictSemiringRecord)(Type_Data_RowList.RLProxy.value)(ra)(rb);
- var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
- var insert = Record_Unsafe.unsafeSet(key);
- var get = Record_Unsafe.unsafeGet(key);
- return insert(add(dictSemiring)(get(ra))(get(rb)))(tail);
- };
- };
- }, function (v) {
- return function (ra) {
- return function (rb) {
- var tail = mulRecord(dictSemiringRecord)(Type_Data_RowList.RLProxy.value)(ra)(rb);
- var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
- var insert = Record_Unsafe.unsafeSet(key);
- var get = Record_Unsafe.unsafeGet(key);
- return insert(mul(dictSemiring)(get(ra))(get(rb)))(tail);
- };
- };
- }, function (v) {
- return function (v1) {
- var tail = oneRecord(dictSemiringRecord)(Type_Data_RowList.RLProxy.value)(Type_Data_Row.RProxy.value);
- var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
- var insert = Record_Unsafe.unsafeSet(key);
- return insert(one(dictSemiring))(tail);
- };
- }, function (v) {
- return function (v1) {
- var tail = zeroRecord(dictSemiringRecord)(Type_Data_RowList.RLProxy.value)(Type_Data_Row.RProxy.value);
- var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
- var insert = Record_Unsafe.unsafeSet(key);
- return insert(zero(dictSemiring))(tail);
- };
- });
- };
- };
- };
- };
- module.exports = {
- Semiring: Semiring,
- add: add,
- zero: zero,
- mul: mul,
- one: one,
- SemiringRecord: SemiringRecord,
- addRecord: addRecord,
- mulRecord: mulRecord,
- oneRecord: oneRecord,
- zeroRecord: zeroRecord,
- semiringInt: semiringInt,
- semiringNumber: semiringNumber,
- semiringFn: semiringFn,
- semiringUnit: semiringUnit,
- semiringRecord: semiringRecord,
- semiringRecordNil: semiringRecordNil,
- semiringRecordCons: semiringRecordCons
- };
- },{"./foreign.js":"../output/Data.Semiring/foreign.js","../Data.Symbol/index.js":"../output/Data.Symbol/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js","../Record.Unsafe/index.js":"../output/Record.Unsafe/index.js","../Type.Data.Row/index.js":"../output/Type.Data.Row/index.js","../Type.Data.RowList/index.js":"../output/Type.Data.RowList/index.js"}],"../output/Data.Ring/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Data_Semiring = require("../Data.Semiring/index.js");
- var Data_Symbol = require("../Data.Symbol/index.js");
- var Data_Unit = require("../Data.Unit/index.js");
- var Record_Unsafe = require("../Record.Unsafe/index.js");
- var Type_Data_RowList = require("../Type.Data.RowList/index.js");
- var RingRecord = function RingRecord(SemiringRecord0, subRecord) {
- this.SemiringRecord0 = SemiringRecord0;
- this.subRecord = subRecord;
- };
- var Ring = function Ring(Semiring0, sub) {
- this.Semiring0 = Semiring0;
- this.sub = sub;
- };
- var subRecord = function subRecord(dict) {
- return dict.subRecord;
- };
- var sub = function sub(dict) {
- return dict.sub;
- };
- var ringUnit = new Ring(function () {
- return Data_Semiring.semiringUnit;
- }, function (v) {
- return function (v1) {
- return Data_Unit.unit;
- };
- });
- var ringRecordNil = new RingRecord(function () {
- return Data_Semiring.semiringRecordNil;
- }, function (v) {
- return function (v1) {
- return function (v2) {
- return {};
- };
- };
- });
- var ringRecordCons = function ringRecordCons(dictIsSymbol) {
- return function (dictCons) {
- return function (dictRingRecord) {
- return function (dictRing) {
- return new RingRecord(function () {
- return Data_Semiring.semiringRecordCons(dictIsSymbol)()(dictRingRecord.SemiringRecord0())(dictRing.Semiring0());
- }, function (v) {
- return function (ra) {
- return function (rb) {
- var tail = subRecord(dictRingRecord)(Type_Data_RowList.RLProxy.value)(ra)(rb);
- var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
- var insert = Record_Unsafe.unsafeSet(key);
- var get = Record_Unsafe.unsafeGet(key);
- return insert(sub(dictRing)(get(ra))(get(rb)))(tail);
- };
- };
- });
- };
- };
- };
- };
- var ringRecord = function ringRecord(dictRowToList) {
- return function (dictRingRecord) {
- return new Ring(function () {
- return Data_Semiring.semiringRecord()(dictRingRecord.SemiringRecord0());
- }, subRecord(dictRingRecord)(Type_Data_RowList.RLProxy.value));
- };
- };
- var ringNumber = new Ring(function () {
- return Data_Semiring.semiringNumber;
- }, $foreign.numSub);
- var ringInt = new Ring(function () {
- return Data_Semiring.semiringInt;
- }, $foreign.intSub);
- var ringFn = function ringFn(dictRing) {
- return new Ring(function () {
- return Data_Semiring.semiringFn(dictRing.Semiring0());
- }, function (f) {
- return function (g) {
- return function (x) {
- return sub(dictRing)(f(x))(g(x));
- };
- };
- });
- };
- var negate = function negate(dictRing) {
- return function (a) {
- return sub(dictRing)(Data_Semiring.zero(dictRing.Semiring0()))(a);
- };
- };
- module.exports = {
- Ring: Ring,
- sub: sub,
- negate: negate,
- RingRecord: RingRecord,
- subRecord: subRecord,
- ringInt: ringInt,
- ringNumber: ringNumber,
- ringUnit: ringUnit,
- ringFn: ringFn,
- ringRecord: ringRecord,
- ringRecordNil: ringRecordNil,
- ringRecordCons: ringRecordCons
- };
- },{"./foreign.js":"../output/Data.Ring/foreign.js","../Data.Semiring/index.js":"../output/Data.Semiring/index.js","../Data.Symbol/index.js":"../output/Data.Symbol/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js","../Record.Unsafe/index.js":"../output/Record.Unsafe/index.js","../Type.Data.RowList/index.js":"../output/Type.Data.RowList/index.js"}],"../output/Data.Ord/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Ordering = require("../Data.Ordering/index.js");
- var Data_Ring = require("../Data.Ring/index.js");
- var Data_Semiring = require("../Data.Semiring/index.js");
- var Data_Symbol = require("../Data.Symbol/index.js");
- var Record_Unsafe = require("../Record.Unsafe/index.js");
- var Type_Data_RowList = require("../Type.Data.RowList/index.js");
- var OrdRecord = function OrdRecord(EqRecord0, compareRecord) {
- this.EqRecord0 = EqRecord0;
- this.compareRecord = compareRecord;
- };
- var Ord1 = function Ord1(Eq10, compare1) {
- this.Eq10 = Eq10;
- this.compare1 = compare1;
- };
- var Ord = function Ord(Eq0, compare) {
- this.Eq0 = Eq0;
- this.compare = compare;
- };
- var ordVoid = new Ord(function () {
- return Data_Eq.eqVoid;
- }, function (v) {
- return function (v1) {
- return Data_Ordering.EQ.value;
- };
- });
- var ordUnit = new Ord(function () {
- return Data_Eq.eqUnit;
- }, function (v) {
- return function (v1) {
- return Data_Ordering.EQ.value;
- };
- });
- var ordString = new Ord(function () {
- return Data_Eq.eqString;
- }, $foreign.ordStringImpl(Data_Ordering.LT.value)(Data_Ordering.EQ.value)(Data_Ordering.GT.value));
- var ordRecordNil = new OrdRecord(function () {
- return Data_Eq.eqRowNil;
- }, function (v) {
- return function (v1) {
- return function (v2) {
- return Data_Ordering.EQ.value;
- };
- };
- });
- var ordOrdering = new Ord(function () {
- return Data_Ordering.eqOrdering;
- }, function (v) {
- return function (v1) {
- if (v instanceof Data_Ordering.LT && v1 instanceof Data_Ordering.LT) {
- return Data_Ordering.EQ.value;
- }
- ;
- if (v instanceof Data_Ordering.EQ && v1 instanceof Data_Ordering.EQ) {
- return Data_Ordering.EQ.value;
- }
- ;
- if (v instanceof Data_Ordering.GT && v1 instanceof Data_Ordering.GT) {
- return Data_Ordering.EQ.value;
- }
- ;
- if (v instanceof Data_Ordering.LT) {
- return Data_Ordering.LT.value;
- }
- ;
- if (v instanceof Data_Ordering.EQ && v1 instanceof Data_Ordering.LT) {
- return Data_Ordering.GT.value;
- }
- ;
- if (v instanceof Data_Ordering.EQ && v1 instanceof Data_Ordering.GT) {
- return Data_Ordering.LT.value;
- }
- ;
- if (v instanceof Data_Ordering.GT) {
- return Data_Ordering.GT.value;
- }
- ;
- throw new Error("Failed pattern match at Data.Ord (line 112, column 1 - line 119, column 21): " + [v.constructor.name, v1.constructor.name]);
- };
- });
- var ordNumber = new Ord(function () {
- return Data_Eq.eqNumber;
- }, $foreign.ordNumberImpl(Data_Ordering.LT.value)(Data_Ordering.EQ.value)(Data_Ordering.GT.value));
- var ordInt = new Ord(function () {
- return Data_Eq.eqInt;
- }, $foreign.ordIntImpl(Data_Ordering.LT.value)(Data_Ordering.EQ.value)(Data_Ordering.GT.value));
- var ordChar = new Ord(function () {
- return Data_Eq.eqChar;
- }, $foreign.ordCharImpl(Data_Ordering.LT.value)(Data_Ordering.EQ.value)(Data_Ordering.GT.value));
- var ordBoolean = new Ord(function () {
- return Data_Eq.eqBoolean;
- }, $foreign.ordBooleanImpl(Data_Ordering.LT.value)(Data_Ordering.EQ.value)(Data_Ordering.GT.value));
- var compareRecord = function compareRecord(dict) {
- return dict.compareRecord;
- };
- var ordRecord = function ordRecord(dictRowToList) {
- return function (dictOrdRecord) {
- return new Ord(function () {
- return Data_Eq.eqRec()(dictOrdRecord.EqRecord0());
- }, compareRecord(dictOrdRecord)(Type_Data_RowList.RLProxy.value));
- };
- };
- var compare1 = function compare1(dict) {
- return dict.compare1;
- };
- var compare = function compare(dict) {
- return dict.compare;
- };
- var comparing = function comparing(dictOrd) {
- return function (f) {
- return function (x) {
- return function (y) {
- return compare(dictOrd)(f(x))(f(y));
- };
- };
- };
- };
- var greaterThan = function greaterThan(dictOrd) {
- return function (a1) {
- return function (a2) {
- var v = compare(dictOrd)(a1)(a2);
- if (v instanceof Data_Ordering.GT) {
- return true;
- }
- ;
- return false;
- };
- };
- };
- var greaterThanOrEq = function greaterThanOrEq(dictOrd) {
- return function (a1) {
- return function (a2) {
- var v = compare(dictOrd)(a1)(a2);
- if (v instanceof Data_Ordering.LT) {
- return false;
- }
- ;
- return true;
- };
- };
- };
- var signum = function signum(dictOrd) {
- return function (dictRing) {
- return function (x) {
- var $43 = greaterThanOrEq(dictOrd)(x)(Data_Semiring.zero(dictRing.Semiring0()));
- if ($43) {
- return Data_Semiring.one(dictRing.Semiring0());
- }
- ;
- return Data_Ring.negate(dictRing)(Data_Semiring.one(dictRing.Semiring0()));
- };
- };
- };
- var lessThan = function lessThan(dictOrd) {
- return function (a1) {
- return function (a2) {
- var v = compare(dictOrd)(a1)(a2);
- if (v instanceof Data_Ordering.LT) {
- return true;
- }
- ;
- return false;
- };
- };
- };
- var lessThanOrEq = function lessThanOrEq(dictOrd) {
- return function (a1) {
- return function (a2) {
- var v = compare(dictOrd)(a1)(a2);
- if (v instanceof Data_Ordering.GT) {
- return false;
- }
- ;
- return true;
- };
- };
- };
- var max = function max(dictOrd) {
- return function (x) {
- return function (y) {
- var v = compare(dictOrd)(x)(y);
- if (v instanceof Data_Ordering.LT) {
- return y;
- }
- ;
- if (v instanceof Data_Ordering.EQ) {
- return x;
- }
- ;
- if (v instanceof Data_Ordering.GT) {
- return x;
- }
- ;
- throw new Error("Failed pattern match at Data.Ord (line 167, column 3 - line 170, column 12): " + [v.constructor.name]);
- };
- };
- };
- var min = function min(dictOrd) {
- return function (x) {
- return function (y) {
- var v = compare(dictOrd)(x)(y);
- if (v instanceof Data_Ordering.LT) {
- return x;
- }
- ;
- if (v instanceof Data_Ordering.EQ) {
- return x;
- }
- ;
- if (v instanceof Data_Ordering.GT) {
- return y;
- }
- ;
- throw new Error("Failed pattern match at Data.Ord (line 158, column 3 - line 161, column 12): " + [v.constructor.name]);
- };
- };
- };
- var ordArray = function ordArray(dictOrd) {
- return new Ord(function () {
- return Data_Eq.eqArray(dictOrd.Eq0());
- }, function () {
- var toDelta = function toDelta(x) {
- return function (y) {
- var v = compare(dictOrd)(x)(y);
- if (v instanceof Data_Ordering.EQ) {
- return 0;
- }
- ;
- if (v instanceof Data_Ordering.LT) {
- return 1;
- }
- ;
- if (v instanceof Data_Ordering.GT) {
- return -1 | 0;
- }
- ;
- throw new Error("Failed pattern match at Data.Ord (line 65, column 7 - line 68, column 17): " + [v.constructor.name]);
- };
- };
- return function (xs) {
- return function (ys) {
- return compare(ordInt)(0)($foreign.ordArrayImpl(toDelta)(xs)(ys));
- };
- };
- }());
- };
- var ord1Array = new Ord1(function () {
- return Data_Eq.eq1Array;
- }, function (dictOrd) {
- return compare(ordArray(dictOrd));
- });
- var ordRecordCons = function ordRecordCons(dictOrdRecord) {
- return function (dictCons) {
- return function (dictIsSymbol) {
- return function (dictOrd) {
- return new OrdRecord(function () {
- return Data_Eq.eqRowCons(dictOrdRecord.EqRecord0())()(dictIsSymbol)(dictOrd.Eq0());
- }, function (v) {
- return function (ra) {
- return function (rb) {
- var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
- var left = compare(dictOrd)(Record_Unsafe.unsafeGet(key)(ra))(Record_Unsafe.unsafeGet(key)(rb));
- var $49 = Data_Eq.notEq(Data_Ordering.eqOrdering)(left)(Data_Ordering.EQ.value);
- if ($49) {
- return left;
- }
- ;
- return compareRecord(dictOrdRecord)(Type_Data_RowList.RLProxy.value)(ra)(rb);
- };
- };
- });
- };
- };
- };
- };
- var clamp = function clamp(dictOrd) {
- return function (low) {
- return function (hi) {
- return function (x) {
- return min(dictOrd)(hi)(max(dictOrd)(low)(x));
- };
- };
- };
- };
- var between = function between(dictOrd) {
- return function (low) {
- return function (hi) {
- return function (x) {
- if (lessThan(dictOrd)(x)(low)) {
- return false;
- }
- ;
- if (greaterThan(dictOrd)(x)(hi)) {
- return false;
- }
- ;
- return true;
- };
- };
- };
- };
- var abs = function abs(dictOrd) {
- return function (dictRing) {
- return function (x) {
- var $53 = greaterThanOrEq(dictOrd)(x)(Data_Semiring.zero(dictRing.Semiring0()));
- if ($53) {
- return x;
- }
- ;
- return Data_Ring.negate(dictRing)(x);
- };
- };
- };
- module.exports = {
- Ord: Ord,
- compare: compare,
- Ord1: Ord1,
- compare1: compare1,
- lessThan: lessThan,
- lessThanOrEq: lessThanOrEq,
- greaterThan: greaterThan,
- greaterThanOrEq: greaterThanOrEq,
- comparing: comparing,
- min: min,
- max: max,
- clamp: clamp,
- between: between,
- abs: abs,
- signum: signum,
- OrdRecord: OrdRecord,
- compareRecord: compareRecord,
- ordBoolean: ordBoolean,
- ordInt: ordInt,
- ordNumber: ordNumber,
- ordString: ordString,
- ordChar: ordChar,
- ordUnit: ordUnit,
- ordVoid: ordVoid,
- ordArray: ordArray,
- ordOrdering: ordOrdering,
- ord1Array: ord1Array,
- ordRecordNil: ordRecordNil,
- ordRecordCons: ordRecordCons,
- ordRecord: ordRecord
- };
- },{"./foreign.js":"../output/Data.Ord/foreign.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Ring/index.js":"../output/Data.Ring/index.js","../Data.Semiring/index.js":"../output/Data.Semiring/index.js","../Data.Symbol/index.js":"../output/Data.Symbol/index.js","../Record.Unsafe/index.js":"../output/Record.Unsafe/index.js","../Type.Data.RowList/index.js":"../output/Type.Data.RowList/index.js"}],"../output/Data.Bounded/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Ordering = require("../Data.Ordering/index.js");
- var Data_Unit = require("../Data.Unit/index.js");
- var Bounded = function Bounded(Ord0, bottom, top) {
- this.Ord0 = Ord0;
- this.bottom = bottom;
- this.top = top;
- };
- var top = function top(dict) {
- return dict.top;
- };
- var boundedUnit = new Bounded(function () {
- return Data_Ord.ordUnit;
- }, Data_Unit.unit, Data_Unit.unit);
- var boundedOrdering = new Bounded(function () {
- return Data_Ord.ordOrdering;
- }, Data_Ordering.LT.value, Data_Ordering.GT.value);
- var boundedNumber = new Bounded(function () {
- return Data_Ord.ordNumber;
- }, $foreign.bottomNumber, $foreign.topNumber);
- var boundedInt = new Bounded(function () {
- return Data_Ord.ordInt;
- }, $foreign.bottomInt, $foreign.topInt);
- var boundedChar = new Bounded(function () {
- return Data_Ord.ordChar;
- }, $foreign.bottomChar, $foreign.topChar);
- var boundedBoolean = new Bounded(function () {
- return Data_Ord.ordBoolean;
- }, false, true);
- var bottom = function bottom(dict) {
- return dict.bottom;
- };
- module.exports = {
- Bounded: Bounded,
- bottom: bottom,
- top: top,
- boundedBoolean: boundedBoolean,
- boundedInt: boundedInt,
- boundedChar: boundedChar,
- boundedOrdering: boundedOrdering,
- boundedUnit: boundedUnit,
- boundedNumber: boundedNumber
- };
- },{"./foreign.js":"../output/Data.Bounded/foreign.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Data.Functor.Invariant/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Data_Functor = require("../Data.Functor/index.js");
- var Invariant = function Invariant(imap) {
- this.imap = imap;
- };
- var invariantMultiplicative = new Invariant(function (f) {
- return function (v) {
- return function (v1) {
- return f(v1);
- };
- };
- });
- var invariantEndo = new Invariant(function (ab) {
- return function (ba) {
- return function (v) {
- return function ($31) {
- return ab(v(ba($31)));
- };
- };
- };
- });
- var invariantDual = new Invariant(function (f) {
- return function (v) {
- return function (v1) {
- return f(v1);
- };
- };
- });
- var invariantDisj = new Invariant(function (f) {
- return function (v) {
- return function (v1) {
- return f(v1);
- };
- };
- });
- var invariantConj = new Invariant(function (f) {
- return function (v) {
- return function (v1) {
- return f(v1);
- };
- };
- });
- var invariantAdditive = new Invariant(function (f) {
- return function (v) {
- return function (v1) {
- return f(v1);
- };
- };
- });
- var imapF = function imapF(dictFunctor) {
- return function (f) {
- return function (v) {
- return Data_Functor.map(dictFunctor)(f);
- };
- };
- };
- var invariantArray = new Invariant(imapF(Data_Functor.functorArray));
- var invariantFn = new Invariant(imapF(Data_Functor.functorFn));
- var imap = function imap(dict) {
- return dict.imap;
- };
- module.exports = {
- imap: imap,
- Invariant: Invariant,
- imapF: imapF,
- invariantFn: invariantFn,
- invariantArray: invariantArray,
- invariantAdditive: invariantAdditive,
- invariantConj: invariantConj,
- invariantDisj: invariantDisj,
- invariantDual: invariantDual,
- invariantEndo: invariantEndo,
- invariantMultiplicative: invariantMultiplicative
- };
- },{"../Data.Functor/index.js":"../output/Data.Functor/index.js"}],"../output/Data.EuclideanRing/foreign.js":[function(require,module,exports) {
- "use strict";
- exports.intDegree = function (x) {
- return Math.min(Math.abs(x), 2147483647);
- }; // See the Euclidean definition in
- // https://en.m.wikipedia.org/wiki/Modulo_operation.
- exports.intDiv = function (x) {
- return function (y) {
- if (y === 0) return 0;
- return y > 0 ? Math.floor(x / y) : -Math.floor(x / -y);
- };
- };
- exports.intMod = function (x) {
- return function (y) {
- if (y === 0) return 0;
- var yy = Math.abs(y);
- return (x % yy + yy) % yy;
- };
- };
- exports.numDiv = function (n1) {
- return function (n2) {
- return n1 / n2;
- };
- };
- },{}],"../output/Data.CommutativeRing/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Data_Ring = require("../Data.Ring/index.js");
- var CommutativeRingRecord = function CommutativeRingRecord(RingRecord0) {
- this.RingRecord0 = RingRecord0;
- };
- var CommutativeRing = function CommutativeRing(Ring0) {
- this.Ring0 = Ring0;
- };
- var commutativeRingUnit = new CommutativeRing(function () {
- return Data_Ring.ringUnit;
- });
- var commutativeRingRecordNil = new CommutativeRingRecord(function () {
- return Data_Ring.ringRecordNil;
- });
- var commutativeRingRecordCons = function commutativeRingRecordCons(dictIsSymbol) {
- return function (dictCons) {
- return function (dictCommutativeRingRecord) {
- return function (dictCommutativeRing) {
- return new CommutativeRingRecord(function () {
- return Data_Ring.ringRecordCons(dictIsSymbol)()(dictCommutativeRingRecord.RingRecord0())(dictCommutativeRing.Ring0());
- });
- };
- };
- };
- };
- var commutativeRingRecord = function commutativeRingRecord(dictRowToList) {
- return function (dictCommutativeRingRecord) {
- return new CommutativeRing(function () {
- return Data_Ring.ringRecord()(dictCommutativeRingRecord.RingRecord0());
- });
- };
- };
- var commutativeRingNumber = new CommutativeRing(function () {
- return Data_Ring.ringNumber;
- });
- var commutativeRingInt = new CommutativeRing(function () {
- return Data_Ring.ringInt;
- });
- var commutativeRingFn = function commutativeRingFn(dictCommutativeRing) {
- return new CommutativeRing(function () {
- return Data_Ring.ringFn(dictCommutativeRing.Ring0());
- });
- };
- module.exports = {
- CommutativeRing: CommutativeRing,
- CommutativeRingRecord: CommutativeRingRecord,
- commutativeRingInt: commutativeRingInt,
- commutativeRingNumber: commutativeRingNumber,
- commutativeRingUnit: commutativeRingUnit,
- commutativeRingFn: commutativeRingFn,
- commutativeRingRecord: commutativeRingRecord,
- commutativeRingRecordNil: commutativeRingRecordNil,
- commutativeRingRecordCons: commutativeRingRecordCons
- };
- },{"../Data.Ring/index.js":"../output/Data.Ring/index.js"}],"../output/Data.EuclideanRing/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Data_CommutativeRing = require("../Data.CommutativeRing/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Semiring = require("../Data.Semiring/index.js");
- var EuclideanRing = function EuclideanRing(CommutativeRing0, degree, div, mod) {
- this.CommutativeRing0 = CommutativeRing0;
- this.degree = degree;
- this.div = div;
- this.mod = mod;
- };
- var mod = function mod(dict) {
- return dict.mod;
- };
- var gcd = function gcd($copy_dictEq) {
- return function ($copy_dictEuclideanRing) {
- return function ($copy_a) {
- return function ($copy_b) {
- var $tco_var_dictEq = $copy_dictEq;
- var $tco_var_dictEuclideanRing = $copy_dictEuclideanRing;
- var $tco_var_a = $copy_a;
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(dictEq, dictEuclideanRing, a, b) {
- var $7 = Data_Eq.eq(dictEq)(b)(Data_Semiring.zero(dictEuclideanRing.CommutativeRing0().Ring0().Semiring0()));
- if ($7) {
- $tco_done = true;
- return a;
- }
- ;
- $tco_var_dictEq = dictEq;
- $tco_var_dictEuclideanRing = dictEuclideanRing;
- $tco_var_a = b;
- $copy_b = mod(dictEuclideanRing)(a)(b);
- return;
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($tco_var_dictEq, $tco_var_dictEuclideanRing, $tco_var_a, $copy_b);
- }
- ;
- return $tco_result;
- };
- };
- };
- };
- var euclideanRingNumber = new EuclideanRing(function () {
- return Data_CommutativeRing.commutativeRingNumber;
- }, function (v) {
- return 1;
- }, $foreign.numDiv, function (v) {
- return function (v1) {
- return 0.0;
- };
- });
- var euclideanRingInt = new EuclideanRing(function () {
- return Data_CommutativeRing.commutativeRingInt;
- }, $foreign.intDegree, $foreign.intDiv, $foreign.intMod);
- var div = function div(dict) {
- return dict.div;
- };
- var lcm = function lcm(dictEq) {
- return function (dictEuclideanRing) {
- return function (a) {
- return function (b) {
- var $8 = Data_Eq.eq(dictEq)(a)(Data_Semiring.zero(dictEuclideanRing.CommutativeRing0().Ring0().Semiring0())) || Data_Eq.eq(dictEq)(b)(Data_Semiring.zero(dictEuclideanRing.CommutativeRing0().Ring0().Semiring0()));
- if ($8) {
- return Data_Semiring.zero(dictEuclideanRing.CommutativeRing0().Ring0().Semiring0());
- }
- ;
- return div(dictEuclideanRing)(Data_Semiring.mul(dictEuclideanRing.CommutativeRing0().Ring0().Semiring0())(a)(b))(gcd(dictEq)(dictEuclideanRing)(a)(b));
- };
- };
- };
- };
- var degree = function degree(dict) {
- return dict.degree;
- };
- module.exports = {
- EuclideanRing: EuclideanRing,
- degree: degree,
- div: div,
- mod: mod,
- gcd: gcd,
- lcm: lcm,
- euclideanRingInt: euclideanRingInt,
- euclideanRingNumber: euclideanRingNumber
- };
- },{"./foreign.js":"../output/Data.EuclideanRing/foreign.js","../Data.CommutativeRing/index.js":"../output/Data.CommutativeRing/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Semiring/index.js":"../output/Data.Semiring/index.js"}],"../output/Data.Monoid/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Data_Boolean = require("../Data.Boolean/index.js");
- var Data_EuclideanRing = require("../Data.EuclideanRing/index.js");
- var Data_Ordering = require("../Data.Ordering/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Symbol = require("../Data.Symbol/index.js");
- var Data_Unit = require("../Data.Unit/index.js");
- var Record_Unsafe = require("../Record.Unsafe/index.js");
- var Type_Data_RowList = require("../Type.Data.RowList/index.js");
- var MonoidRecord = function MonoidRecord(SemigroupRecord0, memptyRecord) {
- this.SemigroupRecord0 = SemigroupRecord0;
- this.memptyRecord = memptyRecord;
- };
- var Monoid = function Monoid(Semigroup0, mempty) {
- this.Semigroup0 = Semigroup0;
- this.mempty = mempty;
- };
- var monoidUnit = new Monoid(function () {
- return Data_Semigroup.semigroupUnit;
- }, Data_Unit.unit);
- var monoidString = new Monoid(function () {
- return Data_Semigroup.semigroupString;
- }, "");
- var monoidRecordNil = new MonoidRecord(function () {
- return Data_Semigroup.semigroupRecordNil;
- }, function (v) {
- return {};
- });
- var monoidOrdering = new Monoid(function () {
- return Data_Ordering.semigroupOrdering;
- }, Data_Ordering.EQ.value);
- var monoidArray = new Monoid(function () {
- return Data_Semigroup.semigroupArray;
- }, []);
- var memptyRecord = function memptyRecord(dict) {
- return dict.memptyRecord;
- };
- var monoidRecord = function monoidRecord(dictRowToList) {
- return function (dictMonoidRecord) {
- return new Monoid(function () {
- return Data_Semigroup.semigroupRecord()(dictMonoidRecord.SemigroupRecord0());
- }, memptyRecord(dictMonoidRecord)(Type_Data_RowList.RLProxy.value));
- };
- };
- var mempty = function mempty(dict) {
- return dict.mempty;
- };
- var monoidFn = function monoidFn(dictMonoid) {
- return new Monoid(function () {
- return Data_Semigroup.semigroupFn(dictMonoid.Semigroup0());
- }, function (v) {
- return mempty(dictMonoid);
- });
- };
- var monoidRecordCons = function monoidRecordCons(dictIsSymbol) {
- return function (dictMonoid) {
- return function (dictCons) {
- return function (dictMonoidRecord) {
- return new MonoidRecord(function () {
- return Data_Semigroup.semigroupRecordCons(dictIsSymbol)()(dictMonoidRecord.SemigroupRecord0())(dictMonoid.Semigroup0());
- }, function (v) {
- var tail = memptyRecord(dictMonoidRecord)(Type_Data_RowList.RLProxy.value);
- var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
- var insert = Record_Unsafe.unsafeSet(key);
- return insert(mempty(dictMonoid))(tail);
- });
- };
- };
- };
- };
- var power = function power(dictMonoid) {
- return function (x) {
- var go = function go(p) {
- if (p <= 0) {
- return mempty(dictMonoid);
- }
- ;
- if (p === 1) {
- return x;
- }
- ;
- if (Data_EuclideanRing.mod(Data_EuclideanRing.euclideanRingInt)(p)(2) === 0) {
- var x$prime = go(Data_EuclideanRing.div(Data_EuclideanRing.euclideanRingInt)(p)(2));
- return Data_Semigroup.append(dictMonoid.Semigroup0())(x$prime)(x$prime);
- }
- ;
- if (Data_Boolean.otherwise) {
- var x$prime = go(Data_EuclideanRing.div(Data_EuclideanRing.euclideanRingInt)(p)(2));
- return Data_Semigroup.append(dictMonoid.Semigroup0())(x$prime)(Data_Semigroup.append(dictMonoid.Semigroup0())(x$prime)(x));
- }
- ;
- throw new Error("Failed pattern match at Data.Monoid (line 65, column 3 - line 65, column 17): " + [p.constructor.name]);
- };
- return go;
- };
- };
- var guard = function guard(dictMonoid) {
- return function (v) {
- return function (v1) {
- if (v) {
- return v1;
- }
- ;
- if (!v) {
- return mempty(dictMonoid);
- }
- ;
- throw new Error("Failed pattern match at Data.Monoid (line 73, column 1 - line 73, column 49): " + [v.constructor.name, v1.constructor.name]);
- };
- };
- };
- module.exports = {
- Monoid: Monoid,
- mempty: mempty,
- power: power,
- guard: guard,
- MonoidRecord: MonoidRecord,
- memptyRecord: memptyRecord,
- monoidUnit: monoidUnit,
- monoidOrdering: monoidOrdering,
- monoidFn: monoidFn,
- monoidString: monoidString,
- monoidArray: monoidArray,
- monoidRecord: monoidRecord,
- monoidRecordNil: monoidRecordNil,
- monoidRecordCons: monoidRecordCons
- };
- },{"../Data.Boolean/index.js":"../output/Data.Boolean/index.js","../Data.EuclideanRing/index.js":"../output/Data.EuclideanRing/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Symbol/index.js":"../output/Data.Symbol/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js","../Record.Unsafe/index.js":"../output/Record.Unsafe/index.js","../Type.Data.RowList/index.js":"../output/Type.Data.RowList/index.js"}],"../output/Data.Maybe/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Alt = require("../Control.Alt/index.js");
- var Control_Alternative = require("../Control.Alternative/index.js");
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Category = require("../Control.Category/index.js");
- var Control_Extend = require("../Control.Extend/index.js");
- var Control_Monad = require("../Control.Monad/index.js");
- var Control_MonadZero = require("../Control.MonadZero/index.js");
- var Control_Plus = require("../Control.Plus/index.js");
- var Data_Bounded = require("../Data.Bounded/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Functor_Invariant = require("../Data.Functor.Invariant/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Ordering = require("../Data.Ordering/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Data_Unit = require("../Data.Unit/index.js");
- var Nothing = function () {
- function Nothing() {}
- ;
- Nothing.value = new Nothing();
- return Nothing;
- }();
- var Just = function () {
- function Just(value0) {
- this.value0 = value0;
- }
- ;
- Just.create = function (value0) {
- return new Just(value0);
- };
- return Just;
- }();
- var showMaybe = function showMaybe(dictShow) {
- return new Data_Show.Show(function (v) {
- if (v instanceof Just) {
- return "(Just " + (Data_Show.show(dictShow)(v.value0) + ")");
- }
- ;
- if (v instanceof Nothing) {
- return "Nothing";
- }
- ;
- throw new Error("Failed pattern match at Data.Maybe (line 205, column 1 - line 207, column 28): " + [v.constructor.name]);
- });
- };
- var semigroupMaybe = function semigroupMaybe(dictSemigroup) {
- return new Data_Semigroup.Semigroup(function (v) {
- return function (v1) {
- if (v instanceof Nothing) {
- return v1;
- }
- ;
- if (v1 instanceof Nothing) {
- return v;
- }
- ;
- if (v instanceof Just && v1 instanceof Just) {
- return new Just(Data_Semigroup.append(dictSemigroup)(v.value0)(v1.value0));
- }
- ;
- throw new Error("Failed pattern match at Data.Maybe (line 174, column 1 - line 177, column 43): " + [v.constructor.name, v1.constructor.name]);
- };
- });
- };
- var optional = function optional(dictAlternative) {
- return function (a) {
- return Control_Alt.alt(dictAlternative.Plus1().Alt0())(Data_Functor.map(dictAlternative.Plus1().Alt0().Functor0())(Just.create)(a))(Control_Applicative.pure(dictAlternative.Applicative0())(Nothing.value));
- };
- };
- var monoidMaybe = function monoidMaybe(dictSemigroup) {
- return new Data_Monoid.Monoid(function () {
- return semigroupMaybe(dictSemigroup);
- }, Nothing.value);
- };
- var maybe$prime = function maybe$prime(v) {
- return function (v1) {
- return function (v2) {
- if (v2 instanceof Nothing) {
- return v(Data_Unit.unit);
- }
- ;
- if (v2 instanceof Just) {
- return v1(v2.value0);
- }
- ;
- throw new Error("Failed pattern match at Data.Maybe (line 230, column 1 - line 230, column 62): " + [v.constructor.name, v1.constructor.name, v2.constructor.name]);
- };
- };
- };
- var maybe = function maybe(v) {
- return function (v1) {
- return function (v2) {
- if (v2 instanceof Nothing) {
- return v;
- }
- ;
- if (v2 instanceof Just) {
- return v1(v2.value0);
- }
- ;
- throw new Error("Failed pattern match at Data.Maybe (line 217, column 1 - line 217, column 51): " + [v.constructor.name, v1.constructor.name, v2.constructor.name]);
- };
- };
- };
- var isNothing = maybe(true)(Data_Function["const"](false));
- var isJust = maybe(false)(Data_Function["const"](true));
- var functorMaybe = new Data_Functor.Functor(function (v) {
- return function (v1) {
- if (v1 instanceof Just) {
- return new Just(v(v1.value0));
- }
- ;
- return Nothing.value;
- };
- });
- var invariantMaybe = new Data_Functor_Invariant.Invariant(Data_Functor_Invariant.imapF(functorMaybe));
- var fromMaybe$prime = function fromMaybe$prime(a) {
- return maybe$prime(a)(Control_Category.identity(Control_Category.categoryFn));
- };
- var fromMaybe = function fromMaybe(a) {
- return maybe(a)(Control_Category.identity(Control_Category.categoryFn));
- };
- var fromJust = function fromJust(dictPartial) {
- return function (v) {
- if (v instanceof Just) {
- return v.value0;
- }
- ;
- throw new Error("Failed pattern match at Data.Maybe (line 268, column 1 - line 268, column 46): " + [v.constructor.name]);
- };
- };
- var extendMaybe = new Control_Extend.Extend(function () {
- return functorMaybe;
- }, function (v) {
- return function (v1) {
- if (v1 instanceof Nothing) {
- return Nothing.value;
- }
- ;
- return new Just(v(v1));
- };
- });
- var eqMaybe = function eqMaybe(dictEq) {
- return new Data_Eq.Eq(function (x) {
- return function (y) {
- if (x instanceof Nothing && y instanceof Nothing) {
- return true;
- }
- ;
- if (x instanceof Just && y instanceof Just) {
- return Data_Eq.eq(dictEq)(x.value0)(y.value0);
- }
- ;
- return false;
- };
- });
- };
- var ordMaybe = function ordMaybe(dictOrd) {
- return new Data_Ord.Ord(function () {
- return eqMaybe(dictOrd.Eq0());
- }, function (x) {
- return function (y) {
- if (x instanceof Nothing && y instanceof Nothing) {
- return Data_Ordering.EQ.value;
- }
- ;
- if (x instanceof Nothing) {
- return Data_Ordering.LT.value;
- }
- ;
- if (y instanceof Nothing) {
- return Data_Ordering.GT.value;
- }
- ;
- if (x instanceof Just && y instanceof Just) {
- return Data_Ord.compare(dictOrd)(x.value0)(y.value0);
- }
- ;
- throw new Error("Failed pattern match at Data.Maybe (line 194, column 1 - line 194, column 51): " + [x.constructor.name, y.constructor.name]);
- };
- });
- };
- var eq1Maybe = new Data_Eq.Eq1(function (dictEq) {
- return Data_Eq.eq(eqMaybe(dictEq));
- });
- var ord1Maybe = new Data_Ord.Ord1(function () {
- return eq1Maybe;
- }, function (dictOrd) {
- return Data_Ord.compare(ordMaybe(dictOrd));
- });
- var boundedMaybe = function boundedMaybe(dictBounded) {
- return new Data_Bounded.Bounded(function () {
- return ordMaybe(dictBounded.Ord0());
- }, Nothing.value, new Just(Data_Bounded.top(dictBounded)));
- };
- var applyMaybe = new Control_Apply.Apply(function () {
- return functorMaybe;
- }, function (v) {
- return function (v1) {
- if (v instanceof Just) {
- return Data_Functor.map(functorMaybe)(v.value0)(v1);
- }
- ;
- if (v instanceof Nothing) {
- return Nothing.value;
- }
- ;
- throw new Error("Failed pattern match at Data.Maybe (line 67, column 1 - line 69, column 30): " + [v.constructor.name, v1.constructor.name]);
- };
- });
- var bindMaybe = new Control_Bind.Bind(function () {
- return applyMaybe;
- }, function (v) {
- return function (v1) {
- if (v instanceof Just) {
- return v1(v.value0);
- }
- ;
- if (v instanceof Nothing) {
- return Nothing.value;
- }
- ;
- throw new Error("Failed pattern match at Data.Maybe (line 125, column 1 - line 127, column 28): " + [v.constructor.name, v1.constructor.name]);
- };
- });
- var applicativeMaybe = new Control_Applicative.Applicative(function () {
- return applyMaybe;
- }, Just.create);
- var monadMaybe = new Control_Monad.Monad(function () {
- return applicativeMaybe;
- }, function () {
- return bindMaybe;
- });
- var altMaybe = new Control_Alt.Alt(function () {
- return functorMaybe;
- }, function (v) {
- return function (v1) {
- if (v instanceof Nothing) {
- return v1;
- }
- ;
- return v;
- };
- });
- var plusMaybe = new Control_Plus.Plus(function () {
- return altMaybe;
- }, Nothing.value);
- var alternativeMaybe = new Control_Alternative.Alternative(function () {
- return applicativeMaybe;
- }, function () {
- return plusMaybe;
- });
- var monadZeroMaybe = new Control_MonadZero.MonadZero(function () {
- return alternativeMaybe;
- }, function () {
- return monadMaybe;
- });
- module.exports = {
- Nothing: Nothing,
- Just: Just,
- maybe: maybe,
- "maybe'": maybe$prime,
- fromMaybe: fromMaybe,
- "fromMaybe'": fromMaybe$prime,
- isJust: isJust,
- isNothing: isNothing,
- fromJust: fromJust,
- optional: optional,
- functorMaybe: functorMaybe,
- applyMaybe: applyMaybe,
- applicativeMaybe: applicativeMaybe,
- altMaybe: altMaybe,
- plusMaybe: plusMaybe,
- alternativeMaybe: alternativeMaybe,
- bindMaybe: bindMaybe,
- monadMaybe: monadMaybe,
- monadZeroMaybe: monadZeroMaybe,
- extendMaybe: extendMaybe,
- invariantMaybe: invariantMaybe,
- semigroupMaybe: semigroupMaybe,
- monoidMaybe: monoidMaybe,
- eqMaybe: eqMaybe,
- eq1Maybe: eq1Maybe,
- ordMaybe: ordMaybe,
- ord1Maybe: ord1Maybe,
- boundedMaybe: boundedMaybe,
- showMaybe: showMaybe
- };
- },{"../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Alternative/index.js":"../output/Control.Alternative/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Extend/index.js":"../output/Control.Extend/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Control.MonadZero/index.js":"../output/Control.MonadZero/index.js","../Control.Plus/index.js":"../output/Control.Plus/index.js","../Data.Bounded/index.js":"../output/Data.Bounded/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Functor.Invariant/index.js":"../output/Data.Functor.Invariant/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Data.Monoid.Conj/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Monad = require("../Control.Monad/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Semiring = require("../Data.Semiring/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Conj = function Conj(x) {
- return x;
- };
- var showConj = function showConj(dictShow) {
- return new Data_Show.Show(function (v) {
- return "(Conj " + (Data_Show.show(dictShow)(v) + ")");
- });
- };
- var semiringConj = function semiringConj(dictHeytingAlgebra) {
- return new Data_Semiring.Semiring(function (v) {
- return function (v1) {
- return Data_HeytingAlgebra.conj(dictHeytingAlgebra)(v)(v1);
- };
- }, function (v) {
- return function (v1) {
- return Data_HeytingAlgebra.disj(dictHeytingAlgebra)(v)(v1);
- };
- }, Data_HeytingAlgebra.ff(dictHeytingAlgebra), Data_HeytingAlgebra.tt(dictHeytingAlgebra));
- };
- var semigroupConj = function semigroupConj(dictHeytingAlgebra) {
- return new Data_Semigroup.Semigroup(function (v) {
- return function (v1) {
- return Data_HeytingAlgebra.conj(dictHeytingAlgebra)(v)(v1);
- };
- });
- };
- var ordConj = function ordConj(dictOrd) {
- return dictOrd;
- };
- var monoidConj = function monoidConj(dictHeytingAlgebra) {
- return new Data_Monoid.Monoid(function () {
- return semigroupConj(dictHeytingAlgebra);
- }, Data_HeytingAlgebra.tt(dictHeytingAlgebra));
- };
- var functorConj = new Data_Functor.Functor(function (f) {
- return function (m) {
- return f(m);
- };
- });
- var eqConj = function eqConj(dictEq) {
- return dictEq;
- };
- var eq1Conj = new Data_Eq.Eq1(function (dictEq) {
- return Data_Eq.eq(eqConj(dictEq));
- });
- var ord1Conj = new Data_Ord.Ord1(function () {
- return eq1Conj;
- }, function (dictOrd) {
- return Data_Ord.compare(ordConj(dictOrd));
- });
- var boundedConj = function boundedConj(dictBounded) {
- return dictBounded;
- };
- var applyConj = new Control_Apply.Apply(function () {
- return functorConj;
- }, function (v) {
- return function (v1) {
- return v(v1);
- };
- });
- var bindConj = new Control_Bind.Bind(function () {
- return applyConj;
- }, function (v) {
- return function (f) {
- return f(v);
- };
- });
- var applicativeConj = new Control_Applicative.Applicative(function () {
- return applyConj;
- }, Conj);
- var monadConj = new Control_Monad.Monad(function () {
- return applicativeConj;
- }, function () {
- return bindConj;
- });
- module.exports = {
- Conj: Conj,
- eqConj: eqConj,
- eq1Conj: eq1Conj,
- ordConj: ordConj,
- ord1Conj: ord1Conj,
- boundedConj: boundedConj,
- showConj: showConj,
- functorConj: functorConj,
- applyConj: applyConj,
- applicativeConj: applicativeConj,
- bindConj: bindConj,
- monadConj: monadConj,
- semigroupConj: semigroupConj,
- monoidConj: monoidConj,
- semiringConj: semiringConj
- };
- },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.HeytingAlgebra/index.js":"../output/Data.HeytingAlgebra/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Semiring/index.js":"../output/Data.Semiring/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Monoid.Disj/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Monad = require("../Control.Monad/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Semiring = require("../Data.Semiring/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Disj = function Disj(x) {
- return x;
- };
- var showDisj = function showDisj(dictShow) {
- return new Data_Show.Show(function (v) {
- return "(Disj " + (Data_Show.show(dictShow)(v) + ")");
- });
- };
- var semiringDisj = function semiringDisj(dictHeytingAlgebra) {
- return new Data_Semiring.Semiring(function (v) {
- return function (v1) {
- return Data_HeytingAlgebra.disj(dictHeytingAlgebra)(v)(v1);
- };
- }, function (v) {
- return function (v1) {
- return Data_HeytingAlgebra.conj(dictHeytingAlgebra)(v)(v1);
- };
- }, Data_HeytingAlgebra.tt(dictHeytingAlgebra), Data_HeytingAlgebra.ff(dictHeytingAlgebra));
- };
- var semigroupDisj = function semigroupDisj(dictHeytingAlgebra) {
- return new Data_Semigroup.Semigroup(function (v) {
- return function (v1) {
- return Data_HeytingAlgebra.disj(dictHeytingAlgebra)(v)(v1);
- };
- });
- };
- var ordDisj = function ordDisj(dictOrd) {
- return dictOrd;
- };
- var monoidDisj = function monoidDisj(dictHeytingAlgebra) {
- return new Data_Monoid.Monoid(function () {
- return semigroupDisj(dictHeytingAlgebra);
- }, Data_HeytingAlgebra.ff(dictHeytingAlgebra));
- };
- var functorDisj = new Data_Functor.Functor(function (f) {
- return function (m) {
- return f(m);
- };
- });
- var eqDisj = function eqDisj(dictEq) {
- return dictEq;
- };
- var eq1Disj = new Data_Eq.Eq1(function (dictEq) {
- return Data_Eq.eq(eqDisj(dictEq));
- });
- var ord1Disj = new Data_Ord.Ord1(function () {
- return eq1Disj;
- }, function (dictOrd) {
- return Data_Ord.compare(ordDisj(dictOrd));
- });
- var boundedDisj = function boundedDisj(dictBounded) {
- return dictBounded;
- };
- var applyDisj = new Control_Apply.Apply(function () {
- return functorDisj;
- }, function (v) {
- return function (v1) {
- return v(v1);
- };
- });
- var bindDisj = new Control_Bind.Bind(function () {
- return applyDisj;
- }, function (v) {
- return function (f) {
- return f(v);
- };
- });
- var applicativeDisj = new Control_Applicative.Applicative(function () {
- return applyDisj;
- }, Disj);
- var monadDisj = new Control_Monad.Monad(function () {
- return applicativeDisj;
- }, function () {
- return bindDisj;
- });
- module.exports = {
- Disj: Disj,
- eqDisj: eqDisj,
- eq1Disj: eq1Disj,
- ordDisj: ordDisj,
- ord1Disj: ord1Disj,
- boundedDisj: boundedDisj,
- showDisj: showDisj,
- functorDisj: functorDisj,
- applyDisj: applyDisj,
- applicativeDisj: applicativeDisj,
- bindDisj: bindDisj,
- monadDisj: monadDisj,
- semigroupDisj: semigroupDisj,
- monoidDisj: monoidDisj,
- semiringDisj: semiringDisj
- };
- },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.HeytingAlgebra/index.js":"../output/Data.HeytingAlgebra/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Semiring/index.js":"../output/Data.Semiring/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Monoid.Dual/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Monad = require("../Control.Monad/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Dual = function Dual(x) {
- return x;
- };
- var showDual = function showDual(dictShow) {
- return new Data_Show.Show(function (v) {
- return "(Dual " + (Data_Show.show(dictShow)(v) + ")");
- });
- };
- var semigroupDual = function semigroupDual(dictSemigroup) {
- return new Data_Semigroup.Semigroup(function (v) {
- return function (v1) {
- return Data_Semigroup.append(dictSemigroup)(v1)(v);
- };
- });
- };
- var ordDual = function ordDual(dictOrd) {
- return dictOrd;
- };
- var monoidDual = function monoidDual(dictMonoid) {
- return new Data_Monoid.Monoid(function () {
- return semigroupDual(dictMonoid.Semigroup0());
- }, Data_Monoid.mempty(dictMonoid));
- };
- var functorDual = new Data_Functor.Functor(function (f) {
- return function (m) {
- return f(m);
- };
- });
- var eqDual = function eqDual(dictEq) {
- return dictEq;
- };
- var eq1Dual = new Data_Eq.Eq1(function (dictEq) {
- return Data_Eq.eq(eqDual(dictEq));
- });
- var ord1Dual = new Data_Ord.Ord1(function () {
- return eq1Dual;
- }, function (dictOrd) {
- return Data_Ord.compare(ordDual(dictOrd));
- });
- var boundedDual = function boundedDual(dictBounded) {
- return dictBounded;
- };
- var applyDual = new Control_Apply.Apply(function () {
- return functorDual;
- }, function (v) {
- return function (v1) {
- return v(v1);
- };
- });
- var bindDual = new Control_Bind.Bind(function () {
- return applyDual;
- }, function (v) {
- return function (f) {
- return f(v);
- };
- });
- var applicativeDual = new Control_Applicative.Applicative(function () {
- return applyDual;
- }, Dual);
- var monadDual = new Control_Monad.Monad(function () {
- return applicativeDual;
- }, function () {
- return bindDual;
- });
- module.exports = {
- Dual: Dual,
- eqDual: eqDual,
- eq1Dual: eq1Dual,
- ordDual: ordDual,
- ord1Dual: ord1Dual,
- boundedDual: boundedDual,
- showDual: showDual,
- functorDual: functorDual,
- applyDual: applyDual,
- applicativeDual: applicativeDual,
- bindDual: bindDual,
- monadDual: monadDual,
- semigroupDual: semigroupDual,
- monoidDual: monoidDual
- };
- },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Monoid.Endo/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Category = require("../Control.Category/index.js");
- var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Endo = function Endo(x) {
- return x;
- };
- var showEndo = function showEndo(dictShow) {
- return new Data_Show.Show(function (v) {
- return "(Endo " + (Data_Show.show(dictShow)(v) + ")");
- });
- };
- var semigroupEndo = function semigroupEndo(dictSemigroupoid) {
- return new Data_Semigroup.Semigroup(function (v) {
- return function (v1) {
- return Control_Semigroupoid.compose(dictSemigroupoid)(v)(v1);
- };
- });
- };
- var ordEndo = function ordEndo(dictOrd) {
- return dictOrd;
- };
- var monoidEndo = function monoidEndo(dictCategory) {
- return new Data_Monoid.Monoid(function () {
- return semigroupEndo(dictCategory.Semigroupoid0());
- }, Control_Category.identity(dictCategory));
- };
- var eqEndo = function eqEndo(dictEq) {
- return dictEq;
- };
- var boundedEndo = function boundedEndo(dictBounded) {
- return dictBounded;
- };
- module.exports = {
- Endo: Endo,
- eqEndo: eqEndo,
- ordEndo: ordEndo,
- boundedEndo: boundedEndo,
- showEndo: showEndo,
- semigroupEndo: semigroupEndo,
- monoidEndo: monoidEndo
- };
- },{"../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Semigroupoid/index.js":"../output/Control.Semigroupoid/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Monoid.Additive/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Monad = require("../Control.Monad/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Semiring = require("../Data.Semiring/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Additive = function Additive(x) {
- return x;
- };
- var showAdditive = function showAdditive(dictShow) {
- return new Data_Show.Show(function (v) {
- return "(Additive " + (Data_Show.show(dictShow)(v) + ")");
- });
- };
- var semigroupAdditive = function semigroupAdditive(dictSemiring) {
- return new Data_Semigroup.Semigroup(function (v) {
- return function (v1) {
- return Data_Semiring.add(dictSemiring)(v)(v1);
- };
- });
- };
- var ordAdditive = function ordAdditive(dictOrd) {
- return dictOrd;
- };
- var monoidAdditive = function monoidAdditive(dictSemiring) {
- return new Data_Monoid.Monoid(function () {
- return semigroupAdditive(dictSemiring);
- }, Data_Semiring.zero(dictSemiring));
- };
- var functorAdditive = new Data_Functor.Functor(function (f) {
- return function (m) {
- return f(m);
- };
- });
- var eqAdditive = function eqAdditive(dictEq) {
- return dictEq;
- };
- var eq1Additive = new Data_Eq.Eq1(function (dictEq) {
- return Data_Eq.eq(eqAdditive(dictEq));
- });
- var ord1Additive = new Data_Ord.Ord1(function () {
- return eq1Additive;
- }, function (dictOrd) {
- return Data_Ord.compare(ordAdditive(dictOrd));
- });
- var boundedAdditive = function boundedAdditive(dictBounded) {
- return dictBounded;
- };
- var applyAdditive = new Control_Apply.Apply(function () {
- return functorAdditive;
- }, function (v) {
- return function (v1) {
- return v(v1);
- };
- });
- var bindAdditive = new Control_Bind.Bind(function () {
- return applyAdditive;
- }, function (v) {
- return function (f) {
- return f(v);
- };
- });
- var applicativeAdditive = new Control_Applicative.Applicative(function () {
- return applyAdditive;
- }, Additive);
- var monadAdditive = new Control_Monad.Monad(function () {
- return applicativeAdditive;
- }, function () {
- return bindAdditive;
- });
- module.exports = {
- Additive: Additive,
- eqAdditive: eqAdditive,
- eq1Additive: eq1Additive,
- ordAdditive: ordAdditive,
- ord1Additive: ord1Additive,
- boundedAdditive: boundedAdditive,
- showAdditive: showAdditive,
- functorAdditive: functorAdditive,
- applyAdditive: applyAdditive,
- applicativeAdditive: applicativeAdditive,
- bindAdditive: bindAdditive,
- monadAdditive: monadAdditive,
- semigroupAdditive: semigroupAdditive,
- monoidAdditive: monoidAdditive
- };
- },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Semiring/index.js":"../output/Data.Semiring/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Monoid.Multiplicative/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Monad = require("../Control.Monad/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Semiring = require("../Data.Semiring/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Multiplicative = function Multiplicative(x) {
- return x;
- };
- var showMultiplicative = function showMultiplicative(dictShow) {
- return new Data_Show.Show(function (v) {
- return "(Multiplicative " + (Data_Show.show(dictShow)(v) + ")");
- });
- };
- var semigroupMultiplicative = function semigroupMultiplicative(dictSemiring) {
- return new Data_Semigroup.Semigroup(function (v) {
- return function (v1) {
- return Data_Semiring.mul(dictSemiring)(v)(v1);
- };
- });
- };
- var ordMultiplicative = function ordMultiplicative(dictOrd) {
- return dictOrd;
- };
- var monoidMultiplicative = function monoidMultiplicative(dictSemiring) {
- return new Data_Monoid.Monoid(function () {
- return semigroupMultiplicative(dictSemiring);
- }, Data_Semiring.one(dictSemiring));
- };
- var functorMultiplicative = new Data_Functor.Functor(function (f) {
- return function (m) {
- return f(m);
- };
- });
- var eqMultiplicative = function eqMultiplicative(dictEq) {
- return dictEq;
- };
- var eq1Multiplicative = new Data_Eq.Eq1(function (dictEq) {
- return Data_Eq.eq(eqMultiplicative(dictEq));
- });
- var ord1Multiplicative = new Data_Ord.Ord1(function () {
- return eq1Multiplicative;
- }, function (dictOrd) {
- return Data_Ord.compare(ordMultiplicative(dictOrd));
- });
- var boundedMultiplicative = function boundedMultiplicative(dictBounded) {
- return dictBounded;
- };
- var applyMultiplicative = new Control_Apply.Apply(function () {
- return functorMultiplicative;
- }, function (v) {
- return function (v1) {
- return v(v1);
- };
- });
- var bindMultiplicative = new Control_Bind.Bind(function () {
- return applyMultiplicative;
- }, function (v) {
- return function (f) {
- return f(v);
- };
- });
- var applicativeMultiplicative = new Control_Applicative.Applicative(function () {
- return applyMultiplicative;
- }, Multiplicative);
- var monadMultiplicative = new Control_Monad.Monad(function () {
- return applicativeMultiplicative;
- }, function () {
- return bindMultiplicative;
- });
- module.exports = {
- Multiplicative: Multiplicative,
- eqMultiplicative: eqMultiplicative,
- eq1Multiplicative: eq1Multiplicative,
- ordMultiplicative: ordMultiplicative,
- ord1Multiplicative: ord1Multiplicative,
- boundedMultiplicative: boundedMultiplicative,
- showMultiplicative: showMultiplicative,
- functorMultiplicative: functorMultiplicative,
- applyMultiplicative: applyMultiplicative,
- applicativeMultiplicative: applicativeMultiplicative,
- bindMultiplicative: bindMultiplicative,
- monadMultiplicative: monadMultiplicative,
- semigroupMultiplicative: semigroupMultiplicative,
- monoidMultiplicative: monoidMultiplicative
- };
- },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Semiring/index.js":"../output/Data.Semiring/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Semigroup.First/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Monad = require("../Control.Monad/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var First = function First(x) {
- return x;
- };
- var showFirst = function showFirst(dictShow) {
- return new Data_Show.Show(function (v) {
- return "(First " + (Data_Show.show(dictShow)(v) + ")");
- });
- };
- var semigroupFirst = new Data_Semigroup.Semigroup(function (x) {
- return function (v) {
- return x;
- };
- });
- var ordFirst = function ordFirst(dictOrd) {
- return dictOrd;
- };
- var functorFirst = new Data_Functor.Functor(function (f) {
- return function (m) {
- return f(m);
- };
- });
- var eqFirst = function eqFirst(dictEq) {
- return dictEq;
- };
- var eq1First = new Data_Eq.Eq1(function (dictEq) {
- return Data_Eq.eq(eqFirst(dictEq));
- });
- var ord1First = new Data_Ord.Ord1(function () {
- return eq1First;
- }, function (dictOrd) {
- return Data_Ord.compare(ordFirst(dictOrd));
- });
- var boundedFirst = function boundedFirst(dictBounded) {
- return dictBounded;
- };
- var applyFirst = new Control_Apply.Apply(function () {
- return functorFirst;
- }, function (v) {
- return function (v1) {
- return v(v1);
- };
- });
- var bindFirst = new Control_Bind.Bind(function () {
- return applyFirst;
- }, function (v) {
- return function (f) {
- return f(v);
- };
- });
- var applicativeFirst = new Control_Applicative.Applicative(function () {
- return applyFirst;
- }, First);
- var monadFirst = new Control_Monad.Monad(function () {
- return applicativeFirst;
- }, function () {
- return bindFirst;
- });
- module.exports = {
- First: First,
- eqFirst: eqFirst,
- eq1First: eq1First,
- ordFirst: ordFirst,
- ord1First: ord1First,
- boundedFirst: boundedFirst,
- showFirst: showFirst,
- functorFirst: functorFirst,
- applyFirst: applyFirst,
- applicativeFirst: applicativeFirst,
- bindFirst: bindFirst,
- monadFirst: monadFirst,
- semigroupFirst: semigroupFirst
- };
- },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Semigroup.Last/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Monad = require("../Control.Monad/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Last = function Last(x) {
- return x;
- };
- var showLast = function showLast(dictShow) {
- return new Data_Show.Show(function (v) {
- return "(Last " + (Data_Show.show(dictShow)(v) + ")");
- });
- };
- var semigroupLast = new Data_Semigroup.Semigroup(function (v) {
- return function (x) {
- return x;
- };
- });
- var ordLast = function ordLast(dictOrd) {
- return dictOrd;
- };
- var functorLast = new Data_Functor.Functor(function (f) {
- return function (m) {
- return f(m);
- };
- });
- var eqLast = function eqLast(dictEq) {
- return dictEq;
- };
- var eq1Last = new Data_Eq.Eq1(function (dictEq) {
- return Data_Eq.eq(eqLast(dictEq));
- });
- var ord1Last = new Data_Ord.Ord1(function () {
- return eq1Last;
- }, function (dictOrd) {
- return Data_Ord.compare(ordLast(dictOrd));
- });
- var boundedLast = function boundedLast(dictBounded) {
- return dictBounded;
- };
- var applyLast = new Control_Apply.Apply(function () {
- return functorLast;
- }, function (v) {
- return function (v1) {
- return v(v1);
- };
- });
- var bindLast = new Control_Bind.Bind(function () {
- return applyLast;
- }, function (v) {
- return function (f) {
- return f(v);
- };
- });
- var applicativeLast = new Control_Applicative.Applicative(function () {
- return applyLast;
- }, Last);
- var monadLast = new Control_Monad.Monad(function () {
- return applicativeLast;
- }, function () {
- return bindLast;
- });
- module.exports = {
- Last: Last,
- eqLast: eqLast,
- eq1Last: eq1Last,
- ordLast: ordLast,
- ord1Last: ord1Last,
- boundedLast: boundedLast,
- showLast: showLast,
- functorLast: functorLast,
- applyLast: applyLast,
- applicativeLast: applicativeLast,
- bindLast: bindLast,
- monadLast: monadLast,
- semigroupLast: semigroupLast
- };
- },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Newtype/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Monoid_Additive = require("../Data.Monoid.Additive/index.js");
- var Data_Monoid_Conj = require("../Data.Monoid.Conj/index.js");
- var Data_Monoid_Disj = require("../Data.Monoid.Disj/index.js");
- var Data_Monoid_Dual = require("../Data.Monoid.Dual/index.js");
- var Data_Monoid_Endo = require("../Data.Monoid.Endo/index.js");
- var Data_Monoid_Multiplicative = require("../Data.Monoid.Multiplicative/index.js");
- var Data_Semigroup_First = require("../Data.Semigroup.First/index.js");
- var Data_Semigroup_Last = require("../Data.Semigroup.Last/index.js");
- var Newtype = function Newtype(unwrap, wrap) {
- this.unwrap = unwrap;
- this.wrap = wrap;
- };
- var wrap = function wrap(dict) {
- return dict.wrap;
- };
- var unwrap = function unwrap(dict) {
- return dict.unwrap;
- };
- var underF2 = function underF2(dictFunctor) {
- return function (dictFunctor1) {
- return function (dictNewtype) {
- return function (dictNewtype1) {
- return function (v) {
- return function (f) {
- var $66 = Control_Semigroupoid.compose(Control_Semigroupoid.semigroupoidFn)(Data_Functor.map(dictFunctor1)(unwrap(dictNewtype1)));
- var $67 = Data_Function.on(f)(Data_Functor.map(dictFunctor)(wrap(dictNewtype)));
- return function ($68) {
- return $66($67($68));
- };
- };
- };
- };
- };
- };
- };
- var underF = function underF(dictFunctor) {
- return function (dictFunctor1) {
- return function (dictNewtype) {
- return function (dictNewtype1) {
- return function (v) {
- return function (f) {
- var $69 = Data_Functor.map(dictFunctor1)(unwrap(dictNewtype1));
- var $70 = Data_Functor.map(dictFunctor)(wrap(dictNewtype));
- return function ($71) {
- return $69(f($70($71)));
- };
- };
- };
- };
- };
- };
- };
- var under2 = function under2(dictNewtype) {
- return function (dictNewtype1) {
- return function (v) {
- return function (f) {
- var $72 = Control_Semigroupoid.compose(Control_Semigroupoid.semigroupoidFn)(unwrap(dictNewtype1));
- var $73 = Data_Function.on(f)(wrap(dictNewtype));
- return function ($74) {
- return $72($73($74));
- };
- };
- };
- };
- };
- var under = function under(dictNewtype) {
- return function (dictNewtype1) {
- return function (v) {
- return function (f) {
- var $75 = unwrap(dictNewtype1);
- var $76 = wrap(dictNewtype);
- return function ($77) {
- return $75(f($76($77)));
- };
- };
- };
- };
- };
- var un = function un(dictNewtype) {
- return function (v) {
- return unwrap(dictNewtype);
- };
- };
- var traverse = function traverse(dictFunctor) {
- return function (dictNewtype) {
- return function (v) {
- return function (f) {
- var $78 = Data_Functor.map(dictFunctor)(wrap(dictNewtype));
- var $79 = unwrap(dictNewtype);
- return function ($80) {
- return $78(f($79($80)));
- };
- };
- };
- };
- };
- var overF2 = function overF2(dictFunctor) {
- return function (dictFunctor1) {
- return function (dictNewtype) {
- return function (dictNewtype1) {
- return function (v) {
- return function (f) {
- var $81 = Control_Semigroupoid.compose(Control_Semigroupoid.semigroupoidFn)(Data_Functor.map(dictFunctor1)(wrap(dictNewtype1)));
- var $82 = Data_Function.on(f)(Data_Functor.map(dictFunctor)(unwrap(dictNewtype)));
- return function ($83) {
- return $81($82($83));
- };
- };
- };
- };
- };
- };
- };
- var overF = function overF(dictFunctor) {
- return function (dictFunctor1) {
- return function (dictNewtype) {
- return function (dictNewtype1) {
- return function (v) {
- return function (f) {
- var $84 = Data_Functor.map(dictFunctor1)(wrap(dictNewtype1));
- var $85 = Data_Functor.map(dictFunctor)(unwrap(dictNewtype));
- return function ($86) {
- return $84(f($85($86)));
- };
- };
- };
- };
- };
- };
- };
- var over2 = function over2(dictNewtype) {
- return function (dictNewtype1) {
- return function (v) {
- return function (f) {
- var $87 = Control_Semigroupoid.compose(Control_Semigroupoid.semigroupoidFn)(wrap(dictNewtype1));
- var $88 = Data_Function.on(f)(unwrap(dictNewtype));
- return function ($89) {
- return $87($88($89));
- };
- };
- };
- };
- };
- var over = function over(dictNewtype) {
- return function (dictNewtype1) {
- return function (v) {
- return function (f) {
- var $90 = wrap(dictNewtype1);
- var $91 = unwrap(dictNewtype);
- return function ($92) {
- return $90(f($91($92)));
- };
- };
- };
- };
- };
- var op = function op(dictNewtype) {
- return un(dictNewtype);
- };
- var newtypeMultiplicative = new Newtype(function (v) {
- return v;
- }, Data_Monoid_Multiplicative.Multiplicative);
- var newtypeLast = new Newtype(function (v) {
- return v;
- }, Data_Semigroup_Last.Last);
- var newtypeFirst = new Newtype(function (v) {
- return v;
- }, Data_Semigroup_First.First);
- var newtypeEndo = new Newtype(function (v) {
- return v;
- }, Data_Monoid_Endo.Endo);
- var newtypeDual = new Newtype(function (v) {
- return v;
- }, Data_Monoid_Dual.Dual);
- var newtypeDisj = new Newtype(function (v) {
- return v;
- }, Data_Monoid_Disj.Disj);
- var newtypeConj = new Newtype(function (v) {
- return v;
- }, Data_Monoid_Conj.Conj);
- var newtypeAdditive = new Newtype(function (v) {
- return v;
- }, Data_Monoid_Additive.Additive);
- var collect = function collect(dictFunctor) {
- return function (dictNewtype) {
- return function (v) {
- return function (f) {
- var $93 = wrap(dictNewtype);
- var $94 = Data_Functor.map(dictFunctor)(unwrap(dictNewtype));
- return function ($95) {
- return $93(f($94($95)));
- };
- };
- };
- };
- };
- var alaF = function alaF(dictFunctor) {
- return function (dictFunctor1) {
- return function (dictNewtype) {
- return function (dictNewtype1) {
- return function (v) {
- return function (f) {
- var $96 = Data_Functor.map(dictFunctor1)(unwrap(dictNewtype1));
- var $97 = Data_Functor.map(dictFunctor)(wrap(dictNewtype));
- return function ($98) {
- return $96(f($97($98)));
- };
- };
- };
- };
- };
- };
- };
- var ala = function ala(dictFunctor) {
- return function (dictNewtype) {
- return function (dictNewtype1) {
- return function (v) {
- return function (f) {
- return Data_Functor.map(dictFunctor)(unwrap(dictNewtype))(f(wrap(dictNewtype1)));
- };
- };
- };
- };
- };
- module.exports = {
- unwrap: unwrap,
- wrap: wrap,
- Newtype: Newtype,
- un: un,
- op: op,
- ala: ala,
- alaF: alaF,
- over: over,
- overF: overF,
- under: under,
- underF: underF,
- over2: over2,
- overF2: overF2,
- under2: under2,
- underF2: underF2,
- traverse: traverse,
- collect: collect,
- newtypeAdditive: newtypeAdditive,
- newtypeMultiplicative: newtypeMultiplicative,
- newtypeConj: newtypeConj,
- newtypeDisj: newtypeDisj,
- newtypeDual: newtypeDual,
- newtypeEndo: newtypeEndo,
- newtypeFirst: newtypeFirst,
- newtypeLast: newtypeLast
- };
- },{"../Control.Semigroupoid/index.js":"../output/Control.Semigroupoid/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Monoid.Additive/index.js":"../output/Data.Monoid.Additive/index.js","../Data.Monoid.Conj/index.js":"../output/Data.Monoid.Conj/index.js","../Data.Monoid.Disj/index.js":"../output/Data.Monoid.Disj/index.js","../Data.Monoid.Dual/index.js":"../output/Data.Monoid.Dual/index.js","../Data.Monoid.Endo/index.js":"../output/Data.Monoid.Endo/index.js","../Data.Monoid.Multiplicative/index.js":"../output/Data.Monoid.Multiplicative/index.js","../Data.Semigroup.First/index.js":"../output/Data.Semigroup.First/index.js","../Data.Semigroup.Last/index.js":"../output/Data.Semigroup.Last/index.js"}],"../output/Data.Foldable/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Control_Alt = require("../Control.Alt/index.js");
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Category = require("../Control.Category/index.js");
- var Control_Plus = require("../Control.Plus/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Data_Monoid_Conj = require("../Data.Monoid.Conj/index.js");
- var Data_Monoid_Disj = require("../Data.Monoid.Disj/index.js");
- var Data_Monoid_Dual = require("../Data.Monoid.Dual/index.js");
- var Data_Monoid_Endo = require("../Data.Monoid.Endo/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Ordering = require("../Data.Ordering/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Semiring = require("../Data.Semiring/index.js");
- var Data_Unit = require("../Data.Unit/index.js");
- var Foldable = function Foldable(foldMap, foldl, foldr) {
- this.foldMap = foldMap;
- this.foldl = foldl;
- this.foldr = foldr;
- };
- var foldr = function foldr(dict) {
- return dict.foldr;
- };
- var indexr = function indexr(dictFoldable) {
- return function (idx) {
- var go = function go(a) {
- return function (cursor) {
- if (cursor.elem instanceof Data_Maybe.Just) {
- return cursor;
- }
- ;
- var $106 = cursor.pos === idx;
- if ($106) {
- return {
- elem: new Data_Maybe.Just(a),
- pos: cursor.pos
- };
- }
- ;
- return {
- pos: cursor.pos + 1 | 0,
- elem: cursor.elem
- };
- };
- };
- var $193 = foldr(dictFoldable)(go)({
- elem: Data_Maybe.Nothing.value,
- pos: 0
- });
- return function ($194) {
- return function (v) {
- return v.elem;
- }($193($194));
- };
- };
- };
- var $$null = function $$null(dictFoldable) {
- return foldr(dictFoldable)(function (v) {
- return function (v1) {
- return false;
- };
- })(true);
- };
- var oneOf = function oneOf(dictFoldable) {
- return function (dictPlus) {
- return foldr(dictFoldable)(Control_Alt.alt(dictPlus.Alt0()))(Control_Plus.empty(dictPlus));
- };
- };
- var oneOfMap = function oneOfMap(dictFoldable) {
- return function (dictPlus) {
- return function (f) {
- return foldr(dictFoldable)(function () {
- var $195 = Control_Alt.alt(dictPlus.Alt0());
- return function ($196) {
- return $195(f($196));
- };
- }())(Control_Plus.empty(dictPlus));
- };
- };
- };
- var traverse_ = function traverse_(dictApplicative) {
- return function (dictFoldable) {
- return function (f) {
- return foldr(dictFoldable)(function () {
- var $197 = Control_Apply.applySecond(dictApplicative.Apply0());
- return function ($198) {
- return $197(f($198));
- };
- }())(Control_Applicative.pure(dictApplicative)(Data_Unit.unit));
- };
- };
- };
- var for_ = function for_(dictApplicative) {
- return function (dictFoldable) {
- return Data_Function.flip(traverse_(dictApplicative)(dictFoldable));
- };
- };
- var sequence_ = function sequence_(dictApplicative) {
- return function (dictFoldable) {
- return traverse_(dictApplicative)(dictFoldable)(Control_Category.identity(Control_Category.categoryFn));
- };
- };
- var foldl = function foldl(dict) {
- return dict.foldl;
- };
- var indexl = function indexl(dictFoldable) {
- return function (idx) {
- var go = function go(cursor) {
- return function (a) {
- if (cursor.elem instanceof Data_Maybe.Just) {
- return cursor;
- }
- ;
- var $109 = cursor.pos === idx;
- if ($109) {
- return {
- elem: new Data_Maybe.Just(a),
- pos: cursor.pos
- };
- }
- ;
- return {
- pos: cursor.pos + 1 | 0,
- elem: cursor.elem
- };
- };
- };
- var $199 = foldl(dictFoldable)(go)({
- elem: Data_Maybe.Nothing.value,
- pos: 0
- });
- return function ($200) {
- return function (v) {
- return v.elem;
- }($199($200));
- };
- };
- };
- var intercalate = function intercalate(dictFoldable) {
- return function (dictMonoid) {
- return function (sep) {
- return function (xs) {
- var go = function go(v) {
- return function (x) {
- if (v.init) {
- return {
- init: false,
- acc: x
- };
- }
- ;
- return {
- init: false,
- acc: Data_Semigroup.append(dictMonoid.Semigroup0())(v.acc)(Data_Semigroup.append(dictMonoid.Semigroup0())(sep)(x))
- };
- };
- };
- return foldl(dictFoldable)(go)({
- init: true,
- acc: Data_Monoid.mempty(dictMonoid)
- })(xs).acc;
- };
- };
- };
- };
- var length = function length(dictFoldable) {
- return function (dictSemiring) {
- return foldl(dictFoldable)(function (c) {
- return function (v) {
- return Data_Semiring.add(dictSemiring)(Data_Semiring.one(dictSemiring))(c);
- };
- })(Data_Semiring.zero(dictSemiring));
- };
- };
- var maximumBy = function maximumBy(dictFoldable) {
- return function (cmp) {
- var max$prime = function max$prime(v) {
- return function (v1) {
- if (v instanceof Data_Maybe.Nothing) {
- return new Data_Maybe.Just(v1);
- }
- ;
- if (v instanceof Data_Maybe.Just) {
- return new Data_Maybe.Just(function () {
- var $116 = Data_Eq.eq(Data_Ordering.eqOrdering)(cmp(v.value0)(v1))(Data_Ordering.GT.value);
- if ($116) {
- return v.value0;
- }
- ;
- return v1;
- }());
- }
- ;
- throw new Error("Failed pattern match at Data.Foldable (line 389, column 3 - line 389, column 27): " + [v.constructor.name, v1.constructor.name]);
- };
- };
- return foldl(dictFoldable)(max$prime)(Data_Maybe.Nothing.value);
- };
- };
- var maximum = function maximum(dictOrd) {
- return function (dictFoldable) {
- return maximumBy(dictFoldable)(Data_Ord.compare(dictOrd));
- };
- };
- var minimumBy = function minimumBy(dictFoldable) {
- return function (cmp) {
- var min$prime = function min$prime(v) {
- return function (v1) {
- if (v instanceof Data_Maybe.Nothing) {
- return new Data_Maybe.Just(v1);
- }
- ;
- if (v instanceof Data_Maybe.Just) {
- return new Data_Maybe.Just(function () {
- var $120 = Data_Eq.eq(Data_Ordering.eqOrdering)(cmp(v.value0)(v1))(Data_Ordering.LT.value);
- if ($120) {
- return v.value0;
- }
- ;
- return v1;
- }());
- }
- ;
- throw new Error("Failed pattern match at Data.Foldable (line 402, column 3 - line 402, column 27): " + [v.constructor.name, v1.constructor.name]);
- };
- };
- return foldl(dictFoldable)(min$prime)(Data_Maybe.Nothing.value);
- };
- };
- var minimum = function minimum(dictOrd) {
- return function (dictFoldable) {
- return minimumBy(dictFoldable)(Data_Ord.compare(dictOrd));
- };
- };
- var product = function product(dictFoldable) {
- return function (dictSemiring) {
- return foldl(dictFoldable)(Data_Semiring.mul(dictSemiring))(Data_Semiring.one(dictSemiring));
- };
- };
- var sum = function sum(dictFoldable) {
- return function (dictSemiring) {
- return foldl(dictFoldable)(Data_Semiring.add(dictSemiring))(Data_Semiring.zero(dictSemiring));
- };
- };
- var foldableMultiplicative = new Foldable(function (dictMonoid) {
- return function (f) {
- return function (v) {
- return f(v);
- };
- };
- }, function (f) {
- return function (z) {
- return function (v) {
- return f(z)(v);
- };
- };
- }, function (f) {
- return function (z) {
- return function (v) {
- return f(v)(z);
- };
- };
- });
- var foldableMaybe = new Foldable(function (dictMonoid) {
- return function (f) {
- return function (v) {
- if (v instanceof Data_Maybe.Nothing) {
- return Data_Monoid.mempty(dictMonoid);
- }
- ;
- if (v instanceof Data_Maybe.Just) {
- return f(v.value0);
- }
- ;
- throw new Error("Failed pattern match at Data.Foldable (line 129, column 1 - line 135, column 27): " + [f.constructor.name, v.constructor.name]);
- };
- };
- }, function (v) {
- return function (z) {
- return function (v1) {
- if (v1 instanceof Data_Maybe.Nothing) {
- return z;
- }
- ;
- if (v1 instanceof Data_Maybe.Just) {
- return v(z)(v1.value0);
- }
- ;
- throw new Error("Failed pattern match at Data.Foldable (line 129, column 1 - line 135, column 27): " + [v.constructor.name, z.constructor.name, v1.constructor.name]);
- };
- };
- }, function (v) {
- return function (z) {
- return function (v1) {
- if (v1 instanceof Data_Maybe.Nothing) {
- return z;
- }
- ;
- if (v1 instanceof Data_Maybe.Just) {
- return v(v1.value0)(z);
- }
- ;
- throw new Error("Failed pattern match at Data.Foldable (line 129, column 1 - line 135, column 27): " + [v.constructor.name, z.constructor.name, v1.constructor.name]);
- };
- };
- });
- var foldableDual = new Foldable(function (dictMonoid) {
- return function (f) {
- return function (v) {
- return f(v);
- };
- };
- }, function (f) {
- return function (z) {
- return function (v) {
- return f(z)(v);
- };
- };
- }, function (f) {
- return function (z) {
- return function (v) {
- return f(v)(z);
- };
- };
- });
- var foldableDisj = new Foldable(function (dictMonoid) {
- return function (f) {
- return function (v) {
- return f(v);
- };
- };
- }, function (f) {
- return function (z) {
- return function (v) {
- return f(z)(v);
- };
- };
- }, function (f) {
- return function (z) {
- return function (v) {
- return f(v)(z);
- };
- };
- });
- var foldableConj = new Foldable(function (dictMonoid) {
- return function (f) {
- return function (v) {
- return f(v);
- };
- };
- }, function (f) {
- return function (z) {
- return function (v) {
- return f(z)(v);
- };
- };
- }, function (f) {
- return function (z) {
- return function (v) {
- return f(v)(z);
- };
- };
- });
- var foldableAdditive = new Foldable(function (dictMonoid) {
- return function (f) {
- return function (v) {
- return f(v);
- };
- };
- }, function (f) {
- return function (z) {
- return function (v) {
- return f(z)(v);
- };
- };
- }, function (f) {
- return function (z) {
- return function (v) {
- return f(v)(z);
- };
- };
- });
- var foldMapDefaultR = function foldMapDefaultR(dictFoldable) {
- return function (dictMonoid) {
- return function (f) {
- return foldr(dictFoldable)(function (x) {
- return function (acc) {
- return Data_Semigroup.append(dictMonoid.Semigroup0())(f(x))(acc);
- };
- })(Data_Monoid.mempty(dictMonoid));
- };
- };
- };
- var foldableArray = new Foldable(function (dictMonoid) {
- return foldMapDefaultR(foldableArray)(dictMonoid);
- }, $foreign.foldlArray, $foreign.foldrArray);
- var foldMapDefaultL = function foldMapDefaultL(dictFoldable) {
- return function (dictMonoid) {
- return function (f) {
- return foldl(dictFoldable)(function (acc) {
- return function (x) {
- return Data_Semigroup.append(dictMonoid.Semigroup0())(acc)(f(x));
- };
- })(Data_Monoid.mempty(dictMonoid));
- };
- };
- };
- var foldMap = function foldMap(dict) {
- return dict.foldMap;
- };
- var foldableFirst = new Foldable(function (dictMonoid) {
- return function (f) {
- return function (v) {
- return foldMap(foldableMaybe)(dictMonoid)(f)(v);
- };
- };
- }, function (f) {
- return function (z) {
- return function (v) {
- return foldl(foldableMaybe)(f)(z)(v);
- };
- };
- }, function (f) {
- return function (z) {
- return function (v) {
- return foldr(foldableMaybe)(f)(z)(v);
- };
- };
- });
- var foldableLast = new Foldable(function (dictMonoid) {
- return function (f) {
- return function (v) {
- return foldMap(foldableMaybe)(dictMonoid)(f)(v);
- };
- };
- }, function (f) {
- return function (z) {
- return function (v) {
- return foldl(foldableMaybe)(f)(z)(v);
- };
- };
- }, function (f) {
- return function (z) {
- return function (v) {
- return foldr(foldableMaybe)(f)(z)(v);
- };
- };
- });
- var foldlDefault = function foldlDefault(dictFoldable) {
- return function (c) {
- return function (u) {
- return function (xs) {
- return Data_Newtype.unwrap(Data_Newtype.newtypeEndo)(Data_Newtype.unwrap(Data_Newtype.newtypeDual)(foldMap(dictFoldable)(Data_Monoid_Dual.monoidDual(Data_Monoid_Endo.monoidEndo(Control_Category.categoryFn)))(function () {
- var $201 = Data_Function.flip(c);
- return function ($202) {
- return Data_Monoid_Dual.Dual(Data_Monoid_Endo.Endo($201($202)));
- };
- }())(xs)))(u);
- };
- };
- };
- };
- var foldrDefault = function foldrDefault(dictFoldable) {
- return function (c) {
- return function (u) {
- return function (xs) {
- return Data_Newtype.unwrap(Data_Newtype.newtypeEndo)(foldMap(dictFoldable)(Data_Monoid_Endo.monoidEndo(Control_Category.categoryFn))(function ($203) {
- return Data_Monoid_Endo.Endo(c($203));
- })(xs))(u);
- };
- };
- };
- };
- var surroundMap = function surroundMap(dictFoldable) {
- return function (dictSemigroup) {
- return function (d) {
- return function (t) {
- return function (f) {
- var joined = function joined(a) {
- return function (m) {
- return Data_Semigroup.append(dictSemigroup)(d)(Data_Semigroup.append(dictSemigroup)(t(a))(m));
- };
- };
- return Data_Newtype.unwrap(Data_Newtype.newtypeEndo)(foldMap(dictFoldable)(Data_Monoid_Endo.monoidEndo(Control_Category.categoryFn))(joined)(f))(d);
- };
- };
- };
- };
- };
- var surround = function surround(dictFoldable) {
- return function (dictSemigroup) {
- return function (d) {
- return surroundMap(dictFoldable)(dictSemigroup)(d)(Control_Category.identity(Control_Category.categoryFn));
- };
- };
- };
- var foldM = function foldM(dictFoldable) {
- return function (dictMonad) {
- return function (f) {
- return function (a0) {
- return foldl(dictFoldable)(function (ma) {
- return function (b) {
- return Control_Bind.bind(dictMonad.Bind1())(ma)(Data_Function.flip(f)(b));
- };
- })(Control_Applicative.pure(dictMonad.Applicative0())(a0));
- };
- };
- };
- };
- var fold = function fold(dictFoldable) {
- return function (dictMonoid) {
- return foldMap(dictFoldable)(dictMonoid)(Control_Category.identity(Control_Category.categoryFn));
- };
- };
- var findMap = function findMap(dictFoldable) {
- return function (p) {
- var go = function go(v) {
- return function (v1) {
- if (v instanceof Data_Maybe.Nothing) {
- return p(v1);
- }
- ;
- return v;
- };
- };
- return foldl(dictFoldable)(go)(Data_Maybe.Nothing.value);
- };
- };
- var find = function find(dictFoldable) {
- return function (p) {
- var go = function go(v) {
- return function (v1) {
- if (v instanceof Data_Maybe.Nothing && p(v1)) {
- return new Data_Maybe.Just(v1);
- }
- ;
- return v;
- };
- };
- return foldl(dictFoldable)(go)(Data_Maybe.Nothing.value);
- };
- };
- var any = function any(dictFoldable) {
- return function (dictHeytingAlgebra) {
- return Data_Newtype.alaF(Data_Functor.functorFn)(Data_Functor.functorFn)(Data_Newtype.newtypeDisj)(Data_Newtype.newtypeDisj)(Data_Monoid_Disj.Disj)(foldMap(dictFoldable)(Data_Monoid_Disj.monoidDisj(dictHeytingAlgebra)));
- };
- };
- var elem = function elem(dictFoldable) {
- return function (dictEq) {
- var $204 = any(dictFoldable)(Data_HeytingAlgebra.heytingAlgebraBoolean);
- var $205 = Data_Eq.eq(dictEq);
- return function ($206) {
- return $204($205($206));
- };
- };
- };
- var notElem = function notElem(dictFoldable) {
- return function (dictEq) {
- return function (x) {
- var $207 = Data_HeytingAlgebra.not(Data_HeytingAlgebra.heytingAlgebraBoolean);
- var $208 = elem(dictFoldable)(dictEq)(x);
- return function ($209) {
- return $207($208($209));
- };
- };
- };
- };
- var or = function or(dictFoldable) {
- return function (dictHeytingAlgebra) {
- return any(dictFoldable)(dictHeytingAlgebra)(Control_Category.identity(Control_Category.categoryFn));
- };
- };
- var all = function all(dictFoldable) {
- return function (dictHeytingAlgebra) {
- return Data_Newtype.alaF(Data_Functor.functorFn)(Data_Functor.functorFn)(Data_Newtype.newtypeConj)(Data_Newtype.newtypeConj)(Data_Monoid_Conj.Conj)(foldMap(dictFoldable)(Data_Monoid_Conj.monoidConj(dictHeytingAlgebra)));
- };
- };
- var and = function and(dictFoldable) {
- return function (dictHeytingAlgebra) {
- return all(dictFoldable)(dictHeytingAlgebra)(Control_Category.identity(Control_Category.categoryFn));
- };
- };
- module.exports = {
- Foldable: Foldable,
- foldr: foldr,
- foldl: foldl,
- foldMap: foldMap,
- foldrDefault: foldrDefault,
- foldlDefault: foldlDefault,
- foldMapDefaultL: foldMapDefaultL,
- foldMapDefaultR: foldMapDefaultR,
- fold: fold,
- foldM: foldM,
- traverse_: traverse_,
- for_: for_,
- sequence_: sequence_,
- oneOf: oneOf,
- oneOfMap: oneOfMap,
- intercalate: intercalate,
- surroundMap: surroundMap,
- surround: surround,
- and: and,
- or: or,
- all: all,
- any: any,
- sum: sum,
- product: product,
- elem: elem,
- notElem: notElem,
- indexl: indexl,
- indexr: indexr,
- find: find,
- findMap: findMap,
- maximum: maximum,
- maximumBy: maximumBy,
- minimum: minimum,
- minimumBy: minimumBy,
- "null": $$null,
- length: length,
- foldableArray: foldableArray,
- foldableMaybe: foldableMaybe,
- foldableFirst: foldableFirst,
- foldableLast: foldableLast,
- foldableAdditive: foldableAdditive,
- foldableDual: foldableDual,
- foldableDisj: foldableDisj,
- foldableConj: foldableConj,
- foldableMultiplicative: foldableMultiplicative
- };
- },{"./foreign.js":"../output/Data.Foldable/foreign.js","../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Plus/index.js":"../output/Control.Plus/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.HeytingAlgebra/index.js":"../output/Data.HeytingAlgebra/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Monoid.Conj/index.js":"../output/Data.Monoid.Conj/index.js","../Data.Monoid.Disj/index.js":"../output/Data.Monoid.Disj/index.js","../Data.Monoid.Dual/index.js":"../output/Data.Monoid.Dual/index.js","../Data.Monoid.Endo/index.js":"../output/Data.Monoid.Endo/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Semiring/index.js":"../output/Data.Semiring/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Data.Bifoldable/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Category = require("../Control.Category/index.js");
- var Data_Foldable = require("../Data.Foldable/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Data_Monoid_Conj = require("../Data.Monoid.Conj/index.js");
- var Data_Monoid_Disj = require("../Data.Monoid.Disj/index.js");
- var Data_Monoid_Dual = require("../Data.Monoid.Dual/index.js");
- var Data_Monoid_Endo = require("../Data.Monoid.Endo/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Unit = require("../Data.Unit/index.js");
- var Bifoldable = function Bifoldable(bifoldMap, bifoldl, bifoldr) {
- this.bifoldMap = bifoldMap;
- this.bifoldl = bifoldl;
- this.bifoldr = bifoldr;
- };
- var bifoldr = function bifoldr(dict) {
- return dict.bifoldr;
- };
- var bitraverse_ = function bitraverse_(dictBifoldable) {
- return function (dictApplicative) {
- return function (f) {
- return function (g) {
- return bifoldr(dictBifoldable)(function () {
- var $97 = Control_Apply.applySecond(dictApplicative.Apply0());
- return function ($98) {
- return $97(f($98));
- };
- }())(function () {
- var $99 = Control_Apply.applySecond(dictApplicative.Apply0());
- return function ($100) {
- return $99(g($100));
- };
- }())(Control_Applicative.pure(dictApplicative)(Data_Unit.unit));
- };
- };
- };
- };
- var bifor_ = function bifor_(dictBifoldable) {
- return function (dictApplicative) {
- return function (t) {
- return function (f) {
- return function (g) {
- return bitraverse_(dictBifoldable)(dictApplicative)(f)(g)(t);
- };
- };
- };
- };
- };
- var bisequence_ = function bisequence_(dictBifoldable) {
- return function (dictApplicative) {
- return bitraverse_(dictBifoldable)(dictApplicative)(Control_Category.identity(Control_Category.categoryFn))(Control_Category.identity(Control_Category.categoryFn));
- };
- };
- var bifoldl = function bifoldl(dict) {
- return dict.bifoldl;
- };
- var bifoldableJoker = function bifoldableJoker(dictFoldable) {
- return new Bifoldable(function (dictMonoid) {
- return function (v) {
- return function (r) {
- return function (v1) {
- return Data_Foldable.foldMap(dictFoldable)(dictMonoid)(r)(v1);
- };
- };
- };
- }, function (v) {
- return function (r) {
- return function (u) {
- return function (v1) {
- return Data_Foldable.foldl(dictFoldable)(r)(u)(v1);
- };
- };
- };
- }, function (v) {
- return function (r) {
- return function (u) {
- return function (v1) {
- return Data_Foldable.foldr(dictFoldable)(r)(u)(v1);
- };
- };
- };
- });
- };
- var bifoldableClown = function bifoldableClown(dictFoldable) {
- return new Bifoldable(function (dictMonoid) {
- return function (l) {
- return function (v) {
- return function (v1) {
- return Data_Foldable.foldMap(dictFoldable)(dictMonoid)(l)(v1);
- };
- };
- };
- }, function (l) {
- return function (v) {
- return function (u) {
- return function (v1) {
- return Data_Foldable.foldl(dictFoldable)(l)(u)(v1);
- };
- };
- };
- }, function (l) {
- return function (v) {
- return function (u) {
- return function (v1) {
- return Data_Foldable.foldr(dictFoldable)(l)(u)(v1);
- };
- };
- };
- });
- };
- var bifoldMapDefaultR = function bifoldMapDefaultR(dictBifoldable) {
- return function (dictMonoid) {
- return function (f) {
- return function (g) {
- return bifoldr(dictBifoldable)(function () {
- var $101 = Data_Semigroup.append(dictMonoid.Semigroup0());
- return function ($102) {
- return $101(f($102));
- };
- }())(function () {
- var $103 = Data_Semigroup.append(dictMonoid.Semigroup0());
- return function ($104) {
- return $103(g($104));
- };
- }())(Data_Monoid.mempty(dictMonoid));
- };
- };
- };
- };
- var bifoldMapDefaultL = function bifoldMapDefaultL(dictBifoldable) {
- return function (dictMonoid) {
- return function (f) {
- return function (g) {
- return bifoldl(dictBifoldable)(function (m) {
- return function (a) {
- return Data_Semigroup.append(dictMonoid.Semigroup0())(m)(f(a));
- };
- })(function (m) {
- return function (b) {
- return Data_Semigroup.append(dictMonoid.Semigroup0())(m)(g(b));
- };
- })(Data_Monoid.mempty(dictMonoid));
- };
- };
- };
- };
- var bifoldMap = function bifoldMap(dict) {
- return dict.bifoldMap;
- };
- var bifoldableFlip = function bifoldableFlip(dictBifoldable) {
- return new Bifoldable(function (dictMonoid) {
- return function (r) {
- return function (l) {
- return function (v) {
- return bifoldMap(dictBifoldable)(dictMonoid)(l)(r)(v);
- };
- };
- };
- }, function (r) {
- return function (l) {
- return function (u) {
- return function (v) {
- return bifoldl(dictBifoldable)(l)(r)(u)(v);
- };
- };
- };
- }, function (r) {
- return function (l) {
- return function (u) {
- return function (v) {
- return bifoldr(dictBifoldable)(l)(r)(u)(v);
- };
- };
- };
- });
- };
- var bifoldableWrap = function bifoldableWrap(dictBifoldable) {
- return new Bifoldable(function (dictMonoid) {
- return function (l) {
- return function (r) {
- return function (v) {
- return bifoldMap(dictBifoldable)(dictMonoid)(l)(r)(v);
- };
- };
- };
- }, function (l) {
- return function (r) {
- return function (u) {
- return function (v) {
- return bifoldl(dictBifoldable)(l)(r)(u)(v);
- };
- };
- };
- }, function (l) {
- return function (r) {
- return function (u) {
- return function (v) {
- return bifoldr(dictBifoldable)(l)(r)(u)(v);
- };
- };
- };
- });
- };
- var bifoldlDefault = function bifoldlDefault(dictBifoldable) {
- return function (f) {
- return function (g) {
- return function (z) {
- return function (p) {
- return Data_Newtype.unwrap(Data_Newtype.newtypeEndo)(Data_Newtype.unwrap(Data_Newtype.newtypeDual)(bifoldMap(dictBifoldable)(Data_Monoid_Dual.monoidDual(Data_Monoid_Endo.monoidEndo(Control_Category.categoryFn)))(function () {
- var $105 = Data_Function.flip(f);
- return function ($106) {
- return Data_Monoid_Dual.Dual(Data_Monoid_Endo.Endo($105($106)));
- };
- }())(function () {
- var $107 = Data_Function.flip(g);
- return function ($108) {
- return Data_Monoid_Dual.Dual(Data_Monoid_Endo.Endo($107($108)));
- };
- }())(p)))(z);
- };
- };
- };
- };
- };
- var bifoldrDefault = function bifoldrDefault(dictBifoldable) {
- return function (f) {
- return function (g) {
- return function (z) {
- return function (p) {
- return Data_Newtype.unwrap(Data_Newtype.newtypeEndo)(bifoldMap(dictBifoldable)(Data_Monoid_Endo.monoidEndo(Control_Category.categoryFn))(function ($109) {
- return Data_Monoid_Endo.Endo(f($109));
- })(function ($110) {
- return Data_Monoid_Endo.Endo(g($110));
- })(p))(z);
- };
- };
- };
- };
- };
- var bifoldableProduct = function bifoldableProduct(dictBifoldable) {
- return function (dictBifoldable1) {
- return new Bifoldable(function (dictMonoid) {
- return function (l) {
- return function (r) {
- return function (v) {
- return Data_Semigroup.append(dictMonoid.Semigroup0())(bifoldMap(dictBifoldable)(dictMonoid)(l)(r)(v.value0))(bifoldMap(dictBifoldable1)(dictMonoid)(l)(r)(v.value1));
- };
- };
- };
- }, function (l) {
- return function (r) {
- return function (u) {
- return function (m) {
- return bifoldlDefault(bifoldableProduct(dictBifoldable)(dictBifoldable1))(l)(r)(u)(m);
- };
- };
- };
- }, function (l) {
- return function (r) {
- return function (u) {
- return function (m) {
- return bifoldrDefault(bifoldableProduct(dictBifoldable)(dictBifoldable1))(l)(r)(u)(m);
- };
- };
- };
- });
- };
- };
- var bifold = function bifold(dictBifoldable) {
- return function (dictMonoid) {
- return bifoldMap(dictBifoldable)(dictMonoid)(Control_Category.identity(Control_Category.categoryFn))(Control_Category.identity(Control_Category.categoryFn));
- };
- };
- var biany = function biany(dictBifoldable) {
- return function (dictBooleanAlgebra) {
- return function (p) {
- return function (q) {
- var $111 = Data_Newtype.unwrap(Data_Newtype.newtypeDisj);
- var $112 = bifoldMap(dictBifoldable)(Data_Monoid_Disj.monoidDisj(dictBooleanAlgebra.HeytingAlgebra0()))(function ($114) {
- return Data_Monoid_Disj.Disj(p($114));
- })(function ($115) {
- return Data_Monoid_Disj.Disj(q($115));
- });
- return function ($113) {
- return $111($112($113));
- };
- };
- };
- };
- };
- var biall = function biall(dictBifoldable) {
- return function (dictBooleanAlgebra) {
- return function (p) {
- return function (q) {
- var $116 = Data_Newtype.unwrap(Data_Newtype.newtypeConj);
- var $117 = bifoldMap(dictBifoldable)(Data_Monoid_Conj.monoidConj(dictBooleanAlgebra.HeytingAlgebra0()))(function ($119) {
- return Data_Monoid_Conj.Conj(p($119));
- })(function ($120) {
- return Data_Monoid_Conj.Conj(q($120));
- });
- return function ($118) {
- return $116($117($118));
- };
- };
- };
- };
- };
- module.exports = {
- bifoldMap: bifoldMap,
- bifoldl: bifoldl,
- bifoldr: bifoldr,
- Bifoldable: Bifoldable,
- bifoldrDefault: bifoldrDefault,
- bifoldlDefault: bifoldlDefault,
- bifoldMapDefaultR: bifoldMapDefaultR,
- bifoldMapDefaultL: bifoldMapDefaultL,
- bifold: bifold,
- bitraverse_: bitraverse_,
- bifor_: bifor_,
- bisequence_: bisequence_,
- biany: biany,
- biall: biall,
- bifoldableClown: bifoldableClown,
- bifoldableJoker: bifoldableJoker,
- bifoldableFlip: bifoldableFlip,
- bifoldableProduct: bifoldableProduct,
- bifoldableWrap: bifoldableWrap
- };
- },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Monoid.Conj/index.js":"../output/Data.Monoid.Conj/index.js","../Data.Monoid.Disj/index.js":"../output/Data.Monoid.Disj/index.js","../Data.Monoid.Dual/index.js":"../output/Data.Monoid.Dual/index.js","../Data.Monoid.Endo/index.js":"../output/Data.Monoid.Endo/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Data.Bifunctor/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Category = require("../Control.Category/index.js");
- var Bifunctor = function Bifunctor(bimap) {
- this.bimap = bimap;
- };
- var bimap = function bimap(dict) {
- return dict.bimap;
- };
- var lmap = function lmap(dictBifunctor) {
- return function (f) {
- return bimap(dictBifunctor)(f)(Control_Category.identity(Control_Category.categoryFn));
- };
- };
- var rmap = function rmap(dictBifunctor) {
- return bimap(dictBifunctor)(Control_Category.identity(Control_Category.categoryFn));
- };
- module.exports = {
- bimap: bimap,
- Bifunctor: Bifunctor,
- lmap: lmap,
- rmap: rmap
- };
- },{"../Control.Category/index.js":"../output/Control.Category/index.js"}],"../output/Control.Biapplicative/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Biapplicative = function Biapplicative(Biapply0, bipure) {
- this.Biapply0 = Biapply0;
- this.bipure = bipure;
- };
- var bipure = function bipure(dict) {
- return dict.bipure;
- };
- module.exports = {
- bipure: bipure,
- Biapplicative: Biapplicative
- };
- },{}],"../output/Control.Biapply/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Category = require("../Control.Category/index.js");
- var Data_Bifunctor = require("../Data.Bifunctor/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Biapply = function Biapply(Bifunctor0, biapply) {
- this.Bifunctor0 = Bifunctor0;
- this.biapply = biapply;
- };
- var biapply = function biapply(dict) {
- return dict.biapply;
- };
- var biapplyFirst = function biapplyFirst(dictBiapply) {
- return function (a) {
- return function (b) {
- return biapply(dictBiapply)(Control_Category.identity(Control_Category.categoryFn)(Data_Bifunctor.bimap(dictBiapply.Bifunctor0())(Data_Function["const"](Control_Category.identity(Control_Category.categoryFn)))(Data_Function["const"](Control_Category.identity(Control_Category.categoryFn))))(a))(b);
- };
- };
- };
- var biapplySecond = function biapplySecond(dictBiapply) {
- return function (a) {
- return function (b) {
- return biapply(dictBiapply)(Control_Category.identity(Control_Category.categoryFn)(Data_Bifunctor.bimap(dictBiapply.Bifunctor0())(Data_Function["const"])(Data_Function["const"]))(a))(b);
- };
- };
- };
- var bilift2 = function bilift2(dictBiapply) {
- return function (f) {
- return function (g) {
- return function (a) {
- return function (b) {
- return biapply(dictBiapply)(Control_Category.identity(Control_Category.categoryFn)(Data_Bifunctor.bimap(dictBiapply.Bifunctor0())(f)(g))(a))(b);
- };
- };
- };
- };
- };
- var bilift3 = function bilift3(dictBiapply) {
- return function (f) {
- return function (g) {
- return function (a) {
- return function (b) {
- return function (c) {
- return biapply(dictBiapply)(biapply(dictBiapply)(Control_Category.identity(Control_Category.categoryFn)(Data_Bifunctor.bimap(dictBiapply.Bifunctor0())(f)(g))(a))(b))(c);
- };
- };
- };
- };
- };
- };
- module.exports = {
- biapply: biapply,
- Biapply: Biapply,
- biapplyFirst: biapplyFirst,
- biapplySecond: biapplySecond,
- bilift2: bilift2,
- bilift3: bilift3
- };
- },{"../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Bifunctor/index.js":"../output/Data.Bifunctor/index.js","../Data.Function/index.js":"../output/Data.Function/index.js"}],"../output/Data.Bifunctor.Clown/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Biapplicative = require("../Control.Biapplicative/index.js");
- var Control_Biapply = require("../Control.Biapply/index.js");
- var Data_Bifunctor = require("../Data.Bifunctor/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Clown = function Clown(x) {
- return x;
- };
- var showClown = function showClown(dictShow) {
- return new Data_Show.Show(function (v) {
- return "(Clown " + (Data_Show.show(dictShow)(v) + ")");
- });
- };
- var ordClown = function ordClown(dictOrd) {
- return dictOrd;
- };
- var newtypeClown = new Data_Newtype.Newtype(function (n) {
- return n;
- }, Clown);
- var functorClown = new Data_Functor.Functor(function (v) {
- return function (v1) {
- return v1;
- };
- });
- var eqClown = function eqClown(dictEq) {
- return dictEq;
- };
- var bifunctorClown = function bifunctorClown(dictFunctor) {
- return new Data_Bifunctor.Bifunctor(function (f) {
- return function (v) {
- return function (v1) {
- return Data_Functor.map(dictFunctor)(f)(v1);
- };
- };
- });
- };
- var biapplyClown = function biapplyClown(dictApply) {
- return new Control_Biapply.Biapply(function () {
- return bifunctorClown(dictApply.Functor0());
- }, function (v) {
- return function (v1) {
- return Control_Apply.apply(dictApply)(v)(v1);
- };
- });
- };
- var biapplicativeClown = function biapplicativeClown(dictApplicative) {
- return new Control_Biapplicative.Biapplicative(function () {
- return biapplyClown(dictApplicative.Apply0());
- }, function (a) {
- return function (v) {
- return Control_Applicative.pure(dictApplicative)(a);
- };
- });
- };
- module.exports = {
- Clown: Clown,
- newtypeClown: newtypeClown,
- eqClown: eqClown,
- ordClown: ordClown,
- showClown: showClown,
- functorClown: functorClown,
- bifunctorClown: bifunctorClown,
- biapplyClown: biapplyClown,
- biapplicativeClown: biapplicativeClown
- };
- },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Biapplicative/index.js":"../output/Control.Biapplicative/index.js","../Control.Biapply/index.js":"../output/Control.Biapply/index.js","../Data.Bifunctor/index.js":"../output/Data.Bifunctor/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Bifunctor.Flip/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Biapplicative = require("../Control.Biapplicative/index.js");
- var Control_Biapply = require("../Control.Biapply/index.js");
- var Data_Bifunctor = require("../Data.Bifunctor/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Flip = function Flip(x) {
- return x;
- };
- var showFlip = function showFlip(dictShow) {
- return new Data_Show.Show(function (v) {
- return "(Flip " + (Data_Show.show(dictShow)(v) + ")");
- });
- };
- var ordFlip = function ordFlip(dictOrd) {
- return dictOrd;
- };
- var newtypeFlip = new Data_Newtype.Newtype(function (n) {
- return n;
- }, Flip);
- var functorFlip = function functorFlip(dictBifunctor) {
- return new Data_Functor.Functor(function (f) {
- return function (v) {
- return Data_Bifunctor.lmap(dictBifunctor)(f)(v);
- };
- });
- };
- var eqFlip = function eqFlip(dictEq) {
- return dictEq;
- };
- var bifunctorFlip = function bifunctorFlip(dictBifunctor) {
- return new Data_Bifunctor.Bifunctor(function (f) {
- return function (g) {
- return function (v) {
- return Data_Bifunctor.bimap(dictBifunctor)(g)(f)(v);
- };
- };
- });
- };
- var biapplyFlip = function biapplyFlip(dictBiapply) {
- return new Control_Biapply.Biapply(function () {
- return bifunctorFlip(dictBiapply.Bifunctor0());
- }, function (v) {
- return function (v1) {
- return Control_Biapply.biapply(dictBiapply)(v)(v1);
- };
- });
- };
- var biapplicativeFlip = function biapplicativeFlip(dictBiapplicative) {
- return new Control_Biapplicative.Biapplicative(function () {
- return biapplyFlip(dictBiapplicative.Biapply0());
- }, function (a) {
- return function (b) {
- return Control_Biapplicative.bipure(dictBiapplicative)(b)(a);
- };
- });
- };
- module.exports = {
- Flip: Flip,
- newtypeFlip: newtypeFlip,
- eqFlip: eqFlip,
- ordFlip: ordFlip,
- showFlip: showFlip,
- functorFlip: functorFlip,
- bifunctorFlip: bifunctorFlip,
- biapplyFlip: biapplyFlip,
- biapplicativeFlip: biapplicativeFlip
- };
- },{"../Control.Biapplicative/index.js":"../output/Control.Biapplicative/index.js","../Control.Biapply/index.js":"../output/Control.Biapply/index.js","../Data.Bifunctor/index.js":"../output/Data.Bifunctor/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Bifunctor.Joker/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Biapplicative = require("../Control.Biapplicative/index.js");
- var Control_Biapply = require("../Control.Biapply/index.js");
- var Data_Bifunctor = require("../Data.Bifunctor/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Joker = function Joker(x) {
- return x;
- };
- var showJoker = function showJoker(dictShow) {
- return new Data_Show.Show(function (v) {
- return "(Joker " + (Data_Show.show(dictShow)(v) + ")");
- });
- };
- var ordJoker = function ordJoker(dictOrd) {
- return dictOrd;
- };
- var newtypeJoker = new Data_Newtype.Newtype(function (n) {
- return n;
- }, Joker);
- var functorJoker = function functorJoker(dictFunctor) {
- return new Data_Functor.Functor(function (g) {
- return function (v) {
- return Data_Functor.map(dictFunctor)(g)(v);
- };
- });
- };
- var eqJoker = function eqJoker(dictEq) {
- return dictEq;
- };
- var bifunctorJoker = function bifunctorJoker(dictFunctor) {
- return new Data_Bifunctor.Bifunctor(function (v) {
- return function (g) {
- return function (v1) {
- return Data_Functor.map(dictFunctor)(g)(v1);
- };
- };
- });
- };
- var biapplyJoker = function biapplyJoker(dictApply) {
- return new Control_Biapply.Biapply(function () {
- return bifunctorJoker(dictApply.Functor0());
- }, function (v) {
- return function (v1) {
- return Control_Apply.apply(dictApply)(v)(v1);
- };
- });
- };
- var biapplicativeJoker = function biapplicativeJoker(dictApplicative) {
- return new Control_Biapplicative.Biapplicative(function () {
- return biapplyJoker(dictApplicative.Apply0());
- }, function (v) {
- return function (b) {
- return Control_Applicative.pure(dictApplicative)(b);
- };
- });
- };
- module.exports = {
- Joker: Joker,
- newtypeJoker: newtypeJoker,
- eqJoker: eqJoker,
- ordJoker: ordJoker,
- showJoker: showJoker,
- functorJoker: functorJoker,
- bifunctorJoker: bifunctorJoker,
- biapplyJoker: biapplyJoker,
- biapplicativeJoker: biapplicativeJoker
- };
- },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Biapplicative/index.js":"../output/Control.Biapplicative/index.js","../Control.Biapply/index.js":"../output/Control.Biapply/index.js","../Data.Bifunctor/index.js":"../output/Data.Bifunctor/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Bifunctor.Product/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Biapplicative = require("../Control.Biapplicative/index.js");
- var Control_Biapply = require("../Control.Biapply/index.js");
- var Data_Bifunctor = require("../Data.Bifunctor/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Ordering = require("../Data.Ordering/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Product = function () {
- function Product(value0, value1) {
- this.value0 = value0;
- this.value1 = value1;
- }
- ;
- Product.create = function (value0) {
- return function (value1) {
- return new Product(value0, value1);
- };
- };
- return Product;
- }();
- var showProduct = function showProduct(dictShow) {
- return function (dictShow1) {
- return new Data_Show.Show(function (v) {
- return "(Product " + (Data_Show.show(dictShow)(v.value0) + (" " + (Data_Show.show(dictShow1)(v.value1) + ")")));
- });
- };
- };
- var eqProduct = function eqProduct(dictEq) {
- return function (dictEq1) {
- return new Data_Eq.Eq(function (x) {
- return function (y) {
- return Data_Eq.eq(dictEq)(x.value0)(y.value0) && Data_Eq.eq(dictEq1)(x.value1)(y.value1);
- };
- });
- };
- };
- var ordProduct = function ordProduct(dictOrd) {
- return function (dictOrd1) {
- return new Data_Ord.Ord(function () {
- return eqProduct(dictOrd.Eq0())(dictOrd1.Eq0());
- }, function (x) {
- return function (y) {
- var v = Data_Ord.compare(dictOrd)(x.value0)(y.value0);
- if (v instanceof Data_Ordering.LT) {
- return Data_Ordering.LT.value;
- }
- ;
- if (v instanceof Data_Ordering.GT) {
- return Data_Ordering.GT.value;
- }
- ;
- return Data_Ord.compare(dictOrd1)(x.value1)(y.value1);
- };
- });
- };
- };
- var bifunctorProduct = function bifunctorProduct(dictBifunctor) {
- return function (dictBifunctor1) {
- return new Data_Bifunctor.Bifunctor(function (f) {
- return function (g) {
- return function (v) {
- return new Product(Data_Bifunctor.bimap(dictBifunctor)(f)(g)(v.value0), Data_Bifunctor.bimap(dictBifunctor1)(f)(g)(v.value1));
- };
- };
- });
- };
- };
- var biapplyProduct = function biapplyProduct(dictBiapply) {
- return function (dictBiapply1) {
- return new Control_Biapply.Biapply(function () {
- return bifunctorProduct(dictBiapply.Bifunctor0())(dictBiapply1.Bifunctor0());
- }, function (v) {
- return function (v1) {
- return new Product(Control_Biapply.biapply(dictBiapply)(v.value0)(v1.value0), Control_Biapply.biapply(dictBiapply1)(v.value1)(v1.value1));
- };
- });
- };
- };
- var biapplicativeProduct = function biapplicativeProduct(dictBiapplicative) {
- return function (dictBiapplicative1) {
- return new Control_Biapplicative.Biapplicative(function () {
- return biapplyProduct(dictBiapplicative.Biapply0())(dictBiapplicative1.Biapply0());
- }, function (a) {
- return function (b) {
- return new Product(Control_Biapplicative.bipure(dictBiapplicative)(a)(b), Control_Biapplicative.bipure(dictBiapplicative1)(a)(b));
- };
- });
- };
- };
- module.exports = {
- Product: Product,
- eqProduct: eqProduct,
- ordProduct: ordProduct,
- showProduct: showProduct,
- bifunctorProduct: bifunctorProduct,
- biapplyProduct: biapplyProduct,
- biapplicativeProduct: biapplicativeProduct
- };
- },{"../Control.Biapplicative/index.js":"../output/Control.Biapplicative/index.js","../Control.Biapply/index.js":"../output/Control.Biapply/index.js","../Data.Bifunctor/index.js":"../output/Data.Bifunctor/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Bifunctor.Wrap/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Biapplicative = require("../Control.Biapplicative/index.js");
- var Control_Biapply = require("../Control.Biapply/index.js");
- var Data_Bifunctor = require("../Data.Bifunctor/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Wrap = function Wrap(x) {
- return x;
- };
- var showWrap = function showWrap(dictShow) {
- return new Data_Show.Show(function (v) {
- return "(Wrap " + (Data_Show.show(dictShow)(v) + ")");
- });
- };
- var ordWrap = function ordWrap(dictOrd) {
- return dictOrd;
- };
- var newtypeWrap = new Data_Newtype.Newtype(function (n) {
- return n;
- }, Wrap);
- var functorWrap = function functorWrap(dictBifunctor) {
- return new Data_Functor.Functor(function (f) {
- return function (v) {
- return Data_Bifunctor.rmap(dictBifunctor)(f)(v);
- };
- });
- };
- var eqWrap = function eqWrap(dictEq) {
- return dictEq;
- };
- var bifunctorWrap = function bifunctorWrap(dictBifunctor) {
- return new Data_Bifunctor.Bifunctor(function (f) {
- return function (g) {
- return function (v) {
- return Data_Bifunctor.bimap(dictBifunctor)(f)(g)(v);
- };
- };
- });
- };
- var biapplyWrap = function biapplyWrap(dictBiapply) {
- return new Control_Biapply.Biapply(function () {
- return bifunctorWrap(dictBiapply.Bifunctor0());
- }, function (v) {
- return function (v1) {
- return Control_Biapply.biapply(dictBiapply)(v)(v1);
- };
- });
- };
- var biapplicativeWrap = function biapplicativeWrap(dictBiapplicative) {
- return new Control_Biapplicative.Biapplicative(function () {
- return biapplyWrap(dictBiapplicative.Biapply0());
- }, function (a) {
- return function (b) {
- return Control_Biapplicative.bipure(dictBiapplicative)(a)(b);
- };
- });
- };
- module.exports = {
- Wrap: Wrap,
- newtypeWrap: newtypeWrap,
- eqWrap: eqWrap,
- ordWrap: ordWrap,
- showWrap: showWrap,
- functorWrap: functorWrap,
- bifunctorWrap: bifunctorWrap,
- biapplyWrap: biapplyWrap,
- biapplicativeWrap: biapplicativeWrap
- };
- },{"../Control.Biapplicative/index.js":"../output/Control.Biapplicative/index.js","../Control.Biapply/index.js":"../output/Control.Biapply/index.js","../Data.Bifunctor/index.js":"../output/Data.Bifunctor/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Traversable/foreign.js":[function(require,module,exports) {
- "use strict"; // jshint maxparams: 3
- exports.traverseArrayImpl = function () {
- function array1(a) {
- return [a];
- }
- function array2(a) {
- return function (b) {
- return [a, b];
- };
- }
- function array3(a) {
- return function (b) {
- return function (c) {
- return [a, b, c];
- };
- };
- }
- function concat2(xs) {
- return function (ys) {
- return xs.concat(ys);
- };
- }
- return function (apply) {
- return function (map) {
- return function (pure) {
- return function (f) {
- return function (array) {
- function go(bot, top) {
- switch (top - bot) {
- case 0:
- return pure([]);
- case 1:
- return map(array1)(f(array[bot]));
- case 2:
- return apply(map(array2)(f(array[bot])))(f(array[bot + 1]));
- case 3:
- return apply(apply(map(array3)(f(array[bot])))(f(array[bot + 1])))(f(array[bot + 2]));
- default:
- // This slightly tricky pivot selection aims to produce two
- // even-length partitions where possible.
- var pivot = bot + Math.floor((top - bot) / 4) * 2;
- return apply(map(concat2)(go(bot, pivot)))(go(pivot, top));
- }
- }
- return go(0, array.length);
- };
- };
- };
- };
- };
- }();
- },{}],"../output/Data.Maybe.First/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Alt = require("../Control.Alt/index.js");
- var Control_Alternative = require("../Control.Alternative/index.js");
- var Control_MonadZero = require("../Control.MonadZero/index.js");
- var Control_Plus = require("../Control.Plus/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var First = function First(x) {
- return x;
- };
- var showFirst = function showFirst(dictShow) {
- return new Data_Show.Show(function (v) {
- return "First (" + (Data_Show.show(Data_Maybe.showMaybe(dictShow))(v) + ")");
- });
- };
- var semigroupFirst = new Data_Semigroup.Semigroup(function (v) {
- return function (v1) {
- if (v instanceof Data_Maybe.Just) {
- return v;
- }
- ;
- return v1;
- };
- });
- var ordFirst = function ordFirst(dictOrd) {
- return Data_Maybe.ordMaybe(dictOrd);
- };
- var ord1First = Data_Maybe.ord1Maybe;
- var newtypeFirst = new Data_Newtype.Newtype(function (n) {
- return n;
- }, First);
- var monoidFirst = new Data_Monoid.Monoid(function () {
- return semigroupFirst;
- }, Data_Maybe.Nothing.value);
- var monadFirst = Data_Maybe.monadMaybe;
- var invariantFirst = Data_Maybe.invariantMaybe;
- var functorFirst = Data_Maybe.functorMaybe;
- var extendFirst = Data_Maybe.extendMaybe;
- var eqFirst = function eqFirst(dictEq) {
- return Data_Maybe.eqMaybe(dictEq);
- };
- var eq1First = Data_Maybe.eq1Maybe;
- var boundedFirst = function boundedFirst(dictBounded) {
- return Data_Maybe.boundedMaybe(dictBounded);
- };
- var bindFirst = Data_Maybe.bindMaybe;
- var applyFirst = Data_Maybe.applyMaybe;
- var applicativeFirst = Data_Maybe.applicativeMaybe;
- var altFirst = new Control_Alt.Alt(function () {
- return functorFirst;
- }, Data_Semigroup.append(semigroupFirst));
- var plusFirst = new Control_Plus.Plus(function () {
- return altFirst;
- }, Data_Monoid.mempty(monoidFirst));
- var alternativeFirst = new Control_Alternative.Alternative(function () {
- return applicativeFirst;
- }, function () {
- return plusFirst;
- });
- var monadZeroFirst = new Control_MonadZero.MonadZero(function () {
- return alternativeFirst;
- }, function () {
- return monadFirst;
- });
- module.exports = {
- First: First,
- newtypeFirst: newtypeFirst,
- eqFirst: eqFirst,
- eq1First: eq1First,
- ordFirst: ordFirst,
- ord1First: ord1First,
- boundedFirst: boundedFirst,
- functorFirst: functorFirst,
- invariantFirst: invariantFirst,
- applyFirst: applyFirst,
- applicativeFirst: applicativeFirst,
- bindFirst: bindFirst,
- monadFirst: monadFirst,
- extendFirst: extendFirst,
- showFirst: showFirst,
- semigroupFirst: semigroupFirst,
- monoidFirst: monoidFirst,
- altFirst: altFirst,
- plusFirst: plusFirst,
- alternativeFirst: alternativeFirst,
- monadZeroFirst: monadZeroFirst
- };
- },{"../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Alternative/index.js":"../output/Control.Alternative/index.js","../Control.MonadZero/index.js":"../output/Control.MonadZero/index.js","../Control.Plus/index.js":"../output/Control.Plus/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Maybe.Last/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Alt = require("../Control.Alt/index.js");
- var Control_Alternative = require("../Control.Alternative/index.js");
- var Control_MonadZero = require("../Control.MonadZero/index.js");
- var Control_Plus = require("../Control.Plus/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Last = function Last(x) {
- return x;
- };
- var showLast = function showLast(dictShow) {
- return new Data_Show.Show(function (v) {
- return "(Last " + (Data_Show.show(Data_Maybe.showMaybe(dictShow))(v) + ")");
- });
- };
- var semigroupLast = new Data_Semigroup.Semigroup(function (v) {
- return function (v1) {
- if (v1 instanceof Data_Maybe.Just) {
- return v1;
- }
- ;
- if (v1 instanceof Data_Maybe.Nothing) {
- return v;
- }
- ;
- throw new Error("Failed pattern match at Data.Maybe.Last (line 52, column 1 - line 54, column 36): " + [v.constructor.name, v1.constructor.name]);
- };
- });
- var ordLast = function ordLast(dictOrd) {
- return Data_Maybe.ordMaybe(dictOrd);
- };
- var ord1Last = Data_Maybe.ord1Maybe;
- var newtypeLast = new Data_Newtype.Newtype(function (n) {
- return n;
- }, Last);
- var monoidLast = new Data_Monoid.Monoid(function () {
- return semigroupLast;
- }, Data_Maybe.Nothing.value);
- var monadLast = Data_Maybe.monadMaybe;
- var invariantLast = Data_Maybe.invariantMaybe;
- var functorLast = Data_Maybe.functorMaybe;
- var extendLast = Data_Maybe.extendMaybe;
- var eqLast = function eqLast(dictEq) {
- return Data_Maybe.eqMaybe(dictEq);
- };
- var eq1Last = Data_Maybe.eq1Maybe;
- var boundedLast = function boundedLast(dictBounded) {
- return Data_Maybe.boundedMaybe(dictBounded);
- };
- var bindLast = Data_Maybe.bindMaybe;
- var applyLast = Data_Maybe.applyMaybe;
- var applicativeLast = Data_Maybe.applicativeMaybe;
- var altLast = new Control_Alt.Alt(function () {
- return functorLast;
- }, Data_Semigroup.append(semigroupLast));
- var plusLast = new Control_Plus.Plus(function () {
- return altLast;
- }, Data_Monoid.mempty(monoidLast));
- var alternativeLast = new Control_Alternative.Alternative(function () {
- return applicativeLast;
- }, function () {
- return plusLast;
- });
- var monadZeroLast = new Control_MonadZero.MonadZero(function () {
- return alternativeLast;
- }, function () {
- return monadLast;
- });
- module.exports = {
- Last: Last,
- newtypeLast: newtypeLast,
- eqLast: eqLast,
- eq1Last: eq1Last,
- ordLast: ordLast,
- ord1Last: ord1Last,
- boundedLast: boundedLast,
- functorLast: functorLast,
- invariantLast: invariantLast,
- applyLast: applyLast,
- applicativeLast: applicativeLast,
- bindLast: bindLast,
- monadLast: monadLast,
- extendLast: extendLast,
- showLast: showLast,
- semigroupLast: semigroupLast,
- monoidLast: monoidLast,
- altLast: altLast,
- plusLast: plusLast,
- alternativeLast: alternativeLast,
- monadZeroLast: monadZeroLast
- };
- },{"../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Alternative/index.js":"../output/Control.Alternative/index.js","../Control.MonadZero/index.js":"../output/Control.MonadZero/index.js","../Control.Plus/index.js":"../output/Control.Plus/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Traversable.Accum.Internal/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var StateR = function StateR(x) {
- return x;
- };
- var StateL = function StateL(x) {
- return x;
- };
- var stateR = function stateR(v) {
- return v;
- };
- var stateL = function stateL(v) {
- return v;
- };
- var functorStateR = new Data_Functor.Functor(function (f) {
- return function (k) {
- return function (s) {
- var v = stateR(k)(s);
- return {
- accum: v.accum,
- value: f(v.value)
- };
- };
- };
- });
- var functorStateL = new Data_Functor.Functor(function (f) {
- return function (k) {
- return function (s) {
- var v = stateL(k)(s);
- return {
- accum: v.accum,
- value: f(v.value)
- };
- };
- };
- });
- var applyStateR = new Control_Apply.Apply(function () {
- return functorStateR;
- }, function (f) {
- return function (x) {
- return function (s) {
- var v = stateR(x)(s);
- var v1 = stateR(f)(v.accum);
- return {
- accum: v1.accum,
- value: v1.value(v.value)
- };
- };
- };
- });
- var applyStateL = new Control_Apply.Apply(function () {
- return functorStateL;
- }, function (f) {
- return function (x) {
- return function (s) {
- var v = stateL(f)(s);
- var v1 = stateL(x)(v.accum);
- return {
- accum: v1.accum,
- value: v.value(v1.value)
- };
- };
- };
- });
- var applicativeStateR = new Control_Applicative.Applicative(function () {
- return applyStateR;
- }, function (a) {
- return function (s) {
- return {
- accum: s,
- value: a
- };
- };
- });
- var applicativeStateL = new Control_Applicative.Applicative(function () {
- return applyStateL;
- }, function (a) {
- return function (s) {
- return {
- accum: s,
- value: a
- };
- };
- });
- module.exports = {
- StateL: StateL,
- stateL: stateL,
- StateR: StateR,
- stateR: stateR,
- functorStateL: functorStateL,
- applyStateL: applyStateL,
- applicativeStateL: applicativeStateL,
- functorStateR: functorStateR,
- applyStateR: applyStateR,
- applicativeStateR: applicativeStateR
- };
- },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js"}],"../output/Data.Traversable/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Category = require("../Control.Category/index.js");
- var Data_Foldable = require("../Data.Foldable/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Maybe_First = require("../Data.Maybe.First/index.js");
- var Data_Maybe_Last = require("../Data.Maybe.Last/index.js");
- var Data_Monoid_Additive = require("../Data.Monoid.Additive/index.js");
- var Data_Monoid_Conj = require("../Data.Monoid.Conj/index.js");
- var Data_Monoid_Disj = require("../Data.Monoid.Disj/index.js");
- var Data_Monoid_Dual = require("../Data.Monoid.Dual/index.js");
- var Data_Monoid_Multiplicative = require("../Data.Monoid.Multiplicative/index.js");
- var Data_Traversable_Accum_Internal = require("../Data.Traversable.Accum.Internal/index.js");
- var Traversable = function Traversable(Foldable1, Functor0, sequence, traverse) {
- this.Foldable1 = Foldable1;
- this.Functor0 = Functor0;
- this.sequence = sequence;
- this.traverse = traverse;
- };
- var traverse = function traverse(dict) {
- return dict.traverse;
- };
- var traversableMultiplicative = new Traversable(function () {
- return Data_Foldable.foldableMultiplicative;
- }, function () {
- return Data_Monoid_Multiplicative.functorMultiplicative;
- }, function (dictApplicative) {
- return function (v) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Multiplicative.Multiplicative)(v);
- };
- }, function (dictApplicative) {
- return function (f) {
- return function (v) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Multiplicative.Multiplicative)(f(v));
- };
- };
- });
- var traversableMaybe = new Traversable(function () {
- return Data_Foldable.foldableMaybe;
- }, function () {
- return Data_Maybe.functorMaybe;
- }, function (dictApplicative) {
- return function (v) {
- if (v instanceof Data_Maybe.Nothing) {
- return Control_Applicative.pure(dictApplicative)(Data_Maybe.Nothing.value);
- }
- ;
- if (v instanceof Data_Maybe.Just) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Maybe.Just.create)(v.value0);
- }
- ;
- throw new Error("Failed pattern match at Data.Traversable (line 86, column 1 - line 90, column 33): " + [v.constructor.name]);
- };
- }, function (dictApplicative) {
- return function (v) {
- return function (v1) {
- if (v1 instanceof Data_Maybe.Nothing) {
- return Control_Applicative.pure(dictApplicative)(Data_Maybe.Nothing.value);
- }
- ;
- if (v1 instanceof Data_Maybe.Just) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Maybe.Just.create)(v(v1.value0));
- }
- ;
- throw new Error("Failed pattern match at Data.Traversable (line 86, column 1 - line 90, column 33): " + [v.constructor.name, v1.constructor.name]);
- };
- };
- });
- var traversableDual = new Traversable(function () {
- return Data_Foldable.foldableDual;
- }, function () {
- return Data_Monoid_Dual.functorDual;
- }, function (dictApplicative) {
- return function (v) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Dual.Dual)(v);
- };
- }, function (dictApplicative) {
- return function (f) {
- return function (v) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Dual.Dual)(f(v));
- };
- };
- });
- var traversableDisj = new Traversable(function () {
- return Data_Foldable.foldableDisj;
- }, function () {
- return Data_Monoid_Disj.functorDisj;
- }, function (dictApplicative) {
- return function (v) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Disj.Disj)(v);
- };
- }, function (dictApplicative) {
- return function (f) {
- return function (v) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Disj.Disj)(f(v));
- };
- };
- });
- var traversableConj = new Traversable(function () {
- return Data_Foldable.foldableConj;
- }, function () {
- return Data_Monoid_Conj.functorConj;
- }, function (dictApplicative) {
- return function (v) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Conj.Conj)(v);
- };
- }, function (dictApplicative) {
- return function (f) {
- return function (v) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Conj.Conj)(f(v));
- };
- };
- });
- var traversableAdditive = new Traversable(function () {
- return Data_Foldable.foldableAdditive;
- }, function () {
- return Data_Monoid_Additive.functorAdditive;
- }, function (dictApplicative) {
- return function (v) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Additive.Additive)(v);
- };
- }, function (dictApplicative) {
- return function (f) {
- return function (v) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Additive.Additive)(f(v));
- };
- };
- });
- var sequenceDefault = function sequenceDefault(dictTraversable) {
- return function (dictApplicative) {
- return traverse(dictTraversable)(dictApplicative)(Control_Category.identity(Control_Category.categoryFn));
- };
- };
- var traversableArray = new Traversable(function () {
- return Data_Foldable.foldableArray;
- }, function () {
- return Data_Functor.functorArray;
- }, function (dictApplicative) {
- return sequenceDefault(traversableArray)(dictApplicative);
- }, function (dictApplicative) {
- return $foreign.traverseArrayImpl(Control_Apply.apply(dictApplicative.Apply0()))(Data_Functor.map(dictApplicative.Apply0().Functor0()))(Control_Applicative.pure(dictApplicative));
- });
- var sequence = function sequence(dict) {
- return dict.sequence;
- };
- var traversableFirst = new Traversable(function () {
- return Data_Foldable.foldableFirst;
- }, function () {
- return Data_Maybe_First.functorFirst;
- }, function (dictApplicative) {
- return function (v) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Maybe_First.First)(sequence(traversableMaybe)(dictApplicative)(v));
- };
- }, function (dictApplicative) {
- return function (f) {
- return function (v) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Maybe_First.First)(traverse(traversableMaybe)(dictApplicative)(f)(v));
- };
- };
- });
- var traversableLast = new Traversable(function () {
- return Data_Foldable.foldableLast;
- }, function () {
- return Data_Maybe_Last.functorLast;
- }, function (dictApplicative) {
- return function (v) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Maybe_Last.Last)(sequence(traversableMaybe)(dictApplicative)(v));
- };
- }, function (dictApplicative) {
- return function (f) {
- return function (v) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Maybe_Last.Last)(traverse(traversableMaybe)(dictApplicative)(f)(v));
- };
- };
- });
- var traverseDefault = function traverseDefault(dictTraversable) {
- return function (dictApplicative) {
- return function (f) {
- return function (ta) {
- return sequence(dictTraversable)(dictApplicative)(Data_Functor.map(dictTraversable.Functor0())(f)(ta));
- };
- };
- };
- };
- var mapAccumR = function mapAccumR(dictTraversable) {
- return function (f) {
- return function (s0) {
- return function (xs) {
- return Data_Traversable_Accum_Internal.stateR(traverse(dictTraversable)(Data_Traversable_Accum_Internal.applicativeStateR)(function (a) {
- return function (s) {
- return f(s)(a);
- };
- })(xs))(s0);
- };
- };
- };
- };
- var scanr = function scanr(dictTraversable) {
- return function (f) {
- return function (b0) {
- return function (xs) {
- return mapAccumR(dictTraversable)(function (b) {
- return function (a) {
- var b$prime = f(a)(b);
- return {
- accum: b$prime,
- value: b$prime
- };
- };
- })(b0)(xs).value;
- };
- };
- };
- };
- var mapAccumL = function mapAccumL(dictTraversable) {
- return function (f) {
- return function (s0) {
- return function (xs) {
- return Data_Traversable_Accum_Internal.stateL(traverse(dictTraversable)(Data_Traversable_Accum_Internal.applicativeStateL)(function (a) {
- return function (s) {
- return f(s)(a);
- };
- })(xs))(s0);
- };
- };
- };
- };
- var scanl = function scanl(dictTraversable) {
- return function (f) {
- return function (b0) {
- return function (xs) {
- return mapAccumL(dictTraversable)(function (b) {
- return function (a) {
- var b$prime = f(b)(a);
- return {
- accum: b$prime,
- value: b$prime
- };
- };
- })(b0)(xs).value;
- };
- };
- };
- };
- var $$for = function $$for(dictApplicative) {
- return function (dictTraversable) {
- return function (x) {
- return function (f) {
- return traverse(dictTraversable)(dictApplicative)(f)(x);
- };
- };
- };
- };
- module.exports = {
- Traversable: Traversable,
- traverse: traverse,
- sequence: sequence,
- traverseDefault: traverseDefault,
- sequenceDefault: sequenceDefault,
- "for": $$for,
- scanl: scanl,
- scanr: scanr,
- mapAccumL: mapAccumL,
- mapAccumR: mapAccumR,
- traversableArray: traversableArray,
- traversableMaybe: traversableMaybe,
- traversableFirst: traversableFirst,
- traversableLast: traversableLast,
- traversableAdditive: traversableAdditive,
- traversableDual: traversableDual,
- traversableConj: traversableConj,
- traversableDisj: traversableDisj,
- traversableMultiplicative: traversableMultiplicative
- };
- },{"./foreign.js":"../output/Data.Traversable/foreign.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Maybe.First/index.js":"../output/Data.Maybe.First/index.js","../Data.Maybe.Last/index.js":"../output/Data.Maybe.Last/index.js","../Data.Monoid.Additive/index.js":"../output/Data.Monoid.Additive/index.js","../Data.Monoid.Conj/index.js":"../output/Data.Monoid.Conj/index.js","../Data.Monoid.Disj/index.js":"../output/Data.Monoid.Disj/index.js","../Data.Monoid.Dual/index.js":"../output/Data.Monoid.Dual/index.js","../Data.Monoid.Multiplicative/index.js":"../output/Data.Monoid.Multiplicative/index.js","../Data.Traversable.Accum.Internal/index.js":"../output/Data.Traversable.Accum.Internal/index.js"}],"../output/Data.Bitraversable/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Category = require("../Control.Category/index.js");
- var Data_Bifoldable = require("../Data.Bifoldable/index.js");
- var Data_Bifunctor = require("../Data.Bifunctor/index.js");
- var Data_Bifunctor_Clown = require("../Data.Bifunctor.Clown/index.js");
- var Data_Bifunctor_Flip = require("../Data.Bifunctor.Flip/index.js");
- var Data_Bifunctor_Joker = require("../Data.Bifunctor.Joker/index.js");
- var Data_Bifunctor_Product = require("../Data.Bifunctor.Product/index.js");
- var Data_Bifunctor_Wrap = require("../Data.Bifunctor.Wrap/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Traversable = require("../Data.Traversable/index.js");
- var Bitraversable = function Bitraversable(Bifoldable1, Bifunctor0, bisequence, bitraverse) {
- this.Bifoldable1 = Bifoldable1;
- this.Bifunctor0 = Bifunctor0;
- this.bisequence = bisequence;
- this.bitraverse = bitraverse;
- };
- var bitraverse = function bitraverse(dict) {
- return dict.bitraverse;
- };
- var lfor = function lfor(dictBitraversable) {
- return function (dictApplicative) {
- return function (t) {
- return function (f) {
- return bitraverse(dictBitraversable)(dictApplicative)(f)(Control_Applicative.pure(dictApplicative))(t);
- };
- };
- };
- };
- var ltraverse = function ltraverse(dictBitraversable) {
- return function (dictApplicative) {
- return function (f) {
- return bitraverse(dictBitraversable)(dictApplicative)(f)(Control_Applicative.pure(dictApplicative));
- };
- };
- };
- var rfor = function rfor(dictBitraversable) {
- return function (dictApplicative) {
- return function (t) {
- return function (f) {
- return bitraverse(dictBitraversable)(dictApplicative)(Control_Applicative.pure(dictApplicative))(f)(t);
- };
- };
- };
- };
- var rtraverse = function rtraverse(dictBitraversable) {
- return function (dictApplicative) {
- return bitraverse(dictBitraversable)(dictApplicative)(Control_Applicative.pure(dictApplicative));
- };
- };
- var bitraversableJoker = function bitraversableJoker(dictTraversable) {
- return new Bitraversable(function () {
- return Data_Bifoldable.bifoldableJoker(dictTraversable.Foldable1());
- }, function () {
- return Data_Bifunctor_Joker.bifunctorJoker(dictTraversable.Functor0());
- }, function (dictApplicative) {
- return function (v) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Joker.Joker)(Data_Traversable.sequence(dictTraversable)(dictApplicative)(v));
- };
- }, function (dictApplicative) {
- return function (v) {
- return function (r) {
- return function (v1) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Joker.Joker)(Data_Traversable.traverse(dictTraversable)(dictApplicative)(r)(v1));
- };
- };
- };
- });
- };
- var bitraversableClown = function bitraversableClown(dictTraversable) {
- return new Bitraversable(function () {
- return Data_Bifoldable.bifoldableClown(dictTraversable.Foldable1());
- }, function () {
- return Data_Bifunctor_Clown.bifunctorClown(dictTraversable.Functor0());
- }, function (dictApplicative) {
- return function (v) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Clown.Clown)(Data_Traversable.sequence(dictTraversable)(dictApplicative)(v));
- };
- }, function (dictApplicative) {
- return function (l) {
- return function (v) {
- return function (v1) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Clown.Clown)(Data_Traversable.traverse(dictTraversable)(dictApplicative)(l)(v1));
- };
- };
- };
- });
- };
- var bisequenceDefault = function bisequenceDefault(dictBitraversable) {
- return function (dictApplicative) {
- return bitraverse(dictBitraversable)(dictApplicative)(Control_Category.identity(Control_Category.categoryFn))(Control_Category.identity(Control_Category.categoryFn));
- };
- };
- var bisequence = function bisequence(dict) {
- return dict.bisequence;
- };
- var bitraversableFlip = function bitraversableFlip(dictBitraversable) {
- return new Bitraversable(function () {
- return Data_Bifoldable.bifoldableFlip(dictBitraversable.Bifoldable1());
- }, function () {
- return Data_Bifunctor_Flip.bifunctorFlip(dictBitraversable.Bifunctor0());
- }, function (dictApplicative) {
- return function (v) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Flip.Flip)(bisequence(dictBitraversable)(dictApplicative)(v));
- };
- }, function (dictApplicative) {
- return function (r) {
- return function (l) {
- return function (v) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Flip.Flip)(bitraverse(dictBitraversable)(dictApplicative)(l)(r)(v));
- };
- };
- };
- });
- };
- var bitraversableProduct = function bitraversableProduct(dictBitraversable) {
- return function (dictBitraversable1) {
- return new Bitraversable(function () {
- return Data_Bifoldable.bifoldableProduct(dictBitraversable.Bifoldable1())(dictBitraversable1.Bifoldable1());
- }, function () {
- return Data_Bifunctor_Product.bifunctorProduct(dictBitraversable.Bifunctor0())(dictBitraversable1.Bifunctor0());
- }, function (dictApplicative) {
- return function (v) {
- return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Product.Product.create)(bisequence(dictBitraversable)(dictApplicative)(v.value0)))(bisequence(dictBitraversable1)(dictApplicative)(v.value1));
- };
- }, function (dictApplicative) {
- return function (l) {
- return function (r) {
- return function (v) {
- return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Product.Product.create)(bitraverse(dictBitraversable)(dictApplicative)(l)(r)(v.value0)))(bitraverse(dictBitraversable1)(dictApplicative)(l)(r)(v.value1));
- };
- };
- };
- });
- };
- };
- var bitraversableWrap = function bitraversableWrap(dictBitraversable) {
- return new Bitraversable(function () {
- return Data_Bifoldable.bifoldableWrap(dictBitraversable.Bifoldable1());
- }, function () {
- return Data_Bifunctor_Wrap.bifunctorWrap(dictBitraversable.Bifunctor0());
- }, function (dictApplicative) {
- return function (v) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Wrap.Wrap)(bisequence(dictBitraversable)(dictApplicative)(v));
- };
- }, function (dictApplicative) {
- return function (l) {
- return function (r) {
- return function (v) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Wrap.Wrap)(bitraverse(dictBitraversable)(dictApplicative)(l)(r)(v));
- };
- };
- };
- });
- };
- var bitraverseDefault = function bitraverseDefault(dictBitraversable) {
- return function (dictApplicative) {
- return function (f) {
- return function (g) {
- return function (t) {
- return bisequence(dictBitraversable)(dictApplicative)(Data_Bifunctor.bimap(dictBitraversable.Bifunctor0())(f)(g)(t));
- };
- };
- };
- };
- };
- var bifor = function bifor(dictBitraversable) {
- return function (dictApplicative) {
- return function (t) {
- return function (f) {
- return function (g) {
- return bitraverse(dictBitraversable)(dictApplicative)(f)(g)(t);
- };
- };
- };
- };
- };
- module.exports = {
- Bitraversable: Bitraversable,
- bitraverse: bitraverse,
- bisequence: bisequence,
- bitraverseDefault: bitraverseDefault,
- bisequenceDefault: bisequenceDefault,
- ltraverse: ltraverse,
- rtraverse: rtraverse,
- bifor: bifor,
- lfor: lfor,
- rfor: rfor,
- bitraversableClown: bitraversableClown,
- bitraversableJoker: bitraversableJoker,
- bitraversableFlip: bitraversableFlip,
- bitraversableProduct: bitraversableProduct,
- bitraversableWrap: bitraversableWrap
- };
- },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Bifoldable/index.js":"../output/Data.Bifoldable/index.js","../Data.Bifunctor/index.js":"../output/Data.Bifunctor/index.js","../Data.Bifunctor.Clown/index.js":"../output/Data.Bifunctor.Clown/index.js","../Data.Bifunctor.Flip/index.js":"../output/Data.Bifunctor.Flip/index.js","../Data.Bifunctor.Joker/index.js":"../output/Data.Bifunctor.Joker/index.js","../Data.Bifunctor.Product/index.js":"../output/Data.Bifunctor.Product/index.js","../Data.Bifunctor.Wrap/index.js":"../output/Data.Bifunctor.Wrap/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js"}],"../output/Data.FunctorWithIndex/foreign.js":[function(require,module,exports) {
- "use strict";
- exports.mapWithIndexArray = function (f) {
- return function (xs) {
- var l = xs.length;
- var result = Array(l);
- for (var i = 0; i < l; i++) {
- result[i] = f(i)(xs[i]);
- }
- return result;
- };
- };
- },{}],"../output/Data.FunctorWithIndex/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Maybe_First = require("../Data.Maybe.First/index.js");
- var Data_Maybe_Last = require("../Data.Maybe.Last/index.js");
- var Data_Monoid_Additive = require("../Data.Monoid.Additive/index.js");
- var Data_Monoid_Conj = require("../Data.Monoid.Conj/index.js");
- var Data_Monoid_Disj = require("../Data.Monoid.Disj/index.js");
- var Data_Monoid_Dual = require("../Data.Monoid.Dual/index.js");
- var Data_Monoid_Multiplicative = require("../Data.Monoid.Multiplicative/index.js");
- var Data_Unit = require("../Data.Unit/index.js");
- var FunctorWithIndex = function FunctorWithIndex(Functor0, mapWithIndex) {
- this.Functor0 = Functor0;
- this.mapWithIndex = mapWithIndex;
- };
- var mapWithIndex = function mapWithIndex(dict) {
- return dict.mapWithIndex;
- };
- var mapDefault = function mapDefault(dictFunctorWithIndex) {
- return function (f) {
- return mapWithIndex(dictFunctorWithIndex)(Data_Function["const"](f));
- };
- };
- var functorWithIndexMultiplicative = new FunctorWithIndex(function () {
- return Data_Monoid_Multiplicative.functorMultiplicative;
- }, function (f) {
- return Data_Functor.map(Data_Monoid_Multiplicative.functorMultiplicative)(f(Data_Unit.unit));
- });
- var functorWithIndexMaybe = new FunctorWithIndex(function () {
- return Data_Maybe.functorMaybe;
- }, function (f) {
- return Data_Functor.map(Data_Maybe.functorMaybe)(f(Data_Unit.unit));
- });
- var functorWithIndexLast = new FunctorWithIndex(function () {
- return Data_Maybe_Last.functorLast;
- }, function (f) {
- return Data_Functor.map(Data_Maybe_Last.functorLast)(f(Data_Unit.unit));
- });
- var functorWithIndexFirst = new FunctorWithIndex(function () {
- return Data_Maybe_First.functorFirst;
- }, function (f) {
- return Data_Functor.map(Data_Maybe_First.functorFirst)(f(Data_Unit.unit));
- });
- var functorWithIndexDual = new FunctorWithIndex(function () {
- return Data_Monoid_Dual.functorDual;
- }, function (f) {
- return Data_Functor.map(Data_Monoid_Dual.functorDual)(f(Data_Unit.unit));
- });
- var functorWithIndexDisj = new FunctorWithIndex(function () {
- return Data_Monoid_Disj.functorDisj;
- }, function (f) {
- return Data_Functor.map(Data_Monoid_Disj.functorDisj)(f(Data_Unit.unit));
- });
- var functorWithIndexConj = new FunctorWithIndex(function () {
- return Data_Monoid_Conj.functorConj;
- }, function (f) {
- return Data_Functor.map(Data_Monoid_Conj.functorConj)(f(Data_Unit.unit));
- });
- var functorWithIndexArray = new FunctorWithIndex(function () {
- return Data_Functor.functorArray;
- }, $foreign.mapWithIndexArray);
- var functorWithIndexAdditive = new FunctorWithIndex(function () {
- return Data_Monoid_Additive.functorAdditive;
- }, function (f) {
- return Data_Functor.map(Data_Monoid_Additive.functorAdditive)(f(Data_Unit.unit));
- });
- module.exports = {
- FunctorWithIndex: FunctorWithIndex,
- mapWithIndex: mapWithIndex,
- mapDefault: mapDefault,
- functorWithIndexArray: functorWithIndexArray,
- functorWithIndexMaybe: functorWithIndexMaybe,
- functorWithIndexFirst: functorWithIndexFirst,
- functorWithIndexLast: functorWithIndexLast,
- functorWithIndexAdditive: functorWithIndexAdditive,
- functorWithIndexDual: functorWithIndexDual,
- functorWithIndexConj: functorWithIndexConj,
- functorWithIndexDisj: functorWithIndexDisj,
- functorWithIndexMultiplicative: functorWithIndexMultiplicative
- };
- },{"./foreign.js":"../output/Data.FunctorWithIndex/foreign.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Maybe.First/index.js":"../output/Data.Maybe.First/index.js","../Data.Maybe.Last/index.js":"../output/Data.Maybe.Last/index.js","../Data.Monoid.Additive/index.js":"../output/Data.Monoid.Additive/index.js","../Data.Monoid.Conj/index.js":"../output/Data.Monoid.Conj/index.js","../Data.Monoid.Disj/index.js":"../output/Data.Monoid.Disj/index.js","../Data.Monoid.Dual/index.js":"../output/Data.Monoid.Dual/index.js","../Data.Monoid.Multiplicative/index.js":"../output/Data.Monoid.Multiplicative/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Data.FoldableWithIndex/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Category = require("../Control.Category/index.js");
- var Data_Foldable = require("../Data.Foldable/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Data_Monoid_Conj = require("../Data.Monoid.Conj/index.js");
- var Data_Monoid_Disj = require("../Data.Monoid.Disj/index.js");
- var Data_Monoid_Dual = require("../Data.Monoid.Dual/index.js");
- var Data_Monoid_Endo = require("../Data.Monoid.Endo/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Unit = require("../Data.Unit/index.js");
- var Tuple = function () {
- function Tuple(value0, value1) {
- this.value0 = value0;
- this.value1 = value1;
- }
- ;
- Tuple.create = function (value0) {
- return function (value1) {
- return new Tuple(value0, value1);
- };
- };
- return Tuple;
- }();
- var FoldableWithIndex = function FoldableWithIndex(Foldable0, foldMapWithIndex, foldlWithIndex, foldrWithIndex) {
- this.Foldable0 = Foldable0;
- this.foldMapWithIndex = foldMapWithIndex;
- this.foldlWithIndex = foldlWithIndex;
- this.foldrWithIndex = foldrWithIndex;
- };
- var foldrWithIndex = function foldrWithIndex(dict) {
- return dict.foldrWithIndex;
- };
- var traverseWithIndex_ = function traverseWithIndex_(dictApplicative) {
- return function (dictFoldableWithIndex) {
- return function (f) {
- return foldrWithIndex(dictFoldableWithIndex)(function (i) {
- var $46 = Control_Apply.applySecond(dictApplicative.Apply0());
- var $47 = f(i);
- return function ($48) {
- return $46($47($48));
- };
- })(Control_Applicative.pure(dictApplicative)(Data_Unit.unit));
- };
- };
- };
- var forWithIndex_ = function forWithIndex_(dictApplicative) {
- return function (dictFoldableWithIndex) {
- return Data_Function.flip(traverseWithIndex_(dictApplicative)(dictFoldableWithIndex));
- };
- };
- var foldrDefault = function foldrDefault(dictFoldableWithIndex) {
- return function (f) {
- return foldrWithIndex(dictFoldableWithIndex)(Data_Function["const"](f));
- };
- };
- var foldlWithIndex = function foldlWithIndex(dict) {
- return dict.foldlWithIndex;
- };
- var foldlDefault = function foldlDefault(dictFoldableWithIndex) {
- return function (f) {
- return foldlWithIndex(dictFoldableWithIndex)(Data_Function["const"](f));
- };
- };
- var foldableWithIndexMultiplicative = new FoldableWithIndex(function () {
- return Data_Foldable.foldableMultiplicative;
- }, function (dictMonoid) {
- return function (f) {
- return Data_Foldable.foldMap(Data_Foldable.foldableMultiplicative)(dictMonoid)(f(Data_Unit.unit));
- };
- }, function (f) {
- return Data_Foldable.foldl(Data_Foldable.foldableMultiplicative)(f(Data_Unit.unit));
- }, function (f) {
- return Data_Foldable.foldr(Data_Foldable.foldableMultiplicative)(f(Data_Unit.unit));
- });
- var foldableWithIndexMaybe = new FoldableWithIndex(function () {
- return Data_Foldable.foldableMaybe;
- }, function (dictMonoid) {
- return function (f) {
- return Data_Foldable.foldMap(Data_Foldable.foldableMaybe)(dictMonoid)(f(Data_Unit.unit));
- };
- }, function (f) {
- return Data_Foldable.foldl(Data_Foldable.foldableMaybe)(f(Data_Unit.unit));
- }, function (f) {
- return Data_Foldable.foldr(Data_Foldable.foldableMaybe)(f(Data_Unit.unit));
- });
- var foldableWithIndexLast = new FoldableWithIndex(function () {
- return Data_Foldable.foldableLast;
- }, function (dictMonoid) {
- return function (f) {
- return Data_Foldable.foldMap(Data_Foldable.foldableLast)(dictMonoid)(f(Data_Unit.unit));
- };
- }, function (f) {
- return Data_Foldable.foldl(Data_Foldable.foldableLast)(f(Data_Unit.unit));
- }, function (f) {
- return Data_Foldable.foldr(Data_Foldable.foldableLast)(f(Data_Unit.unit));
- });
- var foldableWithIndexFirst = new FoldableWithIndex(function () {
- return Data_Foldable.foldableFirst;
- }, function (dictMonoid) {
- return function (f) {
- return Data_Foldable.foldMap(Data_Foldable.foldableFirst)(dictMonoid)(f(Data_Unit.unit));
- };
- }, function (f) {
- return Data_Foldable.foldl(Data_Foldable.foldableFirst)(f(Data_Unit.unit));
- }, function (f) {
- return Data_Foldable.foldr(Data_Foldable.foldableFirst)(f(Data_Unit.unit));
- });
- var foldableWithIndexDual = new FoldableWithIndex(function () {
- return Data_Foldable.foldableDual;
- }, function (dictMonoid) {
- return function (f) {
- return Data_Foldable.foldMap(Data_Foldable.foldableDual)(dictMonoid)(f(Data_Unit.unit));
- };
- }, function (f) {
- return Data_Foldable.foldl(Data_Foldable.foldableDual)(f(Data_Unit.unit));
- }, function (f) {
- return Data_Foldable.foldr(Data_Foldable.foldableDual)(f(Data_Unit.unit));
- });
- var foldableWithIndexDisj = new FoldableWithIndex(function () {
- return Data_Foldable.foldableDisj;
- }, function (dictMonoid) {
- return function (f) {
- return Data_Foldable.foldMap(Data_Foldable.foldableDisj)(dictMonoid)(f(Data_Unit.unit));
- };
- }, function (f) {
- return Data_Foldable.foldl(Data_Foldable.foldableDisj)(f(Data_Unit.unit));
- }, function (f) {
- return Data_Foldable.foldr(Data_Foldable.foldableDisj)(f(Data_Unit.unit));
- });
- var foldableWithIndexConj = new FoldableWithIndex(function () {
- return Data_Foldable.foldableConj;
- }, function (dictMonoid) {
- return function (f) {
- return Data_Foldable.foldMap(Data_Foldable.foldableConj)(dictMonoid)(f(Data_Unit.unit));
- };
- }, function (f) {
- return Data_Foldable.foldl(Data_Foldable.foldableConj)(f(Data_Unit.unit));
- }, function (f) {
- return Data_Foldable.foldr(Data_Foldable.foldableConj)(f(Data_Unit.unit));
- });
- var foldableWithIndexAdditive = new FoldableWithIndex(function () {
- return Data_Foldable.foldableAdditive;
- }, function (dictMonoid) {
- return function (f) {
- return Data_Foldable.foldMap(Data_Foldable.foldableAdditive)(dictMonoid)(f(Data_Unit.unit));
- };
- }, function (f) {
- return Data_Foldable.foldl(Data_Foldable.foldableAdditive)(f(Data_Unit.unit));
- }, function (f) {
- return Data_Foldable.foldr(Data_Foldable.foldableAdditive)(f(Data_Unit.unit));
- });
- var foldWithIndexM = function foldWithIndexM(dictFoldableWithIndex) {
- return function (dictMonad) {
- return function (f) {
- return function (a0) {
- return foldlWithIndex(dictFoldableWithIndex)(function (i) {
- return function (ma) {
- return function (b) {
- return Control_Bind.bind(dictMonad.Bind1())(ma)(Data_Function.flip(f(i))(b));
- };
- };
- })(Control_Applicative.pure(dictMonad.Applicative0())(a0));
- };
- };
- };
- };
- var foldMapWithIndexDefaultR = function foldMapWithIndexDefaultR(dictFoldableWithIndex) {
- return function (dictMonoid) {
- return function (f) {
- return foldrWithIndex(dictFoldableWithIndex)(function (i) {
- return function (x) {
- return function (acc) {
- return Data_Semigroup.append(dictMonoid.Semigroup0())(f(i)(x))(acc);
- };
- };
- })(Data_Monoid.mempty(dictMonoid));
- };
- };
- };
- var foldableWithIndexArray = new FoldableWithIndex(function () {
- return Data_Foldable.foldableArray;
- }, function (dictMonoid) {
- return foldMapWithIndexDefaultR(foldableWithIndexArray)(dictMonoid);
- }, function (f) {
- return function (z) {
- var $49 = Data_Foldable.foldl(Data_Foldable.foldableArray)(function (y) {
- return function (v) {
- return f(v.value0)(y)(v.value1);
- };
- })(z);
- var $50 = Data_FunctorWithIndex.mapWithIndex(Data_FunctorWithIndex.functorWithIndexArray)(Tuple.create);
- return function ($51) {
- return $49($50($51));
- };
- };
- }, function (f) {
- return function (z) {
- var $52 = Data_Foldable.foldr(Data_Foldable.foldableArray)(function (v) {
- return function (y) {
- return f(v.value0)(v.value1)(y);
- };
- })(z);
- var $53 = Data_FunctorWithIndex.mapWithIndex(Data_FunctorWithIndex.functorWithIndexArray)(Tuple.create);
- return function ($54) {
- return $52($53($54));
- };
- };
- });
- var foldMapWithIndexDefaultL = function foldMapWithIndexDefaultL(dictFoldableWithIndex) {
- return function (dictMonoid) {
- return function (f) {
- return foldlWithIndex(dictFoldableWithIndex)(function (i) {
- return function (acc) {
- return function (x) {
- return Data_Semigroup.append(dictMonoid.Semigroup0())(acc)(f(i)(x));
- };
- };
- })(Data_Monoid.mempty(dictMonoid));
- };
- };
- };
- var foldMapWithIndex = function foldMapWithIndex(dict) {
- return dict.foldMapWithIndex;
- };
- var foldlWithIndexDefault = function foldlWithIndexDefault(dictFoldableWithIndex) {
- return function (c) {
- return function (u) {
- return function (xs) {
- return Data_Newtype.unwrap(Data_Newtype.newtypeEndo)(Data_Newtype.unwrap(Data_Newtype.newtypeDual)(foldMapWithIndex(dictFoldableWithIndex)(Data_Monoid_Dual.monoidDual(Data_Monoid_Endo.monoidEndo(Control_Category.categoryFn)))(function (i) {
- var $55 = Data_Function.flip(c(i));
- return function ($56) {
- return Data_Monoid_Dual.Dual(Data_Monoid_Endo.Endo($55($56)));
- };
- })(xs)))(u);
- };
- };
- };
- };
- var foldrWithIndexDefault = function foldrWithIndexDefault(dictFoldableWithIndex) {
- return function (c) {
- return function (u) {
- return function (xs) {
- return Data_Newtype.unwrap(Data_Newtype.newtypeEndo)(foldMapWithIndex(dictFoldableWithIndex)(Data_Monoid_Endo.monoidEndo(Control_Category.categoryFn))(function (i) {
- var $57 = c(i);
- return function ($58) {
- return Data_Monoid_Endo.Endo($57($58));
- };
- })(xs))(u);
- };
- };
- };
- };
- var surroundMapWithIndex = function surroundMapWithIndex(dictFoldableWithIndex) {
- return function (dictSemigroup) {
- return function (d) {
- return function (t) {
- return function (f) {
- var joined = function joined(i) {
- return function (a) {
- return function (m) {
- return Data_Semigroup.append(dictSemigroup)(d)(Data_Semigroup.append(dictSemigroup)(t(i)(a))(m));
- };
- };
- };
- return Data_Newtype.unwrap(Data_Newtype.newtypeEndo)(foldMapWithIndex(dictFoldableWithIndex)(Data_Monoid_Endo.monoidEndo(Control_Category.categoryFn))(joined)(f))(d);
- };
- };
- };
- };
- };
- var foldMapDefault = function foldMapDefault(dictFoldableWithIndex) {
- return function (dictMonoid) {
- return function (f) {
- return foldMapWithIndex(dictFoldableWithIndex)(dictMonoid)(Data_Function["const"](f));
- };
- };
- };
- var findWithIndex = function findWithIndex(dictFoldableWithIndex) {
- return function (p) {
- var go = function go(v) {
- return function (v1) {
- return function (v2) {
- if (v1 instanceof Data_Maybe.Nothing && p(v)(v2)) {
- return new Data_Maybe.Just({
- index: v,
- value: v2
- });
- }
- ;
- return v1;
- };
- };
- };
- return foldlWithIndex(dictFoldableWithIndex)(go)(Data_Maybe.Nothing.value);
- };
- };
- var anyWithIndex = function anyWithIndex(dictFoldableWithIndex) {
- return function (dictHeytingAlgebra) {
- return function (t) {
- var $59 = Data_Newtype.unwrap(Data_Newtype.newtypeDisj);
- var $60 = foldMapWithIndex(dictFoldableWithIndex)(Data_Monoid_Disj.monoidDisj(dictHeytingAlgebra))(function (i) {
- var $62 = t(i);
- return function ($63) {
- return Data_Monoid_Disj.Disj($62($63));
- };
- });
- return function ($61) {
- return $59($60($61));
- };
- };
- };
- };
- var allWithIndex = function allWithIndex(dictFoldableWithIndex) {
- return function (dictHeytingAlgebra) {
- return function (t) {
- var $64 = Data_Newtype.unwrap(Data_Newtype.newtypeConj);
- var $65 = foldMapWithIndex(dictFoldableWithIndex)(Data_Monoid_Conj.monoidConj(dictHeytingAlgebra))(function (i) {
- var $67 = t(i);
- return function ($68) {
- return Data_Monoid_Conj.Conj($67($68));
- };
- });
- return function ($66) {
- return $64($65($66));
- };
- };
- };
- };
- module.exports = {
- FoldableWithIndex: FoldableWithIndex,
- foldrWithIndex: foldrWithIndex,
- foldlWithIndex: foldlWithIndex,
- foldMapWithIndex: foldMapWithIndex,
- foldrWithIndexDefault: foldrWithIndexDefault,
- foldlWithIndexDefault: foldlWithIndexDefault,
- foldMapWithIndexDefaultR: foldMapWithIndexDefaultR,
- foldMapWithIndexDefaultL: foldMapWithIndexDefaultL,
- foldWithIndexM: foldWithIndexM,
- traverseWithIndex_: traverseWithIndex_,
- forWithIndex_: forWithIndex_,
- surroundMapWithIndex: surroundMapWithIndex,
- allWithIndex: allWithIndex,
- anyWithIndex: anyWithIndex,
- findWithIndex: findWithIndex,
- foldrDefault: foldrDefault,
- foldlDefault: foldlDefault,
- foldMapDefault: foldMapDefault,
- foldableWithIndexArray: foldableWithIndexArray,
- foldableWithIndexMaybe: foldableWithIndexMaybe,
- foldableWithIndexFirst: foldableWithIndexFirst,
- foldableWithIndexLast: foldableWithIndexLast,
- foldableWithIndexAdditive: foldableWithIndexAdditive,
- foldableWithIndexDual: foldableWithIndexDual,
- foldableWithIndexDisj: foldableWithIndexDisj,
- foldableWithIndexConj: foldableWithIndexConj,
- foldableWithIndexMultiplicative: foldableWithIndexMultiplicative
- };
- },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.FunctorWithIndex/index.js":"../output/Data.FunctorWithIndex/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Monoid.Conj/index.js":"../output/Data.Monoid.Conj/index.js","../Data.Monoid.Disj/index.js":"../output/Data.Monoid.Disj/index.js","../Data.Monoid.Dual/index.js":"../output/Data.Monoid.Dual/index.js","../Data.Monoid.Endo/index.js":"../output/Data.Monoid.Endo/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Data.TraversableWithIndex/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
- var Data_Traversable = require("../Data.Traversable/index.js");
- var Data_Traversable_Accum_Internal = require("../Data.Traversable.Accum.Internal/index.js");
- var Data_Unit = require("../Data.Unit/index.js");
- var TraversableWithIndex = function TraversableWithIndex(FoldableWithIndex1, FunctorWithIndex0, Traversable2, traverseWithIndex) {
- this.FoldableWithIndex1 = FoldableWithIndex1;
- this.FunctorWithIndex0 = FunctorWithIndex0;
- this.Traversable2 = Traversable2;
- this.traverseWithIndex = traverseWithIndex;
- };
- var traverseWithIndexDefault = function traverseWithIndexDefault(dictTraversableWithIndex) {
- return function (dictApplicative) {
- return function (f) {
- var $19 = Data_Traversable.sequence(dictTraversableWithIndex.Traversable2())(dictApplicative);
- var $20 = Data_FunctorWithIndex.mapWithIndex(dictTraversableWithIndex.FunctorWithIndex0())(f);
- return function ($21) {
- return $19($20($21));
- };
- };
- };
- };
- var traverseWithIndex = function traverseWithIndex(dict) {
- return dict.traverseWithIndex;
- };
- var traverseDefault = function traverseDefault(dictTraversableWithIndex) {
- return function (dictApplicative) {
- return function (f) {
- return traverseWithIndex(dictTraversableWithIndex)(dictApplicative)(Data_Function["const"](f));
- };
- };
- };
- var traversableWithIndexMultiplicative = new TraversableWithIndex(function () {
- return Data_FoldableWithIndex.foldableWithIndexMultiplicative;
- }, function () {
- return Data_FunctorWithIndex.functorWithIndexMultiplicative;
- }, function () {
- return Data_Traversable.traversableMultiplicative;
- }, function (dictApplicative) {
- return function (f) {
- return Data_Traversable.traverse(Data_Traversable.traversableMultiplicative)(dictApplicative)(f(Data_Unit.unit));
- };
- });
- var traversableWithIndexMaybe = new TraversableWithIndex(function () {
- return Data_FoldableWithIndex.foldableWithIndexMaybe;
- }, function () {
- return Data_FunctorWithIndex.functorWithIndexMaybe;
- }, function () {
- return Data_Traversable.traversableMaybe;
- }, function (dictApplicative) {
- return function (f) {
- return Data_Traversable.traverse(Data_Traversable.traversableMaybe)(dictApplicative)(f(Data_Unit.unit));
- };
- });
- var traversableWithIndexLast = new TraversableWithIndex(function () {
- return Data_FoldableWithIndex.foldableWithIndexLast;
- }, function () {
- return Data_FunctorWithIndex.functorWithIndexLast;
- }, function () {
- return Data_Traversable.traversableLast;
- }, function (dictApplicative) {
- return function (f) {
- return Data_Traversable.traverse(Data_Traversable.traversableLast)(dictApplicative)(f(Data_Unit.unit));
- };
- });
- var traversableWithIndexFirst = new TraversableWithIndex(function () {
- return Data_FoldableWithIndex.foldableWithIndexFirst;
- }, function () {
- return Data_FunctorWithIndex.functorWithIndexFirst;
- }, function () {
- return Data_Traversable.traversableFirst;
- }, function (dictApplicative) {
- return function (f) {
- return Data_Traversable.traverse(Data_Traversable.traversableFirst)(dictApplicative)(f(Data_Unit.unit));
- };
- });
- var traversableWithIndexDual = new TraversableWithIndex(function () {
- return Data_FoldableWithIndex.foldableWithIndexDual;
- }, function () {
- return Data_FunctorWithIndex.functorWithIndexDual;
- }, function () {
- return Data_Traversable.traversableDual;
- }, function (dictApplicative) {
- return function (f) {
- return Data_Traversable.traverse(Data_Traversable.traversableDual)(dictApplicative)(f(Data_Unit.unit));
- };
- });
- var traversableWithIndexDisj = new TraversableWithIndex(function () {
- return Data_FoldableWithIndex.foldableWithIndexDisj;
- }, function () {
- return Data_FunctorWithIndex.functorWithIndexDisj;
- }, function () {
- return Data_Traversable.traversableDisj;
- }, function (dictApplicative) {
- return function (f) {
- return Data_Traversable.traverse(Data_Traversable.traversableDisj)(dictApplicative)(f(Data_Unit.unit));
- };
- });
- var traversableWithIndexConj = new TraversableWithIndex(function () {
- return Data_FoldableWithIndex.foldableWithIndexConj;
- }, function () {
- return Data_FunctorWithIndex.functorWithIndexConj;
- }, function () {
- return Data_Traversable.traversableConj;
- }, function (dictApplicative) {
- return function (f) {
- return Data_Traversable.traverse(Data_Traversable.traversableConj)(dictApplicative)(f(Data_Unit.unit));
- };
- });
- var traversableWithIndexArray = new TraversableWithIndex(function () {
- return Data_FoldableWithIndex.foldableWithIndexArray;
- }, function () {
- return Data_FunctorWithIndex.functorWithIndexArray;
- }, function () {
- return Data_Traversable.traversableArray;
- }, function (dictApplicative) {
- return traverseWithIndexDefault(traversableWithIndexArray)(dictApplicative);
- });
- var traversableWithIndexAdditive = new TraversableWithIndex(function () {
- return Data_FoldableWithIndex.foldableWithIndexAdditive;
- }, function () {
- return Data_FunctorWithIndex.functorWithIndexAdditive;
- }, function () {
- return Data_Traversable.traversableAdditive;
- }, function (dictApplicative) {
- return function (f) {
- return Data_Traversable.traverse(Data_Traversable.traversableAdditive)(dictApplicative)(f(Data_Unit.unit));
- };
- });
- var mapAccumRWithIndex = function mapAccumRWithIndex(dictTraversableWithIndex) {
- return function (f) {
- return function (s0) {
- return function (xs) {
- return Data_Traversable_Accum_Internal.stateR(traverseWithIndex(dictTraversableWithIndex)(Data_Traversable_Accum_Internal.applicativeStateR)(function (i) {
- return function (a) {
- return function (s) {
- return f(i)(s)(a);
- };
- };
- })(xs))(s0);
- };
- };
- };
- };
- var scanrWithIndex = function scanrWithIndex(dictTraversableWithIndex) {
- return function (f) {
- return function (b0) {
- return function (xs) {
- return mapAccumRWithIndex(dictTraversableWithIndex)(function (i) {
- return function (b) {
- return function (a) {
- var b$prime = f(i)(a)(b);
- return {
- accum: b$prime,
- value: b$prime
- };
- };
- };
- })(b0)(xs).value;
- };
- };
- };
- };
- var mapAccumLWithIndex = function mapAccumLWithIndex(dictTraversableWithIndex) {
- return function (f) {
- return function (s0) {
- return function (xs) {
- return Data_Traversable_Accum_Internal.stateL(traverseWithIndex(dictTraversableWithIndex)(Data_Traversable_Accum_Internal.applicativeStateL)(function (i) {
- return function (a) {
- return function (s) {
- return f(i)(s)(a);
- };
- };
- })(xs))(s0);
- };
- };
- };
- };
- var scanlWithIndex = function scanlWithIndex(dictTraversableWithIndex) {
- return function (f) {
- return function (b0) {
- return function (xs) {
- return mapAccumLWithIndex(dictTraversableWithIndex)(function (i) {
- return function (b) {
- return function (a) {
- var b$prime = f(i)(b)(a);
- return {
- accum: b$prime,
- value: b$prime
- };
- };
- };
- })(b0)(xs).value;
- };
- };
- };
- };
- var forWithIndex = function forWithIndex(dictApplicative) {
- return function (dictTraversableWithIndex) {
- return Data_Function.flip(traverseWithIndex(dictTraversableWithIndex)(dictApplicative));
- };
- };
- module.exports = {
- TraversableWithIndex: TraversableWithIndex,
- traverseWithIndex: traverseWithIndex,
- traverseWithIndexDefault: traverseWithIndexDefault,
- forWithIndex: forWithIndex,
- scanlWithIndex: scanlWithIndex,
- mapAccumLWithIndex: mapAccumLWithIndex,
- scanrWithIndex: scanrWithIndex,
- mapAccumRWithIndex: mapAccumRWithIndex,
- traverseDefault: traverseDefault,
- traversableWithIndexArray: traversableWithIndexArray,
- traversableWithIndexMaybe: traversableWithIndexMaybe,
- traversableWithIndexFirst: traversableWithIndexFirst,
- traversableWithIndexLast: traversableWithIndexLast,
- traversableWithIndexAdditive: traversableWithIndexAdditive,
- traversableWithIndexDual: traversableWithIndexDual,
- traversableWithIndexConj: traversableWithIndexConj,
- traversableWithIndexDisj: traversableWithIndexDisj,
- traversableWithIndexMultiplicative: traversableWithIndexMultiplicative
- };
- },{"../Data.FoldableWithIndex/index.js":"../output/Data.FoldableWithIndex/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.FunctorWithIndex/index.js":"../output/Data.FunctorWithIndex/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Data.Traversable.Accum.Internal/index.js":"../output/Data.Traversable.Accum.Internal/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Data.Either/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Alt = require("../Control.Alt/index.js");
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Extend = require("../Control.Extend/index.js");
- var Control_Monad = require("../Control.Monad/index.js");
- var Data_Bifoldable = require("../Data.Bifoldable/index.js");
- var Data_Bifunctor = require("../Data.Bifunctor/index.js");
- var Data_Bitraversable = require("../Data.Bitraversable/index.js");
- var Data_Bounded = require("../Data.Bounded/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Foldable = require("../Data.Foldable/index.js");
- var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Functor_Invariant = require("../Data.Functor.Invariant/index.js");
- var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Ordering = require("../Data.Ordering/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Data_Traversable = require("../Data.Traversable/index.js");
- var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js");
- var Data_Unit = require("../Data.Unit/index.js");
- var Left = function () {
- function Left(value0) {
- this.value0 = value0;
- }
- ;
- Left.create = function (value0) {
- return new Left(value0);
- };
- return Left;
- }();
- var Right = function () {
- function Right(value0) {
- this.value0 = value0;
- }
- ;
- Right.create = function (value0) {
- return new Right(value0);
- };
- return Right;
- }();
- var showEither = function showEither(dictShow) {
- return function (dictShow1) {
- return new Data_Show.Show(function (v) {
- if (v instanceof Left) {
- return "(Left " + (Data_Show.show(dictShow)(v.value0) + ")");
- }
- ;
- if (v instanceof Right) {
- return "(Right " + (Data_Show.show(dictShow1)(v.value0) + ")");
- }
- ;
- throw new Error("Failed pattern match at Data.Either (line 163, column 1 - line 165, column 46): " + [v.constructor.name]);
- });
- };
- };
- var note$prime = function note$prime(f) {
- return Data_Maybe["maybe'"](function ($198) {
- return Left.create(f($198));
- })(Right.create);
- };
- var note = function note(a) {
- return Data_Maybe.maybe(new Left(a))(Right.create);
- };
- var functorEither = new Data_Functor.Functor(function (f) {
- return function (m) {
- if (m instanceof Left) {
- return new Left(m.value0);
- }
- ;
- if (m instanceof Right) {
- return new Right(f(m.value0));
- }
- ;
- throw new Error("Failed pattern match at Data.Either (line 38, column 1 - line 38, column 52): " + [m.constructor.name]);
- };
- });
- var functorWithIndexEither = new Data_FunctorWithIndex.FunctorWithIndex(function () {
- return functorEither;
- }, function (f) {
- return Data_Functor.map(functorEither)(f(Data_Unit.unit));
- });
- var invariantEither = new Data_Functor_Invariant.Invariant(Data_Functor_Invariant.imapF(functorEither));
- var fromRight = function fromRight(dictPartial) {
- return function (v) {
- if (v instanceof Right) {
- return v.value0;
- }
- ;
- throw new Error("Failed pattern match at Data.Either (line 261, column 1 - line 261, column 52): " + [v.constructor.name]);
- };
- };
- var fromLeft = function fromLeft(dictPartial) {
- return function (v) {
- if (v instanceof Left) {
- return v.value0;
- }
- ;
- throw new Error("Failed pattern match at Data.Either (line 256, column 1 - line 256, column 51): " + [v.constructor.name]);
- };
- };
- var foldableEither = new Data_Foldable.Foldable(function (dictMonoid) {
- return function (f) {
- return function (v) {
- if (v instanceof Left) {
- return Data_Monoid.mempty(dictMonoid);
- }
- ;
- if (v instanceof Right) {
- return f(v.value0);
- }
- ;
- throw new Error("Failed pattern match at Data.Either (line 187, column 1 - line 193, column 28): " + [f.constructor.name, v.constructor.name]);
- };
- };
- }, function (v) {
- return function (z) {
- return function (v1) {
- if (v1 instanceof Left) {
- return z;
- }
- ;
- if (v1 instanceof Right) {
- return v(z)(v1.value0);
- }
- ;
- throw new Error("Failed pattern match at Data.Either (line 187, column 1 - line 193, column 28): " + [v.constructor.name, z.constructor.name, v1.constructor.name]);
- };
- };
- }, function (v) {
- return function (z) {
- return function (v1) {
- if (v1 instanceof Left) {
- return z;
- }
- ;
- if (v1 instanceof Right) {
- return v(v1.value0)(z);
- }
- ;
- throw new Error("Failed pattern match at Data.Either (line 187, column 1 - line 193, column 28): " + [v.constructor.name, z.constructor.name, v1.constructor.name]);
- };
- };
- });
- var foldableWithIndexEither = new Data_FoldableWithIndex.FoldableWithIndex(function () {
- return foldableEither;
- }, function (dictMonoid) {
- return function (f) {
- return function (v) {
- if (v instanceof Left) {
- return Data_Monoid.mempty(dictMonoid);
- }
- ;
- if (v instanceof Right) {
- return f(Data_Unit.unit)(v.value0);
- }
- ;
- throw new Error("Failed pattern match at Data.Either (line 195, column 1 - line 201, column 42): " + [f.constructor.name, v.constructor.name]);
- };
- };
- }, function (v) {
- return function (z) {
- return function (v1) {
- if (v1 instanceof Left) {
- return z;
- }
- ;
- if (v1 instanceof Right) {
- return v(Data_Unit.unit)(z)(v1.value0);
- }
- ;
- throw new Error("Failed pattern match at Data.Either (line 195, column 1 - line 201, column 42): " + [v.constructor.name, z.constructor.name, v1.constructor.name]);
- };
- };
- }, function (v) {
- return function (z) {
- return function (v1) {
- if (v1 instanceof Left) {
- return z;
- }
- ;
- if (v1 instanceof Right) {
- return v(Data_Unit.unit)(v1.value0)(z);
- }
- ;
- throw new Error("Failed pattern match at Data.Either (line 195, column 1 - line 201, column 42): " + [v.constructor.name, z.constructor.name, v1.constructor.name]);
- };
- };
- });
- var traversableEither = new Data_Traversable.Traversable(function () {
- return foldableEither;
- }, function () {
- return functorEither;
- }, function (dictApplicative) {
- return function (v) {
- if (v instanceof Left) {
- return Control_Applicative.pure(dictApplicative)(new Left(v.value0));
- }
- ;
- if (v instanceof Right) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Right.create)(v.value0);
- }
- ;
- throw new Error("Failed pattern match at Data.Either (line 211, column 1 - line 215, column 36): " + [v.constructor.name]);
- };
- }, function (dictApplicative) {
- return function (v) {
- return function (v1) {
- if (v1 instanceof Left) {
- return Control_Applicative.pure(dictApplicative)(new Left(v1.value0));
- }
- ;
- if (v1 instanceof Right) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Right.create)(v(v1.value0));
- }
- ;
- throw new Error("Failed pattern match at Data.Either (line 211, column 1 - line 215, column 36): " + [v.constructor.name, v1.constructor.name]);
- };
- };
- });
- var traversableWithIndexEither = new Data_TraversableWithIndex.TraversableWithIndex(function () {
- return foldableWithIndexEither;
- }, function () {
- return functorWithIndexEither;
- }, function () {
- return traversableEither;
- }, function (dictApplicative) {
- return function (v) {
- return function (v1) {
- if (v1 instanceof Left) {
- return Control_Applicative.pure(dictApplicative)(new Left(v1.value0));
- }
- ;
- if (v1 instanceof Right) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Right.create)(v(Data_Unit.unit)(v1.value0));
- }
- ;
- throw new Error("Failed pattern match at Data.Either (line 217, column 1 - line 219, column 53): " + [v.constructor.name, v1.constructor.name]);
- };
- };
- });
- var extendEither = new Control_Extend.Extend(function () {
- return functorEither;
- }, function (v) {
- return function (v1) {
- if (v1 instanceof Left) {
- return new Left(v1.value0);
- }
- ;
- return new Right(v(v1));
- };
- });
- var eqEither = function eqEither(dictEq) {
- return function (dictEq1) {
- return new Data_Eq.Eq(function (x) {
- return function (y) {
- if (x instanceof Left && y instanceof Left) {
- return Data_Eq.eq(dictEq)(x.value0)(y.value0);
- }
- ;
- if (x instanceof Right && y instanceof Right) {
- return Data_Eq.eq(dictEq1)(x.value0)(y.value0);
- }
- ;
- return false;
- };
- });
- };
- };
- var ordEither = function ordEither(dictOrd) {
- return function (dictOrd1) {
- return new Data_Ord.Ord(function () {
- return eqEither(dictOrd.Eq0())(dictOrd1.Eq0());
- }, function (x) {
- return function (y) {
- if (x instanceof Left && y instanceof Left) {
- return Data_Ord.compare(dictOrd)(x.value0)(y.value0);
- }
- ;
- if (x instanceof Left) {
- return Data_Ordering.LT.value;
- }
- ;
- if (y instanceof Left) {
- return Data_Ordering.GT.value;
- }
- ;
- if (x instanceof Right && y instanceof Right) {
- return Data_Ord.compare(dictOrd1)(x.value0)(y.value0);
- }
- ;
- throw new Error("Failed pattern match at Data.Either (line 179, column 1 - line 179, column 64): " + [x.constructor.name, y.constructor.name]);
- };
- });
- };
- };
- var eq1Either = function eq1Either(dictEq) {
- return new Data_Eq.Eq1(function (dictEq1) {
- return Data_Eq.eq(eqEither(dictEq)(dictEq1));
- });
- };
- var ord1Either = function ord1Either(dictOrd) {
- return new Data_Ord.Ord1(function () {
- return eq1Either(dictOrd.Eq0());
- }, function (dictOrd1) {
- return Data_Ord.compare(ordEither(dictOrd)(dictOrd1));
- });
- };
- var either = function either(v) {
- return function (v1) {
- return function (v2) {
- if (v2 instanceof Left) {
- return v(v2.value0);
- }
- ;
- if (v2 instanceof Right) {
- return v1(v2.value0);
- }
- ;
- throw new Error("Failed pattern match at Data.Either (line 238, column 1 - line 238, column 64): " + [v.constructor.name, v1.constructor.name, v2.constructor.name]);
- };
- };
- };
- var hush = either(Data_Function["const"](Data_Maybe.Nothing.value))(Data_Maybe.Just.create);
- var isLeft = either(Data_Function["const"](true))(Data_Function["const"](false));
- var isRight = either(Data_Function["const"](false))(Data_Function["const"](true));
- var choose = function choose(dictAlt) {
- return function (a) {
- return function (b) {
- return Control_Alt.alt(dictAlt)(Data_Functor.map(dictAlt.Functor0())(Left.create)(a))(Data_Functor.map(dictAlt.Functor0())(Right.create)(b));
- };
- };
- };
- var boundedEither = function boundedEither(dictBounded) {
- return function (dictBounded1) {
- return new Data_Bounded.Bounded(function () {
- return ordEither(dictBounded.Ord0())(dictBounded1.Ord0());
- }, new Left(Data_Bounded.bottom(dictBounded)), new Right(Data_Bounded.top(dictBounded1)));
- };
- };
- var bifunctorEither = new Data_Bifunctor.Bifunctor(function (v) {
- return function (v1) {
- return function (v2) {
- if (v2 instanceof Left) {
- return new Left(v(v2.value0));
- }
- ;
- if (v2 instanceof Right) {
- return new Right(v1(v2.value0));
- }
- ;
- throw new Error("Failed pattern match at Data.Either (line 46, column 1 - line 48, column 36): " + [v.constructor.name, v1.constructor.name, v2.constructor.name]);
- };
- };
- });
- var bifoldableEither = new Data_Bifoldable.Bifoldable(function (dictMonoid) {
- return function (v) {
- return function (v1) {
- return function (v2) {
- if (v2 instanceof Left) {
- return v(v2.value0);
- }
- ;
- if (v2 instanceof Right) {
- return v1(v2.value0);
- }
- ;
- throw new Error("Failed pattern match at Data.Either (line 203, column 1 - line 209, column 32): " + [v.constructor.name, v1.constructor.name, v2.constructor.name]);
- };
- };
- };
- }, function (v) {
- return function (v1) {
- return function (z) {
- return function (v2) {
- if (v2 instanceof Left) {
- return v(z)(v2.value0);
- }
- ;
- if (v2 instanceof Right) {
- return v1(z)(v2.value0);
- }
- ;
- throw new Error("Failed pattern match at Data.Either (line 203, column 1 - line 209, column 32): " + [v.constructor.name, v1.constructor.name, z.constructor.name, v2.constructor.name]);
- };
- };
- };
- }, function (v) {
- return function (v1) {
- return function (z) {
- return function (v2) {
- if (v2 instanceof Left) {
- return v(v2.value0)(z);
- }
- ;
- if (v2 instanceof Right) {
- return v1(v2.value0)(z);
- }
- ;
- throw new Error("Failed pattern match at Data.Either (line 203, column 1 - line 209, column 32): " + [v.constructor.name, v1.constructor.name, z.constructor.name, v2.constructor.name]);
- };
- };
- };
- });
- var bitraversableEither = new Data_Bitraversable.Bitraversable(function () {
- return bifoldableEither;
- }, function () {
- return bifunctorEither;
- }, function (dictApplicative) {
- return function (v) {
- if (v instanceof Left) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Left.create)(v.value0);
- }
- ;
- if (v instanceof Right) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Right.create)(v.value0);
- }
- ;
- throw new Error("Failed pattern match at Data.Either (line 221, column 1 - line 225, column 37): " + [v.constructor.name]);
- };
- }, function (dictApplicative) {
- return function (v) {
- return function (v1) {
- return function (v2) {
- if (v2 instanceof Left) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Left.create)(v(v2.value0));
- }
- ;
- if (v2 instanceof Right) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Right.create)(v1(v2.value0));
- }
- ;
- throw new Error("Failed pattern match at Data.Either (line 221, column 1 - line 225, column 37): " + [v.constructor.name, v1.constructor.name, v2.constructor.name]);
- };
- };
- };
- });
- var applyEither = new Control_Apply.Apply(function () {
- return functorEither;
- }, function (v) {
- return function (v1) {
- if (v instanceof Left) {
- return new Left(v.value0);
- }
- ;
- if (v instanceof Right) {
- return Data_Functor.map(functorEither)(v.value0)(v1);
- }
- ;
- throw new Error("Failed pattern match at Data.Either (line 82, column 1 - line 84, column 30): " + [v.constructor.name, v1.constructor.name]);
- };
- });
- var bindEither = new Control_Bind.Bind(function () {
- return applyEither;
- }, either(function (e) {
- return function (v) {
- return new Left(e);
- };
- })(function (a) {
- return function (f) {
- return f(a);
- };
- }));
- var semigroupEither = function semigroupEither(dictSemigroup) {
- return new Data_Semigroup.Semigroup(function (x) {
- return function (y) {
- return Control_Apply.apply(applyEither)(Data_Functor.map(functorEither)(Data_Semigroup.append(dictSemigroup))(x))(y);
- };
- });
- };
- var applicativeEither = new Control_Applicative.Applicative(function () {
- return applyEither;
- }, Right.create);
- var monadEither = new Control_Monad.Monad(function () {
- return applicativeEither;
- }, function () {
- return bindEither;
- });
- var altEither = new Control_Alt.Alt(function () {
- return functorEither;
- }, function (v) {
- return function (v1) {
- if (v instanceof Left) {
- return v1;
- }
- ;
- return v;
- };
- });
- module.exports = {
- Left: Left,
- Right: Right,
- either: either,
- choose: choose,
- isLeft: isLeft,
- isRight: isRight,
- fromLeft: fromLeft,
- fromRight: fromRight,
- note: note,
- "note'": note$prime,
- hush: hush,
- functorEither: functorEither,
- functorWithIndexEither: functorWithIndexEither,
- invariantEither: invariantEither,
- bifunctorEither: bifunctorEither,
- applyEither: applyEither,
- applicativeEither: applicativeEither,
- altEither: altEither,
- bindEither: bindEither,
- monadEither: monadEither,
- extendEither: extendEither,
- showEither: showEither,
- eqEither: eqEither,
- eq1Either: eq1Either,
- ordEither: ordEither,
- ord1Either: ord1Either,
- boundedEither: boundedEither,
- foldableEither: foldableEither,
- foldableWithIndexEither: foldableWithIndexEither,
- bifoldableEither: bifoldableEither,
- traversableEither: traversableEither,
- traversableWithIndexEither: traversableWithIndexEither,
- bitraversableEither: bitraversableEither,
- semigroupEither: semigroupEither
- };
- },{"../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Extend/index.js":"../output/Control.Extend/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Data.Bifoldable/index.js":"../output/Data.Bifoldable/index.js","../Data.Bifunctor/index.js":"../output/Data.Bifunctor/index.js","../Data.Bitraversable/index.js":"../output/Data.Bitraversable/index.js","../Data.Bounded/index.js":"../output/Data.Bounded/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.FoldableWithIndex/index.js":"../output/Data.FoldableWithIndex/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Functor.Invariant/index.js":"../output/Data.Functor.Invariant/index.js","../Data.FunctorWithIndex/index.js":"../output/Data.FunctorWithIndex/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Data.TraversableWithIndex/index.js":"../output/Data.TraversableWithIndex/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Effect/foreign.js":[function(require,module,exports) {
- "use strict";
- exports.pureE = function (a) {
- return function () {
- return a;
- };
- };
- exports.bindE = function (a) {
- return function (f) {
- return function () {
- return f(a())();
- };
- };
- };
- exports.untilE = function (f) {
- return function () {
- while (!f()) {
- ;
- }
- return {};
- };
- };
- exports.whileE = function (f) {
- return function (a) {
- return function () {
- while (f()) {
- a();
- }
- return {};
- };
- };
- };
- exports.forE = function (lo) {
- return function (hi) {
- return function (f) {
- return function () {
- for (var i = lo; i < hi; i++) {
- f(i)();
- }
- };
- };
- };
- };
- exports.foreachE = function (as) {
- return function (f) {
- return function () {
- for (var i = 0, l = as.length; i < l; i++) {
- f(as[i])();
- }
- };
- };
- };
- },{}],"../output/Effect/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Monad = require("../Control.Monad/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var monadEffect = new Control_Monad.Monad(function () {
- return applicativeEffect;
- }, function () {
- return bindEffect;
- });
- var bindEffect = new Control_Bind.Bind(function () {
- return applyEffect;
- }, $foreign.bindE);
- var applyEffect = new Control_Apply.Apply(function () {
- return functorEffect;
- }, Control_Monad.ap(monadEffect));
- var applicativeEffect = new Control_Applicative.Applicative(function () {
- return applyEffect;
- }, $foreign.pureE);
- var functorEffect = new Data_Functor.Functor(Control_Applicative.liftA1(applicativeEffect));
- var semigroupEffect = function semigroupEffect(dictSemigroup) {
- return new Data_Semigroup.Semigroup(Control_Apply.lift2(applyEffect)(Data_Semigroup.append(dictSemigroup)));
- };
- var monoidEffect = function monoidEffect(dictMonoid) {
- return new Data_Monoid.Monoid(function () {
- return semigroupEffect(dictMonoid.Semigroup0());
- }, $foreign.pureE(Data_Monoid.mempty(dictMonoid)));
- };
- module.exports = {
- functorEffect: functorEffect,
- applyEffect: applyEffect,
- applicativeEffect: applicativeEffect,
- bindEffect: bindEffect,
- monadEffect: monadEffect,
- semigroupEffect: semigroupEffect,
- monoidEffect: monoidEffect,
- untilE: $foreign.untilE,
- whileE: $foreign.whileE,
- forE: $foreign.forE,
- foreachE: $foreign.foreachE
- };
- },{"./foreign.js":"../output/Effect/foreign.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js"}],"../output/Effect.Exception/foreign.js":[function(require,module,exports) {
- "use strict";
- exports.showErrorImpl = function (err) {
- return err.stack || err.toString();
- };
- exports.error = function (msg) {
- return new Error(msg);
- };
- exports.message = function (e) {
- return e.message;
- };
- exports.name = function (e) {
- return e.name || "Error";
- };
- exports.stackImpl = function (just) {
- return function (nothing) {
- return function (e) {
- return e.stack ? just(e.stack) : nothing;
- };
- };
- };
- exports.throwException = function (e) {
- return function () {
- throw e;
- };
- };
- exports.catchException = function (c) {
- return function (t) {
- return function () {
- try {
- return t();
- } catch (e) {
- if (e instanceof Error || Object.prototype.toString.call(e) === "[object Error]") {
- return c(e)();
- } else {
- return c(new Error(e.toString()))();
- }
- }
- };
- };
- };
- },{}],"../output/Effect.Exception/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Data_Either = require("../Data.Either/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Effect = require("../Effect/index.js");
- var $$try = function $$try(action) {
- return $foreign.catchException(function () {
- var $0 = Control_Applicative.pure(Effect.applicativeEffect);
- return function ($1) {
- return $0(Data_Either.Left.create($1));
- };
- }())(Data_Functor.map(Effect.functorEffect)(Data_Either.Right.create)(action));
- };
- var $$throw = function $$throw($2) {
- return $foreign.throwException($foreign.error($2));
- };
- var stack = $foreign.stackImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
- var showError = new Data_Show.Show($foreign.showErrorImpl);
- module.exports = {
- stack: stack,
- "throw": $$throw,
- "try": $$try,
- showError: showError,
- error: $foreign.error,
- message: $foreign.message,
- name: $foreign.name,
- throwException: $foreign.throwException,
- catchException: $foreign.catchException
- };
- },{"./foreign.js":"../output/Effect.Exception/foreign.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Effect/index.js":"../output/Effect/index.js"}],"../output/Control.Monad.Error.Class/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Data_Either = require("../Data.Either/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Unit = require("../Data.Unit/index.js");
- var Effect = require("../Effect/index.js");
- var Effect_Exception = require("../Effect.Exception/index.js");
- var MonadThrow = function MonadThrow(Monad0, throwError) {
- this.Monad0 = Monad0;
- this.throwError = throwError;
- };
- var MonadError = function MonadError(MonadThrow0, catchError) {
- this.MonadThrow0 = MonadThrow0;
- this.catchError = catchError;
- };
- var throwError = function throwError(dict) {
- return dict.throwError;
- };
- var monadThrowMaybe = new MonadThrow(function () {
- return Data_Maybe.monadMaybe;
- }, Data_Function["const"](Data_Maybe.Nothing.value));
- var monadThrowEither = new MonadThrow(function () {
- return Data_Either.monadEither;
- }, Data_Either.Left.create);
- var monadThrowEffect = new MonadThrow(function () {
- return Effect.monadEffect;
- }, Effect_Exception.throwException);
- var monadErrorMaybe = new MonadError(function () {
- return monadThrowMaybe;
- }, function (v) {
- return function (v1) {
- if (v instanceof Data_Maybe.Nothing) {
- return v1(Data_Unit.unit);
- }
- ;
- if (v instanceof Data_Maybe.Just) {
- return new Data_Maybe.Just(v.value0);
- }
- ;
- throw new Error("Failed pattern match at Control.Monad.Error.Class (line 79, column 1 - line 81, column 33): " + [v.constructor.name, v1.constructor.name]);
- };
- });
- var monadErrorEither = new MonadError(function () {
- return monadThrowEither;
- }, function (v) {
- return function (v1) {
- if (v instanceof Data_Either.Left) {
- return v1(v.value0);
- }
- ;
- if (v instanceof Data_Either.Right) {
- return new Data_Either.Right(v.value0);
- }
- ;
- throw new Error("Failed pattern match at Control.Monad.Error.Class (line 72, column 1 - line 74, column 35): " + [v.constructor.name, v1.constructor.name]);
- };
- });
- var monadErrorEffect = new MonadError(function () {
- return monadThrowEffect;
- }, Data_Function.flip(Effect_Exception.catchException));
- var catchError = function catchError(dict) {
- return dict.catchError;
- };
- var catchJust = function catchJust(dictMonadError) {
- return function (p) {
- return function (act) {
- return function (handler) {
- var handle = function handle(e) {
- var v = p(e);
- if (v instanceof Data_Maybe.Nothing) {
- return throwError(dictMonadError.MonadThrow0())(e);
- }
- ;
- if (v instanceof Data_Maybe.Just) {
- return handler(v.value0);
- }
- ;
- throw new Error("Failed pattern match at Control.Monad.Error.Class (line 57, column 5 - line 59, column 26): " + [v.constructor.name]);
- };
- return catchError(dictMonadError)(act)(handle);
- };
- };
- };
- };
- var $$try = function $$try(dictMonadError) {
- return function (a) {
- return catchError(dictMonadError)(Data_Functor.map(dictMonadError.MonadThrow0().Monad0().Bind1().Apply0().Functor0())(Data_Either.Right.create)(a))(function () {
- var $17 = Control_Applicative.pure(dictMonadError.MonadThrow0().Monad0().Applicative0());
- return function ($18) {
- return $17(Data_Either.Left.create($18));
- };
- }());
- };
- };
- var withResource = function withResource(dictMonadError) {
- return function (acquire) {
- return function (release) {
- return function (kleisli) {
- return Control_Bind.bind(dictMonadError.MonadThrow0().Monad0().Bind1())(acquire)(function (resource) {
- return Control_Bind.bind(dictMonadError.MonadThrow0().Monad0().Bind1())($$try(dictMonadError)(kleisli(resource)))(function (result) {
- return Control_Bind.discard(Control_Bind.discardUnit)(dictMonadError.MonadThrow0().Monad0().Bind1())(release(resource))(function () {
- return Data_Either.either(throwError(dictMonadError.MonadThrow0()))(Control_Applicative.pure(dictMonadError.MonadThrow0().Monad0().Applicative0()))(result);
- });
- });
- });
- };
- };
- };
- };
- module.exports = {
- catchError: catchError,
- throwError: throwError,
- MonadThrow: MonadThrow,
- MonadError: MonadError,
- catchJust: catchJust,
- "try": $$try,
- withResource: withResource,
- monadThrowEither: monadThrowEither,
- monadErrorEither: monadErrorEither,
- monadThrowMaybe: monadThrowMaybe,
- monadErrorMaybe: monadErrorMaybe,
- monadThrowEffect: monadThrowEffect,
- monadErrorEffect: monadErrorEffect
- };
- },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js","../Effect/index.js":"../output/Effect/index.js","../Effect.Exception/index.js":"../output/Effect.Exception/index.js"}],"../output/Control.Monad.Reader.Class/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Category = require("../Control.Category/index.js");
- var Control_Monad = require("../Control.Monad/index.js");
- var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var MonadAsk = function MonadAsk(Monad0, ask) {
- this.Monad0 = Monad0;
- this.ask = ask;
- };
- var MonadReader = function MonadReader(MonadAsk0, local) {
- this.MonadAsk0 = MonadAsk0;
- this.local = local;
- };
- var monadAskFun = new MonadAsk(function () {
- return Control_Monad.monadFn;
- }, Control_Category.identity(Control_Category.categoryFn));
- var monadReaderFun = new MonadReader(function () {
- return monadAskFun;
- }, Control_Semigroupoid.composeFlipped(Control_Semigroupoid.semigroupoidFn));
- var local = function local(dict) {
- return dict.local;
- };
- var ask = function ask(dict) {
- return dict.ask;
- };
- var asks = function asks(dictMonadAsk) {
- return function (f) {
- return Data_Functor.map(dictMonadAsk.Monad0().Bind1().Apply0().Functor0())(f)(ask(dictMonadAsk));
- };
- };
- module.exports = {
- ask: ask,
- local: local,
- MonadAsk: MonadAsk,
- asks: asks,
- MonadReader: MonadReader,
- monadAskFun: monadAskFun,
- monadReaderFun: monadReaderFun
- };
- },{"../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Control.Semigroupoid/index.js":"../output/Control.Semigroupoid/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js"}],"../output/Control.Comonad/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Comonad = function Comonad(Extend0, extract) {
- this.Extend0 = Extend0;
- this.extract = extract;
- };
- var extract = function extract(dict) {
- return dict.extract;
- };
- module.exports = {
- Comonad: Comonad,
- extract: extract
- };
- },{}],"../output/Data.Ord.Max/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Data_Bounded = require("../Data.Bounded/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Max = function Max(x) {
- return x;
- };
- var showMax = function showMax(dictShow) {
- return new Data_Show.Show(function (v) {
- return "(Max " + (Data_Show.show(dictShow)(v) + ")");
- });
- };
- var semigroupMax = function semigroupMax(dictOrd) {
- return new Data_Semigroup.Semigroup(function (v) {
- return function (v1) {
- return Data_Ord.max(dictOrd)(v)(v1);
- };
- });
- };
- var newtypeMax = new Data_Newtype.Newtype(function (n) {
- return n;
- }, Max);
- var monoidMax = function monoidMax(dictBounded) {
- return new Data_Monoid.Monoid(function () {
- return semigroupMax(dictBounded.Ord0());
- }, Data_Bounded.bottom(dictBounded));
- };
- var eqMax = function eqMax(dictEq) {
- return dictEq;
- };
- var ordMax = function ordMax(dictOrd) {
- return new Data_Ord.Ord(function () {
- return eqMax(dictOrd.Eq0());
- }, function (v) {
- return function (v1) {
- return Data_Ord.compare(dictOrd)(v)(v1);
- };
- });
- };
- module.exports = {
- Max: Max,
- newtypeMax: newtypeMax,
- eqMax: eqMax,
- ordMax: ordMax,
- semigroupMax: semigroupMax,
- monoidMax: monoidMax,
- showMax: showMax
- };
- },{"../Data.Bounded/index.js":"../output/Data.Bounded/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Ord.Min/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Data_Bounded = require("../Data.Bounded/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Min = function Min(x) {
- return x;
- };
- var showMin = function showMin(dictShow) {
- return new Data_Show.Show(function (v) {
- return "(Min " + (Data_Show.show(dictShow)(v) + ")");
- });
- };
- var semigroupMin = function semigroupMin(dictOrd) {
- return new Data_Semigroup.Semigroup(function (v) {
- return function (v1) {
- return Data_Ord.min(dictOrd)(v)(v1);
- };
- });
- };
- var newtypeMin = new Data_Newtype.Newtype(function (n) {
- return n;
- }, Min);
- var monoidMin = function monoidMin(dictBounded) {
- return new Data_Monoid.Monoid(function () {
- return semigroupMin(dictBounded.Ord0());
- }, Data_Bounded.top(dictBounded));
- };
- var eqMin = function eqMin(dictEq) {
- return dictEq;
- };
- var ordMin = function ordMin(dictOrd) {
- return new Data_Ord.Ord(function () {
- return eqMin(dictOrd.Eq0());
- }, function (v) {
- return function (v1) {
- return Data_Ord.compare(dictOrd)(v)(v1);
- };
- });
- };
- module.exports = {
- Min: Min,
- newtypeMin: newtypeMin,
- eqMin: eqMin,
- ordMin: ordMin,
- semigroupMin: semigroupMin,
- monoidMin: monoidMin,
- showMin: showMin
- };
- },{"../Data.Bounded/index.js":"../output/Data.Bounded/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Semigroup.Foldable/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Category = require("../Control.Category/index.js");
- var Data_Foldable = require("../Data.Foldable/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Ord_Max = require("../Data.Ord.Max/index.js");
- var Data_Ord_Min = require("../Data.Ord.Min/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Unit = require("../Data.Unit/index.js");
- var JoinWith = function JoinWith(x) {
- return x;
- };
- var Act = function Act(x) {
- return x;
- };
- var Foldable1 = function Foldable1(Foldable0, fold1, foldMap1) {
- this.Foldable0 = Foldable0;
- this.fold1 = fold1;
- this.foldMap1 = foldMap1;
- };
- var semigroupJoinWith = function semigroupJoinWith(dictSemigroup) {
- return new Data_Semigroup.Semigroup(function (v) {
- return function (v1) {
- return JoinWith(function (j) {
- return Data_Semigroup.append(dictSemigroup)(v(j))(Data_Semigroup.append(dictSemigroup)(j)(v1(j)));
- });
- };
- });
- };
- var semigroupAct = function semigroupAct(dictApply) {
- return new Data_Semigroup.Semigroup(function (v) {
- return function (v1) {
- return Control_Apply.applySecond(dictApply)(v)(v1);
- };
- });
- };
- var joinee = function joinee(v) {
- return v;
- };
- var getAct = function getAct(v) {
- return v;
- };
- var foldMap1 = function foldMap1(dict) {
- return dict.foldMap1;
- };
- var intercalateMap = function intercalateMap(dictFoldable1) {
- return function (dictSemigroup) {
- return function (j) {
- return function (f) {
- return function (foldable) {
- return joinee(foldMap1(dictFoldable1)(semigroupJoinWith(dictSemigroup))(function ($43) {
- return JoinWith(Data_Function["const"](f($43)));
- })(foldable))(j);
- };
- };
- };
- };
- };
- var intercalate = function intercalate(dictFoldable1) {
- return function (dictSemigroup) {
- return Data_Function.flip(intercalateMap(dictFoldable1)(dictSemigroup))(Control_Category.identity(Control_Category.categoryFn));
- };
- };
- var maximum = function maximum(dictOrd) {
- return function (dictFoldable1) {
- return Data_Newtype.ala(Data_Functor.functorFn)(Data_Ord_Max.newtypeMax)(Data_Ord_Max.newtypeMax)(Data_Ord_Max.Max)(foldMap1(dictFoldable1)(Data_Ord_Max.semigroupMax(dictOrd)));
- };
- };
- var minimum = function minimum(dictOrd) {
- return function (dictFoldable1) {
- return Data_Newtype.ala(Data_Functor.functorFn)(Data_Ord_Min.newtypeMin)(Data_Ord_Min.newtypeMin)(Data_Ord_Min.Min)(foldMap1(dictFoldable1)(Data_Ord_Min.semigroupMin(dictOrd)));
- };
- };
- var traverse1_ = function traverse1_(dictFoldable1) {
- return function (dictApply) {
- return function (f) {
- return function (t) {
- return Data_Functor.voidRight(dictApply.Functor0())(Data_Unit.unit)(getAct(foldMap1(dictFoldable1)(semigroupAct(dictApply))(function ($44) {
- return Act(f($44));
- })(t)));
- };
- };
- };
- };
- var for1_ = function for1_(dictFoldable1) {
- return function (dictApply) {
- return Data_Function.flip(traverse1_(dictFoldable1)(dictApply));
- };
- };
- var sequence1_ = function sequence1_(dictFoldable1) {
- return function (dictApply) {
- return traverse1_(dictFoldable1)(dictApply)(Control_Category.identity(Control_Category.categoryFn));
- };
- };
- var fold1Default = function fold1Default(dictFoldable1) {
- return function (dictSemigroup) {
- return foldMap1(dictFoldable1)(dictSemigroup)(Control_Category.identity(Control_Category.categoryFn));
- };
- };
- var foldableDual = new Foldable1(function () {
- return Data_Foldable.foldableDual;
- }, function (dictSemigroup) {
- return fold1Default(foldableDual)(dictSemigroup);
- }, function (dictSemigroup) {
- return function (f) {
- return function (v) {
- return f(v);
- };
- };
- });
- var foldableMultiplicative = new Foldable1(function () {
- return Data_Foldable.foldableMultiplicative;
- }, function (dictSemigroup) {
- return fold1Default(foldableMultiplicative)(dictSemigroup);
- }, function (dictSemigroup) {
- return function (f) {
- return function (v) {
- return f(v);
- };
- };
- });
- var fold1 = function fold1(dict) {
- return dict.fold1;
- };
- var foldMap1Default = function foldMap1Default(dictFoldable1) {
- return function (dictFunctor) {
- return function (dictSemigroup) {
- return function (f) {
- var $45 = fold1(dictFoldable1)(dictSemigroup);
- var $46 = Data_Functor.map(dictFunctor)(f);
- return function ($47) {
- return $45($46($47));
- };
- };
- };
- };
- };
- module.exports = {
- Foldable1: Foldable1,
- foldMap1: foldMap1,
- fold1: fold1,
- traverse1_: traverse1_,
- for1_: for1_,
- sequence1_: sequence1_,
- foldMap1Default: foldMap1Default,
- fold1Default: fold1Default,
- intercalate: intercalate,
- intercalateMap: intercalateMap,
- maximum: maximum,
- minimum: minimum,
- foldableDual: foldableDual,
- foldableMultiplicative: foldableMultiplicative
- };
- },{"../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Ord.Max/index.js":"../output/Data.Ord.Max/index.js","../Data.Ord.Min/index.js":"../output/Data.Ord.Min/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Data.Semigroup.Traversable/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Category = require("../Control.Category/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Monoid_Dual = require("../Data.Monoid.Dual/index.js");
- var Data_Monoid_Multiplicative = require("../Data.Monoid.Multiplicative/index.js");
- var Data_Semigroup_Foldable = require("../Data.Semigroup.Foldable/index.js");
- var Data_Traversable = require("../Data.Traversable/index.js");
- var Traversable1 = function Traversable1(Foldable10, _Traversable, sequence1, traverse1) {
- this.Foldable10 = Foldable10;
- this.Traversable1 = _Traversable;
- this.sequence1 = sequence1;
- this.traverse1 = traverse1;
- };
- var traverse1 = function traverse1(dict) {
- return dict.traverse1;
- };
- var sequence1Default = function sequence1Default(dictTraversable1) {
- return function (dictApply) {
- return traverse1(dictTraversable1)(dictApply)(Control_Category.identity(Control_Category.categoryFn));
- };
- };
- var traversableDual = new Traversable1(function () {
- return Data_Semigroup_Foldable.foldableDual;
- }, function () {
- return Data_Traversable.traversableDual;
- }, function (dictApply) {
- return sequence1Default(traversableDual)(dictApply);
- }, function (dictApply) {
- return function (f) {
- return function (v) {
- return Data_Functor.map(dictApply.Functor0())(Data_Monoid_Dual.Dual)(f(v));
- };
- };
- });
- var traversableMultiplicative = new Traversable1(function () {
- return Data_Semigroup_Foldable.foldableMultiplicative;
- }, function () {
- return Data_Traversable.traversableMultiplicative;
- }, function (dictApply) {
- return sequence1Default(traversableMultiplicative)(dictApply);
- }, function (dictApply) {
- return function (f) {
- return function (v) {
- return Data_Functor.map(dictApply.Functor0())(Data_Monoid_Multiplicative.Multiplicative)(f(v));
- };
- };
- });
- var sequence1 = function sequence1(dict) {
- return dict.sequence1;
- };
- var traverse1Default = function traverse1Default(dictTraversable1) {
- return function (dictApply) {
- return function (f) {
- return function (ta) {
- return sequence1(dictTraversable1)(dictApply)(Data_Functor.map(dictTraversable1.Traversable1().Functor0())(f)(ta));
- };
- };
- };
- };
- module.exports = {
- sequence1: sequence1,
- traverse1: traverse1,
- Traversable1: Traversable1,
- traverse1Default: traverse1Default,
- sequence1Default: sequence1Default,
- traversableDual: traversableDual,
- traversableMultiplicative: traversableMultiplicative
- };
- },{"../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Monoid.Dual/index.js":"../output/Data.Monoid.Dual/index.js","../Data.Monoid.Multiplicative/index.js":"../output/Data.Monoid.Multiplicative/index.js","../Data.Semigroup.Foldable/index.js":"../output/Data.Semigroup.Foldable/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js"}],"../output/Data.Identity/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Alt = require("../Control.Alt/index.js");
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Comonad = require("../Control.Comonad/index.js");
- var Control_Extend = require("../Control.Extend/index.js");
- var Control_Monad = require("../Control.Monad/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Foldable = require("../Data.Foldable/index.js");
- var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Functor_Invariant = require("../Data.Functor.Invariant/index.js");
- var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Semigroup_Foldable = require("../Data.Semigroup.Foldable/index.js");
- var Data_Semigroup_Traversable = require("../Data.Semigroup.Traversable/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Data_Traversable = require("../Data.Traversable/index.js");
- var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js");
- var Data_Unit = require("../Data.Unit/index.js");
- var Identity = function Identity(x) {
- return x;
- };
- var showIdentity = function showIdentity(dictShow) {
- return new Data_Show.Show(function (v) {
- return "(Identity " + (Data_Show.show(dictShow)(v) + ")");
- });
- };
- var semiringIdentity = function semiringIdentity(dictSemiring) {
- return dictSemiring;
- };
- var semigroupIdenity = function semigroupIdenity(dictSemigroup) {
- return dictSemigroup;
- };
- var ringIdentity = function ringIdentity(dictRing) {
- return dictRing;
- };
- var ordIdentity = function ordIdentity(dictOrd) {
- return dictOrd;
- };
- var newtypeIdentity = new Data_Newtype.Newtype(function (n) {
- return n;
- }, Identity);
- var monoidIdentity = function monoidIdentity(dictMonoid) {
- return dictMonoid;
- };
- var lazyIdentity = function lazyIdentity(dictLazy) {
- return dictLazy;
- };
- var heytingAlgebraIdentity = function heytingAlgebraIdentity(dictHeytingAlgebra) {
- return dictHeytingAlgebra;
- };
- var functorIdentity = new Data_Functor.Functor(function (f) {
- return function (m) {
- return f(m);
- };
- });
- var functorWithIndexIdentity = new Data_FunctorWithIndex.FunctorWithIndex(function () {
- return functorIdentity;
- }, function (f) {
- return function (v) {
- return f(Data_Unit.unit)(v);
- };
- });
- var invariantIdentity = new Data_Functor_Invariant.Invariant(Data_Functor_Invariant.imapF(functorIdentity));
- var foldableIdentity = new Data_Foldable.Foldable(function (dictMonoid) {
- return function (f) {
- return function (v) {
- return f(v);
- };
- };
- }, function (f) {
- return function (z) {
- return function (v) {
- return f(z)(v);
- };
- };
- }, function (f) {
- return function (z) {
- return function (v) {
- return f(v)(z);
- };
- };
- });
- var foldableWithIndexIdentity = new Data_FoldableWithIndex.FoldableWithIndex(function () {
- return foldableIdentity;
- }, function (dictMonoid) {
- return function (f) {
- return function (v) {
- return f(Data_Unit.unit)(v);
- };
- };
- }, function (f) {
- return function (z) {
- return function (v) {
- return f(Data_Unit.unit)(z)(v);
- };
- };
- }, function (f) {
- return function (z) {
- return function (v) {
- return f(Data_Unit.unit)(v)(z);
- };
- };
- });
- var traversableIdentity = new Data_Traversable.Traversable(function () {
- return foldableIdentity;
- }, function () {
- return functorIdentity;
- }, function (dictApplicative) {
- return function (v) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Identity)(v);
- };
- }, function (dictApplicative) {
- return function (f) {
- return function (v) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Identity)(f(v));
- };
- };
- });
- var traversableWithIndexIdentity = new Data_TraversableWithIndex.TraversableWithIndex(function () {
- return foldableWithIndexIdentity;
- }, function () {
- return functorWithIndexIdentity;
- }, function () {
- return traversableIdentity;
- }, function (dictApplicative) {
- return function (f) {
- return function (v) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Identity)(f(Data_Unit.unit)(v));
- };
- };
- });
- var foldable1Identity = new Data_Semigroup_Foldable.Foldable1(function () {
- return foldableIdentity;
- }, function (dictSemigroup) {
- return function (v) {
- return v;
- };
- }, function (dictSemigroup) {
- return function (f) {
- return function (v) {
- return f(v);
- };
- };
- });
- var traversable1Identity = new Data_Semigroup_Traversable.Traversable1(function () {
- return foldable1Identity;
- }, function () {
- return traversableIdentity;
- }, function (dictApply) {
- return function (v) {
- return Data_Functor.map(dictApply.Functor0())(Identity)(v);
- };
- }, function (dictApply) {
- return function (f) {
- return function (v) {
- return Data_Functor.map(dictApply.Functor0())(Identity)(f(v));
- };
- };
- });
- var extendIdentity = new Control_Extend.Extend(function () {
- return functorIdentity;
- }, function (f) {
- return function (m) {
- return f(m);
- };
- });
- var euclideanRingIdentity = function euclideanRingIdentity(dictEuclideanRing) {
- return dictEuclideanRing;
- };
- var eqIdentity = function eqIdentity(dictEq) {
- return dictEq;
- };
- var eq1Identity = new Data_Eq.Eq1(function (dictEq) {
- return Data_Eq.eq(eqIdentity(dictEq));
- });
- var ord1Identity = new Data_Ord.Ord1(function () {
- return eq1Identity;
- }, function (dictOrd) {
- return Data_Ord.compare(ordIdentity(dictOrd));
- });
- var comonadIdentity = new Control_Comonad.Comonad(function () {
- return extendIdentity;
- }, function (v) {
- return v;
- });
- var commutativeRingIdentity = function commutativeRingIdentity(dictCommutativeRing) {
- return dictCommutativeRing;
- };
- var boundedIdentity = function boundedIdentity(dictBounded) {
- return dictBounded;
- };
- var booleanAlgebraIdentity = function booleanAlgebraIdentity(dictBooleanAlgebra) {
- return dictBooleanAlgebra;
- };
- var applyIdentity = new Control_Apply.Apply(function () {
- return functorIdentity;
- }, function (v) {
- return function (v1) {
- return v(v1);
- };
- });
- var bindIdentity = new Control_Bind.Bind(function () {
- return applyIdentity;
- }, function (v) {
- return function (f) {
- return f(v);
- };
- });
- var applicativeIdentity = new Control_Applicative.Applicative(function () {
- return applyIdentity;
- }, Identity);
- var monadIdentity = new Control_Monad.Monad(function () {
- return applicativeIdentity;
- }, function () {
- return bindIdentity;
- });
- var altIdentity = new Control_Alt.Alt(function () {
- return functorIdentity;
- }, function (x) {
- return function (v) {
- return x;
- };
- });
- module.exports = {
- Identity: Identity,
- newtypeIdentity: newtypeIdentity,
- eqIdentity: eqIdentity,
- ordIdentity: ordIdentity,
- boundedIdentity: boundedIdentity,
- heytingAlgebraIdentity: heytingAlgebraIdentity,
- booleanAlgebraIdentity: booleanAlgebraIdentity,
- semigroupIdenity: semigroupIdenity,
- monoidIdentity: monoidIdentity,
- semiringIdentity: semiringIdentity,
- euclideanRingIdentity: euclideanRingIdentity,
- ringIdentity: ringIdentity,
- commutativeRingIdentity: commutativeRingIdentity,
- lazyIdentity: lazyIdentity,
- showIdentity: showIdentity,
- eq1Identity: eq1Identity,
- ord1Identity: ord1Identity,
- functorIdentity: functorIdentity,
- functorWithIndexIdentity: functorWithIndexIdentity,
- invariantIdentity: invariantIdentity,
- altIdentity: altIdentity,
- applyIdentity: applyIdentity,
- applicativeIdentity: applicativeIdentity,
- bindIdentity: bindIdentity,
- monadIdentity: monadIdentity,
- extendIdentity: extendIdentity,
- comonadIdentity: comonadIdentity,
- foldableIdentity: foldableIdentity,
- foldable1Identity: foldable1Identity,
- foldableWithIndexIdentity: foldableWithIndexIdentity,
- traversableIdentity: traversableIdentity,
- traversable1Identity: traversable1Identity,
- traversableWithIndexIdentity: traversableWithIndexIdentity
- };
- },{"../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Comonad/index.js":"../output/Control.Comonad/index.js","../Control.Extend/index.js":"../output/Control.Extend/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.FoldableWithIndex/index.js":"../output/Data.FoldableWithIndex/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Functor.Invariant/index.js":"../output/Data.Functor.Invariant/index.js","../Data.FunctorWithIndex/index.js":"../output/Data.FunctorWithIndex/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Semigroup.Foldable/index.js":"../output/Data.Semigroup.Foldable/index.js","../Data.Semigroup.Traversable/index.js":"../output/Data.Semigroup.Traversable/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Data.TraversableWithIndex/index.js":"../output/Data.TraversableWithIndex/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Effect.Ref/foreign.js":[function(require,module,exports) {
- "use strict";
- exports.new = function (val) {
- return function () {
- return {
- value: val
- };
- };
- };
- exports.read = function (ref) {
- return function () {
- return ref.value;
- };
- };
- exports["modify'"] = function (f) {
- return function (ref) {
- return function () {
- var t = f(ref.value);
- ref.value = t.state;
- return t.value;
- };
- };
- };
- exports.write = function (val) {
- return function (ref) {
- return function () {
- ref.value = val;
- return {};
- };
- };
- };
- },{}],"../output/Effect.Ref/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Effect = require("../Effect/index.js");
- var modify = function modify(f) {
- return $foreign["modify'"](function (s) {
- var s$prime = f(s);
- return {
- state: s$prime,
- value: s$prime
- };
- });
- };
- var modify_ = function modify_(f) {
- return function (s) {
- return Data_Functor["void"](Effect.functorEffect)(modify(f)(s));
- };
- };
- module.exports = {
- modify: modify,
- modify_: modify_,
- "new": $foreign["new"],
- read: $foreign.read,
- "modify'": $foreign["modify'"],
- write: $foreign.write
- };
- },{"./foreign.js":"../output/Effect.Ref/foreign.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Effect/index.js":"../output/Effect/index.js"}],"../output/Control.Monad.Rec.Class/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Monad = require("../Control.Monad/index.js");
- var Data_Bifunctor = require("../Data.Bifunctor/index.js");
- var Data_Either = require("../Data.Either/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Identity = require("../Data.Identity/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Unit = require("../Data.Unit/index.js");
- var Effect = require("../Effect/index.js");
- var Effect_Ref = require("../Effect.Ref/index.js");
- var Loop = function () {
- function Loop(value0) {
- this.value0 = value0;
- }
- ;
- Loop.create = function (value0) {
- return new Loop(value0);
- };
- return Loop;
- }();
- var Done = function () {
- function Done(value0) {
- this.value0 = value0;
- }
- ;
- Done.create = function (value0) {
- return new Done(value0);
- };
- return Done;
- }();
- var MonadRec = function MonadRec(Monad0, tailRecM) {
- this.Monad0 = Monad0;
- this.tailRecM = tailRecM;
- };
- var tailRecM = function tailRecM(dict) {
- return dict.tailRecM;
- };
- var tailRecM2 = function tailRecM2(dictMonadRec) {
- return function (f) {
- return function (a) {
- return function (b) {
- return tailRecM(dictMonadRec)(function (o) {
- return f(o.a)(o.b);
- })({
- a: a,
- b: b
- });
- };
- };
- };
- };
- var tailRecM3 = function tailRecM3(dictMonadRec) {
- return function (f) {
- return function (a) {
- return function (b) {
- return function (c) {
- return tailRecM(dictMonadRec)(function (o) {
- return f(o.a)(o.b)(o.c);
- })({
- a: a,
- b: b,
- c: c
- });
- };
- };
- };
- };
- };
- var untilJust = function untilJust(dictMonadRec) {
- return function (m) {
- return tailRecM(dictMonadRec)(function (v) {
- return Data_Functor.mapFlipped(dictMonadRec.Monad0().Bind1().Apply0().Functor0())(m)(function (v1) {
- if (v1 instanceof Data_Maybe.Nothing) {
- return new Loop(Data_Unit.unit);
- }
- ;
- if (v1 instanceof Data_Maybe.Just) {
- return new Done(v1.value0);
- }
- ;
- throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 155, column 43 - line 157, column 19): " + [v1.constructor.name]);
- });
- })(Data_Unit.unit);
- };
- };
- var whileJust = function whileJust(dictMonoid) {
- return function (dictMonadRec) {
- return function (m) {
- return tailRecM(dictMonadRec)(function (v) {
- return Data_Functor.mapFlipped(dictMonadRec.Monad0().Bind1().Apply0().Functor0())(m)(function (v1) {
- if (v1 instanceof Data_Maybe.Nothing) {
- return new Done(v);
- }
- ;
- if (v1 instanceof Data_Maybe.Just) {
- return Loop.create(Data_Semigroup.append(dictMonoid.Semigroup0())(v)(v1.value0));
- }
- ;
- throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 148, column 45 - line 150, column 26): " + [v1.constructor.name]);
- });
- })(Data_Monoid.mempty(dictMonoid));
- };
- };
- };
- var tailRec = function tailRec(f) {
- var go = function go($copy_v) {
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(v) {
- if (v instanceof Loop) {
- $copy_v = f(v.value0);
- return;
- }
- ;
- if (v instanceof Done) {
- $tco_done = true;
- return v.value0;
- }
- ;
- throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 93, column 3 - line 93, column 25): " + [v.constructor.name]);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($copy_v);
- }
- ;
- return $tco_result;
- };
- return function ($58) {
- return go(f($58));
- };
- };
- var monadRecMaybe = new MonadRec(function () {
- return Data_Maybe.monadMaybe;
- }, function (f) {
- return function (a0) {
- var g = function g(v) {
- if (v instanceof Data_Maybe.Nothing) {
- return new Done(Data_Maybe.Nothing.value);
- }
- ;
- if (v instanceof Data_Maybe.Just && v.value0 instanceof Loop) {
- return new Loop(f(v.value0.value0));
- }
- ;
- if (v instanceof Data_Maybe.Just && v.value0 instanceof Done) {
- return new Done(new Data_Maybe.Just(v.value0.value0));
- }
- ;
- throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 129, column 7 - line 129, column 31): " + [v.constructor.name]);
- };
- return tailRec(g)(f(a0));
- };
- });
- var monadRecIdentity = new MonadRec(function () {
- return Data_Identity.monadIdentity;
- }, function (f) {
- var runIdentity = function runIdentity(v) {
- return v;
- };
- var $59 = tailRec(function ($61) {
- return runIdentity(f($61));
- });
- return function ($60) {
- return Data_Identity.Identity($59($60));
- };
- });
- var monadRecFunction = new MonadRec(function () {
- return Control_Monad.monadFn;
- }, function (f) {
- return function (a0) {
- return function (e) {
- return tailRec(function (a) {
- return f(a)(e);
- })(a0);
- };
- };
- });
- var monadRecEither = new MonadRec(function () {
- return Data_Either.monadEither;
- }, function (f) {
- return function (a0) {
- var g = function g(v) {
- if (v instanceof Data_Either.Left) {
- return new Done(new Data_Either.Left(v.value0));
- }
- ;
- if (v instanceof Data_Either.Right && v.value0 instanceof Loop) {
- return new Loop(f(v.value0.value0));
- }
- ;
- if (v instanceof Data_Either.Right && v.value0 instanceof Done) {
- return new Done(new Data_Either.Right(v.value0.value0));
- }
- ;
- throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 121, column 7 - line 121, column 33): " + [v.constructor.name]);
- };
- return tailRec(g)(f(a0));
- };
- });
- var monadRecEffect = new MonadRec(function () {
- return Effect.monadEffect;
- }, function (f) {
- return function (a) {
- var fromDone = function fromDone(v) {
- if (v instanceof Done) {
- return v.value0;
- }
- ;
- throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 113, column 30 - line 113, column 44): " + [v.constructor.name]);
- };
- return function __do() {
- var r = Control_Bind.bindFlipped(Effect.bindEffect)(Effect_Ref["new"])(f(a))();
- (function () {
- while (!function __do() {
- var v = Effect_Ref.read(r)();
- if (v instanceof Loop) {
- var e = f(v.value0)();
- Effect_Ref.write(e)(r)();
- return false;
- }
- ;
- if (v instanceof Done) {
- return true;
- }
- ;
- throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 104, column 22 - line 109, column 28): " + [v.constructor.name]);
- }()) {}
- ;
- return {};
- })();
- return Data_Functor.map(Effect.functorEffect)(fromDone)(Effect_Ref.read(r))();
- };
- };
- });
- var functorStep = new Data_Functor.Functor(function (f) {
- return function (m) {
- if (m instanceof Loop) {
- return new Loop(m.value0);
- }
- ;
- if (m instanceof Done) {
- return new Done(f(m.value0));
- }
- ;
- throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 27, column 1 - line 27, column 48): " + [m.constructor.name]);
- };
- });
- var forever = function forever(dictMonadRec) {
- return function (ma) {
- return tailRecM(dictMonadRec)(function (u) {
- return Data_Functor.voidRight(dictMonadRec.Monad0().Bind1().Apply0().Functor0())(new Loop(u))(ma);
- })(Data_Unit.unit);
- };
- };
- var bifunctorStep = new Data_Bifunctor.Bifunctor(function (v) {
- return function (v1) {
- return function (v2) {
- if (v2 instanceof Loop) {
- return new Loop(v(v2.value0));
- }
- ;
- if (v2 instanceof Done) {
- return new Done(v1(v2.value0));
- }
- ;
- throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 29, column 1 - line 31, column 34): " + [v.constructor.name, v1.constructor.name, v2.constructor.name]);
- };
- };
- });
- module.exports = {
- Loop: Loop,
- Done: Done,
- MonadRec: MonadRec,
- tailRec: tailRec,
- tailRecM: tailRecM,
- tailRecM2: tailRecM2,
- tailRecM3: tailRecM3,
- forever: forever,
- whileJust: whileJust,
- untilJust: untilJust,
- functorStep: functorStep,
- bifunctorStep: bifunctorStep,
- monadRecIdentity: monadRecIdentity,
- monadRecEffect: monadRecEffect,
- monadRecFunction: monadRecFunction,
- monadRecEither: monadRecEither,
- monadRecMaybe: monadRecMaybe
- };
- },{"../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Data.Bifunctor/index.js":"../output/Data.Bifunctor/index.js","../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Identity/index.js":"../output/Data.Identity/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js","../Effect/index.js":"../output/Effect/index.js","../Effect.Ref/index.js":"../output/Effect.Ref/index.js"}],"../output/Control.Lazy/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Data_Unit = require("../Data.Unit/index.js");
- var Lazy = function Lazy(defer) {
- this.defer = defer;
- };
- var lazyUnit = new Lazy(function (v) {
- return Data_Unit.unit;
- });
- var lazyFn = new Lazy(function (f) {
- return function (x) {
- return f(Data_Unit.unit)(x);
- };
- });
- var defer = function defer(dict) {
- return dict.defer;
- };
- var fix = function fix(dictLazy) {
- return function (f) {
- var go = defer(dictLazy)(function (v) {
- return f(go);
- });
- return go;
- };
- };
- module.exports = {
- defer: defer,
- Lazy: Lazy,
- fix: fix,
- lazyFn: lazyFn,
- lazyUnit: lazyUnit
- };
- },{"../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Data.BooleanAlgebra/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
- var BooleanAlgebraRecord = function BooleanAlgebraRecord(HeytingAlgebraRecord0) {
- this.HeytingAlgebraRecord0 = HeytingAlgebraRecord0;
- };
- var BooleanAlgebra = function BooleanAlgebra(HeytingAlgebra0) {
- this.HeytingAlgebra0 = HeytingAlgebra0;
- };
- var booleanAlgebraUnit = new BooleanAlgebra(function () {
- return Data_HeytingAlgebra.heytingAlgebraUnit;
- });
- var booleanAlgebraRecordNil = new BooleanAlgebraRecord(function () {
- return Data_HeytingAlgebra.heytingAlgebraRecordNil;
- });
- var booleanAlgebraRecordCons = function booleanAlgebraRecordCons(dictIsSymbol) {
- return function (dictCons) {
- return function (dictBooleanAlgebraRecord) {
- return function (dictBooleanAlgebra) {
- return new BooleanAlgebraRecord(function () {
- return Data_HeytingAlgebra.heytingAlgebraRecordCons(dictIsSymbol)()(dictBooleanAlgebraRecord.HeytingAlgebraRecord0())(dictBooleanAlgebra.HeytingAlgebra0());
- });
- };
- };
- };
- };
- var booleanAlgebraRecord = function booleanAlgebraRecord(dictRowToList) {
- return function (dictBooleanAlgebraRecord) {
- return new BooleanAlgebra(function () {
- return Data_HeytingAlgebra.heytingAlgebraRecord()(dictBooleanAlgebraRecord.HeytingAlgebraRecord0());
- });
- };
- };
- var booleanAlgebraFn = function booleanAlgebraFn(dictBooleanAlgebra) {
- return new BooleanAlgebra(function () {
- return Data_HeytingAlgebra.heytingAlgebraFunction(dictBooleanAlgebra.HeytingAlgebra0());
- });
- };
- var booleanAlgebraBoolean = new BooleanAlgebra(function () {
- return Data_HeytingAlgebra.heytingAlgebraBoolean;
- });
- module.exports = {
- BooleanAlgebra: BooleanAlgebra,
- BooleanAlgebraRecord: BooleanAlgebraRecord,
- booleanAlgebraBoolean: booleanAlgebraBoolean,
- booleanAlgebraUnit: booleanAlgebraUnit,
- booleanAlgebraFn: booleanAlgebraFn,
- booleanAlgebraRecord: booleanAlgebraRecord,
- booleanAlgebraRecordNil: booleanAlgebraRecordNil,
- booleanAlgebraRecordCons: booleanAlgebraRecordCons
- };
- },{"../Data.HeytingAlgebra/index.js":"../output/Data.HeytingAlgebra/index.js"}],"../output/Data.Distributive/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Category = require("../Control.Category/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Identity = require("../Data.Identity/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Distributive = function Distributive(Functor0, collect, distribute) {
- this.Functor0 = Functor0;
- this.collect = collect;
- this.distribute = distribute;
- };
- var distributiveIdentity = new Distributive(function () {
- return Data_Identity.functorIdentity;
- }, function (dictFunctor) {
- return function (f) {
- var $11 = Data_Functor.map(dictFunctor)(function () {
- var $13 = Data_Newtype.unwrap(Data_Identity.newtypeIdentity);
- return function ($14) {
- return $13(f($14));
- };
- }());
- return function ($12) {
- return Data_Identity.Identity($11($12));
- };
- };
- }, function (dictFunctor) {
- var $15 = Data_Functor.map(dictFunctor)(Data_Newtype.unwrap(Data_Identity.newtypeIdentity));
- return function ($16) {
- return Data_Identity.Identity($15($16));
- };
- });
- var distribute = function distribute(dict) {
- return dict.distribute;
- };
- var distributiveFunction = new Distributive(function () {
- return Data_Functor.functorFn;
- }, function (dictFunctor) {
- return function (f) {
- var $17 = distribute(distributiveFunction)(dictFunctor);
- var $18 = Data_Functor.map(dictFunctor)(f);
- return function ($19) {
- return $17($18($19));
- };
- };
- }, function (dictFunctor) {
- return function (a) {
- return function (e) {
- return Data_Functor.map(dictFunctor)(function (v) {
- return v(e);
- })(a);
- };
- };
- });
- var cotraverse = function cotraverse(dictDistributive) {
- return function (dictFunctor) {
- return function (f) {
- var $20 = Data_Functor.map(dictDistributive.Functor0())(f);
- var $21 = distribute(dictDistributive)(dictFunctor);
- return function ($22) {
- return $20($21($22));
- };
- };
- };
- };
- var collectDefault = function collectDefault(dictDistributive) {
- return function (dictFunctor) {
- return function (f) {
- var $23 = distribute(dictDistributive)(dictFunctor);
- var $24 = Data_Functor.map(dictFunctor)(f);
- return function ($25) {
- return $23($24($25));
- };
- };
- };
- };
- var collect = function collect(dict) {
- return dict.collect;
- };
- var distributeDefault = function distributeDefault(dictDistributive) {
- return function (dictFunctor) {
- return collect(dictDistributive)(dictFunctor)(Control_Category.identity(Control_Category.categoryFn));
- };
- };
- module.exports = {
- collect: collect,
- distribute: distribute,
- Distributive: Distributive,
- distributeDefault: distributeDefault,
- collectDefault: collectDefault,
- cotraverse: cotraverse,
- distributiveIdentity: distributiveIdentity,
- distributiveFunction: distributiveFunction
- };
- },{"../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Identity/index.js":"../output/Data.Identity/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js"}],"../output/Type.Equality/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var TypeEquals = function TypeEquals(from, to) {
- this.from = from;
- this.to = to;
- };
- var to = function to(dict) {
- return dict.to;
- };
- var refl = new TypeEquals(function (a) {
- return a;
- }, function (a) {
- return a;
- });
- var from = function from(dict) {
- return dict.from;
- };
- module.exports = {
- TypeEquals: TypeEquals,
- to: to,
- from: from,
- refl: refl
- };
- },{}],"../output/Data.Tuple/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Biapplicative = require("../Control.Biapplicative/index.js");
- var Control_Biapply = require("../Control.Biapply/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Comonad = require("../Control.Comonad/index.js");
- var Control_Extend = require("../Control.Extend/index.js");
- var Control_Lazy = require("../Control.Lazy/index.js");
- var Control_Monad = require("../Control.Monad/index.js");
- var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
- var Data_Bifoldable = require("../Data.Bifoldable/index.js");
- var Data_Bifunctor = require("../Data.Bifunctor/index.js");
- var Data_Bitraversable = require("../Data.Bitraversable/index.js");
- var Data_BooleanAlgebra = require("../Data.BooleanAlgebra/index.js");
- var Data_Bounded = require("../Data.Bounded/index.js");
- var Data_CommutativeRing = require("../Data.CommutativeRing/index.js");
- var Data_Distributive = require("../Data.Distributive/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Foldable = require("../Data.Foldable/index.js");
- var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Functor_Invariant = require("../Data.Functor.Invariant/index.js");
- var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
- var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Maybe_First = require("../Data.Maybe.First/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Ordering = require("../Data.Ordering/index.js");
- var Data_Ring = require("../Data.Ring/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Semigroup_Foldable = require("../Data.Semigroup.Foldable/index.js");
- var Data_Semigroup_Traversable = require("../Data.Semigroup.Traversable/index.js");
- var Data_Semiring = require("../Data.Semiring/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Data_Traversable = require("../Data.Traversable/index.js");
- var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js");
- var Data_Unit = require("../Data.Unit/index.js");
- var Type_Equality = require("../Type.Equality/index.js");
- var Tuple = function () {
- function Tuple(value0, value1) {
- this.value0 = value0;
- this.value1 = value1;
- }
- ;
- Tuple.create = function (value0) {
- return function (value1) {
- return new Tuple(value0, value1);
- };
- };
- return Tuple;
- }();
- var uncurry = function uncurry(f) {
- return function (v) {
- return f(v.value0)(v.value1);
- };
- };
- var swap = function swap(v) {
- return new Tuple(v.value1, v.value0);
- };
- var snd = function snd(v) {
- return v.value1;
- };
- var showTuple = function showTuple(dictShow) {
- return function (dictShow1) {
- return new Data_Show.Show(function (v) {
- return "(Tuple " + (Data_Show.show(dictShow)(v.value0) + (" " + (Data_Show.show(dictShow1)(v.value1) + ")")));
- });
- };
- };
- var semiringTuple = function semiringTuple(dictSemiring) {
- return function (dictSemiring1) {
- return new Data_Semiring.Semiring(function (v) {
- return function (v1) {
- return new Tuple(Data_Semiring.add(dictSemiring)(v.value0)(v1.value0), Data_Semiring.add(dictSemiring1)(v.value1)(v1.value1));
- };
- }, function (v) {
- return function (v1) {
- return new Tuple(Data_Semiring.mul(dictSemiring)(v.value0)(v1.value0), Data_Semiring.mul(dictSemiring1)(v.value1)(v1.value1));
- };
- }, new Tuple(Data_Semiring.one(dictSemiring), Data_Semiring.one(dictSemiring1)), new Tuple(Data_Semiring.zero(dictSemiring), Data_Semiring.zero(dictSemiring1)));
- };
- };
- var semigroupoidTuple = new Control_Semigroupoid.Semigroupoid(function (v) {
- return function (v1) {
- return new Tuple(v1.value0, v.value1);
- };
- });
- var semigroupTuple = function semigroupTuple(dictSemigroup) {
- return function (dictSemigroup1) {
- return new Data_Semigroup.Semigroup(function (v) {
- return function (v1) {
- return new Tuple(Data_Semigroup.append(dictSemigroup)(v.value0)(v1.value0), Data_Semigroup.append(dictSemigroup1)(v.value1)(v1.value1));
- };
- });
- };
- };
- var ringTuple = function ringTuple(dictRing) {
- return function (dictRing1) {
- return new Data_Ring.Ring(function () {
- return semiringTuple(dictRing.Semiring0())(dictRing1.Semiring0());
- }, function (v) {
- return function (v1) {
- return new Tuple(Data_Ring.sub(dictRing)(v.value0)(v1.value0), Data_Ring.sub(dictRing1)(v.value1)(v1.value1));
- };
- });
- };
- };
- var monoidTuple = function monoidTuple(dictMonoid) {
- return function (dictMonoid1) {
- return new Data_Monoid.Monoid(function () {
- return semigroupTuple(dictMonoid.Semigroup0())(dictMonoid1.Semigroup0());
- }, new Tuple(Data_Monoid.mempty(dictMonoid), Data_Monoid.mempty(dictMonoid1)));
- };
- };
- var lookup = function lookup(dictFoldable) {
- return function (dictEq) {
- return function (a) {
- var $312 = Data_Newtype.unwrap(Data_Maybe_First.newtypeFirst);
- var $313 = Data_Foldable.foldMap(dictFoldable)(Data_Maybe_First.monoidFirst)(function (v) {
- var $163 = Data_Eq.eq(dictEq)(a)(v.value0);
- if ($163) {
- return new Data_Maybe.Just(v.value1);
- }
- ;
- return Data_Maybe.Nothing.value;
- });
- return function ($314) {
- return $312($313($314));
- };
- };
- };
- };
- var heytingAlgebraTuple = function heytingAlgebraTuple(dictHeytingAlgebra) {
- return function (dictHeytingAlgebra1) {
- return new Data_HeytingAlgebra.HeytingAlgebra(function (v) {
- return function (v1) {
- return new Tuple(Data_HeytingAlgebra.conj(dictHeytingAlgebra)(v.value0)(v1.value0), Data_HeytingAlgebra.conj(dictHeytingAlgebra1)(v.value1)(v1.value1));
- };
- }, function (v) {
- return function (v1) {
- return new Tuple(Data_HeytingAlgebra.disj(dictHeytingAlgebra)(v.value0)(v1.value0), Data_HeytingAlgebra.disj(dictHeytingAlgebra1)(v.value1)(v1.value1));
- };
- }, new Tuple(Data_HeytingAlgebra.ff(dictHeytingAlgebra), Data_HeytingAlgebra.ff(dictHeytingAlgebra1)), function (v) {
- return function (v1) {
- return new Tuple(Data_HeytingAlgebra.implies(dictHeytingAlgebra)(v.value0)(v1.value0), Data_HeytingAlgebra.implies(dictHeytingAlgebra1)(v.value1)(v1.value1));
- };
- }, function (v) {
- return new Tuple(Data_HeytingAlgebra.not(dictHeytingAlgebra)(v.value0), Data_HeytingAlgebra.not(dictHeytingAlgebra1)(v.value1));
- }, new Tuple(Data_HeytingAlgebra.tt(dictHeytingAlgebra), Data_HeytingAlgebra.tt(dictHeytingAlgebra1)));
- };
- };
- var functorTuple = new Data_Functor.Functor(function (f) {
- return function (m) {
- return new Tuple(m.value0, f(m.value1));
- };
- });
- var functorWithIndexTuple = new Data_FunctorWithIndex.FunctorWithIndex(function () {
- return functorTuple;
- }, function (f) {
- return Data_Functor.map(functorTuple)(f(Data_Unit.unit));
- });
- var invariantTuple = new Data_Functor_Invariant.Invariant(Data_Functor_Invariant.imapF(functorTuple));
- var fst = function fst(v) {
- return v.value0;
- };
- var lazyTuple = function lazyTuple(dictLazy) {
- return function (dictLazy1) {
- return new Control_Lazy.Lazy(function (f) {
- return new Tuple(Control_Lazy.defer(dictLazy)(function (v) {
- return fst(f(Data_Unit.unit));
- }), Control_Lazy.defer(dictLazy1)(function (v) {
- return snd(f(Data_Unit.unit));
- }));
- });
- };
- };
- var foldableTuple = new Data_Foldable.Foldable(function (dictMonoid) {
- return function (f) {
- return function (v) {
- return f(v.value1);
- };
- };
- }, function (f) {
- return function (z) {
- return function (v) {
- return f(z)(v.value1);
- };
- };
- }, function (f) {
- return function (z) {
- return function (v) {
- return f(v.value1)(z);
- };
- };
- });
- var foldableWithIndexTuple = new Data_FoldableWithIndex.FoldableWithIndex(function () {
- return foldableTuple;
- }, function (dictMonoid) {
- return function (f) {
- return function (v) {
- return f(Data_Unit.unit)(v.value1);
- };
- };
- }, function (f) {
- return function (z) {
- return function (v) {
- return f(Data_Unit.unit)(z)(v.value1);
- };
- };
- }, function (f) {
- return function (z) {
- return function (v) {
- return f(Data_Unit.unit)(v.value1)(z);
- };
- };
- });
- var traversableTuple = new Data_Traversable.Traversable(function () {
- return foldableTuple;
- }, function () {
- return functorTuple;
- }, function (dictApplicative) {
- return function (v) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Tuple.create(v.value0))(v.value1);
- };
- }, function (dictApplicative) {
- return function (f) {
- return function (v) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Tuple.create(v.value0))(f(v.value1));
- };
- };
- });
- var traversableWithIndexTuple = new Data_TraversableWithIndex.TraversableWithIndex(function () {
- return foldableWithIndexTuple;
- }, function () {
- return functorWithIndexTuple;
- }, function () {
- return traversableTuple;
- }, function (dictApplicative) {
- return function (f) {
- return function (v) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Tuple.create(v.value0))(f(Data_Unit.unit)(v.value1));
- };
- };
- });
- var foldable1Tuple = new Data_Semigroup_Foldable.Foldable1(function () {
- return foldableTuple;
- }, function (dictSemigroup) {
- return function (v) {
- return v.value1;
- };
- }, function (dictSemigroup) {
- return function (f) {
- return function (v) {
- return f(v.value1);
- };
- };
- });
- var traversable1Tuple = new Data_Semigroup_Traversable.Traversable1(function () {
- return foldable1Tuple;
- }, function () {
- return traversableTuple;
- }, function (dictApply) {
- return function (v) {
- return Data_Functor.map(dictApply.Functor0())(Tuple.create(v.value0))(v.value1);
- };
- }, function (dictApply) {
- return function (f) {
- return function (v) {
- return Data_Functor.map(dictApply.Functor0())(Tuple.create(v.value0))(f(v.value1));
- };
- };
- });
- var extendTuple = new Control_Extend.Extend(function () {
- return functorTuple;
- }, function (f) {
- return function (v) {
- return new Tuple(v.value0, f(v));
- };
- });
- var eqTuple = function eqTuple(dictEq) {
- return function (dictEq1) {
- return new Data_Eq.Eq(function (x) {
- return function (y) {
- return Data_Eq.eq(dictEq)(x.value0)(y.value0) && Data_Eq.eq(dictEq1)(x.value1)(y.value1);
- };
- });
- };
- };
- var ordTuple = function ordTuple(dictOrd) {
- return function (dictOrd1) {
- return new Data_Ord.Ord(function () {
- return eqTuple(dictOrd.Eq0())(dictOrd1.Eq0());
- }, function (x) {
- return function (y) {
- var v = Data_Ord.compare(dictOrd)(x.value0)(y.value0);
- if (v instanceof Data_Ordering.LT) {
- return Data_Ordering.LT.value;
- }
- ;
- if (v instanceof Data_Ordering.GT) {
- return Data_Ordering.GT.value;
- }
- ;
- return Data_Ord.compare(dictOrd1)(x.value1)(y.value1);
- };
- });
- };
- };
- var eq1Tuple = function eq1Tuple(dictEq) {
- return new Data_Eq.Eq1(function (dictEq1) {
- return Data_Eq.eq(eqTuple(dictEq)(dictEq1));
- });
- };
- var ord1Tuple = function ord1Tuple(dictOrd) {
- return new Data_Ord.Ord1(function () {
- return eq1Tuple(dictOrd.Eq0());
- }, function (dictOrd1) {
- return Data_Ord.compare(ordTuple(dictOrd)(dictOrd1));
- });
- };
- var distributiveTuple = function distributiveTuple(dictTypeEquals) {
- return new Data_Distributive.Distributive(function () {
- return functorTuple;
- }, function (dictFunctor) {
- return Data_Distributive.collectDefault(distributiveTuple(dictTypeEquals))(dictFunctor);
- }, function (dictFunctor) {
- var $315 = Tuple.create(Type_Equality.from(dictTypeEquals)(Data_Unit.unit));
- var $316 = Data_Functor.map(dictFunctor)(snd);
- return function ($317) {
- return $315($316($317));
- };
- });
- };
- var curry = function curry(f) {
- return function (a) {
- return function (b) {
- return f(new Tuple(a, b));
- };
- };
- };
- var comonadTuple = new Control_Comonad.Comonad(function () {
- return extendTuple;
- }, snd);
- var commutativeRingTuple = function commutativeRingTuple(dictCommutativeRing) {
- return function (dictCommutativeRing1) {
- return new Data_CommutativeRing.CommutativeRing(function () {
- return ringTuple(dictCommutativeRing.Ring0())(dictCommutativeRing1.Ring0());
- });
- };
- };
- var boundedTuple = function boundedTuple(dictBounded) {
- return function (dictBounded1) {
- return new Data_Bounded.Bounded(function () {
- return ordTuple(dictBounded.Ord0())(dictBounded1.Ord0());
- }, new Tuple(Data_Bounded.bottom(dictBounded), Data_Bounded.bottom(dictBounded1)), new Tuple(Data_Bounded.top(dictBounded), Data_Bounded.top(dictBounded1)));
- };
- };
- var booleanAlgebraTuple = function booleanAlgebraTuple(dictBooleanAlgebra) {
- return function (dictBooleanAlgebra1) {
- return new Data_BooleanAlgebra.BooleanAlgebra(function () {
- return heytingAlgebraTuple(dictBooleanAlgebra.HeytingAlgebra0())(dictBooleanAlgebra1.HeytingAlgebra0());
- });
- };
- };
- var bifunctorTuple = new Data_Bifunctor.Bifunctor(function (f) {
- return function (g) {
- return function (v) {
- return new Tuple(f(v.value0), g(v.value1));
- };
- };
- });
- var bifoldableTuple = new Data_Bifoldable.Bifoldable(function (dictMonoid) {
- return function (f) {
- return function (g) {
- return function (v) {
- return Data_Semigroup.append(dictMonoid.Semigroup0())(f(v.value0))(g(v.value1));
- };
- };
- };
- }, function (f) {
- return function (g) {
- return function (z) {
- return function (v) {
- return g(f(z)(v.value0))(v.value1);
- };
- };
- };
- }, function (f) {
- return function (g) {
- return function (z) {
- return function (v) {
- return f(v.value0)(g(v.value1)(z));
- };
- };
- };
- });
- var bitraversableTuple = new Data_Bitraversable.Bitraversable(function () {
- return bifoldableTuple;
- }, function () {
- return bifunctorTuple;
- }, function (dictApplicative) {
- return function (v) {
- return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(Tuple.create)(v.value0))(v.value1);
- };
- }, function (dictApplicative) {
- return function (f) {
- return function (g) {
- return function (v) {
- return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(Tuple.create)(f(v.value0)))(g(v.value1));
- };
- };
- };
- });
- var biapplyTuple = new Control_Biapply.Biapply(function () {
- return bifunctorTuple;
- }, function (v) {
- return function (v1) {
- return new Tuple(v.value0(v1.value0), v.value1(v1.value1));
- };
- });
- var biapplicativeTuple = new Control_Biapplicative.Biapplicative(function () {
- return biapplyTuple;
- }, Tuple.create);
- var applyTuple = function applyTuple(dictSemigroup) {
- return new Control_Apply.Apply(function () {
- return functorTuple;
- }, function (v) {
- return function (v1) {
- return new Tuple(Data_Semigroup.append(dictSemigroup)(v.value0)(v1.value0), v.value1(v1.value1));
- };
- });
- };
- var bindTuple = function bindTuple(dictSemigroup) {
- return new Control_Bind.Bind(function () {
- return applyTuple(dictSemigroup);
- }, function (v) {
- return function (f) {
- var v1 = f(v.value1);
- return new Tuple(Data_Semigroup.append(dictSemigroup)(v.value0)(v1.value0), v1.value1);
- };
- });
- };
- var applicativeTuple = function applicativeTuple(dictMonoid) {
- return new Control_Applicative.Applicative(function () {
- return applyTuple(dictMonoid.Semigroup0());
- }, Tuple.create(Data_Monoid.mempty(dictMonoid)));
- };
- var monadTuple = function monadTuple(dictMonoid) {
- return new Control_Monad.Monad(function () {
- return applicativeTuple(dictMonoid);
- }, function () {
- return bindTuple(dictMonoid.Semigroup0());
- });
- };
- module.exports = {
- Tuple: Tuple,
- fst: fst,
- snd: snd,
- curry: curry,
- uncurry: uncurry,
- swap: swap,
- lookup: lookup,
- showTuple: showTuple,
- eqTuple: eqTuple,
- eq1Tuple: eq1Tuple,
- ordTuple: ordTuple,
- ord1Tuple: ord1Tuple,
- boundedTuple: boundedTuple,
- semigroupoidTuple: semigroupoidTuple,
- semigroupTuple: semigroupTuple,
- monoidTuple: monoidTuple,
- semiringTuple: semiringTuple,
- ringTuple: ringTuple,
- commutativeRingTuple: commutativeRingTuple,
- heytingAlgebraTuple: heytingAlgebraTuple,
- booleanAlgebraTuple: booleanAlgebraTuple,
- functorTuple: functorTuple,
- functorWithIndexTuple: functorWithIndexTuple,
- invariantTuple: invariantTuple,
- bifunctorTuple: bifunctorTuple,
- applyTuple: applyTuple,
- biapplyTuple: biapplyTuple,
- applicativeTuple: applicativeTuple,
- biapplicativeTuple: biapplicativeTuple,
- bindTuple: bindTuple,
- monadTuple: monadTuple,
- extendTuple: extendTuple,
- comonadTuple: comonadTuple,
- lazyTuple: lazyTuple,
- foldableTuple: foldableTuple,
- foldable1Tuple: foldable1Tuple,
- foldableWithIndexTuple: foldableWithIndexTuple,
- bifoldableTuple: bifoldableTuple,
- traversableTuple: traversableTuple,
- traversable1Tuple: traversable1Tuple,
- traversableWithIndexTuple: traversableWithIndexTuple,
- bitraversableTuple: bitraversableTuple,
- distributiveTuple: distributiveTuple
- };
- },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Biapplicative/index.js":"../output/Control.Biapplicative/index.js","../Control.Biapply/index.js":"../output/Control.Biapply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Comonad/index.js":"../output/Control.Comonad/index.js","../Control.Extend/index.js":"../output/Control.Extend/index.js","../Control.Lazy/index.js":"../output/Control.Lazy/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Control.Semigroupoid/index.js":"../output/Control.Semigroupoid/index.js","../Data.Bifoldable/index.js":"../output/Data.Bifoldable/index.js","../Data.Bifunctor/index.js":"../output/Data.Bifunctor/index.js","../Data.Bitraversable/index.js":"../output/Data.Bitraversable/index.js","../Data.BooleanAlgebra/index.js":"../output/Data.BooleanAlgebra/index.js","../Data.Bounded/index.js":"../output/Data.Bounded/index.js","../Data.CommutativeRing/index.js":"../output/Data.CommutativeRing/index.js","../Data.Distributive/index.js":"../output/Data.Distributive/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.FoldableWithIndex/index.js":"../output/Data.FoldableWithIndex/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Functor.Invariant/index.js":"../output/Data.Functor.Invariant/index.js","../Data.FunctorWithIndex/index.js":"../output/Data.FunctorWithIndex/index.js","../Data.HeytingAlgebra/index.js":"../output/Data.HeytingAlgebra/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Maybe.First/index.js":"../output/Data.Maybe.First/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Ring/index.js":"../output/Data.Ring/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Semigroup.Foldable/index.js":"../output/Data.Semigroup.Foldable/index.js","../Data.Semigroup.Traversable/index.js":"../output/Data.Semigroup.Traversable/index.js","../Data.Semiring/index.js":"../output/Data.Semiring/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Data.TraversableWithIndex/index.js":"../output/Data.TraversableWithIndex/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js","../Type.Equality/index.js":"../output/Type.Equality/index.js"}],"../output/Control.Monad.State.Class/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Data_Tuple = require("../Data.Tuple/index.js");
- var Data_Unit = require("../Data.Unit/index.js");
- var MonadState = function MonadState(Monad0, state) {
- this.Monad0 = Monad0;
- this.state = state;
- };
- var state = function state(dict) {
- return dict.state;
- };
- var put = function put(dictMonadState) {
- return function (s) {
- return state(dictMonadState)(function (v) {
- return new Data_Tuple.Tuple(Data_Unit.unit, s);
- });
- };
- };
- var modify_ = function modify_(dictMonadState) {
- return function (f) {
- return state(dictMonadState)(function (s) {
- return new Data_Tuple.Tuple(Data_Unit.unit, f(s));
- });
- };
- };
- var modify = function modify(dictMonadState) {
- return function (f) {
- return state(dictMonadState)(function (s) {
- var s$prime = f(s);
- return new Data_Tuple.Tuple(s$prime, s$prime);
- });
- };
- };
- var gets = function gets(dictMonadState) {
- return function (f) {
- return state(dictMonadState)(function (s) {
- return new Data_Tuple.Tuple(f(s), s);
- });
- };
- };
- var get = function get(dictMonadState) {
- return state(dictMonadState)(function (s) {
- return new Data_Tuple.Tuple(s, s);
- });
- };
- module.exports = {
- state: state,
- MonadState: MonadState,
- get: get,
- gets: gets,
- put: put,
- modify: modify,
- modify_: modify_
- };
- },{"../Data.Tuple/index.js":"../output/Data.Tuple/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Control.Monad.Trans.Class/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var MonadTrans = function MonadTrans(lift) {
- this.lift = lift;
- };
- var lift = function lift(dict) {
- return dict.lift;
- };
- module.exports = {
- lift: lift,
- MonadTrans: MonadTrans
- };
- },{}],"../output/Control.Monad.Writer.Class/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Data_Tuple = require("../Data.Tuple/index.js");
- var MonadTell = function MonadTell(Monad0, tell) {
- this.Monad0 = Monad0;
- this.tell = tell;
- };
- var MonadWriter = function MonadWriter(MonadTell0, listen, pass) {
- this.MonadTell0 = MonadTell0;
- this.listen = listen;
- this.pass = pass;
- };
- var tell = function tell(dict) {
- return dict.tell;
- };
- var pass = function pass(dict) {
- return dict.pass;
- };
- var listen = function listen(dict) {
- return dict.listen;
- };
- var listens = function listens(dictMonadWriter) {
- return function (f) {
- return function (m) {
- return Control_Bind.bind(dictMonadWriter.MonadTell0().Monad0().Bind1())(listen(dictMonadWriter)(m))(function (v) {
- return Control_Applicative.pure(dictMonadWriter.MonadTell0().Monad0().Applicative0())(new Data_Tuple.Tuple(v.value0, f(v.value1)));
- });
- };
- };
- };
- var censor = function censor(dictMonadWriter) {
- return function (f) {
- return function (m) {
- return pass(dictMonadWriter)(Control_Bind.bind(dictMonadWriter.MonadTell0().Monad0().Bind1())(m)(function (a) {
- return Control_Applicative.pure(dictMonadWriter.MonadTell0().Monad0().Applicative0())(new Data_Tuple.Tuple(a, f));
- }));
- };
- };
- };
- module.exports = {
- listen: listen,
- pass: pass,
- tell: tell,
- MonadTell: MonadTell,
- MonadWriter: MonadWriter,
- listens: listens,
- censor: censor
- };
- },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js"}],"../output/Control.MonadPlus/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_MonadZero = require("../Control.MonadZero/index.js");
- var MonadPlus = function MonadPlus(MonadZero0) {
- this.MonadZero0 = MonadZero0;
- };
- var monadPlusArray = new MonadPlus(function () {
- return Control_MonadZero.monadZeroArray;
- });
- module.exports = {
- MonadPlus: MonadPlus,
- monadPlusArray: monadPlusArray
- };
- },{"../Control.MonadZero/index.js":"../output/Control.MonadZero/index.js"}],"../output/Effect.Class/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Category = require("../Control.Category/index.js");
- var Effect = require("../Effect/index.js");
- var MonadEffect = function MonadEffect(Monad0, liftEffect) {
- this.Monad0 = Monad0;
- this.liftEffect = liftEffect;
- };
- var monadEffectEffect = new MonadEffect(function () {
- return Effect.monadEffect;
- }, Control_Category.identity(Control_Category.categoryFn));
- var liftEffect = function liftEffect(dict) {
- return dict.liftEffect;
- };
- module.exports = {
- liftEffect: liftEffect,
- MonadEffect: MonadEffect,
- monadEffectEffect: monadEffectEffect
- };
- },{"../Control.Category/index.js":"../output/Control.Category/index.js","../Effect/index.js":"../output/Effect/index.js"}],"../output/Control.Monad.Except.Trans/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Alt = require("../Control.Alt/index.js");
- var Control_Alternative = require("../Control.Alternative/index.js");
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Category = require("../Control.Category/index.js");
- var Control_Monad = require("../Control.Monad/index.js");
- var Control_Monad_Cont_Class = require("../Control.Monad.Cont.Class/index.js");
- var Control_Monad_Error_Class = require("../Control.Monad.Error.Class/index.js");
- var Control_Monad_Reader_Class = require("../Control.Monad.Reader.Class/index.js");
- var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js");
- var Control_Monad_State_Class = require("../Control.Monad.State.Class/index.js");
- var Control_Monad_Trans_Class = require("../Control.Monad.Trans.Class/index.js");
- var Control_Monad_Writer_Class = require("../Control.Monad.Writer.Class/index.js");
- var Control_MonadPlus = require("../Control.MonadPlus/index.js");
- var Control_MonadZero = require("../Control.MonadZero/index.js");
- var Control_Plus = require("../Control.Plus/index.js");
- var Data_Either = require("../Data.Either/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Tuple = require("../Data.Tuple/index.js");
- var Effect_Class = require("../Effect.Class/index.js");
- var ExceptT = function ExceptT(x) {
- return x;
- };
- var withExceptT = function withExceptT(dictFunctor) {
- return function (f) {
- return function (v) {
- var mapLeft = function mapLeft(v1) {
- return function (v2) {
- if (v2 instanceof Data_Either.Right) {
- return new Data_Either.Right(v2.value0);
- }
- ;
- if (v2 instanceof Data_Either.Left) {
- return new Data_Either.Left(v1(v2.value0));
- }
- ;
- throw new Error("Failed pattern match at Control.Monad.Except.Trans (line 42, column 3 - line 42, column 32): " + [v1.constructor.name, v2.constructor.name]);
- };
- };
- return ExceptT(Data_Functor.map(dictFunctor)(mapLeft(f))(v));
- };
- };
- };
- var runExceptT = function runExceptT(v) {
- return v;
- };
- var newtypeExceptT = new Data_Newtype.Newtype(function (n) {
- return n;
- }, ExceptT);
- var monadTransExceptT = new Control_Monad_Trans_Class.MonadTrans(function (dictMonad) {
- return function (m) {
- return Control_Bind.bind(dictMonad.Bind1())(m)(function (a) {
- return Control_Applicative.pure(dictMonad.Applicative0())(new Data_Either.Right(a));
- });
- };
- });
- var mapExceptT = function mapExceptT(f) {
- return function (v) {
- return f(v);
- };
- };
- var functorExceptT = function functorExceptT(dictFunctor) {
- return new Data_Functor.Functor(function (f) {
- return mapExceptT(Data_Functor.map(dictFunctor)(Data_Functor.map(Data_Either.functorEither)(f)));
- });
- };
- var except = function except(dictApplicative) {
- var $88 = Control_Applicative.pure(dictApplicative);
- return function ($89) {
- return ExceptT($88($89));
- };
- };
- var monadExceptT = function monadExceptT(dictMonad) {
- return new Control_Monad.Monad(function () {
- return applicativeExceptT(dictMonad);
- }, function () {
- return bindExceptT(dictMonad);
- });
- };
- var bindExceptT = function bindExceptT(dictMonad) {
- return new Control_Bind.Bind(function () {
- return applyExceptT(dictMonad);
- }, function (v) {
- return function (k) {
- return Control_Bind.bind(dictMonad.Bind1())(v)(Data_Either.either(function () {
- var $90 = Control_Applicative.pure(dictMonad.Applicative0());
- return function ($91) {
- return $90(Data_Either.Left.create($91));
- };
- }())(function (a) {
- var v1 = k(a);
- return v1;
- }));
- };
- });
- };
- var applyExceptT = function applyExceptT(dictMonad) {
- return new Control_Apply.Apply(function () {
- return functorExceptT(dictMonad.Bind1().Apply0().Functor0());
- }, Control_Monad.ap(monadExceptT(dictMonad)));
- };
- var applicativeExceptT = function applicativeExceptT(dictMonad) {
- return new Control_Applicative.Applicative(function () {
- return applyExceptT(dictMonad);
- }, function () {
- var $92 = Control_Applicative.pure(dictMonad.Applicative0());
- return function ($93) {
- return ExceptT($92(Data_Either.Right.create($93)));
- };
- }());
- };
- var monadAskExceptT = function monadAskExceptT(dictMonadAsk) {
- return new Control_Monad_Reader_Class.MonadAsk(function () {
- return monadExceptT(dictMonadAsk.Monad0());
- }, Control_Monad_Trans_Class.lift(monadTransExceptT)(dictMonadAsk.Monad0())(Control_Monad_Reader_Class.ask(dictMonadAsk)));
- };
- var monadReaderExceptT = function monadReaderExceptT(dictMonadReader) {
- return new Control_Monad_Reader_Class.MonadReader(function () {
- return monadAskExceptT(dictMonadReader.MonadAsk0());
- }, function (f) {
- return mapExceptT(Control_Monad_Reader_Class.local(dictMonadReader)(f));
- });
- };
- var monadContExceptT = function monadContExceptT(dictMonadCont) {
- return new Control_Monad_Cont_Class.MonadCont(function () {
- return monadExceptT(dictMonadCont.Monad0());
- }, function (f) {
- return ExceptT(Control_Monad_Cont_Class.callCC(dictMonadCont)(function (c) {
- var v = f(function (a) {
- return ExceptT(c(new Data_Either.Right(a)));
- });
- return v;
- }));
- });
- };
- var monadEffectExceptT = function monadEffectExceptT(dictMonadEffect) {
- return new Effect_Class.MonadEffect(function () {
- return monadExceptT(dictMonadEffect.Monad0());
- }, function () {
- var $94 = Control_Monad_Trans_Class.lift(monadTransExceptT)(dictMonadEffect.Monad0());
- var $95 = Effect_Class.liftEffect(dictMonadEffect);
- return function ($96) {
- return $94($95($96));
- };
- }());
- };
- var monadRecExceptT = function monadRecExceptT(dictMonadRec) {
- return new Control_Monad_Rec_Class.MonadRec(function () {
- return monadExceptT(dictMonadRec.Monad0());
- }, function (f) {
- var $97 = Control_Monad_Rec_Class.tailRecM(dictMonadRec)(function (a) {
- var v = f(a);
- return Control_Bind.bind(dictMonadRec.Monad0().Bind1())(v)(function (m$prime) {
- return Control_Applicative.pure(dictMonadRec.Monad0().Applicative0())(function () {
- if (m$prime instanceof Data_Either.Left) {
- return new Control_Monad_Rec_Class.Done(new Data_Either.Left(m$prime.value0));
- }
- ;
- if (m$prime instanceof Data_Either.Right && m$prime.value0 instanceof Control_Monad_Rec_Class.Loop) {
- return new Control_Monad_Rec_Class.Loop(m$prime.value0.value0);
- }
- ;
- if (m$prime instanceof Data_Either.Right && m$prime.value0 instanceof Control_Monad_Rec_Class.Done) {
- return new Control_Monad_Rec_Class.Done(new Data_Either.Right(m$prime.value0.value0));
- }
- ;
- throw new Error("Failed pattern match at Control.Monad.Except.Trans (line 74, column 14 - line 77, column 43): " + [m$prime.constructor.name]);
- }());
- });
- });
- return function ($98) {
- return ExceptT($97($98));
- };
- });
- };
- var monadStateExceptT = function monadStateExceptT(dictMonadState) {
- return new Control_Monad_State_Class.MonadState(function () {
- return monadExceptT(dictMonadState.Monad0());
- }, function (f) {
- return Control_Monad_Trans_Class.lift(monadTransExceptT)(dictMonadState.Monad0())(Control_Monad_State_Class.state(dictMonadState)(f));
- });
- };
- var monadTellExceptT = function monadTellExceptT(dictMonadTell) {
- return new Control_Monad_Writer_Class.MonadTell(function () {
- return monadExceptT(dictMonadTell.Monad0());
- }, function () {
- var $99 = Control_Monad_Trans_Class.lift(monadTransExceptT)(dictMonadTell.Monad0());
- var $100 = Control_Monad_Writer_Class.tell(dictMonadTell);
- return function ($101) {
- return $99($100($101));
- };
- }());
- };
- var monadWriterExceptT = function monadWriterExceptT(dictMonadWriter) {
- return new Control_Monad_Writer_Class.MonadWriter(function () {
- return monadTellExceptT(dictMonadWriter.MonadTell0());
- }, mapExceptT(function (m) {
- return Control_Bind.bind(dictMonadWriter.MonadTell0().Monad0().Bind1())(Control_Monad_Writer_Class.listen(dictMonadWriter)(m))(function (v) {
- return Control_Applicative.pure(dictMonadWriter.MonadTell0().Monad0().Applicative0())(Data_Functor.map(Data_Either.functorEither)(function (r) {
- return new Data_Tuple.Tuple(r, v.value1);
- })(v.value0));
- });
- }), mapExceptT(function (m) {
- return Control_Monad_Writer_Class.pass(dictMonadWriter)(Control_Bind.bind(dictMonadWriter.MonadTell0().Monad0().Bind1())(m)(function (a) {
- return Control_Applicative.pure(dictMonadWriter.MonadTell0().Monad0().Applicative0())(function () {
- if (a instanceof Data_Either.Left) {
- return new Data_Tuple.Tuple(new Data_Either.Left(a.value0), Control_Category.identity(Control_Category.categoryFn));
- }
- ;
- if (a instanceof Data_Either.Right) {
- return new Data_Tuple.Tuple(new Data_Either.Right(a.value0.value0), a.value0.value1);
- }
- ;
- throw new Error("Failed pattern match at Control.Monad.Except.Trans (line 136, column 10 - line 138, column 45): " + [a.constructor.name]);
- }());
- }));
- }));
- };
- var monadThrowExceptT = function monadThrowExceptT(dictMonad) {
- return new Control_Monad_Error_Class.MonadThrow(function () {
- return monadExceptT(dictMonad);
- }, function () {
- var $102 = Control_Applicative.pure(dictMonad.Applicative0());
- return function ($103) {
- return ExceptT($102(Data_Either.Left.create($103)));
- };
- }());
- };
- var monadErrorExceptT = function monadErrorExceptT(dictMonad) {
- return new Control_Monad_Error_Class.MonadError(function () {
- return monadThrowExceptT(dictMonad);
- }, function (v) {
- return function (k) {
- return Control_Bind.bind(dictMonad.Bind1())(v)(Data_Either.either(function (a) {
- var v1 = k(a);
- return v1;
- })(function () {
- var $104 = Control_Applicative.pure(dictMonad.Applicative0());
- return function ($105) {
- return $104(Data_Either.Right.create($105));
- };
- }()));
- };
- });
- };
- var altExceptT = function altExceptT(dictSemigroup) {
- return function (dictMonad) {
- return new Control_Alt.Alt(function () {
- return functorExceptT(dictMonad.Bind1().Apply0().Functor0());
- }, function (v) {
- return function (v1) {
- return Control_Bind.bind(dictMonad.Bind1())(v)(function (rm) {
- if (rm instanceof Data_Either.Right) {
- return Control_Applicative.pure(dictMonad.Applicative0())(new Data_Either.Right(rm.value0));
- }
- ;
- if (rm instanceof Data_Either.Left) {
- return Control_Bind.bind(dictMonad.Bind1())(v1)(function (rn) {
- if (rn instanceof Data_Either.Right) {
- return Control_Applicative.pure(dictMonad.Applicative0())(new Data_Either.Right(rn.value0));
- }
- ;
- if (rn instanceof Data_Either.Left) {
- return Control_Applicative.pure(dictMonad.Applicative0())(new Data_Either.Left(Data_Semigroup.append(dictSemigroup)(rm.value0)(rn.value0)));
- }
- ;
- throw new Error("Failed pattern match at Control.Monad.Except.Trans (line 86, column 9 - line 88, column 49): " + [rn.constructor.name]);
- });
- }
- ;
- throw new Error("Failed pattern match at Control.Monad.Except.Trans (line 82, column 5 - line 88, column 49): " + [rm.constructor.name]);
- });
- };
- });
- };
- };
- var plusExceptT = function plusExceptT(dictMonoid) {
- return function (dictMonad) {
- return new Control_Plus.Plus(function () {
- return altExceptT(dictMonoid.Semigroup0())(dictMonad);
- }, Control_Monad_Error_Class.throwError(monadThrowExceptT(dictMonad))(Data_Monoid.mempty(dictMonoid)));
- };
- };
- var alternativeExceptT = function alternativeExceptT(dictMonoid) {
- return function (dictMonad) {
- return new Control_Alternative.Alternative(function () {
- return applicativeExceptT(dictMonad);
- }, function () {
- return plusExceptT(dictMonoid)(dictMonad);
- });
- };
- };
- var monadZeroExceptT = function monadZeroExceptT(dictMonoid) {
- return function (dictMonad) {
- return new Control_MonadZero.MonadZero(function () {
- return alternativeExceptT(dictMonoid)(dictMonad);
- }, function () {
- return monadExceptT(dictMonad);
- });
- };
- };
- var monadPlusExceptT = function monadPlusExceptT(dictMonoid) {
- return function (dictMonad) {
- return new Control_MonadPlus.MonadPlus(function () {
- return monadZeroExceptT(dictMonoid)(dictMonad);
- });
- };
- };
- module.exports = {
- ExceptT: ExceptT,
- runExceptT: runExceptT,
- withExceptT: withExceptT,
- mapExceptT: mapExceptT,
- except: except,
- newtypeExceptT: newtypeExceptT,
- functorExceptT: functorExceptT,
- applyExceptT: applyExceptT,
- applicativeExceptT: applicativeExceptT,
- bindExceptT: bindExceptT,
- monadExceptT: monadExceptT,
- monadRecExceptT: monadRecExceptT,
- altExceptT: altExceptT,
- plusExceptT: plusExceptT,
- alternativeExceptT: alternativeExceptT,
- monadPlusExceptT: monadPlusExceptT,
- monadZeroExceptT: monadZeroExceptT,
- monadTransExceptT: monadTransExceptT,
- monadEffectExceptT: monadEffectExceptT,
- monadContExceptT: monadContExceptT,
- monadThrowExceptT: monadThrowExceptT,
- monadErrorExceptT: monadErrorExceptT,
- monadAskExceptT: monadAskExceptT,
- monadReaderExceptT: monadReaderExceptT,
- monadStateExceptT: monadStateExceptT,
- monadTellExceptT: monadTellExceptT,
- monadWriterExceptT: monadWriterExceptT
- };
- },{"../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Alternative/index.js":"../output/Control.Alternative/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Control.Monad.Cont.Class/index.js":"../output/Control.Monad.Cont.Class/index.js","../Control.Monad.Error.Class/index.js":"../output/Control.Monad.Error.Class/index.js","../Control.Monad.Reader.Class/index.js":"../output/Control.Monad.Reader.Class/index.js","../Control.Monad.Rec.Class/index.js":"../output/Control.Monad.Rec.Class/index.js","../Control.Monad.State.Class/index.js":"../output/Control.Monad.State.Class/index.js","../Control.Monad.Trans.Class/index.js":"../output/Control.Monad.Trans.Class/index.js","../Control.Monad.Writer.Class/index.js":"../output/Control.Monad.Writer.Class/index.js","../Control.MonadPlus/index.js":"../output/Control.MonadPlus/index.js","../Control.MonadZero/index.js":"../output/Control.MonadZero/index.js","../Control.Plus/index.js":"../output/Control.Plus/index.js","../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js","../Effect.Class/index.js":"../output/Effect.Class/index.js"}],"../output/Control.Monad.Except/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js");
- var Data_Identity = require("../Data.Identity/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var withExcept = Control_Monad_Except_Trans.withExceptT(Data_Identity.functorIdentity);
- var runExcept = function () {
- var $0 = Data_Newtype.unwrap(Data_Identity.newtypeIdentity);
- return function ($1) {
- return $0(Control_Monad_Except_Trans.runExceptT($1));
- };
- }();
- var mapExcept = function mapExcept(f) {
- return Control_Monad_Except_Trans.mapExceptT(function () {
- var $2 = Data_Newtype.unwrap(Data_Identity.newtypeIdentity);
- return function ($3) {
- return Data_Identity.Identity(f($2($3)));
- };
- }());
- };
- module.exports = {
- runExcept: runExcept,
- mapExcept: mapExcept,
- withExcept: withExcept
- };
- },{"../Control.Monad.Except.Trans/index.js":"../output/Control.Monad.Except.Trans/index.js","../Data.Identity/index.js":"../output/Data.Identity/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js"}],"../output/Data.Unfoldable/foreign.js":[function(require,module,exports) {
- "use strict";
- exports.unfoldrArrayImpl = function (isNothing) {
- return function (fromJust) {
- return function (fst) {
- return function (snd) {
- return function (f) {
- return function (b) {
- var result = [];
- var value = b;
- while (true) {
- // eslint-disable-line no-constant-condition
- var maybe = f(value);
- if (isNothing(maybe)) return result;
- var tuple = fromJust(maybe);
- result.push(fst(tuple));
- value = snd(tuple);
- }
- };
- };
- };
- };
- };
- };
- },{}],"../output/Data.Unfoldable1/foreign.js":[function(require,module,exports) {
- "use strict";
- exports.unfoldr1ArrayImpl = function (isNothing) {
- return function (fromJust) {
- return function (fst) {
- return function (snd) {
- return function (f) {
- return function (b) {
- var result = [];
- var value = b;
- while (true) {
- // eslint-disable-line no-constant-condition
- var tuple = f(value);
- result.push(fst(tuple));
- var maybe = snd(tuple);
- if (isNothing(maybe)) return result;
- value = fromJust(maybe);
- }
- };
- };
- };
- };
- };
- };
- },{}],"../output/Data.Unfoldable1/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Data_Boolean = require("../Data.Boolean/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Semigroup_Traversable = require("../Data.Semigroup.Traversable/index.js");
- var Data_Tuple = require("../Data.Tuple/index.js");
- var Unfoldable1 = function Unfoldable1(unfoldr1) {
- this.unfoldr1 = unfoldr1;
- };
- var unfoldr1 = function unfoldr1(dict) {
- return dict.unfoldr1;
- };
- var unfoldable1Maybe = new Unfoldable1(function (f) {
- return function (b) {
- return new Data_Maybe.Just(Data_Tuple.fst(f(b)));
- };
- });
- var unfoldable1Array = new Unfoldable1($foreign.unfoldr1ArrayImpl(Data_Maybe.isNothing)(Data_Maybe.fromJust())(Data_Tuple.fst)(Data_Tuple.snd));
- var replicate1 = function replicate1(dictUnfoldable1) {
- return function (n) {
- return function (v) {
- var step = function step(i) {
- if (i <= 0) {
- return new Data_Tuple.Tuple(v, Data_Maybe.Nothing.value);
- }
- ;
- if (Data_Boolean.otherwise) {
- return new Data_Tuple.Tuple(v, new Data_Maybe.Just(i - 1 | 0));
- }
- ;
- throw new Error("Failed pattern match at Data.Unfoldable1 (line 67, column 5 - line 67, column 39): " + [i.constructor.name]);
- };
- return unfoldr1(dictUnfoldable1)(step)(n - 1 | 0);
- };
- };
- };
- var replicate1A = function replicate1A(dictApply) {
- return function (dictUnfoldable1) {
- return function (dictTraversable1) {
- return function (n) {
- return function (m) {
- return Data_Semigroup_Traversable.sequence1(dictTraversable1)(dictApply)(replicate1(dictUnfoldable1)(n)(m));
- };
- };
- };
- };
- };
- var singleton = function singleton(dictUnfoldable1) {
- return replicate1(dictUnfoldable1)(1);
- };
- var range = function range(dictUnfoldable1) {
- return function (start) {
- return function (end) {
- var go = function go(delta) {
- return function (i) {
- var i$prime = i + delta | 0;
- return new Data_Tuple.Tuple(i, function () {
- var $8 = i === end;
- if ($8) {
- return Data_Maybe.Nothing.value;
- }
- ;
- return new Data_Maybe.Just(i$prime);
- }());
- };
- };
- var delta = function () {
- var $9 = end >= start;
- if ($9) {
- return 1;
- }
- ;
- return -1 | 0;
- }();
- return unfoldr1(dictUnfoldable1)(go(delta))(start);
- };
- };
- };
- module.exports = {
- Unfoldable1: Unfoldable1,
- unfoldr1: unfoldr1,
- replicate1: replicate1,
- replicate1A: replicate1A,
- singleton: singleton,
- range: range,
- unfoldable1Array: unfoldable1Array,
- unfoldable1Maybe: unfoldable1Maybe
- };
- },{"./foreign.js":"../output/Data.Unfoldable1/foreign.js","../Data.Boolean/index.js":"../output/Data.Boolean/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Semigroup.Traversable/index.js":"../output/Data.Semigroup.Traversable/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js"}],"../output/Data.Unfoldable/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Traversable = require("../Data.Traversable/index.js");
- var Data_Tuple = require("../Data.Tuple/index.js");
- var Data_Unfoldable1 = require("../Data.Unfoldable1/index.js");
- var Data_Unit = require("../Data.Unit/index.js");
- var Unfoldable = function Unfoldable(Unfoldable10, unfoldr) {
- this.Unfoldable10 = Unfoldable10;
- this.unfoldr = unfoldr;
- };
- var unfoldr = function unfoldr(dict) {
- return dict.unfoldr;
- };
- var unfoldableMaybe = new Unfoldable(function () {
- return Data_Unfoldable1.unfoldable1Maybe;
- }, function (f) {
- return function (b) {
- return Data_Functor.map(Data_Maybe.functorMaybe)(Data_Tuple.fst)(f(b));
- };
- });
- var unfoldableArray = new Unfoldable(function () {
- return Data_Unfoldable1.unfoldable1Array;
- }, $foreign.unfoldrArrayImpl(Data_Maybe.isNothing)(Data_Maybe.fromJust())(Data_Tuple.fst)(Data_Tuple.snd));
- var replicate = function replicate(dictUnfoldable) {
- return function (n) {
- return function (v) {
- var step = function step(i) {
- var $7 = i <= 0;
- if ($7) {
- return Data_Maybe.Nothing.value;
- }
- ;
- return new Data_Maybe.Just(new Data_Tuple.Tuple(v, i - 1 | 0));
- };
- return unfoldr(dictUnfoldable)(step)(n);
- };
- };
- };
- var replicateA = function replicateA(dictApplicative) {
- return function (dictUnfoldable) {
- return function (dictTraversable) {
- return function (n) {
- return function (m) {
- return Data_Traversable.sequence(dictTraversable)(dictApplicative)(replicate(dictUnfoldable)(n)(m));
- };
- };
- };
- };
- };
- var none = function none(dictUnfoldable) {
- return unfoldr(dictUnfoldable)(Data_Function["const"](Data_Maybe.Nothing.value))(Data_Unit.unit);
- };
- var fromMaybe = function fromMaybe(dictUnfoldable) {
- return unfoldr(dictUnfoldable)(function (b) {
- return Data_Functor.map(Data_Maybe.functorMaybe)(Data_Function.flip(Data_Tuple.Tuple.create)(Data_Maybe.Nothing.value))(b);
- });
- };
- module.exports = {
- Unfoldable: Unfoldable,
- unfoldr: unfoldr,
- replicate: replicate,
- replicateA: replicateA,
- none: none,
- fromMaybe: fromMaybe,
- unfoldableArray: unfoldableArray,
- unfoldableMaybe: unfoldableMaybe
- };
- },{"./foreign.js":"../output/Data.Unfoldable/foreign.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js","../Data.Unfoldable1/index.js":"../output/Data.Unfoldable1/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Data.NonEmpty/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Alt = require("../Control.Alt/index.js");
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Category = require("../Control.Category/index.js");
- var Control_Plus = require("../Control.Plus/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Foldable = require("../Data.Foldable/index.js");
- var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Ordering = require("../Data.Ordering/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Semigroup_Foldable = require("../Data.Semigroup.Foldable/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Data_Traversable = require("../Data.Traversable/index.js");
- var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js");
- var Data_Tuple = require("../Data.Tuple/index.js");
- var Data_Unfoldable = require("../Data.Unfoldable/index.js");
- var Data_Unfoldable1 = require("../Data.Unfoldable1/index.js");
- var NonEmpty = function () {
- function NonEmpty(value0, value1) {
- this.value0 = value0;
- this.value1 = value1;
- }
- ;
- NonEmpty.create = function (value0) {
- return function (value1) {
- return new NonEmpty(value0, value1);
- };
- };
- return NonEmpty;
- }();
- var unfoldable1NonEmpty = function unfoldable1NonEmpty(dictUnfoldable) {
- return new Data_Unfoldable1.Unfoldable1(function (f) {
- return function (b) {
- return Data_Tuple.uncurry(NonEmpty.create)(Data_Functor.map(Data_Tuple.functorTuple)(Data_Unfoldable.unfoldr(dictUnfoldable)(Data_Functor.map(Data_Maybe.functorMaybe)(f)))(f(b)));
- };
- });
- };
- var tail = function tail(v) {
- return v.value1;
- };
- var singleton = function singleton(dictPlus) {
- return function (a) {
- return new NonEmpty(a, Control_Plus.empty(dictPlus));
- };
- };
- var showNonEmpty = function showNonEmpty(dictShow) {
- return function (dictShow1) {
- return new Data_Show.Show(function (v) {
- return "(NonEmpty " + (Data_Show.show(dictShow)(v.value0) + (" " + (Data_Show.show(dictShow1)(v.value1) + ")")));
- });
- };
- };
- var oneOf = function oneOf(dictAlternative) {
- return function (v) {
- return Control_Alt.alt(dictAlternative.Plus1().Alt0())(Control_Applicative.pure(dictAlternative.Applicative0())(v.value0))(v.value1);
- };
- };
- var head = function head(v) {
- return v.value0;
- };
- var functorNonEmpty = function functorNonEmpty(dictFunctor) {
- return new Data_Functor.Functor(function (f) {
- return function (m) {
- return new NonEmpty(f(m.value0), Data_Functor.map(dictFunctor)(f)(m.value1));
- };
- });
- };
- var functorWithIndex = function functorWithIndex(dictFunctorWithIndex) {
- return new Data_FunctorWithIndex.FunctorWithIndex(function () {
- return functorNonEmpty(dictFunctorWithIndex.Functor0());
- }, function (f) {
- return function (v) {
- return new NonEmpty(f(Data_Maybe.Nothing.value)(v.value0), Data_FunctorWithIndex.mapWithIndex(dictFunctorWithIndex)(function ($146) {
- return f(Data_Maybe.Just.create($146));
- })(v.value1));
- };
- });
- };
- var fromNonEmpty = function fromNonEmpty(f) {
- return function (v) {
- return f(v.value0)(v.value1);
- };
- };
- var foldl1 = function foldl1(dictFoldable) {
- return function (f) {
- return function (v) {
- return Data_Foldable.foldl(dictFoldable)(f)(v.value0)(v.value1);
- };
- };
- };
- var foldableNonEmpty = function foldableNonEmpty(dictFoldable) {
- return new Data_Foldable.Foldable(function (dictMonoid) {
- return function (f) {
- return function (v) {
- return Data_Semigroup.append(dictMonoid.Semigroup0())(f(v.value0))(Data_Foldable.foldMap(dictFoldable)(dictMonoid)(f)(v.value1));
- };
- };
- }, function (f) {
- return function (b) {
- return function (v) {
- return Data_Foldable.foldl(dictFoldable)(f)(f(b)(v.value0))(v.value1);
- };
- };
- }, function (f) {
- return function (b) {
- return function (v) {
- return f(v.value0)(Data_Foldable.foldr(dictFoldable)(f)(b)(v.value1));
- };
- };
- });
- };
- var foldableWithIndexNonEmpty = function foldableWithIndexNonEmpty(dictFoldableWithIndex) {
- return new Data_FoldableWithIndex.FoldableWithIndex(function () {
- return foldableNonEmpty(dictFoldableWithIndex.Foldable0());
- }, function (dictMonoid) {
- return function (f) {
- return function (v) {
- return Data_Semigroup.append(dictMonoid.Semigroup0())(f(Data_Maybe.Nothing.value)(v.value0))(Data_FoldableWithIndex.foldMapWithIndex(dictFoldableWithIndex)(dictMonoid)(function ($147) {
- return f(Data_Maybe.Just.create($147));
- })(v.value1));
- };
- };
- }, function (f) {
- return function (b) {
- return function (v) {
- return Data_FoldableWithIndex.foldlWithIndex(dictFoldableWithIndex)(function ($148) {
- return f(Data_Maybe.Just.create($148));
- })(f(Data_Maybe.Nothing.value)(b)(v.value0))(v.value1);
- };
- };
- }, function (f) {
- return function (b) {
- return function (v) {
- return f(Data_Maybe.Nothing.value)(v.value0)(Data_FoldableWithIndex.foldrWithIndex(dictFoldableWithIndex)(function ($149) {
- return f(Data_Maybe.Just.create($149));
- })(b)(v.value1));
- };
- };
- });
- };
- var traversableNonEmpty = function traversableNonEmpty(dictTraversable) {
- return new Data_Traversable.Traversable(function () {
- return foldableNonEmpty(dictTraversable.Foldable1());
- }, function () {
- return functorNonEmpty(dictTraversable.Functor0());
- }, function (dictApplicative) {
- return function (v) {
- return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(NonEmpty.create)(v.value0))(Data_Traversable.sequence(dictTraversable)(dictApplicative)(v.value1));
- };
- }, function (dictApplicative) {
- return function (f) {
- return function (v) {
- return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(NonEmpty.create)(f(v.value0)))(Data_Traversable.traverse(dictTraversable)(dictApplicative)(f)(v.value1));
- };
- };
- });
- };
- var traversableWithIndexNonEmpty = function traversableWithIndexNonEmpty(dictTraversableWithIndex) {
- return new Data_TraversableWithIndex.TraversableWithIndex(function () {
- return foldableWithIndexNonEmpty(dictTraversableWithIndex.FoldableWithIndex1());
- }, function () {
- return functorWithIndex(dictTraversableWithIndex.FunctorWithIndex0());
- }, function () {
- return traversableNonEmpty(dictTraversableWithIndex.Traversable2());
- }, function (dictApplicative) {
- return function (f) {
- return function (v) {
- return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(NonEmpty.create)(f(Data_Maybe.Nothing.value)(v.value0)))(Data_TraversableWithIndex.traverseWithIndex(dictTraversableWithIndex)(dictApplicative)(function ($150) {
- return f(Data_Maybe.Just.create($150));
- })(v.value1));
- };
- };
- });
- };
- var foldable1NonEmpty = function foldable1NonEmpty(dictFoldable) {
- return new Data_Semigroup_Foldable.Foldable1(function () {
- return foldableNonEmpty(dictFoldable);
- }, function (dictSemigroup) {
- return Data_Semigroup_Foldable.foldMap1(foldable1NonEmpty(dictFoldable))(dictSemigroup)(Control_Category.identity(Control_Category.categoryFn));
- }, function (dictSemigroup) {
- return function (f) {
- return function (v) {
- return Data_Foldable.foldl(dictFoldable)(function (s) {
- return function (a1) {
- return Data_Semigroup.append(dictSemigroup)(s)(f(a1));
- };
- })(f(v.value0))(v.value1);
- };
- };
- });
- };
- var eqNonEmpty = function eqNonEmpty(dictEq1) {
- return function (dictEq) {
- return new Data_Eq.Eq(function (x) {
- return function (y) {
- return Data_Eq.eq(dictEq)(x.value0)(y.value0) && Data_Eq.eq1(dictEq1)(dictEq)(x.value1)(y.value1);
- };
- });
- };
- };
- var ordNonEmpty = function ordNonEmpty(dictOrd1) {
- return function (dictOrd) {
- return new Data_Ord.Ord(function () {
- return eqNonEmpty(dictOrd1.Eq10())(dictOrd.Eq0());
- }, function (x) {
- return function (y) {
- var v = Data_Ord.compare(dictOrd)(x.value0)(y.value0);
- if (v instanceof Data_Ordering.LT) {
- return Data_Ordering.LT.value;
- }
- ;
- if (v instanceof Data_Ordering.GT) {
- return Data_Ordering.GT.value;
- }
- ;
- return Data_Ord.compare1(dictOrd1)(dictOrd)(x.value1)(y.value1);
- };
- });
- };
- };
- var eq1NonEmpty = function eq1NonEmpty(dictEq1) {
- return new Data_Eq.Eq1(function (dictEq) {
- return Data_Eq.eq(eqNonEmpty(dictEq1)(dictEq));
- });
- };
- var ord1NonEmpty = function ord1NonEmpty(dictOrd1) {
- return new Data_Ord.Ord1(function () {
- return eq1NonEmpty(dictOrd1.Eq10());
- }, function (dictOrd) {
- return Data_Ord.compare(ordNonEmpty(dictOrd1)(dictOrd));
- });
- };
- module.exports = {
- NonEmpty: NonEmpty,
- singleton: singleton,
- foldl1: foldl1,
- fromNonEmpty: fromNonEmpty,
- oneOf: oneOf,
- head: head,
- tail: tail,
- showNonEmpty: showNonEmpty,
- eqNonEmpty: eqNonEmpty,
- eq1NonEmpty: eq1NonEmpty,
- ordNonEmpty: ordNonEmpty,
- ord1NonEmpty: ord1NonEmpty,
- functorNonEmpty: functorNonEmpty,
- functorWithIndex: functorWithIndex,
- foldableNonEmpty: foldableNonEmpty,
- foldableWithIndexNonEmpty: foldableWithIndexNonEmpty,
- traversableNonEmpty: traversableNonEmpty,
- traversableWithIndexNonEmpty: traversableWithIndexNonEmpty,
- foldable1NonEmpty: foldable1NonEmpty,
- unfoldable1NonEmpty: unfoldable1NonEmpty
- };
- },{"../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Plus/index.js":"../output/Control.Plus/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.FoldableWithIndex/index.js":"../output/Data.FoldableWithIndex/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.FunctorWithIndex/index.js":"../output/Data.FunctorWithIndex/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Semigroup.Foldable/index.js":"../output/Data.Semigroup.Foldable/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Data.TraversableWithIndex/index.js":"../output/Data.TraversableWithIndex/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js","../Data.Unfoldable/index.js":"../output/Data.Unfoldable/index.js","../Data.Unfoldable1/index.js":"../output/Data.Unfoldable1/index.js"}],"../output/Data.List.Types/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Alt = require("../Control.Alt/index.js");
- var Control_Alternative = require("../Control.Alternative/index.js");
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Category = require("../Control.Category/index.js");
- var Control_Comonad = require("../Control.Comonad/index.js");
- var Control_Extend = require("../Control.Extend/index.js");
- var Control_Monad = require("../Control.Monad/index.js");
- var Control_MonadPlus = require("../Control.MonadPlus/index.js");
- var Control_MonadZero = require("../Control.MonadZero/index.js");
- var Control_Plus = require("../Control.Plus/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Foldable = require("../Data.Foldable/index.js");
- var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_NonEmpty = require("../Data.NonEmpty/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Ordering = require("../Data.Ordering/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Semigroup_Traversable = require("../Data.Semigroup.Traversable/index.js");
- var Data_Semiring = require("../Data.Semiring/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Data_Traversable = require("../Data.Traversable/index.js");
- var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js");
- var Data_Tuple = require("../Data.Tuple/index.js");
- var Data_Unfoldable = require("../Data.Unfoldable/index.js");
- var Data_Unfoldable1 = require("../Data.Unfoldable1/index.js");
- var Nil = function () {
- function Nil() {}
- ;
- Nil.value = new Nil();
- return Nil;
- }();
- var Cons = function () {
- function Cons(value0, value1) {
- this.value0 = value0;
- this.value1 = value1;
- }
- ;
- Cons.create = function (value0) {
- return function (value1) {
- return new Cons(value0, value1);
- };
- };
- return Cons;
- }();
- var NonEmptyList = function NonEmptyList(x) {
- return x;
- };
- var toList = function toList(v) {
- return new Cons(v.value0, v.value1);
- };
- var newtypeNonEmptyList = new Data_Newtype.Newtype(function (n) {
- return n;
- }, NonEmptyList);
- var nelCons = function nelCons(a) {
- return function (v) {
- return new Data_NonEmpty.NonEmpty(a, new Cons(v.value0, v.value1));
- };
- };
- var listMap = function listMap(f) {
- var chunkedRevMap = function chunkedRevMap($copy_chunksAcc) {
- return function ($copy_v) {
- var $tco_var_chunksAcc = $copy_chunksAcc;
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(chunksAcc, v) {
- if (v instanceof Cons && v.value1 instanceof Cons && v.value1.value1 instanceof Cons) {
- $tco_var_chunksAcc = new Cons(v, chunksAcc);
- $copy_v = v.value1.value1.value1;
- return;
- }
- ;
- var unrolledMap = function unrolledMap(v1) {
- if (v1 instanceof Cons && v1.value1 instanceof Cons && v1.value1.value1 instanceof Nil) {
- return new Cons(f(v1.value0), new Cons(f(v1.value1.value0), Nil.value));
- }
- ;
- if (v1 instanceof Cons && v1.value1 instanceof Nil) {
- return new Cons(f(v1.value0), Nil.value);
- }
- ;
- return Nil.value;
- };
- var reverseUnrolledMap = function reverseUnrolledMap($copy_v1) {
- return function ($copy_acc) {
- var $tco_var_v1 = $copy_v1;
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(v1, acc) {
- if (v1 instanceof Cons && v1.value0 instanceof Cons && v1.value0.value1 instanceof Cons && v1.value0.value1.value1 instanceof Cons) {
- $tco_var_v1 = v1.value1;
- $copy_acc = new Cons(f(v1.value0.value0), new Cons(f(v1.value0.value1.value0), new Cons(f(v1.value0.value1.value1.value0), acc)));
- return;
- }
- ;
- $tco_done = true;
- return acc;
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($tco_var_v1, $copy_acc);
- }
- ;
- return $tco_result;
- };
- };
- $tco_done = true;
- return reverseUnrolledMap(chunksAcc)(unrolledMap(v));
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($tco_var_chunksAcc, $copy_v);
- }
- ;
- return $tco_result;
- };
- };
- return chunkedRevMap(Nil.value);
- };
- var functorList = new Data_Functor.Functor(listMap);
- var functorNonEmptyList = Data_NonEmpty.functorNonEmpty(functorList);
- var foldableList = new Data_Foldable.Foldable(function (dictMonoid) {
- return function (f) {
- return Data_Foldable.foldl(foldableList)(function (acc) {
- var $202 = Data_Semigroup.append(dictMonoid.Semigroup0())(acc);
- return function ($203) {
- return $202(f($203));
- };
- })(Data_Monoid.mempty(dictMonoid));
- };
- }, function (f) {
- var go = function go($copy_b) {
- return function ($copy_v) {
- var $tco_var_b = $copy_b;
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(b, v) {
- if (v instanceof Nil) {
- $tco_done = true;
- return b;
- }
- ;
- if (v instanceof Cons) {
- $tco_var_b = f(b)(v.value0);
- $copy_v = v.value1;
- return;
- }
- ;
- throw new Error("Failed pattern match at Data.List.Types (line 109, column 12 - line 111, column 30): " + [v.constructor.name]);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($tco_var_b, $copy_v);
- }
- ;
- return $tco_result;
- };
- };
- return go;
- }, function (f) {
- return function (b) {
- var rev = Data_Foldable.foldl(foldableList)(Data_Function.flip(Cons.create))(Nil.value);
- var $204 = Data_Foldable.foldl(foldableList)(Data_Function.flip(f))(b);
- return function ($205) {
- return $204(rev($205));
- };
- };
- });
- var foldableNonEmptyList = Data_NonEmpty.foldableNonEmpty(foldableList);
- var foldableWithIndexList = new Data_FoldableWithIndex.FoldableWithIndex(function () {
- return foldableList;
- }, function (dictMonoid) {
- return function (f) {
- return Data_FoldableWithIndex.foldlWithIndex(foldableWithIndexList)(function (i) {
- return function (acc) {
- var $206 = Data_Semigroup.append(dictMonoid.Semigroup0())(acc);
- var $207 = f(i);
- return function ($208) {
- return $206($207($208));
- };
- };
- })(Data_Monoid.mempty(dictMonoid));
- };
- }, function (f) {
- return function (acc) {
- var $209 = Data_Foldable.foldl(foldableList)(function (v) {
- return function (a) {
- return new Data_Tuple.Tuple(v.value0 + 1 | 0, f(v.value0)(v.value1)(a));
- };
- })(new Data_Tuple.Tuple(0, acc));
- return function ($210) {
- return Data_Tuple.snd($209($210));
- };
- };
- }, function (f) {
- return function (b) {
- return function (xs) {
- var v = function () {
- var rev = Data_Foldable.foldl(foldableList)(function (v1) {
- return function (a) {
- return new Data_Tuple.Tuple(v1.value0 + 1 | 0, new Cons(a, v1.value1));
- };
- });
- return rev(new Data_Tuple.Tuple(0, Nil.value))(xs);
- }();
- return Data_Tuple.snd(Data_Foldable.foldl(foldableList)(function (v1) {
- return function (a) {
- return new Data_Tuple.Tuple(v1.value0 - 1 | 0, f(v1.value0 - 1 | 0)(a)(v1.value1));
- };
- })(new Data_Tuple.Tuple(v.value0, b))(v.value1));
- };
- };
- });
- var foldableWithIndexNonEmptyList = new Data_FoldableWithIndex.FoldableWithIndex(function () {
- return foldableNonEmptyList;
- }, function (dictMonoid) {
- return function (f) {
- return function (v) {
- return Data_FoldableWithIndex.foldMapWithIndex(Data_NonEmpty.foldableWithIndexNonEmpty(foldableWithIndexList))(dictMonoid)(function () {
- var $211 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1));
- return function ($212) {
- return f($211($212));
- };
- }())(v);
- };
- };
- }, function (f) {
- return function (b) {
- return function (v) {
- return Data_FoldableWithIndex.foldlWithIndex(Data_NonEmpty.foldableWithIndexNonEmpty(foldableWithIndexList))(function () {
- var $213 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1));
- return function ($214) {
- return f($213($214));
- };
- }())(b)(v);
- };
- };
- }, function (f) {
- return function (b) {
- return function (v) {
- return Data_FoldableWithIndex.foldrWithIndex(Data_NonEmpty.foldableWithIndexNonEmpty(foldableWithIndexList))(function () {
- var $215 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1));
- return function ($216) {
- return f($215($216));
- };
- }())(b)(v);
- };
- };
- });
- var functorWithIndexList = new Data_FunctorWithIndex.FunctorWithIndex(function () {
- return functorList;
- }, function (f) {
- return Data_FoldableWithIndex.foldrWithIndex(foldableWithIndexList)(function (i) {
- return function (x) {
- return function (acc) {
- return new Cons(f(i)(x), acc);
- };
- };
- })(Nil.value);
- });
- var functorWithIndexNonEmptyList = new Data_FunctorWithIndex.FunctorWithIndex(function () {
- return functorNonEmptyList;
- }, function (fn) {
- return function (v) {
- return NonEmptyList(Data_FunctorWithIndex.mapWithIndex(Data_NonEmpty.functorWithIndex(functorWithIndexList))(function () {
- var $217 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1));
- return function ($218) {
- return fn($217($218));
- };
- }())(v));
- };
- });
- var semigroupList = new Data_Semigroup.Semigroup(function (xs) {
- return function (ys) {
- return Data_Foldable.foldr(foldableList)(Cons.create)(ys)(xs);
- };
- });
- var monoidList = new Data_Monoid.Monoid(function () {
- return semigroupList;
- }, Nil.value);
- var semigroupNonEmptyList = new Data_Semigroup.Semigroup(function (v) {
- return function (as$prime) {
- return new Data_NonEmpty.NonEmpty(v.value0, Data_Semigroup.append(semigroupList)(v.value1)(toList(as$prime)));
- };
- });
- var showList = function showList(dictShow) {
- return new Data_Show.Show(function (v) {
- if (v instanceof Nil) {
- return "Nil";
- }
- ;
- return "(" + (Data_Foldable.intercalate(foldableList)(Data_Monoid.monoidString)(" : ")(Data_Functor.map(functorList)(Data_Show.show(dictShow))(v)) + " : Nil)");
- });
- };
- var showNonEmptyList = function showNonEmptyList(dictShow) {
- return new Data_Show.Show(function (v) {
- return "(NonEmptyList " + (Data_Show.show(Data_NonEmpty.showNonEmpty(dictShow)(showList(dictShow)))(v) + ")");
- });
- };
- var traversableList = new Data_Traversable.Traversable(function () {
- return foldableList;
- }, function () {
- return functorList;
- }, function (dictApplicative) {
- return Data_Traversable.traverse(traversableList)(dictApplicative)(Control_Category.identity(Control_Category.categoryFn));
- }, function (dictApplicative) {
- return function (f) {
- var $219 = Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Foldable.foldl(foldableList)(Data_Function.flip(Cons.create))(Nil.value));
- var $220 = Data_Foldable.foldl(foldableList)(function (acc) {
- var $222 = Control_Apply.lift2(dictApplicative.Apply0())(Data_Function.flip(Cons.create))(acc);
- return function ($223) {
- return $222(f($223));
- };
- })(Control_Applicative.pure(dictApplicative)(Nil.value));
- return function ($221) {
- return $219($220($221));
- };
- };
- });
- var traversableNonEmptyList = Data_NonEmpty.traversableNonEmpty(traversableList);
- var traversableWithIndexList = new Data_TraversableWithIndex.TraversableWithIndex(function () {
- return foldableWithIndexList;
- }, function () {
- return functorWithIndexList;
- }, function () {
- return traversableList;
- }, function (dictApplicative) {
- return function (f) {
- var rev = Data_Foldable.foldl(foldableList)(Data_Function.flip(Cons.create))(Nil.value);
- var $224 = Data_Functor.map(dictApplicative.Apply0().Functor0())(rev);
- var $225 = Data_FoldableWithIndex.foldlWithIndex(foldableWithIndexList)(function (i) {
- return function (acc) {
- var $227 = Control_Apply.lift2(dictApplicative.Apply0())(Data_Function.flip(Cons.create))(acc);
- var $228 = f(i);
- return function ($229) {
- return $227($228($229));
- };
- };
- })(Control_Applicative.pure(dictApplicative)(Nil.value));
- return function ($226) {
- return $224($225($226));
- };
- };
- });
- var traversableWithIndexNonEmptyList = new Data_TraversableWithIndex.TraversableWithIndex(function () {
- return foldableWithIndexNonEmptyList;
- }, function () {
- return functorWithIndexNonEmptyList;
- }, function () {
- return traversableNonEmptyList;
- }, function (dictApplicative) {
- return function (f) {
- return function (v) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(NonEmptyList)(Data_TraversableWithIndex.traverseWithIndex(Data_NonEmpty.traversableWithIndexNonEmpty(traversableWithIndexList))(dictApplicative)(function () {
- var $230 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1));
- return function ($231) {
- return f($230($231));
- };
- }())(v));
- };
- };
- });
- var unfoldable1List = new Data_Unfoldable1.Unfoldable1(function (f) {
- return function (b) {
- var go = function go($copy_source) {
- return function ($copy_memo) {
- var $tco_var_source = $copy_source;
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(source, memo) {
- var v = f(source);
- if (v.value1 instanceof Data_Maybe.Just) {
- $tco_var_source = v.value1.value0;
- $copy_memo = new Cons(v.value0, memo);
- return;
- }
- ;
- if (v.value1 instanceof Data_Maybe.Nothing) {
- $tco_done = true;
- return Data_Foldable.foldl(foldableList)(Data_Function.flip(Cons.create))(Nil.value)(new Cons(v.value0, memo));
- }
- ;
- throw new Error("Failed pattern match at Data.List.Types (line 133, column 22 - line 135, column 61): " + [v.constructor.name]);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($tco_var_source, $copy_memo);
- }
- ;
- return $tco_result;
- };
- };
- return go(b)(Nil.value);
- };
- });
- var unfoldableList = new Data_Unfoldable.Unfoldable(function () {
- return unfoldable1List;
- }, function (f) {
- return function (b) {
- var go = function go($copy_source) {
- return function ($copy_memo) {
- var $tco_var_source = $copy_source;
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(source, memo) {
- var v = f(source);
- if (v instanceof Data_Maybe.Nothing) {
- $tco_done = true;
- return Data_Foldable.foldl(foldableList)(Data_Function.flip(Cons.create))(Nil.value)(memo);
- }
- ;
- if (v instanceof Data_Maybe.Just) {
- $tco_var_source = v.value0.value1;
- $copy_memo = new Cons(v.value0.value0, memo);
- return;
- }
- ;
- throw new Error("Failed pattern match at Data.List.Types (line 140, column 22 - line 142, column 52): " + [v.constructor.name]);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($tco_var_source, $copy_memo);
- }
- ;
- return $tco_result;
- };
- };
- return go(b)(Nil.value);
- };
- });
- var unfoldable1NonEmptyList = Data_NonEmpty.unfoldable1NonEmpty(unfoldableList);
- var foldable1NonEmptyList = Data_NonEmpty.foldable1NonEmpty(foldableList);
- var extendNonEmptyList = new Control_Extend.Extend(function () {
- return functorNonEmptyList;
- }, function (f) {
- return function (v) {
- var go = function go(a) {
- return function (v1) {
- return {
- val: new Cons(f(new Data_NonEmpty.NonEmpty(a, v1.acc)), v1.val),
- acc: new Cons(a, v1.acc)
- };
- };
- };
- return new Data_NonEmpty.NonEmpty(f(v), Data_Foldable.foldr(foldableList)(go)({
- val: Nil.value,
- acc: Nil.value
- })(v.value1).val);
- };
- });
- var extendList = new Control_Extend.Extend(function () {
- return functorList;
- }, function (f) {
- return function (v) {
- if (v instanceof Nil) {
- return Nil.value;
- }
- ;
- if (v instanceof Cons) {
- var go = function go(a$prime) {
- return function (v1) {
- var acc$prime = new Cons(a$prime, v1.acc);
- return {
- val: new Cons(f(acc$prime), v1.val),
- acc: acc$prime
- };
- };
- };
- return new Cons(f(v), Data_Foldable.foldr(foldableList)(go)({
- val: Nil.value,
- acc: Nil.value
- })(v.value1).val);
- }
- ;
- throw new Error("Failed pattern match at Data.List.Types (line 180, column 1 - line 187, column 42): " + [f.constructor.name, v.constructor.name]);
- };
- });
- var eq1List = new Data_Eq.Eq1(function (dictEq) {
- return function (xs) {
- return function (ys) {
- var go = function go($copy_v) {
- return function ($copy_v1) {
- return function ($copy_v2) {
- var $tco_var_v = $copy_v;
- var $tco_var_v1 = $copy_v1;
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(v, v1, v2) {
- if (!v2) {
- $tco_done = true;
- return false;
- }
- ;
- if (v instanceof Nil && v1 instanceof Nil) {
- $tco_done = true;
- return v2;
- }
- ;
- if (v instanceof Cons && v1 instanceof Cons) {
- $tco_var_v = v.value1;
- $tco_var_v1 = v1.value1;
- $copy_v2 = v2 && Data_Eq.eq(dictEq)(v1.value0)(v.value0);
- return;
- }
- ;
- $tco_done = true;
- return false;
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($tco_var_v, $tco_var_v1, $copy_v2);
- }
- ;
- return $tco_result;
- };
- };
- };
- return go(xs)(ys)(true);
- };
- };
- });
- var eqList = function eqList(dictEq) {
- return new Data_Eq.Eq(Data_Eq.eq1(eq1List)(dictEq));
- };
- var eqNonEmptyList = function eqNonEmptyList(dictEq) {
- return Data_NonEmpty.eqNonEmpty(eq1List)(dictEq);
- };
- var ord1List = new Data_Ord.Ord1(function () {
- return eq1List;
- }, function (dictOrd) {
- return function (xs) {
- return function (ys) {
- var go = function go($copy_v) {
- return function ($copy_v1) {
- var $tco_var_v = $copy_v;
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(v, v1) {
- if (v instanceof Nil && v1 instanceof Nil) {
- $tco_done = true;
- return Data_Ordering.EQ.value;
- }
- ;
- if (v instanceof Nil) {
- $tco_done = true;
- return Data_Ordering.LT.value;
- }
- ;
- if (v1 instanceof Nil) {
- $tco_done = true;
- return Data_Ordering.GT.value;
- }
- ;
- if (v instanceof Cons && v1 instanceof Cons) {
- var v2 = Data_Ord.compare(dictOrd)(v.value0)(v1.value0);
- if (v2 instanceof Data_Ordering.EQ) {
- $tco_var_v = v.value1;
- $copy_v1 = v1.value1;
- return;
- }
- ;
- $tco_done = true;
- return v2;
- }
- ;
- throw new Error("Failed pattern match at Data.List.Types (line 61, column 5 - line 61, column 20): " + [v.constructor.name, v1.constructor.name]);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($tco_var_v, $copy_v1);
- }
- ;
- return $tco_result;
- };
- };
- return go(xs)(ys);
- };
- };
- });
- var ordList = function ordList(dictOrd) {
- return new Data_Ord.Ord(function () {
- return eqList(dictOrd.Eq0());
- }, Data_Ord.compare1(ord1List)(dictOrd));
- };
- var ordNonEmptyList = function ordNonEmptyList(dictOrd) {
- return Data_NonEmpty.ordNonEmpty(ord1List)(dictOrd);
- };
- var comonadNonEmptyList = new Control_Comonad.Comonad(function () {
- return extendNonEmptyList;
- }, function (v) {
- return v.value0;
- });
- var applyList = new Control_Apply.Apply(function () {
- return functorList;
- }, function (v) {
- return function (v1) {
- if (v instanceof Nil) {
- return Nil.value;
- }
- ;
- if (v instanceof Cons) {
- return Data_Semigroup.append(semigroupList)(Data_Functor.map(functorList)(v.value0)(v1))(Control_Apply.apply(applyList)(v.value1)(v1));
- }
- ;
- throw new Error("Failed pattern match at Data.List.Types (line 155, column 1 - line 157, column 48): " + [v.constructor.name, v1.constructor.name]);
- };
- });
- var applyNonEmptyList = new Control_Apply.Apply(function () {
- return functorNonEmptyList;
- }, function (v) {
- return function (v1) {
- return new Data_NonEmpty.NonEmpty(v.value0(v1.value0), Data_Semigroup.append(semigroupList)(Control_Apply.apply(applyList)(v.value1)(new Cons(v1.value0, Nil.value)))(Control_Apply.apply(applyList)(new Cons(v.value0, v.value1))(v1.value1)));
- };
- });
- var bindList = new Control_Bind.Bind(function () {
- return applyList;
- }, function (v) {
- return function (v1) {
- if (v instanceof Nil) {
- return Nil.value;
- }
- ;
- if (v instanceof Cons) {
- return Data_Semigroup.append(semigroupList)(v1(v.value0))(Control_Bind.bind(bindList)(v.value1)(v1));
- }
- ;
- throw new Error("Failed pattern match at Data.List.Types (line 162, column 1 - line 164, column 37): " + [v.constructor.name, v1.constructor.name]);
- };
- });
- var bindNonEmptyList = new Control_Bind.Bind(function () {
- return applyNonEmptyList;
- }, function (v) {
- return function (f) {
- var v1 = f(v.value0);
- return new Data_NonEmpty.NonEmpty(v1.value0, Data_Semigroup.append(semigroupList)(v1.value1)(Control_Bind.bind(bindList)(v.value1)(function ($232) {
- return toList(f($232));
- })));
- };
- });
- var applicativeList = new Control_Applicative.Applicative(function () {
- return applyList;
- }, function (a) {
- return new Cons(a, Nil.value);
- });
- var monadList = new Control_Monad.Monad(function () {
- return applicativeList;
- }, function () {
- return bindList;
- });
- var altNonEmptyList = new Control_Alt.Alt(function () {
- return functorNonEmptyList;
- }, Data_Semigroup.append(semigroupNonEmptyList));
- var altList = new Control_Alt.Alt(function () {
- return functorList;
- }, Data_Semigroup.append(semigroupList));
- var plusList = new Control_Plus.Plus(function () {
- return altList;
- }, Nil.value);
- var alternativeList = new Control_Alternative.Alternative(function () {
- return applicativeList;
- }, function () {
- return plusList;
- });
- var monadZeroList = new Control_MonadZero.MonadZero(function () {
- return alternativeList;
- }, function () {
- return monadList;
- });
- var monadPlusList = new Control_MonadPlus.MonadPlus(function () {
- return monadZeroList;
- });
- var applicativeNonEmptyList = new Control_Applicative.Applicative(function () {
- return applyNonEmptyList;
- }, function () {
- var $233 = Data_NonEmpty.singleton(plusList);
- return function ($234) {
- return NonEmptyList($233($234));
- };
- }());
- var monadNonEmptyList = new Control_Monad.Monad(function () {
- return applicativeNonEmptyList;
- }, function () {
- return bindNonEmptyList;
- });
- var traversable1NonEmptyList = new Data_Semigroup_Traversable.Traversable1(function () {
- return foldable1NonEmptyList;
- }, function () {
- return traversableNonEmptyList;
- }, function (dictApply) {
- return Data_Semigroup_Traversable.traverse1(traversable1NonEmptyList)(dictApply)(Control_Category.identity(Control_Category.categoryFn));
- }, function (dictApply) {
- return function (f) {
- return function (v) {
- return Data_Functor.mapFlipped(dictApply.Functor0())(Data_Foldable.foldl(foldableList)(function (acc) {
- var $235 = Control_Apply.lift2(dictApply)(Data_Function.flip(nelCons))(acc);
- return function ($236) {
- return $235(f($236));
- };
- })(Data_Functor.map(dictApply.Functor0())(Control_Applicative.pure(applicativeNonEmptyList))(f(v.value0)))(v.value1))(function (v1) {
- return Data_Foldable.foldl(foldableList)(Data_Function.flip(nelCons))(Control_Applicative.pure(applicativeNonEmptyList)(v1.value0))(v1.value1);
- });
- };
- };
- });
- module.exports = {
- Nil: Nil,
- Cons: Cons,
- NonEmptyList: NonEmptyList,
- toList: toList,
- nelCons: nelCons,
- showList: showList,
- eqList: eqList,
- eq1List: eq1List,
- ordList: ordList,
- ord1List: ord1List,
- semigroupList: semigroupList,
- monoidList: monoidList,
- functorList: functorList,
- functorWithIndexList: functorWithIndexList,
- foldableList: foldableList,
- foldableWithIndexList: foldableWithIndexList,
- unfoldable1List: unfoldable1List,
- unfoldableList: unfoldableList,
- traversableList: traversableList,
- traversableWithIndexList: traversableWithIndexList,
- applyList: applyList,
- applicativeList: applicativeList,
- bindList: bindList,
- monadList: monadList,
- altList: altList,
- plusList: plusList,
- alternativeList: alternativeList,
- monadZeroList: monadZeroList,
- monadPlusList: monadPlusList,
- extendList: extendList,
- newtypeNonEmptyList: newtypeNonEmptyList,
- eqNonEmptyList: eqNonEmptyList,
- ordNonEmptyList: ordNonEmptyList,
- showNonEmptyList: showNonEmptyList,
- functorNonEmptyList: functorNonEmptyList,
- applyNonEmptyList: applyNonEmptyList,
- applicativeNonEmptyList: applicativeNonEmptyList,
- bindNonEmptyList: bindNonEmptyList,
- monadNonEmptyList: monadNonEmptyList,
- altNonEmptyList: altNonEmptyList,
- extendNonEmptyList: extendNonEmptyList,
- comonadNonEmptyList: comonadNonEmptyList,
- semigroupNonEmptyList: semigroupNonEmptyList,
- foldableNonEmptyList: foldableNonEmptyList,
- traversableNonEmptyList: traversableNonEmptyList,
- foldable1NonEmptyList: foldable1NonEmptyList,
- unfoldable1NonEmptyList: unfoldable1NonEmptyList,
- functorWithIndexNonEmptyList: functorWithIndexNonEmptyList,
- foldableWithIndexNonEmptyList: foldableWithIndexNonEmptyList,
- traversableWithIndexNonEmptyList: traversableWithIndexNonEmptyList,
- traversable1NonEmptyList: traversable1NonEmptyList
- };
- },{"../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Alternative/index.js":"../output/Control.Alternative/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Comonad/index.js":"../output/Control.Comonad/index.js","../Control.Extend/index.js":"../output/Control.Extend/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Control.MonadPlus/index.js":"../output/Control.MonadPlus/index.js","../Control.MonadZero/index.js":"../output/Control.MonadZero/index.js","../Control.Plus/index.js":"../output/Control.Plus/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.FoldableWithIndex/index.js":"../output/Data.FoldableWithIndex/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.FunctorWithIndex/index.js":"../output/Data.FunctorWithIndex/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.NonEmpty/index.js":"../output/Data.NonEmpty/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Semigroup.Traversable/index.js":"../output/Data.Semigroup.Traversable/index.js","../Data.Semiring/index.js":"../output/Data.Semiring/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Data.TraversableWithIndex/index.js":"../output/Data.TraversableWithIndex/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js","../Data.Unfoldable/index.js":"../output/Data.Unfoldable/index.js","../Data.Unfoldable1/index.js":"../output/Data.Unfoldable1/index.js"}],"../output/Foreign/foreign.js":[function(require,module,exports) {
- "use strict";
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
- exports.unsafeToForeign = function (value) {
- return value;
- };
- exports.unsafeFromForeign = function (value) {
- return value;
- };
- exports.typeOf = function (value) {
- return _typeof(value);
- };
- exports.tagOf = function (value) {
- return Object.prototype.toString.call(value).slice(8, -1);
- };
- exports.isNull = function (value) {
- return value === null;
- };
- exports.isUndefined = function (value) {
- return value === undefined;
- };
- exports.isArray = Array.isArray || function (value) {
- return Object.prototype.toString.call(value) === "[object Array]";
- };
- },{}],"../output/Data.Int/foreign.js":[function(require,module,exports) {
- "use strict";
- exports.fromNumberImpl = function (just) {
- return function (nothing) {
- return function (n) {
- /* jshint bitwise: false */
- return (n | 0) === n ? just(n) : nothing;
- };
- };
- };
- exports.toNumber = function (n) {
- return n;
- };
- exports.fromStringAsImpl = function (just) {
- return function (nothing) {
- return function (radix) {
- var digits;
- if (radix < 11) {
- digits = "[0-" + (radix - 1).toString() + "]";
- } else if (radix === 11) {
- digits = "[0-9a]";
- } else {
- digits = "[0-9a-" + String.fromCharCode(86 + radix) + "]";
- }
- var pattern = new RegExp("^[\\+\\-]?" + digits + "+$", "i");
- return function (s) {
- /* jshint bitwise: false */
- if (pattern.test(s)) {
- var i = parseInt(s, radix);
- return (i | 0) === i ? just(i) : nothing;
- } else {
- return nothing;
- }
- };
- };
- };
- };
- exports.toStringAs = function (radix) {
- return function (i) {
- return i.toString(radix);
- };
- };
- exports.quot = function (x) {
- return function (y) {
- /* jshint bitwise: false */
- return x / y | 0;
- };
- };
- exports.rem = function (x) {
- return function (y) {
- return x % y;
- };
- };
- exports.pow = function (x) {
- return function (y) {
- /* jshint bitwise: false */
- return Math.pow(x, y) | 0;
- };
- };
- },{}],"../output/Data.DivisionRing/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Data_Ring = require("../Data.Ring/index.js");
- var Data_Semiring = require("../Data.Semiring/index.js");
- var DivisionRing = function DivisionRing(Ring0, recip) {
- this.Ring0 = Ring0;
- this.recip = recip;
- };
- var recip = function recip(dict) {
- return dict.recip;
- };
- var rightDiv = function rightDiv(dictDivisionRing) {
- return function (a) {
- return function (b) {
- return Data_Semiring.mul(dictDivisionRing.Ring0().Semiring0())(a)(recip(dictDivisionRing)(b));
- };
- };
- };
- var leftDiv = function leftDiv(dictDivisionRing) {
- return function (a) {
- return function (b) {
- return Data_Semiring.mul(dictDivisionRing.Ring0().Semiring0())(recip(dictDivisionRing)(b))(a);
- };
- };
- };
- var divisionringNumber = new DivisionRing(function () {
- return Data_Ring.ringNumber;
- }, function (x) {
- return 1.0 / x;
- });
- module.exports = {
- DivisionRing: DivisionRing,
- recip: recip,
- leftDiv: leftDiv,
- rightDiv: rightDiv,
- divisionringNumber: divisionringNumber
- };
- },{"../Data.Ring/index.js":"../output/Data.Ring/index.js","../Data.Semiring/index.js":"../output/Data.Semiring/index.js"}],"../output/Global/foreign.js":[function(require,module,exports) {
- /* globals exports */
- "use strict";
- exports.nan = NaN;
- exports.isNaN = isNaN;
- exports.infinity = Infinity;
- exports.isFinite = isFinite;
- exports.readInt = function (radix) {
- return function (n) {
- return parseInt(n, radix);
- };
- };
- exports.readFloat = parseFloat;
- var formatNumber = function formatNumber(format) {
- return function (fail, succ, digits, n) {
- try {
- return succ(n[format](digits));
- } catch (e) {
- return fail(e.message);
- }
- };
- };
- exports._toFixed = formatNumber("toFixed");
- exports._toExponential = formatNumber("toExponential");
- exports._toPrecision = formatNumber("toPrecision");
- var encdecURI = function encdecURI(encdec) {
- return function (fail, succ, s) {
- try {
- return succ(encdec(s));
- } catch (e) {
- return fail(e.message);
- }
- };
- };
- exports._decodeURI = encdecURI(decodeURI);
- exports._encodeURI = encdecURI(encodeURI);
- exports._decodeURIComponent = encdecURI(decodeURIComponent);
- exports._encodeURIComponent = encdecURI(encodeURIComponent);
- },{}],"../output/Global/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var toPrecision = function toPrecision(digits) {
- return function (n) {
- return $foreign["_toPrecision"](Data_Function["const"](Data_Maybe.Nothing.value), Data_Maybe.Just.create, digits, n);
- };
- };
- var toFixed = function toFixed(digits) {
- return function (n) {
- return $foreign["_toFixed"](Data_Function["const"](Data_Maybe.Nothing.value), Data_Maybe.Just.create, digits, n);
- };
- };
- var toExponential = function toExponential(digits) {
- return function (n) {
- return $foreign["_toExponential"](Data_Function["const"](Data_Maybe.Nothing.value), Data_Maybe.Just.create, digits, n);
- };
- };
- var $$encodeURIComponent = function $$encodeURIComponent(s) {
- return $foreign["_encodeURIComponent"](Data_Function["const"](Data_Maybe.Nothing.value), Data_Maybe.Just.create, s);
- };
- var $$encodeURI = function $$encodeURI(s) {
- return $foreign["_encodeURI"](Data_Function["const"](Data_Maybe.Nothing.value), Data_Maybe.Just.create, s);
- };
- var $$decodeURIComponent = function $$decodeURIComponent(s) {
- return $foreign["_decodeURIComponent"](Data_Function["const"](Data_Maybe.Nothing.value), Data_Maybe.Just.create, s);
- };
- var $$decodeURI = function $$decodeURI(s) {
- return $foreign["_decodeURI"](Data_Function["const"](Data_Maybe.Nothing.value), Data_Maybe.Just.create, s);
- };
- module.exports = {
- toFixed: toFixed,
- toExponential: toExponential,
- toPrecision: toPrecision,
- "decodeURI": $$decodeURI,
- "encodeURI": $$encodeURI,
- "decodeURIComponent": $$decodeURIComponent,
- "encodeURIComponent": $$encodeURIComponent,
- nan: $foreign.nan,
- "isNaN": $foreign["isNaN"],
- infinity: $foreign.infinity,
- "isFinite": $foreign["isFinite"],
- readInt: $foreign.readInt,
- readFloat: $foreign.readFloat
- };
- },{"./foreign.js":"../output/Global/foreign.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js"}],"../output/Math/foreign.js":[function(require,module,exports) {
- "use strict"; // module Math
- exports.abs = Math.abs;
- exports.acos = Math.acos;
- exports.asin = Math.asin;
- exports.atan = Math.atan;
- exports.atan2 = function (y) {
- return function (x) {
- return Math.atan2(y, x);
- };
- };
- exports.ceil = Math.ceil;
- exports.cos = Math.cos;
- exports.exp = Math.exp;
- exports.floor = Math.floor;
- exports.trunc = Math.trunc || function (n) {
- return n < 0 ? Math.ceil(n) : Math.floor(n);
- };
- exports.log = Math.log;
- exports.max = function (n1) {
- return function (n2) {
- return Math.max(n1, n2);
- };
- };
- exports.min = function (n1) {
- return function (n2) {
- return Math.min(n1, n2);
- };
- };
- exports.pow = function (n) {
- return function (p) {
- return Math.pow(n, p);
- };
- };
- exports.remainder = function (n) {
- return function (m) {
- return n % m;
- };
- };
- exports.round = Math.round;
- exports.sin = Math.sin;
- exports.sqrt = Math.sqrt;
- exports.tan = Math.tan;
- exports.e = Math.E;
- exports.ln2 = Math.LN2;
- exports.ln10 = Math.LN10;
- exports.log2e = Math.LOG2E;
- exports.log10e = Math.LOG10E;
- exports.pi = Math.PI;
- exports.tau = 2 * Math.PI;
- exports.sqrt1_2 = Math.SQRT1_2;
- exports.sqrt2 = Math.SQRT2;
- },{}],"../output/Math/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- module.exports = {
- abs: $foreign.abs,
- acos: $foreign.acos,
- asin: $foreign.asin,
- atan: $foreign.atan,
- atan2: $foreign.atan2,
- ceil: $foreign.ceil,
- cos: $foreign.cos,
- exp: $foreign.exp,
- floor: $foreign.floor,
- log: $foreign.log,
- max: $foreign.max,
- min: $foreign.min,
- pow: $foreign.pow,
- round: $foreign.round,
- sin: $foreign.sin,
- sqrt: $foreign.sqrt,
- tan: $foreign.tan,
- trunc: $foreign.trunc,
- remainder: $foreign.remainder,
- e: $foreign.e,
- ln2: $foreign.ln2,
- ln10: $foreign.ln10,
- log2e: $foreign.log2e,
- log10e: $foreign.log10e,
- pi: $foreign.pi,
- tau: $foreign.tau,
- sqrt1_2: $foreign.sqrt1_2,
- sqrt2: $foreign.sqrt2
- };
- },{"./foreign.js":"../output/Math/foreign.js"}],"../output/Data.Int/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Control_Category = require("../Control.Category/index.js");
- var Data_Boolean = require("../Data.Boolean/index.js");
- var Data_Bounded = require("../Data.Bounded/index.js");
- var Data_CommutativeRing = require("../Data.CommutativeRing/index.js");
- var Data_DivisionRing = require("../Data.DivisionRing/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_EuclideanRing = require("../Data.EuclideanRing/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Ordering = require("../Data.Ordering/index.js");
- var Data_Ring = require("../Data.Ring/index.js");
- var Data_Semiring = require("../Data.Semiring/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Global = require("../Global/index.js");
- var $$Math = require("../Math/index.js");
- var Radix = function Radix(x) {
- return x;
- };
- var Even = function () {
- function Even() {}
- ;
- Even.value = new Even();
- return Even;
- }();
- var Odd = function () {
- function Odd() {}
- ;
- Odd.value = new Odd();
- return Odd;
- }();
- var showParity = new Data_Show.Show(function (v) {
- if (v instanceof Even) {
- return "Even";
- }
- ;
- if (v instanceof Odd) {
- return "Odd";
- }
- ;
- throw new Error("Failed pattern match at Data.Int (line 112, column 1 - line 114, column 19): " + [v.constructor.name]);
- });
- var radix = function radix(n) {
- if (n >= 2 && n <= 36) {
- return new Data_Maybe.Just(n);
- }
- ;
- if (Data_Boolean.otherwise) {
- return Data_Maybe.Nothing.value;
- }
- ;
- throw new Error("Failed pattern match at Data.Int (line 193, column 1 - line 193, column 28): " + [n.constructor.name]);
- };
- var odd = function odd(x) {
- return (x & 1) !== 0;
- };
- var octal = 8;
- var hexadecimal = 16;
- var fromStringAs = $foreign.fromStringAsImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
- var fromString = fromStringAs(10);
- var fromNumber = $foreign.fromNumberImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
- var unsafeClamp = function unsafeClamp(x) {
- if (x === Global.infinity) {
- return 0;
- }
- ;
- if (x === -Global.infinity) {
- return 0;
- }
- ;
- if (x >= $foreign.toNumber(Data_Bounded.top(Data_Bounded.boundedInt))) {
- return Data_Bounded.top(Data_Bounded.boundedInt);
- }
- ;
- if (x <= $foreign.toNumber(Data_Bounded.bottom(Data_Bounded.boundedInt))) {
- return Data_Bounded.bottom(Data_Bounded.boundedInt);
- }
- ;
- if (Data_Boolean.otherwise) {
- return Data_Maybe.fromMaybe(0)(fromNumber(x));
- }
- ;
- throw new Error("Failed pattern match at Data.Int (line 66, column 1 - line 66, column 29): " + [x.constructor.name]);
- };
- var round = function round($23) {
- return unsafeClamp($$Math.round($23));
- };
- var floor = function floor($24) {
- return unsafeClamp($$Math.floor($24));
- };
- var even = function even(x) {
- return (x & 1) === 0;
- };
- var parity = function parity(n) {
- var $14 = even(n);
- if ($14) {
- return Even.value;
- }
- ;
- return Odd.value;
- };
- var eqParity = new Data_Eq.Eq(function (x) {
- return function (y) {
- if (x instanceof Even && y instanceof Even) {
- return true;
- }
- ;
- if (x instanceof Odd && y instanceof Odd) {
- return true;
- }
- ;
- return false;
- };
- });
- var ordParity = new Data_Ord.Ord(function () {
- return eqParity;
- }, function (x) {
- return function (y) {
- if (x instanceof Even && y instanceof Even) {
- return Data_Ordering.EQ.value;
- }
- ;
- if (x instanceof Even) {
- return Data_Ordering.LT.value;
- }
- ;
- if (y instanceof Even) {
- return Data_Ordering.GT.value;
- }
- ;
- if (x instanceof Odd && y instanceof Odd) {
- return Data_Ordering.EQ.value;
- }
- ;
- throw new Error("Failed pattern match at Data.Int (line 110, column 1 - line 110, column 40): " + [x.constructor.name, y.constructor.name]);
- };
- });
- var semiringParity = new Data_Semiring.Semiring(function (x) {
- return function (y) {
- var $19 = Data_Eq.eq(eqParity)(x)(y);
- if ($19) {
- return Even.value;
- }
- ;
- return Odd.value;
- };
- }, function (v) {
- return function (v1) {
- if (v instanceof Odd && v1 instanceof Odd) {
- return Odd.value;
- }
- ;
- return Even.value;
- };
- }, Odd.value, Even.value);
- var ringParity = new Data_Ring.Ring(function () {
- return semiringParity;
- }, Data_Semiring.add(semiringParity));
- var divisionRingParity = new Data_DivisionRing.DivisionRing(function () {
- return ringParity;
- }, Control_Category.identity(Control_Category.categoryFn));
- var decimal = 10;
- var commutativeRingParity = new Data_CommutativeRing.CommutativeRing(function () {
- return ringParity;
- });
- var euclideanRingParity = new Data_EuclideanRing.EuclideanRing(function () {
- return commutativeRingParity;
- }, function (v) {
- if (v instanceof Even) {
- return 0;
- }
- ;
- if (v instanceof Odd) {
- return 1;
- }
- ;
- throw new Error("Failed pattern match at Data.Int (line 132, column 1 - line 136, column 17): " + [v.constructor.name]);
- }, function (x) {
- return function (v) {
- return x;
- };
- }, function (v) {
- return function (v1) {
- return Even.value;
- };
- });
- var ceil = function ceil($25) {
- return unsafeClamp($$Math.ceil($25));
- };
- var boundedParity = new Data_Bounded.Bounded(function () {
- return ordParity;
- }, Even.value, Odd.value);
- var binary = 2;
- var base36 = 36;
- module.exports = {
- fromNumber: fromNumber,
- ceil: ceil,
- floor: floor,
- round: round,
- fromString: fromString,
- radix: radix,
- binary: binary,
- octal: octal,
- decimal: decimal,
- hexadecimal: hexadecimal,
- base36: base36,
- fromStringAs: fromStringAs,
- Even: Even,
- Odd: Odd,
- parity: parity,
- even: even,
- odd: odd,
- eqParity: eqParity,
- ordParity: ordParity,
- showParity: showParity,
- boundedParity: boundedParity,
- semiringParity: semiringParity,
- ringParity: ringParity,
- commutativeRingParity: commutativeRingParity,
- euclideanRingParity: euclideanRingParity,
- divisionRingParity: divisionRingParity,
- toNumber: $foreign.toNumber,
- toStringAs: $foreign.toStringAs,
- quot: $foreign.quot,
- rem: $foreign.rem,
- pow: $foreign.pow
- };
- },{"./foreign.js":"../output/Data.Int/foreign.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Boolean/index.js":"../output/Data.Boolean/index.js","../Data.Bounded/index.js":"../output/Data.Bounded/index.js","../Data.CommutativeRing/index.js":"../output/Data.CommutativeRing/index.js","../Data.DivisionRing/index.js":"../output/Data.DivisionRing/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.EuclideanRing/index.js":"../output/Data.EuclideanRing/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Ring/index.js":"../output/Data.Ring/index.js","../Data.Semiring/index.js":"../output/Data.Semiring/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Global/index.js":"../output/Global/index.js","../Math/index.js":"../output/Math/index.js"}],"../output/Data.List/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Alt = require("../Control.Alt/index.js");
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Category = require("../Control.Category/index.js");
- var Control_Lazy = require("../Control.Lazy/index.js");
- var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js");
- var Data_Bifunctor = require("../Data.Bifunctor/index.js");
- var Data_Boolean = require("../Data.Boolean/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Foldable = require("../Data.Foldable/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
- var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
- var Data_List_Types = require("../Data.List.Types/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_NonEmpty = require("../Data.NonEmpty/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Ordering = require("../Data.Ordering/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Data_Traversable = require("../Data.Traversable/index.js");
- var Data_Tuple = require("../Data.Tuple/index.js");
- var Data_Unfoldable = require("../Data.Unfoldable/index.js");
- var Data_Unit = require("../Data.Unit/index.js");
- var Pattern = function Pattern(x) {
- return x;
- };
- var updateAt = function updateAt(v) {
- return function (v1) {
- return function (v2) {
- if (v === 0 && v2 instanceof Data_List_Types.Cons) {
- return new Data_Maybe.Just(new Data_List_Types.Cons(v1, v2.value1));
- }
- ;
- if (v2 instanceof Data_List_Types.Cons) {
- return Data_Functor.map(Data_Maybe.functorMaybe)(function (v3) {
- return new Data_List_Types.Cons(v2.value0, v3);
- })(updateAt(v - 1 | 0)(v1)(v2.value1));
- }
- ;
- return Data_Maybe.Nothing.value;
- };
- };
- };
- var unzip = Data_Foldable.foldr(Data_List_Types.foldableList)(function (v) {
- return function (v1) {
- return new Data_Tuple.Tuple(new Data_List_Types.Cons(v.value0, v1.value0), new Data_List_Types.Cons(v.value1, v1.value1));
- };
- })(new Data_Tuple.Tuple(Data_List_Types.Nil.value, Data_List_Types.Nil.value));
- var uncons = function uncons(v) {
- if (v instanceof Data_List_Types.Nil) {
- return Data_Maybe.Nothing.value;
- }
- ;
- if (v instanceof Data_List_Types.Cons) {
- return new Data_Maybe.Just({
- head: v.value0,
- tail: v.value1
- });
- }
- ;
- throw new Error("Failed pattern match at Data.List (line 259, column 1 - line 259, column 66): " + [v.constructor.name]);
- };
- var toUnfoldable = function toUnfoldable(dictUnfoldable) {
- return Data_Unfoldable.unfoldr(dictUnfoldable)(function (xs) {
- return Data_Functor.map(Data_Maybe.functorMaybe)(function (rec) {
- return new Data_Tuple.Tuple(rec.head, rec.tail);
- })(uncons(xs));
- });
- };
- var tail = function tail(v) {
- if (v instanceof Data_List_Types.Nil) {
- return Data_Maybe.Nothing.value;
- }
- ;
- if (v instanceof Data_List_Types.Cons) {
- return new Data_Maybe.Just(v.value1);
- }
- ;
- throw new Error("Failed pattern match at Data.List (line 245, column 1 - line 245, column 43): " + [v.constructor.name]);
- };
- var stripPrefix = function stripPrefix(dictEq) {
- return function (v) {
- return function (s) {
- var go = function go(prefix) {
- return function (input) {
- if (prefix instanceof Data_List_Types.Cons && input instanceof Data_List_Types.Cons && Data_Eq.eq(dictEq)(prefix.value0)(input.value0)) {
- return Data_Maybe.Just.create(new Control_Monad_Rec_Class.Loop({
- a: prefix.value1,
- b: input.value1
- }));
- }
- ;
- if (prefix instanceof Data_List_Types.Nil) {
- return Data_Maybe.Just.create(new Control_Monad_Rec_Class.Done(input));
- }
- ;
- return Data_Maybe.Nothing.value;
- };
- };
- return Control_Monad_Rec_Class.tailRecM2(Control_Monad_Rec_Class.monadRecMaybe)(go)(v)(s);
- };
- };
- };
- var span = function span(v) {
- return function (v1) {
- if (v1 instanceof Data_List_Types.Cons && v(v1.value0)) {
- var v2 = span(v)(v1.value1);
- return {
- init: new Data_List_Types.Cons(v1.value0, v2.init),
- rest: v2.rest
- };
- }
- ;
- return {
- init: Data_List_Types.Nil.value,
- rest: v1
- };
- };
- };
- var snoc = function snoc(xs) {
- return function (x) {
- return Data_Foldable.foldr(Data_List_Types.foldableList)(Data_List_Types.Cons.create)(new Data_List_Types.Cons(x, Data_List_Types.Nil.value))(xs);
- };
- };
- var singleton = function singleton(a) {
- return new Data_List_Types.Cons(a, Data_List_Types.Nil.value);
- };
- var sortBy = function sortBy(cmp) {
- var merge = function merge(v) {
- return function (v1) {
- if (v instanceof Data_List_Types.Cons && v1 instanceof Data_List_Types.Cons) {
- if (Data_Eq.eq(Data_Ordering.eqOrdering)(cmp(v.value0)(v1.value0))(Data_Ordering.GT.value)) {
- return new Data_List_Types.Cons(v1.value0, merge(v)(v1.value1));
- }
- ;
- if (Data_Boolean.otherwise) {
- return new Data_List_Types.Cons(v.value0, merge(v.value1)(v1));
- }
- ;
- }
- ;
- if (v instanceof Data_List_Types.Nil) {
- return v1;
- }
- ;
- if (v1 instanceof Data_List_Types.Nil) {
- return v;
- }
- ;
- throw new Error("Failed pattern match at Data.List (line 473, column 3 - line 473, column 38): " + [v.constructor.name, v1.constructor.name]);
- };
- };
- var mergePairs = function mergePairs(v) {
- if (v instanceof Data_List_Types.Cons && v.value1 instanceof Data_List_Types.Cons) {
- return new Data_List_Types.Cons(merge(v.value0)(v.value1.value0), mergePairs(v.value1.value1));
- }
- ;
- return v;
- };
- var mergeAll = function mergeAll($copy_v) {
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(v) {
- if (v instanceof Data_List_Types.Cons && v.value1 instanceof Data_List_Types.Nil) {
- $tco_done = true;
- return v.value0;
- }
- ;
- $copy_v = mergePairs(v);
- return;
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($copy_v);
- }
- ;
- return $tco_result;
- };
- var sequences = function sequences(v) {
- if (v instanceof Data_List_Types.Cons && v.value1 instanceof Data_List_Types.Cons) {
- if (Data_Eq.eq(Data_Ordering.eqOrdering)(cmp(v.value0)(v.value1.value0))(Data_Ordering.GT.value)) {
- return descending(v.value1.value0)(singleton(v.value0))(v.value1.value1);
- }
- ;
- if (Data_Boolean.otherwise) {
- return ascending(v.value1.value0)(function (v1) {
- return new Data_List_Types.Cons(v.value0, v1);
- })(v.value1.value1);
- }
- ;
- }
- ;
- return singleton(v);
- };
- var descending = function descending($copy_a) {
- return function ($copy_as) {
- return function ($copy_v) {
- var $tco_var_a = $copy_a;
- var $tco_var_as = $copy_as;
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(a, as, v) {
- if (v instanceof Data_List_Types.Cons && Data_Eq.eq(Data_Ordering.eqOrdering)(cmp(a)(v.value0))(Data_Ordering.GT.value)) {
- $tco_var_a = v.value0;
- $tco_var_as = new Data_List_Types.Cons(a, as);
- $copy_v = v.value1;
- return;
- }
- ;
- $tco_done = true;
- return new Data_List_Types.Cons(new Data_List_Types.Cons(a, as), sequences(v));
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($tco_var_a, $tco_var_as, $copy_v);
- }
- ;
- return $tco_result;
- };
- };
- };
- var ascending = function ascending($copy_a) {
- return function ($copy_as) {
- return function ($copy_v) {
- var $tco_var_a = $copy_a;
- var $tco_var_as = $copy_as;
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(a, as, v) {
- if (v instanceof Data_List_Types.Cons && Data_Eq.notEq(Data_Ordering.eqOrdering)(cmp(a)(v.value0))(Data_Ordering.GT.value)) {
- $tco_var_a = v.value0;
- $tco_var_as = function $tco_var_as(ys) {
- return as(new Data_List_Types.Cons(a, ys));
- };
- $copy_v = v.value1;
- return;
- }
- ;
- $tco_done = true;
- return new Data_List_Types.Cons(as(singleton(a)), sequences(v));
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($tco_var_a, $tco_var_as, $copy_v);
- }
- ;
- return $tco_result;
- };
- };
- };
- return function ($331) {
- return mergeAll(sequences($331));
- };
- };
- var sort = function sort(dictOrd) {
- return function (xs) {
- return sortBy(Data_Ord.compare(dictOrd))(xs);
- };
- };
- var tails = function tails(v) {
- if (v instanceof Data_List_Types.Nil) {
- return singleton(Data_List_Types.Nil.value);
- }
- ;
- if (v instanceof Data_List_Types.Cons) {
- return new Data_List_Types.Cons(v, tails(v.value1));
- }
- ;
- throw new Error("Failed pattern match at Data.List (line 626, column 1 - line 626, column 43): " + [v.constructor.name]);
- };
- var showPattern = function showPattern(dictShow) {
- return new Data_Show.Show(function (v) {
- return "(Pattern " + (Data_Show.show(Data_List_Types.showList(dictShow))(v) + ")");
- });
- };
- var reverse = function () {
- var go = function go($copy_acc) {
- return function ($copy_v) {
- var $tco_var_acc = $copy_acc;
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(acc, v) {
- if (v instanceof Data_List_Types.Nil) {
- $tco_done = true;
- return acc;
- }
- ;
- if (v instanceof Data_List_Types.Cons) {
- $tco_var_acc = new Data_List_Types.Cons(v.value0, acc);
- $copy_v = v.value1;
- return;
- }
- ;
- throw new Error("Failed pattern match at Data.List (line 368, column 3 - line 368, column 19): " + [acc.constructor.name, v.constructor.name]);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($tco_var_acc, $copy_v);
- }
- ;
- return $tco_result;
- };
- };
- return go(Data_List_Types.Nil.value);
- }();
- var take = function () {
- var go = function go($copy_acc) {
- return function ($copy_v) {
- return function ($copy_v1) {
- var $tco_var_acc = $copy_acc;
- var $tco_var_v = $copy_v;
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(acc, v, v1) {
- if (v < 1) {
- $tco_done = true;
- return reverse(acc);
- }
- ;
- if (v1 instanceof Data_List_Types.Nil) {
- $tco_done = true;
- return reverse(acc);
- }
- ;
- if (v1 instanceof Data_List_Types.Cons) {
- $tco_var_acc = new Data_List_Types.Cons(v1.value0, acc);
- $tco_var_v = v - 1 | 0;
- $copy_v1 = v1.value1;
- return;
- }
- ;
- throw new Error("Failed pattern match at Data.List (line 520, column 3 - line 520, column 35): " + [acc.constructor.name, v.constructor.name, v1.constructor.name]);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($tco_var_acc, $tco_var_v, $copy_v1);
- }
- ;
- return $tco_result;
- };
- };
- };
- return go(Data_List_Types.Nil.value);
- }();
- var takeWhile = function takeWhile(p) {
- var go = function go($copy_acc) {
- return function ($copy_v) {
- var $tco_var_acc = $copy_acc;
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(acc, v) {
- if (v instanceof Data_List_Types.Cons && p(v.value0)) {
- $tco_var_acc = new Data_List_Types.Cons(v.value0, acc);
- $copy_v = v.value1;
- return;
- }
- ;
- $tco_done = true;
- return reverse(acc);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($tco_var_acc, $copy_v);
- }
- ;
- return $tco_result;
- };
- };
- return go(Data_List_Types.Nil.value);
- };
- var unsnoc = function unsnoc(lst) {
- var go = function go($copy_v) {
- return function ($copy_acc) {
- var $tco_var_v = $copy_v;
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(v, acc) {
- if (v instanceof Data_List_Types.Nil) {
- $tco_done = true;
- return Data_Maybe.Nothing.value;
- }
- ;
- if (v instanceof Data_List_Types.Cons && v.value1 instanceof Data_List_Types.Nil) {
- $tco_done = true;
- return new Data_Maybe.Just({
- revInit: acc,
- last: v.value0
- });
- }
- ;
- if (v instanceof Data_List_Types.Cons) {
- $tco_var_v = v.value1;
- $copy_acc = new Data_List_Types.Cons(v.value0, acc);
- return;
- }
- ;
- throw new Error("Failed pattern match at Data.List (line 270, column 3 - line 270, column 23): " + [v.constructor.name, acc.constructor.name]);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($tco_var_v, $copy_acc);
- }
- ;
- return $tco_result;
- };
- };
- return Data_Functor.map(Data_Maybe.functorMaybe)(function (h) {
- return {
- init: reverse(h.revInit),
- last: h.last
- };
- })(go(lst)(Data_List_Types.Nil.value));
- };
- var zipWith = function zipWith(f) {
- return function (xs) {
- return function (ys) {
- var go = function go($copy_v) {
- return function ($copy_v1) {
- return function ($copy_acc) {
- var $tco_var_v = $copy_v;
- var $tco_var_v1 = $copy_v1;
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(v, v1, acc) {
- if (v instanceof Data_List_Types.Nil) {
- $tco_done = true;
- return acc;
- }
- ;
- if (v1 instanceof Data_List_Types.Nil) {
- $tco_done = true;
- return acc;
- }
- ;
- if (v instanceof Data_List_Types.Cons && v1 instanceof Data_List_Types.Cons) {
- $tco_var_v = v.value1;
- $tco_var_v1 = v1.value1;
- $copy_acc = new Data_List_Types.Cons(f(v.value0)(v1.value0), acc);
- return;
- }
- ;
- throw new Error("Failed pattern match at Data.List (line 718, column 3 - line 718, column 21): " + [v.constructor.name, v1.constructor.name, acc.constructor.name]);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($tco_var_v, $tco_var_v1, $copy_acc);
- }
- ;
- return $tco_result;
- };
- };
- };
- return reverse(go(xs)(ys)(Data_List_Types.Nil.value));
- };
- };
- };
- var zip = zipWith(Data_Tuple.Tuple.create);
- var zipWithA = function zipWithA(dictApplicative) {
- return function (f) {
- return function (xs) {
- return function (ys) {
- return Data_Traversable.sequence(Data_List_Types.traversableList)(dictApplicative)(zipWith(f)(xs)(ys));
- };
- };
- };
- };
- var range = function range(start) {
- return function (end) {
- if (start === end) {
- return singleton(start);
- }
- ;
- if (Data_Boolean.otherwise) {
- var go = function go($copy_s) {
- return function ($copy_e) {
- return function ($copy_step) {
- return function ($copy_rest) {
- var $tco_var_s = $copy_s;
- var $tco_var_e = $copy_e;
- var $tco_var_step = $copy_step;
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(s, e, step, rest) {
- if (s === e) {
- $tco_done = true;
- return new Data_List_Types.Cons(s, rest);
- }
- ;
- if (Data_Boolean.otherwise) {
- $tco_var_s = s + step | 0;
- $tco_var_e = e;
- $tco_var_step = step;
- $copy_rest = new Data_List_Types.Cons(s, rest);
- return;
- }
- ;
- throw new Error("Failed pattern match at Data.List (line 148, column 3 - line 149, column 65): " + [s.constructor.name, e.constructor.name, step.constructor.name, rest.constructor.name]);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($tco_var_s, $tco_var_e, $tco_var_step, $copy_rest);
- }
- ;
- return $tco_result;
- };
- };
- };
- };
- return go(end)(start)(function () {
- var $220 = start > end;
- if ($220) {
- return 1;
- }
- ;
- return -1 | 0;
- }())(Data_List_Types.Nil.value);
- }
- ;
- throw new Error("Failed pattern match at Data.List (line 144, column 1 - line 144, column 32): " + [start.constructor.name, end.constructor.name]);
- };
- };
- var partition = function partition(p) {
- return function (xs) {
- var select = function select(x) {
- return function (v) {
- var $223 = p(x);
- if ($223) {
- return {
- no: v.no,
- yes: new Data_List_Types.Cons(x, v.yes)
- };
- }
- ;
- return {
- no: new Data_List_Types.Cons(x, v.no),
- yes: v.yes
- };
- };
- };
- return Data_Foldable.foldr(Data_List_Types.foldableList)(select)({
- no: Data_List_Types.Nil.value,
- yes: Data_List_Types.Nil.value
- })(xs);
- };
- };
- var $$null = function $$null(v) {
- if (v instanceof Data_List_Types.Nil) {
- return true;
- }
- ;
- return false;
- };
- var newtypePattern = new Data_Newtype.Newtype(function (n) {
- return n;
- }, Pattern);
- var mapWithIndex = Data_FunctorWithIndex.mapWithIndex(Data_List_Types.functorWithIndexList);
- var mapMaybe = function mapMaybe(f) {
- var go = function go($copy_acc) {
- return function ($copy_v) {
- var $tco_var_acc = $copy_acc;
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(acc, v) {
- if (v instanceof Data_List_Types.Nil) {
- $tco_done = true;
- return reverse(acc);
- }
- ;
- if (v instanceof Data_List_Types.Cons) {
- var v1 = f(v.value0);
- if (v1 instanceof Data_Maybe.Nothing) {
- $tco_var_acc = acc;
- $copy_v = v.value1;
- return;
- }
- ;
- if (v1 instanceof Data_Maybe.Just) {
- $tco_var_acc = new Data_List_Types.Cons(v1.value0, acc);
- $copy_v = v.value1;
- return;
- }
- ;
- throw new Error("Failed pattern match at Data.List (line 419, column 5 - line 421, column 32): " + [v1.constructor.name]);
- }
- ;
- throw new Error("Failed pattern match at Data.List (line 417, column 3 - line 417, column 27): " + [acc.constructor.name, v.constructor.name]);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($tco_var_acc, $copy_v);
- }
- ;
- return $tco_result;
- };
- };
- return go(Data_List_Types.Nil.value);
- };
- var manyRec = function manyRec(dictMonadRec) {
- return function (dictAlternative) {
- return function (p) {
- var go = function go(acc) {
- return Control_Bind.bind(dictMonadRec.Monad0().Bind1())(Control_Alt.alt(dictAlternative.Plus1().Alt0())(Data_Functor.map(dictAlternative.Plus1().Alt0().Functor0())(Control_Monad_Rec_Class.Loop.create)(p))(Control_Applicative.pure(dictAlternative.Applicative0())(new Control_Monad_Rec_Class.Done(Data_Unit.unit))))(function (aa) {
- return Control_Applicative.pure(dictAlternative.Applicative0())(Data_Bifunctor.bimap(Control_Monad_Rec_Class.bifunctorStep)(function (v) {
- return new Data_List_Types.Cons(v, acc);
- })(function (v) {
- return reverse(acc);
- })(aa));
- });
- };
- return Control_Monad_Rec_Class.tailRecM(dictMonadRec)(go)(Data_List_Types.Nil.value);
- };
- };
- };
- var someRec = function someRec(dictMonadRec) {
- return function (dictAlternative) {
- return function (v) {
- return Control_Apply.apply(dictAlternative.Applicative0().Apply0())(Data_Functor.map(dictAlternative.Plus1().Alt0().Functor0())(Data_List_Types.Cons.create)(v))(manyRec(dictMonadRec)(dictAlternative)(v));
- };
- };
- };
- var some = function some(dictAlternative) {
- return function (dictLazy) {
- return function (v) {
- return Control_Apply.apply(dictAlternative.Applicative0().Apply0())(Data_Functor.map(dictAlternative.Plus1().Alt0().Functor0())(Data_List_Types.Cons.create)(v))(Control_Lazy.defer(dictLazy)(function (v1) {
- return many(dictAlternative)(dictLazy)(v);
- }));
- };
- };
- };
- var many = function many(dictAlternative) {
- return function (dictLazy) {
- return function (v) {
- return Control_Alt.alt(dictAlternative.Plus1().Alt0())(some(dictAlternative)(dictLazy)(v))(Control_Applicative.pure(dictAlternative.Applicative0())(Data_List_Types.Nil.value));
- };
- };
- };
- var length = Data_Foldable.foldl(Data_List_Types.foldableList)(function (acc) {
- return function (v) {
- return acc + 1 | 0;
- };
- })(0);
- var last = function last($copy_v) {
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(v) {
- if (v instanceof Data_List_Types.Cons && v.value1 instanceof Data_List_Types.Nil) {
- $tco_done = true;
- return new Data_Maybe.Just(v.value0);
- }
- ;
- if (v instanceof Data_List_Types.Cons) {
- $copy_v = v.value1;
- return;
- }
- ;
- $tco_done = true;
- return Data_Maybe.Nothing.value;
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($copy_v);
- }
- ;
- return $tco_result;
- };
- var insertBy = function insertBy(v) {
- return function (x) {
- return function (v1) {
- if (v1 instanceof Data_List_Types.Nil) {
- return singleton(x);
- }
- ;
- if (v1 instanceof Data_List_Types.Cons) {
- var v2 = v(x)(v1.value0);
- if (v2 instanceof Data_Ordering.GT) {
- return new Data_List_Types.Cons(v1.value0, insertBy(v)(x)(v1.value1));
- }
- ;
- return new Data_List_Types.Cons(x, v1);
- }
- ;
- throw new Error("Failed pattern match at Data.List (line 216, column 1 - line 216, column 68): " + [v.constructor.name, x.constructor.name, v1.constructor.name]);
- };
- };
- };
- var insertAt = function insertAt(v) {
- return function (v1) {
- return function (v2) {
- if (v === 0) {
- return new Data_Maybe.Just(new Data_List_Types.Cons(v1, v2));
- }
- ;
- if (v2 instanceof Data_List_Types.Cons) {
- return Data_Functor.map(Data_Maybe.functorMaybe)(function (v3) {
- return new Data_List_Types.Cons(v2.value0, v3);
- })(insertAt(v - 1 | 0)(v1)(v2.value1));
- }
- ;
- return Data_Maybe.Nothing.value;
- };
- };
- };
- var insert = function insert(dictOrd) {
- return insertBy(Data_Ord.compare(dictOrd));
- };
- var init = function init(lst) {
- return Data_Functor.map(Data_Maybe.functorMaybe)(function (v) {
- return v.init;
- })(unsnoc(lst));
- };
- var index = function index($copy_v) {
- return function ($copy_v1) {
- var $tco_var_v = $copy_v;
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(v, v1) {
- if (v instanceof Data_List_Types.Nil) {
- $tco_done = true;
- return Data_Maybe.Nothing.value;
- }
- ;
- if (v instanceof Data_List_Types.Cons && v1 === 0) {
- $tco_done = true;
- return new Data_Maybe.Just(v.value0);
- }
- ;
- if (v instanceof Data_List_Types.Cons) {
- $tco_var_v = v.value1;
- $copy_v1 = v1 - 1 | 0;
- return;
- }
- ;
- throw new Error("Failed pattern match at Data.List (line 281, column 1 - line 281, column 44): " + [v.constructor.name, v1.constructor.name]);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($tco_var_v, $copy_v1);
- }
- ;
- return $tco_result;
- };
- };
- var head = function head(v) {
- if (v instanceof Data_List_Types.Nil) {
- return Data_Maybe.Nothing.value;
- }
- ;
- if (v instanceof Data_List_Types.Cons) {
- return new Data_Maybe.Just(v.value0);
- }
- ;
- throw new Error("Failed pattern match at Data.List (line 230, column 1 - line 230, column 22): " + [v.constructor.name]);
- };
- var transpose = function transpose(v) {
- if (v instanceof Data_List_Types.Nil) {
- return Data_List_Types.Nil.value;
- }
- ;
- if (v instanceof Data_List_Types.Cons && v.value0 instanceof Data_List_Types.Nil) {
- return transpose(v.value1);
- }
- ;
- if (v instanceof Data_List_Types.Cons && v.value0 instanceof Data_List_Types.Cons) {
- return new Data_List_Types.Cons(new Data_List_Types.Cons(v.value0.value0, mapMaybe(head)(v.value1)), transpose(new Data_List_Types.Cons(v.value0.value1, mapMaybe(tail)(v.value1))));
- }
- ;
- throw new Error("Failed pattern match at Data.List (line 752, column 1 - line 752, column 54): " + [v.constructor.name]);
- };
- var groupBy = function groupBy(v) {
- return function (v1) {
- if (v1 instanceof Data_List_Types.Nil) {
- return Data_List_Types.Nil.value;
- }
- ;
- if (v1 instanceof Data_List_Types.Cons) {
- var v2 = span(v(v1.value0))(v1.value1);
- return new Data_List_Types.Cons(new Data_NonEmpty.NonEmpty(v1.value0, v2.init), groupBy(v)(v2.rest));
- }
- ;
- throw new Error("Failed pattern match at Data.List (line 605, column 1 - line 605, column 80): " + [v.constructor.name, v1.constructor.name]);
- };
- };
- var group = function group(dictEq) {
- return groupBy(Data_Eq.eq(dictEq));
- };
- var group$prime = function group$prime(dictOrd) {
- var $332 = group(dictOrd.Eq0());
- var $333 = sort(dictOrd);
- return function ($334) {
- return $332($333($334));
- };
- };
- var fromFoldable = function fromFoldable(dictFoldable) {
- return Data_Foldable.foldr(dictFoldable)(Data_List_Types.Cons.create)(Data_List_Types.Nil.value);
- };
- var foldM = function foldM(dictMonad) {
- return function (v) {
- return function (a) {
- return function (v1) {
- if (v1 instanceof Data_List_Types.Nil) {
- return Control_Applicative.pure(dictMonad.Applicative0())(a);
- }
- ;
- if (v1 instanceof Data_List_Types.Cons) {
- return Control_Bind.bind(dictMonad.Bind1())(v(a)(v1.value0))(function (a$prime) {
- return foldM(dictMonad)(v)(a$prime)(v1.value1);
- });
- }
- ;
- throw new Error("Failed pattern match at Data.List (line 763, column 1 - line 763, column 72): " + [v.constructor.name, a.constructor.name, v1.constructor.name]);
- };
- };
- };
- };
- var findIndex = function findIndex(fn) {
- var go = function go($copy_v) {
- return function ($copy_v1) {
- var $tco_var_v = $copy_v;
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(v, v1) {
- if (v1 instanceof Data_List_Types.Cons) {
- if (fn(v1.value0)) {
- $tco_done = true;
- return new Data_Maybe.Just(v);
- }
- ;
- if (Data_Boolean.otherwise) {
- $tco_var_v = v + 1 | 0;
- $copy_v1 = v1.value1;
- return;
- }
- ;
- }
- ;
- if (v1 instanceof Data_List_Types.Nil) {
- $tco_done = true;
- return Data_Maybe.Nothing.value;
- }
- ;
- throw new Error("Failed pattern match at Data.List (line 301, column 3 - line 301, column 35): " + [v.constructor.name, v1.constructor.name]);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($tco_var_v, $copy_v1);
- }
- ;
- return $tco_result;
- };
- };
- return go(0);
- };
- var findLastIndex = function findLastIndex(fn) {
- return function (xs) {
- return Data_Functor.map(Data_Maybe.functorMaybe)(function (v) {
- return (length(xs) - 1 | 0) - v | 0;
- })(findIndex(fn)(reverse(xs)));
- };
- };
- var filterM = function filterM(dictMonad) {
- return function (v) {
- return function (v1) {
- if (v1 instanceof Data_List_Types.Nil) {
- return Control_Applicative.pure(dictMonad.Applicative0())(Data_List_Types.Nil.value);
- }
- ;
- if (v1 instanceof Data_List_Types.Cons) {
- return Control_Bind.bind(dictMonad.Bind1())(v(v1.value0))(function (b) {
- return Control_Bind.bind(dictMonad.Bind1())(filterM(dictMonad)(v)(v1.value1))(function (xs$prime) {
- return Control_Applicative.pure(dictMonad.Applicative0())(function () {
- if (b) {
- return new Data_List_Types.Cons(v1.value0, xs$prime);
- }
- ;
- return xs$prime;
- }());
- });
- });
- }
- ;
- throw new Error("Failed pattern match at Data.List (line 403, column 1 - line 403, column 75): " + [v.constructor.name, v1.constructor.name]);
- };
- };
- };
- var filter = function filter(p) {
- var go = function go($copy_acc) {
- return function ($copy_v) {
- var $tco_var_acc = $copy_acc;
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(acc, v) {
- if (v instanceof Data_List_Types.Nil) {
- $tco_done = true;
- return reverse(acc);
- }
- ;
- if (v instanceof Data_List_Types.Cons) {
- if (p(v.value0)) {
- $tco_var_acc = new Data_List_Types.Cons(v.value0, acc);
- $copy_v = v.value1;
- return;
- }
- ;
- if (Data_Boolean.otherwise) {
- $tco_var_acc = acc;
- $copy_v = v.value1;
- return;
- }
- ;
- }
- ;
- throw new Error("Failed pattern match at Data.List (line 390, column 3 - line 390, column 27): " + [acc.constructor.name, v.constructor.name]);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($tco_var_acc, $copy_v);
- }
- ;
- return $tco_result;
- };
- };
- return go(Data_List_Types.Nil.value);
- };
- var intersectBy = function intersectBy(v) {
- return function (v1) {
- return function (v2) {
- if (v1 instanceof Data_List_Types.Nil) {
- return Data_List_Types.Nil.value;
- }
- ;
- if (v2 instanceof Data_List_Types.Nil) {
- return Data_List_Types.Nil.value;
- }
- ;
- return filter(function (x) {
- return Data_Foldable.any(Data_List_Types.foldableList)(Data_HeytingAlgebra.heytingAlgebraBoolean)(v(x))(v2);
- })(v1);
- };
- };
- };
- var intersect = function intersect(dictEq) {
- return intersectBy(Data_Eq.eq(dictEq));
- };
- var nubBy = function nubBy(v) {
- return function (v1) {
- if (v1 instanceof Data_List_Types.Nil) {
- return Data_List_Types.Nil.value;
- }
- ;
- if (v1 instanceof Data_List_Types.Cons) {
- return new Data_List_Types.Cons(v1.value0, nubBy(v)(filter(function (y) {
- return !v(v1.value0)(y);
- })(v1.value1)));
- }
- ;
- throw new Error("Failed pattern match at Data.List (line 644, column 1 - line 644, column 59): " + [v.constructor.name, v1.constructor.name]);
- };
- };
- var nub = function nub(dictEq) {
- return nubBy(Data_Eq.eq(dictEq));
- };
- var eqPattern = function eqPattern(dictEq) {
- return new Data_Eq.Eq(function (x) {
- return function (y) {
- return Data_Eq.eq(Data_List_Types.eqList(dictEq))(x)(y);
- };
- });
- };
- var ordPattern = function ordPattern(dictOrd) {
- return new Data_Ord.Ord(function () {
- return eqPattern(dictOrd.Eq0());
- }, function (x) {
- return function (y) {
- return Data_Ord.compare(Data_List_Types.ordList(dictOrd))(x)(y);
- };
- });
- };
- var elemLastIndex = function elemLastIndex(dictEq) {
- return function (x) {
- return findLastIndex(function (v) {
- return Data_Eq.eq(dictEq)(v)(x);
- });
- };
- };
- var elemIndex = function elemIndex(dictEq) {
- return function (x) {
- return findIndex(function (v) {
- return Data_Eq.eq(dictEq)(v)(x);
- });
- };
- };
- var dropWhile = function dropWhile(p) {
- var go = function go($copy_v) {
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(v) {
- if (v instanceof Data_List_Types.Cons && p(v.value0)) {
- $copy_v = v.value1;
- return;
- }
- ;
- $tco_done = true;
- return v;
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($copy_v);
- }
- ;
- return $tco_result;
- };
- return go;
- };
- var dropEnd = function dropEnd(n) {
- return function (xs) {
- return take(length(xs) - n | 0)(xs);
- };
- };
- var drop = function drop($copy_v) {
- return function ($copy_v1) {
- var $tco_var_v = $copy_v;
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(v, v1) {
- if (v < 1) {
- $tco_done = true;
- return v1;
- }
- ;
- if (v1 instanceof Data_List_Types.Nil) {
- $tco_done = true;
- return Data_List_Types.Nil.value;
- }
- ;
- if (v1 instanceof Data_List_Types.Cons) {
- $tco_var_v = v - 1 | 0;
- $copy_v1 = v1.value1;
- return;
- }
- ;
- throw new Error("Failed pattern match at Data.List (line 543, column 1 - line 543, column 42): " + [v.constructor.name, v1.constructor.name]);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($tco_var_v, $copy_v1);
- }
- ;
- return $tco_result;
- };
- };
- var slice = function slice(start) {
- return function (end) {
- return function (xs) {
- return take(end - start | 0)(drop(start)(xs));
- };
- };
- };
- var takeEnd = function takeEnd(n) {
- return function (xs) {
- return drop(length(xs) - n | 0)(xs);
- };
- };
- var deleteBy = function deleteBy(v) {
- return function (v1) {
- return function (v2) {
- if (v2 instanceof Data_List_Types.Nil) {
- return Data_List_Types.Nil.value;
- }
- ;
- if (v2 instanceof Data_List_Types.Cons && v(v1)(v2.value0)) {
- return v2.value1;
- }
- ;
- if (v2 instanceof Data_List_Types.Cons) {
- return new Data_List_Types.Cons(v2.value0, deleteBy(v)(v1)(v2.value1));
- }
- ;
- throw new Error("Failed pattern match at Data.List (line 671, column 1 - line 671, column 67): " + [v.constructor.name, v1.constructor.name, v2.constructor.name]);
- };
- };
- };
- var unionBy = function unionBy(eq) {
- return function (xs) {
- return function (ys) {
- return Data_Semigroup.append(Data_List_Types.semigroupList)(xs)(Data_Foldable.foldl(Data_List_Types.foldableList)(Data_Function.flip(deleteBy(eq)))(nubBy(eq)(ys))(xs));
- };
- };
- };
- var union = function union(dictEq) {
- return unionBy(Data_Eq.eq(dictEq));
- };
- var deleteAt = function deleteAt(v) {
- return function (v1) {
- if (v === 0 && v1 instanceof Data_List_Types.Cons) {
- return new Data_Maybe.Just(v1.value1);
- }
- ;
- if (v1 instanceof Data_List_Types.Cons) {
- return Data_Functor.map(Data_Maybe.functorMaybe)(function (v2) {
- return new Data_List_Types.Cons(v1.value0, v2);
- })(deleteAt(v - 1 | 0)(v1.value1));
- }
- ;
- return Data_Maybe.Nothing.value;
- };
- };
- var $$delete = function $$delete(dictEq) {
- return deleteBy(Data_Eq.eq(dictEq));
- };
- var difference = function difference(dictEq) {
- return Data_Foldable.foldl(Data_List_Types.foldableList)(Data_Function.flip($$delete(dictEq)));
- };
- var concatMap = Data_Function.flip(Control_Bind.bind(Data_List_Types.bindList));
- var concat = function concat(v) {
- return Control_Bind.bind(Data_List_Types.bindList)(v)(Control_Category.identity(Control_Category.categoryFn));
- };
- var catMaybes = mapMaybe(Control_Category.identity(Control_Category.categoryFn));
- var alterAt = function alterAt(v) {
- return function (v1) {
- return function (v2) {
- if (v === 0 && v2 instanceof Data_List_Types.Cons) {
- return Data_Maybe.Just.create(function () {
- var v3 = v1(v2.value0);
- if (v3 instanceof Data_Maybe.Nothing) {
- return v2.value1;
- }
- ;
- if (v3 instanceof Data_Maybe.Just) {
- return new Data_List_Types.Cons(v3.value0, v2.value1);
- }
- ;
- throw new Error("Failed pattern match at Data.List (line 352, column 3 - line 354, column 23): " + [v3.constructor.name]);
- }());
- }
- ;
- if (v2 instanceof Data_List_Types.Cons) {
- return Data_Functor.map(Data_Maybe.functorMaybe)(function (v3) {
- return new Data_List_Types.Cons(v2.value0, v3);
- })(alterAt(v - 1 | 0)(v1)(v2.value1));
- }
- ;
- return Data_Maybe.Nothing.value;
- };
- };
- };
- var modifyAt = function modifyAt(n) {
- return function (f) {
- return alterAt(n)(function ($335) {
- return Data_Maybe.Just.create(f($335));
- });
- };
- };
- module.exports = {
- toUnfoldable: toUnfoldable,
- fromFoldable: fromFoldable,
- singleton: singleton,
- range: range,
- some: some,
- someRec: someRec,
- many: many,
- manyRec: manyRec,
- "null": $$null,
- length: length,
- snoc: snoc,
- insert: insert,
- insertBy: insertBy,
- head: head,
- last: last,
- tail: tail,
- init: init,
- uncons: uncons,
- unsnoc: unsnoc,
- index: index,
- elemIndex: elemIndex,
- elemLastIndex: elemLastIndex,
- findIndex: findIndex,
- findLastIndex: findLastIndex,
- insertAt: insertAt,
- deleteAt: deleteAt,
- updateAt: updateAt,
- modifyAt: modifyAt,
- alterAt: alterAt,
- reverse: reverse,
- concat: concat,
- concatMap: concatMap,
- filter: filter,
- filterM: filterM,
- mapMaybe: mapMaybe,
- catMaybes: catMaybes,
- mapWithIndex: mapWithIndex,
- sort: sort,
- sortBy: sortBy,
- Pattern: Pattern,
- stripPrefix: stripPrefix,
- slice: slice,
- take: take,
- takeEnd: takeEnd,
- takeWhile: takeWhile,
- drop: drop,
- dropEnd: dropEnd,
- dropWhile: dropWhile,
- span: span,
- group: group,
- "group'": group$prime,
- groupBy: groupBy,
- partition: partition,
- nub: nub,
- nubBy: nubBy,
- union: union,
- unionBy: unionBy,
- "delete": $$delete,
- deleteBy: deleteBy,
- difference: difference,
- intersect: intersect,
- intersectBy: intersectBy,
- zipWith: zipWith,
- zipWithA: zipWithA,
- zip: zip,
- unzip: unzip,
- transpose: transpose,
- foldM: foldM,
- eqPattern: eqPattern,
- ordPattern: ordPattern,
- newtypePattern: newtypePattern,
- showPattern: showPattern
- };
- },{"../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Lazy/index.js":"../output/Control.Lazy/index.js","../Control.Monad.Rec.Class/index.js":"../output/Control.Monad.Rec.Class/index.js","../Data.Bifunctor/index.js":"../output/Data.Bifunctor/index.js","../Data.Boolean/index.js":"../output/Data.Boolean/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.FunctorWithIndex/index.js":"../output/Data.FunctorWithIndex/index.js","../Data.HeytingAlgebra/index.js":"../output/Data.HeytingAlgebra/index.js","../Data.List.Types/index.js":"../output/Data.List.Types/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.NonEmpty/index.js":"../output/Data.NonEmpty/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js","../Data.Unfoldable/index.js":"../output/Data.Unfoldable/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Partial.Unsafe/foreign.js":[function(require,module,exports) {
- "use strict"; // module Partial.Unsafe
- exports.unsafePartial = function (f) {
- return f();
- };
- },{}],"../output/Partial/foreign.js":[function(require,module,exports) {
- "use strict"; // module Partial
- exports.crashWith = function () {
- return function (msg) {
- throw new Error(msg);
- };
- };
- },{}],"../output/Partial/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var crash = function crash(dictPartial) {
- return $foreign.crashWith()("Partial.crash: partial function");
- };
- module.exports = {
- crash: crash,
- crashWith: $foreign.crashWith
- };
- },{"./foreign.js":"../output/Partial/foreign.js"}],"../output/Partial.Unsafe/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Partial = require("../Partial/index.js");
- var unsafePartialBecause = function unsafePartialBecause(v) {
- return function (x) {
- return $foreign.unsafePartial(function (dictPartial) {
- return x();
- });
- };
- };
- var unsafeCrashWith = function unsafeCrashWith(msg) {
- return $foreign.unsafePartial(function (dictPartial) {
- return Partial.crashWith()(msg);
- });
- };
- module.exports = {
- unsafePartialBecause: unsafePartialBecause,
- unsafeCrashWith: unsafeCrashWith,
- unsafePartial: $foreign.unsafePartial
- };
- },{"./foreign.js":"../output/Partial.Unsafe/foreign.js","../Partial/index.js":"../output/Partial/index.js"}],"../output/Data.List.NonEmpty/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Category = require("../Control.Category/index.js");
- var Data_Boolean = require("../Data.Boolean/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
- var Data_List = require("../Data.List/index.js");
- var Data_List_Types = require("../Data.List.Types/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_NonEmpty = require("../Data.NonEmpty/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Semigroup_Traversable = require("../Data.Semigroup.Traversable/index.js");
- var Data_Tuple = require("../Data.Tuple/index.js");
- var Data_Unfoldable = require("../Data.Unfoldable/index.js");
- var Partial_Unsafe = require("../Partial.Unsafe/index.js");
- var zipWith = function zipWith(f) {
- return function (v) {
- return function (v1) {
- return new Data_NonEmpty.NonEmpty(f(v.value0)(v1.value0), Data_List.zipWith(f)(v.value1)(v1.value1));
- };
- };
- };
- var zipWithA = function zipWithA(dictApplicative) {
- return function (f) {
- return function (xs) {
- return function (ys) {
- return Data_Semigroup_Traversable.sequence1(Data_List_Types.traversable1NonEmptyList)(dictApplicative.Apply0())(zipWith(f)(xs)(ys));
- };
- };
- };
- };
- var zip = zipWith(Data_Tuple.Tuple.create);
- var wrappedOperation2 = function wrappedOperation2(name) {
- return function (f) {
- return function (v) {
- return function (v1) {
- var v2 = f(new Data_List_Types.Cons(v.value0, v.value1))(new Data_List_Types.Cons(v1.value0, v1.value1));
- if (v2 instanceof Data_List_Types.Cons) {
- return new Data_NonEmpty.NonEmpty(v2.value0, v2.value1);
- }
- ;
- if (v2 instanceof Data_List_Types.Nil) {
- return Partial_Unsafe.unsafeCrashWith("Impossible: empty list in NonEmptyList " + name);
- }
- ;
- throw new Error("Failed pattern match at Data.List.NonEmpty (line 104, column 3 - line 106, column 81): " + [v2.constructor.name]);
- };
- };
- };
- };
- var wrappedOperation = function wrappedOperation(name) {
- return function (f) {
- return function (v) {
- var v1 = f(new Data_List_Types.Cons(v.value0, v.value1));
- if (v1 instanceof Data_List_Types.Cons) {
- return new Data_NonEmpty.NonEmpty(v1.value0, v1.value1);
- }
- ;
- if (v1 instanceof Data_List_Types.Nil) {
- return Partial_Unsafe.unsafeCrashWith("Impossible: empty list in NonEmptyList " + name);
- }
- ;
- throw new Error("Failed pattern match at Data.List.NonEmpty (line 91, column 3 - line 93, column 81): " + [v1.constructor.name]);
- };
- };
- };
- var updateAt = function updateAt(i) {
- return function (a) {
- return function (v) {
- if (i === 0) {
- return new Data_Maybe.Just(new Data_NonEmpty.NonEmpty(a, v.value1));
- }
- ;
- if (Data_Boolean.otherwise) {
- return Data_Functor.map(Data_Maybe.functorMaybe)(function ($161) {
- return Data_List_Types.NonEmptyList(function (v1) {
- return new Data_NonEmpty.NonEmpty(v.value0, v1);
- }($161));
- })(Data_List.updateAt(i - 1 | 0)(a)(v.value1));
- }
- ;
- throw new Error("Failed pattern match at Data.List.NonEmpty (line 197, column 1 - line 197, column 75): " + [i.constructor.name, a.constructor.name, v.constructor.name]);
- };
- };
- };
- var unzip = function unzip(ts) {
- return new Data_Tuple.Tuple(Data_Functor.map(Data_List_Types.functorNonEmptyList)(Data_Tuple.fst)(ts), Data_Functor.map(Data_List_Types.functorNonEmptyList)(Data_Tuple.snd)(ts));
- };
- var unsnoc = function unsnoc(v) {
- var v1 = Data_List.unsnoc(v.value1);
- if (v1 instanceof Data_Maybe.Nothing) {
- return {
- init: Data_List_Types.Nil.value,
- last: v.value0
- };
- }
- ;
- if (v1 instanceof Data_Maybe.Just) {
- return {
- init: new Data_List_Types.Cons(v.value0, v1.value0.init),
- last: v1.value0.last
- };
- }
- ;
- throw new Error("Failed pattern match at Data.List.NonEmpty (line 159, column 35 - line 161, column 50): " + [v1.constructor.name]);
- };
- var unionBy = function () {
- var $162 = wrappedOperation2("unionBy");
- return function ($163) {
- return $162(Data_List.unionBy($163));
- };
- }();
- var union = function union(dictEq) {
- return wrappedOperation2("union")(Data_List.union(dictEq));
- };
- var uncons = function uncons(v) {
- return {
- head: v.value0,
- tail: v.value1
- };
- };
- var toList = function toList(v) {
- return new Data_List_Types.Cons(v.value0, v.value1);
- };
- var toUnfoldable = function toUnfoldable(dictUnfoldable) {
- var $164 = Data_Unfoldable.unfoldr(dictUnfoldable)(function (xs) {
- return Data_Functor.map(Data_Maybe.functorMaybe)(function (rec) {
- return new Data_Tuple.Tuple(rec.head, rec.tail);
- })(Data_List.uncons(xs));
- });
- return function ($165) {
- return $164(toList($165));
- };
- };
- var tail = function tail(v) {
- return v.value1;
- };
- var sortBy = function () {
- var $166 = wrappedOperation("sortBy");
- return function ($167) {
- return $166(Data_List.sortBy($167));
- };
- }();
- var sort = function sort(dictOrd) {
- return function (xs) {
- return sortBy(Data_Ord.compare(dictOrd))(xs);
- };
- };
- var snoc = function snoc(v) {
- return function (y) {
- return new Data_NonEmpty.NonEmpty(v.value0, Data_List.snoc(v.value1)(y));
- };
- };
- var singleton = function () {
- var $168 = Data_NonEmpty.singleton(Data_List_Types.plusList);
- return function ($169) {
- return Data_List_Types.NonEmptyList($168($169));
- };
- }();
- var snoc$prime = function snoc$prime(v) {
- return function (y) {
- if (v instanceof Data_List_Types.Cons) {
- return new Data_NonEmpty.NonEmpty(v.value0, Data_List.snoc(v.value1)(y));
- }
- ;
- if (v instanceof Data_List_Types.Nil) {
- return singleton(y);
- }
- ;
- throw new Error("Failed pattern match at Data.List.NonEmpty (line 139, column 1 - line 139, column 51): " + [v.constructor.name, y.constructor.name]);
- };
- };
- var reverse = wrappedOperation("reverse")(Data_List.reverse);
- var nubBy = function () {
- var $170 = wrappedOperation("nubBy");
- return function ($171) {
- return $170(Data_List.nubBy($171));
- };
- }();
- var nub = function nub(dictEq) {
- return wrappedOperation("nub")(Data_List.nub(dictEq));
- };
- var modifyAt = function modifyAt(i) {
- return function (f) {
- return function (v) {
- if (i === 0) {
- return new Data_Maybe.Just(new Data_NonEmpty.NonEmpty(f(v.value0), v.value1));
- }
- ;
- if (Data_Boolean.otherwise) {
- return Data_Functor.map(Data_Maybe.functorMaybe)(function ($172) {
- return Data_List_Types.NonEmptyList(function (v1) {
- return new Data_NonEmpty.NonEmpty(v.value0, v1);
- }($172));
- })(Data_List.modifyAt(i - 1 | 0)(f)(v.value1));
- }
- ;
- throw new Error("Failed pattern match at Data.List.NonEmpty (line 202, column 1 - line 202, column 82): " + [i.constructor.name, f.constructor.name, v.constructor.name]);
- };
- };
- };
- var mapWithIndex = Data_FunctorWithIndex.mapWithIndex(Data_List_Types.functorWithIndexNonEmptyList);
- var lift = function lift(f) {
- return function (v) {
- return f(new Data_List_Types.Cons(v.value0, v.value1));
- };
- };
- var mapMaybe = function mapMaybe($173) {
- return lift(Data_List.mapMaybe($173));
- };
- var partition = function partition($174) {
- return lift(Data_List.partition($174));
- };
- var span = function span($175) {
- return lift(Data_List.span($175));
- };
- var take = function take($176) {
- return lift(Data_List.take($176));
- };
- var takeWhile = function takeWhile($177) {
- return lift(Data_List.takeWhile($177));
- };
- var length = function length(v) {
- return 1 + Data_List.length(v.value1) | 0;
- };
- var last = function last(v) {
- return Data_Maybe.fromMaybe(v.value0)(Data_List.last(v.value1));
- };
- var intersectBy = function () {
- var $178 = wrappedOperation2("intersectBy");
- return function ($179) {
- return $178(Data_List.intersectBy($179));
- };
- }();
- var intersect = function intersect(dictEq) {
- return wrappedOperation2("intersect")(Data_List.intersect(dictEq));
- };
- var insertAt = function insertAt(i) {
- return function (a) {
- return function (v) {
- if (i === 0) {
- return new Data_Maybe.Just(new Data_NonEmpty.NonEmpty(a, new Data_List_Types.Cons(v.value0, v.value1)));
- }
- ;
- if (Data_Boolean.otherwise) {
- return Data_Functor.map(Data_Maybe.functorMaybe)(function ($180) {
- return Data_List_Types.NonEmptyList(function (v1) {
- return new Data_NonEmpty.NonEmpty(v.value0, v1);
- }($180));
- })(Data_List.insertAt(i - 1 | 0)(a)(v.value1));
- }
- ;
- throw new Error("Failed pattern match at Data.List.NonEmpty (line 192, column 1 - line 192, column 75): " + [i.constructor.name, a.constructor.name, v.constructor.name]);
- };
- };
- };
- var init = function init(v) {
- return Data_Maybe.maybe(Data_List_Types.Nil.value)(function (v1) {
- return new Data_List_Types.Cons(v.value0, v1);
- })(Data_List.init(v.value1));
- };
- var index = function index(v) {
- return function (i) {
- if (i === 0) {
- return new Data_Maybe.Just(v.value0);
- }
- ;
- if (Data_Boolean.otherwise) {
- return Data_List.index(v.value1)(i - 1 | 0);
- }
- ;
- throw new Error("Failed pattern match at Data.List.NonEmpty (line 166, column 1 - line 166, column 52): " + [v.constructor.name, i.constructor.name]);
- };
- };
- var head = function head(v) {
- return v.value0;
- };
- var groupBy = function () {
- var $181 = wrappedOperation("groupBy");
- return function ($182) {
- return $181(Data_List.groupBy($182));
- };
- }();
- var group$prime = function group$prime(dictOrd) {
- return wrappedOperation("group'")(Data_List["group'"](dictOrd));
- };
- var group = function group(dictEq) {
- return wrappedOperation("group")(Data_List.group(dictEq));
- };
- var fromList = function fromList(v) {
- if (v instanceof Data_List_Types.Nil) {
- return Data_Maybe.Nothing.value;
- }
- ;
- if (v instanceof Data_List_Types.Cons) {
- return new Data_Maybe.Just(new Data_NonEmpty.NonEmpty(v.value0, v.value1));
- }
- ;
- throw new Error("Failed pattern match at Data.List.NonEmpty (line 120, column 1 - line 120, column 57): " + [v.constructor.name]);
- };
- var fromFoldable = function fromFoldable(dictFoldable) {
- var $183 = Data_List.fromFoldable(dictFoldable);
- return function ($184) {
- return fromList($183($184));
- };
- };
- var foldM = function foldM(dictMonad) {
- return function (f) {
- return function (a) {
- return function (v) {
- return Control_Bind.bind(dictMonad.Bind1())(f(a)(v.value0))(function (a$prime) {
- return Data_List.foldM(dictMonad)(f)(a$prime)(v.value1);
- });
- };
- };
- };
- };
- var findLastIndex = function findLastIndex(f) {
- return function (v) {
- var v1 = Data_List.findLastIndex(f)(v.value1);
- if (v1 instanceof Data_Maybe.Just) {
- return new Data_Maybe.Just(v1.value0 + 1 | 0);
- }
- ;
- if (v1 instanceof Data_Maybe.Nothing) {
- if (f(v.value0)) {
- return new Data_Maybe.Just(0);
- }
- ;
- if (Data_Boolean.otherwise) {
- return Data_Maybe.Nothing.value;
- }
- ;
- }
- ;
- throw new Error("Failed pattern match at Data.List.NonEmpty (line 186, column 3 - line 190, column 29): " + [v1.constructor.name]);
- };
- };
- var findIndex = function findIndex(f) {
- return function (v) {
- if (f(v.value0)) {
- return new Data_Maybe.Just(0);
- }
- ;
- if (Data_Boolean.otherwise) {
- return Data_Functor.map(Data_Maybe.functorMaybe)(function (v1) {
- return v1 + 1 | 0;
- })(Data_List.findIndex(f)(v.value1));
- }
- ;
- throw new Error("Failed pattern match at Data.List.NonEmpty (line 179, column 1 - line 179, column 69): " + [f.constructor.name, v.constructor.name]);
- };
- };
- var filterM = function filterM(dictMonad) {
- var $185 = Data_List.filterM(dictMonad);
- return function ($186) {
- return lift($185($186));
- };
- };
- var filter = function filter($187) {
- return lift(Data_List.filter($187));
- };
- var elemLastIndex = function elemLastIndex(dictEq) {
- return function (x) {
- return findLastIndex(function (v) {
- return Data_Eq.eq(dictEq)(v)(x);
- });
- };
- };
- var elemIndex = function elemIndex(dictEq) {
- return function (x) {
- return findIndex(function (v) {
- return Data_Eq.eq(dictEq)(v)(x);
- });
- };
- };
- var dropWhile = function dropWhile($188) {
- return lift(Data_List.dropWhile($188));
- };
- var drop = function drop($189) {
- return lift(Data_List.drop($189));
- };
- var cons$prime = function cons$prime(x) {
- return function (xs) {
- return new Data_NonEmpty.NonEmpty(x, xs);
- };
- };
- var cons = function cons(y) {
- return function (v) {
- return new Data_NonEmpty.NonEmpty(y, new Data_List_Types.Cons(v.value0, v.value1));
- };
- };
- var concatMap = Data_Function.flip(Control_Bind.bind(Data_List_Types.bindNonEmptyList));
- var concat = function concat(v) {
- return Control_Bind.bind(Data_List_Types.bindNonEmptyList)(v)(Control_Category.identity(Control_Category.categoryFn));
- };
- var catMaybes = lift(Data_List.catMaybes);
- var appendFoldable = function appendFoldable(dictFoldable) {
- return function (v) {
- return function (ys) {
- return new Data_NonEmpty.NonEmpty(v.value0, Data_Semigroup.append(Data_List_Types.semigroupList)(v.value1)(Data_List.fromFoldable(dictFoldable)(ys)));
- };
- };
- };
- module.exports = {
- toUnfoldable: toUnfoldable,
- fromFoldable: fromFoldable,
- fromList: fromList,
- toList: toList,
- singleton: singleton,
- length: length,
- cons: cons,
- "cons'": cons$prime,
- snoc: snoc,
- "snoc'": snoc$prime,
- head: head,
- last: last,
- tail: tail,
- init: init,
- uncons: uncons,
- unsnoc: unsnoc,
- index: index,
- elemIndex: elemIndex,
- elemLastIndex: elemLastIndex,
- findIndex: findIndex,
- findLastIndex: findLastIndex,
- insertAt: insertAt,
- updateAt: updateAt,
- modifyAt: modifyAt,
- reverse: reverse,
- concat: concat,
- concatMap: concatMap,
- filter: filter,
- filterM: filterM,
- mapMaybe: mapMaybe,
- catMaybes: catMaybes,
- appendFoldable: appendFoldable,
- mapWithIndex: mapWithIndex,
- sort: sort,
- sortBy: sortBy,
- take: take,
- takeWhile: takeWhile,
- drop: drop,
- dropWhile: dropWhile,
- span: span,
- group: group,
- "group'": group$prime,
- groupBy: groupBy,
- partition: partition,
- nub: nub,
- nubBy: nubBy,
- union: union,
- unionBy: unionBy,
- intersect: intersect,
- intersectBy: intersectBy,
- zipWith: zipWith,
- zipWithA: zipWithA,
- zip: zip,
- unzip: unzip,
- foldM: foldM
- };
- },{"../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Boolean/index.js":"../output/Data.Boolean/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.FunctorWithIndex/index.js":"../output/Data.FunctorWithIndex/index.js","../Data.List/index.js":"../output/Data.List/index.js","../Data.List.Types/index.js":"../output/Data.List.Types/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.NonEmpty/index.js":"../output/Data.NonEmpty/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Semigroup.Traversable/index.js":"../output/Data.Semigroup.Traversable/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js","../Data.Unfoldable/index.js":"../output/Data.Unfoldable/index.js","../Partial.Unsafe/index.js":"../output/Partial.Unsafe/index.js"}],"../output/Data.String.CodeUnits/foreign.js":[function(require,module,exports) {
- "use strict";
- exports.fromCharArray = function (a) {
- return a.join("");
- };
- exports.toCharArray = function (s) {
- return s.split("");
- };
- exports.singleton = function (c) {
- return c;
- };
- exports._charAt = function (just) {
- return function (nothing) {
- return function (i) {
- return function (s) {
- return i >= 0 && i < s.length ? just(s.charAt(i)) : nothing;
- };
- };
- };
- };
- exports._toChar = function (just) {
- return function (nothing) {
- return function (s) {
- return s.length === 1 ? just(s) : nothing;
- };
- };
- };
- exports.length = function (s) {
- return s.length;
- };
- exports.countPrefix = function (p) {
- return function (s) {
- var i = 0;
- while (i < s.length && p(s.charAt(i))) {
- i++;
- }
- return i;
- };
- };
- exports._indexOf = function (just) {
- return function (nothing) {
- return function (x) {
- return function (s) {
- var i = s.indexOf(x);
- return i === -1 ? nothing : just(i);
- };
- };
- };
- };
- exports["_indexOf'"] = function (just) {
- return function (nothing) {
- return function (x) {
- return function (startAt) {
- return function (s) {
- if (startAt < 0 || startAt > s.length) return nothing;
- var i = s.indexOf(x, startAt);
- return i === -1 ? nothing : just(i);
- };
- };
- };
- };
- };
- exports._lastIndexOf = function (just) {
- return function (nothing) {
- return function (x) {
- return function (s) {
- var i = s.lastIndexOf(x);
- return i === -1 ? nothing : just(i);
- };
- };
- };
- };
- exports["_lastIndexOf'"] = function (just) {
- return function (nothing) {
- return function (x) {
- return function (startAt) {
- return function (s) {
- if (startAt < 0 || startAt > s.length) return nothing;
- var i = s.lastIndexOf(x, startAt);
- return i === -1 ? nothing : just(i);
- };
- };
- };
- };
- };
- exports.take = function (n) {
- return function (s) {
- return s.substr(0, n);
- };
- };
- exports.drop = function (n) {
- return function (s) {
- return s.substring(n);
- };
- };
- exports._slice = function (b) {
- return function (e) {
- return function (s) {
- return s.slice(b, e);
- };
- };
- };
- exports.splitAt = function (i) {
- return function (s) {
- return {
- before: s.substring(0, i),
- after: s.substring(i)
- };
- };
- };
- },{}],"../output/Data.String.Unsafe/foreign.js":[function(require,module,exports) {
- "use strict";
- exports.charAt = function (i) {
- return function (s) {
- if (i >= 0 && i < s.length) return s.charAt(i);
- throw new Error("Data.String.Unsafe.charAt: Invalid index.");
- };
- };
- exports.char = function (s) {
- if (s.length === 1) return s.charAt(0);
- throw new Error("Data.String.Unsafe.char: Expected string of length 1.");
- };
- },{}],"../output/Data.String.Unsafe/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- module.exports = {
- "char": $foreign["char"],
- charAt: $foreign.charAt
- };
- },{"./foreign.js":"../output/Data.String.Unsafe/foreign.js"}],"../output/Data.String.CodeUnits/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Data_Boolean = require("../Data.Boolean/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_String_Unsafe = require("../Data.String.Unsafe/index.js");
- var uncons = function uncons(v) {
- if (v === "") {
- return Data_Maybe.Nothing.value;
- }
- ;
- return new Data_Maybe.Just({
- head: Data_String_Unsafe.charAt(0)(v),
- tail: $foreign.drop(1)(v)
- });
- };
- var toChar = $foreign["_toChar"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
- var takeWhile = function takeWhile(p) {
- return function (s) {
- return $foreign.take($foreign.countPrefix(p)(s))(s);
- };
- };
- var takeRight = function takeRight(i) {
- return function (s) {
- return $foreign.drop($foreign.length(s) - i | 0)(s);
- };
- };
- var slice = function slice(b) {
- return function (e) {
- return function (s) {
- var l = $foreign.length(s);
- var norm = function norm(x) {
- if (x < 0) {
- return l + x | 0;
- }
- ;
- if (Data_Boolean.otherwise) {
- return x;
- }
- ;
- throw new Error("Failed pattern match at Data.String.CodeUnits (line 314, column 5 - line 315, column 27): " + [x.constructor.name]);
- };
- var e$prime = norm(e);
- var b$prime = norm(b);
- var $7 = b$prime < 0 || b$prime >= l || e$prime < 0 || e$prime > l || b$prime > e$prime;
- if ($7) {
- return Data_Maybe.Nothing.value;
- }
- ;
- return new Data_Maybe.Just($foreign["_slice"](b)(e)(s));
- };
- };
- };
- var lastIndexOf$prime = $foreign["_lastIndexOf'"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
- var lastIndexOf = $foreign["_lastIndexOf"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
- var stripSuffix = function stripSuffix(v) {
- return function (str) {
- var v1 = lastIndexOf(v)(str);
- if (v1 instanceof Data_Maybe.Just && v1.value0 === ($foreign.length(str) - $foreign.length(v) | 0)) {
- return Data_Maybe.Just.create($foreign.take(v1.value0)(str));
- }
- ;
- return Data_Maybe.Nothing.value;
- };
- };
- var indexOf$prime = $foreign["_indexOf'"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
- var indexOf = $foreign["_indexOf"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
- var stripPrefix = function stripPrefix(v) {
- return function (str) {
- var v1 = indexOf(v)(str);
- if (v1 instanceof Data_Maybe.Just && v1.value0 === 0) {
- return Data_Maybe.Just.create($foreign.drop($foreign.length(v))(str));
- }
- ;
- return Data_Maybe.Nothing.value;
- };
- };
- var dropWhile = function dropWhile(p) {
- return function (s) {
- return $foreign.drop($foreign.countPrefix(p)(s))(s);
- };
- };
- var dropRight = function dropRight(i) {
- return function (s) {
- return $foreign.take($foreign.length(s) - i | 0)(s);
- };
- };
- var contains = function contains(pat) {
- var $16 = indexOf(pat);
- return function ($17) {
- return Data_Maybe.isJust($16($17));
- };
- };
- var charAt = $foreign["_charAt"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
- module.exports = {
- stripPrefix: stripPrefix,
- stripSuffix: stripSuffix,
- contains: contains,
- charAt: charAt,
- toChar: toChar,
- uncons: uncons,
- indexOf: indexOf,
- "indexOf'": indexOf$prime,
- lastIndexOf: lastIndexOf,
- "lastIndexOf'": lastIndexOf$prime,
- takeRight: takeRight,
- takeWhile: takeWhile,
- dropRight: dropRight,
- dropWhile: dropWhile,
- slice: slice,
- singleton: $foreign.singleton,
- fromCharArray: $foreign.fromCharArray,
- toCharArray: $foreign.toCharArray,
- length: $foreign.length,
- countPrefix: $foreign.countPrefix,
- take: $foreign.take,
- drop: $foreign.drop,
- splitAt: $foreign.splitAt
- };
- },{"./foreign.js":"../output/Data.String.CodeUnits/foreign.js","../Data.Boolean/index.js":"../output/Data.Boolean/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.String.Unsafe/index.js":"../output/Data.String.Unsafe/index.js"}],"../output/Foreign/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Monad_Error_Class = require("../Control.Monad.Error.Class/index.js");
- var Control_Monad_Except = require("../Control.Monad.Except/index.js");
- var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js");
- var Data_Boolean = require("../Data.Boolean/index.js");
- var Data_Either = require("../Data.Either/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Identity = require("../Data.Identity/index.js");
- var Data_Int = require("../Data.Int/index.js");
- var Data_List_NonEmpty = require("../Data.List.NonEmpty/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Ordering = require("../Data.Ordering/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Data_String_CodeUnits = require("../Data.String.CodeUnits/index.js");
- var ForeignError = function () {
- function ForeignError(value0) {
- this.value0 = value0;
- }
- ;
- ForeignError.create = function (value0) {
- return new ForeignError(value0);
- };
- return ForeignError;
- }();
- var TypeMismatch = function () {
- function TypeMismatch(value0, value1) {
- this.value0 = value0;
- this.value1 = value1;
- }
- ;
- TypeMismatch.create = function (value0) {
- return function (value1) {
- return new TypeMismatch(value0, value1);
- };
- };
- return TypeMismatch;
- }();
- var ErrorAtIndex = function () {
- function ErrorAtIndex(value0, value1) {
- this.value0 = value0;
- this.value1 = value1;
- }
- ;
- ErrorAtIndex.create = function (value0) {
- return function (value1) {
- return new ErrorAtIndex(value0, value1);
- };
- };
- return ErrorAtIndex;
- }();
- var ErrorAtProperty = function () {
- function ErrorAtProperty(value0, value1) {
- this.value0 = value0;
- this.value1 = value1;
- }
- ;
- ErrorAtProperty.create = function (value0) {
- return function (value1) {
- return new ErrorAtProperty(value0, value1);
- };
- };
- return ErrorAtProperty;
- }();
- var showForeignError = new Data_Show.Show(function (v) {
- if (v instanceof ForeignError) {
- return "(ForeignError " + (Data_Show.show(Data_Show.showString)(v.value0) + ")");
- }
- ;
- if (v instanceof ErrorAtIndex) {
- return "(ErrorAtIndex " + (Data_Show.show(Data_Show.showInt)(v.value0) + (" " + (Data_Show.show(showForeignError)(v.value1) + ")")));
- }
- ;
- if (v instanceof ErrorAtProperty) {
- return "(ErrorAtProperty " + (Data_Show.show(Data_Show.showString)(v.value0) + (" " + (Data_Show.show(showForeignError)(v.value1) + ")")));
- }
- ;
- if (v instanceof TypeMismatch) {
- return "(TypeMismatch " + (Data_Show.show(Data_Show.showString)(v.value0) + (" " + (Data_Show.show(Data_Show.showString)(v.value1) + ")")));
- }
- ;
- throw new Error("Failed pattern match at Foreign (line 63, column 1 - line 67, column 89): " + [v.constructor.name]);
- });
- var renderForeignError = function renderForeignError(v) {
- if (v instanceof ForeignError) {
- return v.value0;
- }
- ;
- if (v instanceof ErrorAtIndex) {
- return "Error at array index " + (Data_Show.show(Data_Show.showInt)(v.value0) + (": " + renderForeignError(v.value1)));
- }
- ;
- if (v instanceof ErrorAtProperty) {
- return "Error at property " + (Data_Show.show(Data_Show.showString)(v.value0) + (": " + renderForeignError(v.value1)));
- }
- ;
- if (v instanceof TypeMismatch) {
- return "Type mismatch: expected " + (v.value0 + (", found " + v.value1));
- }
- ;
- throw new Error("Failed pattern match at Foreign (line 72, column 1 - line 72, column 45): " + [v.constructor.name]);
- };
- var readUndefined = function readUndefined(value) {
- if ($foreign.isUndefined(value)) {
- return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Data_Maybe.Nothing.value);
- }
- ;
- if (Data_Boolean.otherwise) {
- return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(new Data_Maybe.Just(value));
- }
- ;
- throw new Error("Failed pattern match at Foreign (line 157, column 1 - line 157, column 46): " + [value.constructor.name]);
- };
- var readNullOrUndefined = function readNullOrUndefined(value) {
- if ($foreign.isNull(value) || $foreign.isUndefined(value)) {
- return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Data_Maybe.Nothing.value);
- }
- ;
- if (Data_Boolean.otherwise) {
- return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(new Data_Maybe.Just(value));
- }
- ;
- throw new Error("Failed pattern match at Foreign (line 162, column 1 - line 162, column 52): " + [value.constructor.name]);
- };
- var readNull = function readNull(value) {
- if ($foreign.isNull(value)) {
- return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Data_Maybe.Nothing.value);
- }
- ;
- if (Data_Boolean.otherwise) {
- return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(new Data_Maybe.Just(value));
- }
- ;
- throw new Error("Failed pattern match at Foreign (line 152, column 1 - line 152, column 41): " + [value.constructor.name]);
- };
- var fail = function () {
- var $107 = Control_Monad_Error_Class.throwError(Control_Monad_Except_Trans.monadThrowExceptT(Data_Identity.monadIdentity));
- return function ($108) {
- return $107(Data_List_NonEmpty.singleton($108));
- };
- }();
- var readArray = function readArray(value) {
- if ($foreign.isArray(value)) {
- return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))($foreign.unsafeFromForeign(value));
- }
- ;
- if (Data_Boolean.otherwise) {
- return fail(new TypeMismatch("array", $foreign.tagOf(value)));
- }
- ;
- throw new Error("Failed pattern match at Foreign (line 147, column 1 - line 147, column 42): " + [value.constructor.name]);
- };
- var unsafeReadTagged = function unsafeReadTagged(tag) {
- return function (value) {
- if ($foreign.tagOf(value) === tag) {
- return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))($foreign.unsafeFromForeign(value));
- }
- ;
- if (Data_Boolean.otherwise) {
- return fail(new TypeMismatch(tag, $foreign.tagOf(value)));
- }
- ;
- throw new Error("Failed pattern match at Foreign (line 106, column 1 - line 106, column 55): " + [tag.constructor.name, value.constructor.name]);
- };
- };
- var readBoolean = unsafeReadTagged("Boolean");
- var readNumber = unsafeReadTagged("Number");
- var readInt = function readInt(value) {
- var error = Data_Either.Left.create(Data_List_NonEmpty.singleton(new TypeMismatch("Int", $foreign.tagOf(value))));
- var fromNumber = function () {
- var $109 = Data_Maybe.maybe(error)(Control_Applicative.pure(Data_Either.applicativeEither));
- return function ($110) {
- return $109(Data_Int.fromNumber($110));
- };
- }();
- return Control_Monad_Except.mapExcept(Data_Either.either(Data_Function["const"](error))(fromNumber))(readNumber(value));
- };
- var readString = unsafeReadTagged("String");
- var readChar = function readChar(value) {
- var error = Data_Either.Left.create(Data_List_NonEmpty.singleton(new TypeMismatch("Char", $foreign.tagOf(value))));
- var fromString = function () {
- var $111 = Data_Maybe.maybe(error)(Control_Applicative.pure(Data_Either.applicativeEither));
- return function ($112) {
- return $111(Data_String_CodeUnits.toChar($112));
- };
- }();
- return Control_Monad_Except.mapExcept(Data_Either.either(Data_Function["const"](error))(fromString))(readString(value));
- };
- var eqForeignError = new Data_Eq.Eq(function (x) {
- return function (y) {
- if (x instanceof ForeignError && y instanceof ForeignError) {
- return x.value0 === y.value0;
- }
- ;
- if (x instanceof TypeMismatch && y instanceof TypeMismatch) {
- return x.value0 === y.value0 && x.value1 === y.value1;
- }
- ;
- if (x instanceof ErrorAtIndex && y instanceof ErrorAtIndex) {
- return x.value0 === y.value0 && Data_Eq.eq(eqForeignError)(x.value1)(y.value1);
- }
- ;
- if (x instanceof ErrorAtProperty && y instanceof ErrorAtProperty) {
- return x.value0 === y.value0 && Data_Eq.eq(eqForeignError)(x.value1)(y.value1);
- }
- ;
- return false;
- };
- });
- var ordForeignError = new Data_Ord.Ord(function () {
- return eqForeignError;
- }, function (x) {
- return function (y) {
- if (x instanceof ForeignError && y instanceof ForeignError) {
- return Data_Ord.compare(Data_Ord.ordString)(x.value0)(y.value0);
- }
- ;
- if (x instanceof ForeignError) {
- return Data_Ordering.LT.value;
- }
- ;
- if (y instanceof ForeignError) {
- return Data_Ordering.GT.value;
- }
- ;
- if (x instanceof TypeMismatch && y instanceof TypeMismatch) {
- var v = Data_Ord.compare(Data_Ord.ordString)(x.value0)(y.value0);
- if (v instanceof Data_Ordering.LT) {
- return Data_Ordering.LT.value;
- }
- ;
- if (v instanceof Data_Ordering.GT) {
- return Data_Ordering.GT.value;
- }
- ;
- return Data_Ord.compare(Data_Ord.ordString)(x.value1)(y.value1);
- }
- ;
- if (x instanceof TypeMismatch) {
- return Data_Ordering.LT.value;
- }
- ;
- if (y instanceof TypeMismatch) {
- return Data_Ordering.GT.value;
- }
- ;
- if (x instanceof ErrorAtIndex && y instanceof ErrorAtIndex) {
- var v = Data_Ord.compare(Data_Ord.ordInt)(x.value0)(y.value0);
- if (v instanceof Data_Ordering.LT) {
- return Data_Ordering.LT.value;
- }
- ;
- if (v instanceof Data_Ordering.GT) {
- return Data_Ordering.GT.value;
- }
- ;
- return Data_Ord.compare(ordForeignError)(x.value1)(y.value1);
- }
- ;
- if (x instanceof ErrorAtIndex) {
- return Data_Ordering.LT.value;
- }
- ;
- if (y instanceof ErrorAtIndex) {
- return Data_Ordering.GT.value;
- }
- ;
- if (x instanceof ErrorAtProperty && y instanceof ErrorAtProperty) {
- var v = Data_Ord.compare(Data_Ord.ordString)(x.value0)(y.value0);
- if (v instanceof Data_Ordering.LT) {
- return Data_Ordering.LT.value;
- }
- ;
- if (v instanceof Data_Ordering.GT) {
- return Data_Ordering.GT.value;
- }
- ;
- return Data_Ord.compare(ordForeignError)(x.value1)(y.value1);
- }
- ;
- throw new Error("Failed pattern match at Foreign (line 61, column 1 - line 61, column 52): " + [x.constructor.name, y.constructor.name]);
- };
- });
- module.exports = {
- ForeignError: ForeignError,
- TypeMismatch: TypeMismatch,
- ErrorAtIndex: ErrorAtIndex,
- ErrorAtProperty: ErrorAtProperty,
- renderForeignError: renderForeignError,
- unsafeReadTagged: unsafeReadTagged,
- readString: readString,
- readChar: readChar,
- readBoolean: readBoolean,
- readNumber: readNumber,
- readInt: readInt,
- readArray: readArray,
- readNull: readNull,
- readUndefined: readUndefined,
- readNullOrUndefined: readNullOrUndefined,
- fail: fail,
- eqForeignError: eqForeignError,
- ordForeignError: ordForeignError,
- showForeignError: showForeignError,
- unsafeToForeign: $foreign.unsafeToForeign,
- unsafeFromForeign: $foreign.unsafeFromForeign,
- typeOf: $foreign.typeOf,
- tagOf: $foreign.tagOf,
- isNull: $foreign.isNull,
- isUndefined: $foreign.isUndefined,
- isArray: $foreign.isArray
- };
- },{"./foreign.js":"../output/Foreign/foreign.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Monad.Error.Class/index.js":"../output/Control.Monad.Error.Class/index.js","../Control.Monad.Except/index.js":"../output/Control.Monad.Except/index.js","../Control.Monad.Except.Trans/index.js":"../output/Control.Monad.Except.Trans/index.js","../Data.Boolean/index.js":"../output/Data.Boolean/index.js","../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Identity/index.js":"../output/Data.Identity/index.js","../Data.Int/index.js":"../output/Data.Int/index.js","../Data.List.NonEmpty/index.js":"../output/Data.List.NonEmpty/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.String.CodeUnits/index.js":"../output/Data.String.CodeUnits/index.js"}],"../output/Data.Generic.Rep/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Inl = function () {
- function Inl(value0) {
- this.value0 = value0;
- }
- ;
- Inl.create = function (value0) {
- return new Inl(value0);
- };
- return Inl;
- }();
- var Inr = function () {
- function Inr(value0) {
- this.value0 = value0;
- }
- ;
- Inr.create = function (value0) {
- return new Inr(value0);
- };
- return Inr;
- }();
- var Product = function () {
- function Product(value0, value1) {
- this.value0 = value0;
- this.value1 = value1;
- }
- ;
- Product.create = function (value0) {
- return function (value1) {
- return new Product(value0, value1);
- };
- };
- return Product;
- }();
- var NoArguments = function () {
- function NoArguments() {}
- ;
- NoArguments.value = new NoArguments();
- return NoArguments;
- }();
- var Constructor = function Constructor(x) {
- return x;
- };
- var Argument = function Argument(x) {
- return x;
- };
- var Generic = function Generic(from, to) {
- this.from = from;
- this.to = to;
- };
- var to = function to(dict) {
- return dict.to;
- };
- var genericMaybe = new Generic(function (v) {
- if (v instanceof Data_Maybe.Nothing) {
- return new Inl(NoArguments.value);
- }
- ;
- if (v instanceof Data_Maybe.Just) {
- return new Inr(v.value0);
- }
- ;
- throw new Error("Failed pattern match at Data.Generic.Rep (line 40, column 1 - line 47, column 49): " + [v.constructor.name]);
- }, function (v) {
- if (v instanceof Inl) {
- return Data_Maybe.Nothing.value;
- }
- ;
- if (v instanceof Inr) {
- return new Data_Maybe.Just(v.value0);
- }
- ;
- throw new Error("Failed pattern match at Data.Generic.Rep (line 40, column 1 - line 47, column 49): " + [v.constructor.name]);
- });
- var from = function from(dict) {
- return dict.from;
- };
- module.exports = {
- Generic: Generic,
- to: to,
- from: from,
- NoArguments: NoArguments,
- Inl: Inl,
- Inr: Inr,
- Product: Product,
- Constructor: Constructor,
- Argument: Argument,
- genericMaybe: genericMaybe
- };
- },{"../Data.Maybe/index.js":"../output/Data.Maybe/index.js"}],"../output/Data.Array/foreign.js":[function(require,module,exports) {
- "use strict"; //------------------------------------------------------------------------------
- // Array creation --------------------------------------------------------------
- //------------------------------------------------------------------------------
- exports.range = function (start) {
- return function (end) {
- var step = start > end ? -1 : 1;
- var result = new Array(step * (end - start) + 1);
- var i = start,
- n = 0;
- while (i !== end) {
- result[n++] = i;
- i += step;
- }
- result[n] = i;
- return result;
- };
- };
- var replicateFill = function replicateFill(count) {
- return function (value) {
- if (count < 1) {
- return [];
- }
- var result = new Array(count);
- return result.fill(value);
- };
- };
- var replicatePolyfill = function replicatePolyfill(count) {
- return function (value) {
- var result = [];
- var n = 0;
- for (var i = 0; i < count; i++) {
- result[n++] = value;
- }
- return result;
- };
- }; // In browsers that have Array.prototype.fill we use it, as it's faster.
- exports.replicate = typeof Array.prototype.fill === "function" ? replicateFill : replicatePolyfill;
- exports.fromFoldableImpl = function () {
- function Cons(head, tail) {
- this.head = head;
- this.tail = tail;
- }
- var emptyList = {};
- function curryCons(head) {
- return function (tail) {
- return new Cons(head, tail);
- };
- }
- function listToArray(list) {
- var result = [];
- var count = 0;
- var xs = list;
- while (xs !== emptyList) {
- result[count++] = xs.head;
- xs = xs.tail;
- }
- return result;
- }
- return function (foldr) {
- return function (xs) {
- return listToArray(foldr(curryCons)(emptyList)(xs));
- };
- };
- }(); //------------------------------------------------------------------------------
- // Array size ------------------------------------------------------------------
- //------------------------------------------------------------------------------
- exports.length = function (xs) {
- return xs.length;
- }; //------------------------------------------------------------------------------
- // Extending arrays ------------------------------------------------------------
- //------------------------------------------------------------------------------
- exports.cons = function (e) {
- return function (l) {
- return [e].concat(l);
- };
- };
- exports.snoc = function (l) {
- return function (e) {
- var l1 = l.slice();
- l1.push(e);
- return l1;
- };
- }; //------------------------------------------------------------------------------
- // Non-indexed reads -----------------------------------------------------------
- //------------------------------------------------------------------------------
- exports["uncons'"] = function (empty) {
- return function (next) {
- return function (xs) {
- return xs.length === 0 ? empty({}) : next(xs[0])(xs.slice(1));
- };
- };
- }; //------------------------------------------------------------------------------
- // Indexed operations ----------------------------------------------------------
- //------------------------------------------------------------------------------
- exports.indexImpl = function (just) {
- return function (nothing) {
- return function (xs) {
- return function (i) {
- return i < 0 || i >= xs.length ? nothing : just(xs[i]);
- };
- };
- };
- };
- exports.findIndexImpl = function (just) {
- return function (nothing) {
- return function (f) {
- return function (xs) {
- for (var i = 0, l = xs.length; i < l; i++) {
- if (f(xs[i])) return just(i);
- }
- return nothing;
- };
- };
- };
- };
- exports.findLastIndexImpl = function (just) {
- return function (nothing) {
- return function (f) {
- return function (xs) {
- for (var i = xs.length - 1; i >= 0; i--) {
- if (f(xs[i])) return just(i);
- }
- return nothing;
- };
- };
- };
- };
- exports._insertAt = function (just) {
- return function (nothing) {
- return function (i) {
- return function (a) {
- return function (l) {
- if (i < 0 || i > l.length) return nothing;
- var l1 = l.slice();
- l1.splice(i, 0, a);
- return just(l1);
- };
- };
- };
- };
- };
- exports._deleteAt = function (just) {
- return function (nothing) {
- return function (i) {
- return function (l) {
- if (i < 0 || i >= l.length) return nothing;
- var l1 = l.slice();
- l1.splice(i, 1);
- return just(l1);
- };
- };
- };
- };
- exports._updateAt = function (just) {
- return function (nothing) {
- return function (i) {
- return function (a) {
- return function (l) {
- if (i < 0 || i >= l.length) return nothing;
- var l1 = l.slice();
- l1[i] = a;
- return just(l1);
- };
- };
- };
- };
- }; //------------------------------------------------------------------------------
- // Transformations -------------------------------------------------------------
- //------------------------------------------------------------------------------
- exports.reverse = function (l) {
- return l.slice().reverse();
- };
- exports.concat = function (xss) {
- if (xss.length <= 10000) {
- // This method is faster, but it crashes on big arrays.
- // So we use it when can and fallback to simple variant otherwise.
- return Array.prototype.concat.apply([], xss);
- }
- var result = [];
- for (var i = 0, l = xss.length; i < l; i++) {
- var xs = xss[i];
- for (var j = 0, m = xs.length; j < m; j++) {
- result.push(xs[j]);
- }
- }
- return result;
- };
- exports.filter = function (f) {
- return function (xs) {
- return xs.filter(f);
- };
- };
- exports.partition = function (f) {
- return function (xs) {
- var yes = [];
- var no = [];
- for (var i = 0; i < xs.length; i++) {
- var x = xs[i];
- if (f(x)) yes.push(x);else no.push(x);
- }
- return {
- yes: yes,
- no: no
- };
- };
- }; //------------------------------------------------------------------------------
- // Sorting ---------------------------------------------------------------------
- //------------------------------------------------------------------------------
- exports.sortImpl = function (f) {
- return function (l) {
- return l.slice().sort(function (x, y) {
- return f(x)(y);
- });
- };
- }; //------------------------------------------------------------------------------
- // Subarrays -------------------------------------------------------------------
- //------------------------------------------------------------------------------
- exports.slice = function (s) {
- return function (e) {
- return function (l) {
- return l.slice(s, e);
- };
- };
- };
- exports.take = function (n) {
- return function (l) {
- return n < 1 ? [] : l.slice(0, n);
- };
- };
- exports.drop = function (n) {
- return function (l) {
- return n < 1 ? l : l.slice(n);
- };
- }; //------------------------------------------------------------------------------
- // Zipping ---------------------------------------------------------------------
- //------------------------------------------------------------------------------
- exports.zipWith = function (f) {
- return function (xs) {
- return function (ys) {
- var l = xs.length < ys.length ? xs.length : ys.length;
- var result = new Array(l);
- for (var i = 0; i < l; i++) {
- result[i] = f(xs[i])(ys[i]);
- }
- return result;
- };
- };
- }; //------------------------------------------------------------------------------
- // Partial ---------------------------------------------------------------------
- //------------------------------------------------------------------------------
- exports.unsafeIndexImpl = function (xs) {
- return function (n) {
- return xs[n];
- };
- };
- },{}],"../output/Control.Monad.ST.Internal/foreign.js":[function(require,module,exports) {
- "use strict";
- exports.map_ = function (f) {
- return function (a) {
- return function () {
- return f(a());
- };
- };
- };
- exports.pure_ = function (a) {
- return function () {
- return a;
- };
- };
- exports.bind_ = function (a) {
- return function (f) {
- return function () {
- return f(a())();
- };
- };
- };
- exports.run = function (f) {
- return f();
- };
- exports["while"] = function (f) {
- return function (a) {
- return function () {
- while (f()) {
- a();
- }
- };
- };
- };
- exports["for"] = function (lo) {
- return function (hi) {
- return function (f) {
- return function () {
- for (var i = lo; i < hi; i++) {
- f(i)();
- }
- };
- };
- };
- };
- exports.foreach = function (as) {
- return function (f) {
- return function () {
- for (var i = 0, l = as.length; i < l; i++) {
- f(as[i])();
- }
- };
- };
- };
- exports.new = function (val) {
- return function () {
- return {
- value: val
- };
- };
- };
- exports.read = function (ref) {
- return function () {
- return ref.value;
- };
- };
- exports["modify'"] = function (f) {
- return function (ref) {
- return function () {
- var t = f(ref.value);
- ref.value = t.state;
- return t.value;
- };
- };
- };
- exports.write = function (a) {
- return function (ref) {
- return function () {
- return ref.value = a; // eslint-disable-line no-return-assign
- };
- };
- };
- },{}],"../output/Control.Monad.ST.Internal/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Monad = require("../Control.Monad/index.js");
- var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Unit = require("../Data.Unit/index.js");
- var modify = function modify(f) {
- return $foreign["modify'"](function (s) {
- var s$prime = f(s);
- return {
- state: s$prime,
- value: s$prime
- };
- });
- };
- var functorST = new Data_Functor.Functor($foreign.map_);
- var monadST = new Control_Monad.Monad(function () {
- return applicativeST;
- }, function () {
- return bindST;
- });
- var bindST = new Control_Bind.Bind(function () {
- return applyST;
- }, $foreign.bind_);
- var applyST = new Control_Apply.Apply(function () {
- return functorST;
- }, Control_Monad.ap(monadST));
- var applicativeST = new Control_Applicative.Applicative(function () {
- return applyST;
- }, $foreign.pure_);
- var monadRecST = new Control_Monad_Rec_Class.MonadRec(function () {
- return monadST;
- }, function (f) {
- return function (a) {
- var isLooping = function isLooping(v) {
- if (v instanceof Control_Monad_Rec_Class.Loop) {
- return true;
- }
- ;
- return false;
- };
- var fromDone = function fromDone(v) {
- if (v instanceof Control_Monad_Rec_Class.Done) {
- return v.value0;
- }
- ;
- throw new Error("Failed pattern match at Control.Monad.ST.Internal (line 54, column 32 - line 54, column 46): " + [v.constructor.name]);
- };
- return Control_Bind.bind(bindST)(Control_Bind.bindFlipped(bindST)($foreign["new"])(f(a)))(function (r) {
- return Control_Bind.discard(Control_Bind.discardUnit)(bindST)($foreign["while"](Data_Functor.map(functorST)(isLooping)($foreign.read(r)))(Control_Bind.bind(bindST)($foreign.read(r))(function (v) {
- if (v instanceof Control_Monad_Rec_Class.Loop) {
- return Control_Bind.bind(bindST)(f(v.value0))(function (e) {
- return Data_Functor["void"](functorST)($foreign.write(e)(r));
- });
- }
- ;
- if (v instanceof Control_Monad_Rec_Class.Done) {
- return Control_Applicative.pure(applicativeST)(Data_Unit.unit);
- }
- ;
- throw new Error("Failed pattern match at Control.Monad.ST.Internal (line 46, column 18 - line 50, column 28): " + [v.constructor.name]);
- })))(function () {
- return Data_Functor.map(functorST)(fromDone)($foreign.read(r));
- });
- });
- };
- });
- module.exports = {
- modify: modify,
- functorST: functorST,
- applyST: applyST,
- applicativeST: applicativeST,
- bindST: bindST,
- monadST: monadST,
- monadRecST: monadRecST,
- map_: $foreign.map_,
- pure_: $foreign.pure_,
- bind_: $foreign.bind_,
- run: $foreign.run,
- "while": $foreign["while"],
- "for": $foreign["for"],
- foreach: $foreign.foreach,
- "new": $foreign["new"],
- read: $foreign.read,
- "modify'": $foreign["modify'"],
- write: $foreign.write
- };
- },{"./foreign.js":"../output/Control.Monad.ST.Internal/foreign.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Control.Monad.Rec.Class/index.js":"../output/Control.Monad.Rec.Class/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Data.Array.ST/foreign.js":[function(require,module,exports) {
- "use strict";
- exports.empty = function () {
- return [];
- };
- exports.peekImpl = function (just) {
- return function (nothing) {
- return function (i) {
- return function (xs) {
- return function () {
- return i >= 0 && i < xs.length ? just(xs[i]) : nothing;
- };
- };
- };
- };
- };
- exports.poke = function (i) {
- return function (a) {
- return function (xs) {
- return function () {
- var ret = i >= 0 && i < xs.length;
- if (ret) xs[i] = a;
- return ret;
- };
- };
- };
- };
- exports.popImpl = function (just) {
- return function (nothing) {
- return function (xs) {
- return function () {
- return xs.length > 0 ? just(xs.pop()) : nothing;
- };
- };
- };
- };
- exports.pushAll = function (as) {
- return function (xs) {
- return function () {
- return xs.push.apply(xs, as);
- };
- };
- };
- exports.shiftImpl = function (just) {
- return function (nothing) {
- return function (xs) {
- return function () {
- return xs.length > 0 ? just(xs.shift()) : nothing;
- };
- };
- };
- };
- exports.unshiftAll = function (as) {
- return function (xs) {
- return function () {
- return xs.unshift.apply(xs, as);
- };
- };
- };
- exports.splice = function (i) {
- return function (howMany) {
- return function (bs) {
- return function (xs) {
- return function () {
- return xs.splice.apply(xs, [i, howMany].concat(bs));
- };
- };
- };
- };
- };
- exports.unsafeFreeze = function (xs) {
- return function () {
- return xs;
- };
- };
- exports.unsafeThaw = function (xs) {
- return function () {
- return xs;
- };
- };
- function copyImpl(xs) {
- return function () {
- return xs.slice();
- };
- }
- exports.freeze = copyImpl;
- exports.thaw = copyImpl;
- exports.sortByImpl = function (comp) {
- return function (xs) {
- return function () {
- return xs.sort(function (x, y) {
- return comp(x)(y);
- });
- };
- };
- };
- exports.toAssocArray = function (xs) {
- return function () {
- var n = xs.length;
- var as = new Array(n);
- for (var i = 0; i < n; i++) {
- as[i] = {
- value: xs[i],
- index: i
- };
- }
- return as;
- };
- };
- },{}],"../output/Data.Array.ST/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Monad_ST_Internal = require("../Control.Monad.ST.Internal/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Ordering = require("../Data.Ordering/index.js");
- var withArray = function withArray(f) {
- return function (xs) {
- return function __do() {
- var result = $foreign.thaw(xs)();
- f(result)();
- return $foreign.unsafeFreeze(result)();
- };
- };
- };
- var unshift = function unshift(a) {
- return $foreign.unshiftAll([a]);
- };
- var sortBy = function sortBy(comp) {
- var comp$prime = function comp$prime(x) {
- return function (y) {
- var v = comp(x)(y);
- if (v instanceof Data_Ordering.GT) {
- return 1;
- }
- ;
- if (v instanceof Data_Ordering.EQ) {
- return 0;
- }
- ;
- if (v instanceof Data_Ordering.LT) {
- return -1 | 0;
- }
- ;
- throw new Error("Failed pattern match at Data.Array.ST (line 105, column 15 - line 108, column 13): " + [v.constructor.name]);
- };
- };
- return $foreign.sortByImpl(comp$prime);
- };
- var sortWith = function sortWith(dictOrd) {
- return function (f) {
- return sortBy(Data_Ord.comparing(dictOrd)(f));
- };
- };
- var sort = function sort(dictOrd) {
- return sortBy(Data_Ord.compare(dictOrd));
- };
- var shift = $foreign.shiftImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
- var run = function run(st) {
- return Control_Bind.bind(Control_Monad_ST_Internal.bindST)(st)($foreign.unsafeFreeze)();
- };
- var push = function push(a) {
- return $foreign.pushAll([a]);
- };
- var pop = $foreign.popImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
- var peek = $foreign.peekImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
- var modify = function modify(i) {
- return function (f) {
- return function (xs) {
- return function __do() {
- var entry = peek(i)(xs)();
- if (entry instanceof Data_Maybe.Just) {
- return $foreign.poke(i)(f(entry.value0))(xs)();
- }
- ;
- if (entry instanceof Data_Maybe.Nothing) {
- return false;
- }
- ;
- throw new Error("Failed pattern match at Data.Array.ST (line 188, column 3 - line 190, column 26): " + [entry.constructor.name]);
- };
- };
- };
- };
- module.exports = {
- run: run,
- withArray: withArray,
- peek: peek,
- modify: modify,
- pop: pop,
- push: push,
- shift: shift,
- unshift: unshift,
- sort: sort,
- sortBy: sortBy,
- sortWith: sortWith,
- empty: $foreign.empty,
- poke: $foreign.poke,
- pushAll: $foreign.pushAll,
- unshiftAll: $foreign.unshiftAll,
- splice: $foreign.splice,
- freeze: $foreign.freeze,
- thaw: $foreign.thaw,
- unsafeFreeze: $foreign.unsafeFreeze,
- unsafeThaw: $foreign.unsafeThaw,
- toAssocArray: $foreign.toAssocArray
- };
- },{"./foreign.js":"../output/Data.Array.ST/foreign.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad.ST.Internal/index.js":"../output/Control.Monad.ST.Internal/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js"}],"../output/Data.Array.ST.Iterator/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Monad_ST_Internal = require("../Control.Monad.ST.Internal/index.js");
- var Data_Array_ST = require("../Data.Array.ST/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Iterator = function () {
- function Iterator(value0, value1) {
- this.value0 = value0;
- this.value1 = value1;
- }
- ;
- Iterator.create = function (value0) {
- return function (value1) {
- return new Iterator(value0, value1);
- };
- };
- return Iterator;
- }();
- var peek = function peek(v) {
- return function __do() {
- var i = Control_Monad_ST_Internal.read(v.value1)();
- return v.value0(i);
- };
- };
- var next = function next(v) {
- return function __do() {
- var i = Control_Monad_ST_Internal.read(v.value1)();
- Control_Monad_ST_Internal.modify(function (v1) {
- return v1 + 1 | 0;
- })(v.value1)();
- return v.value0(i);
- };
- };
- var pushWhile = function pushWhile(p) {
- return function (iter) {
- return function (array) {
- return function __do() {
- var $$break = Control_Monad_ST_Internal["new"](false)();
- while (Data_Functor.map(Control_Monad_ST_Internal.functorST)(Data_HeytingAlgebra.not(Data_HeytingAlgebra.heytingAlgebraBoolean))(Control_Monad_ST_Internal.read($$break))()) {
- (function __do() {
- var mx = peek(iter)();
- if (mx instanceof Data_Maybe.Just && p(mx.value0)) {
- Data_Array_ST.push(mx.value0)(array)();
- return Data_Functor["void"](Control_Monad_ST_Internal.functorST)(next(iter))();
- }
- ;
- return Data_Functor["void"](Control_Monad_ST_Internal.functorST)(Control_Monad_ST_Internal.write(true)($$break))();
- })();
- }
- ;
- return {};
- };
- };
- };
- };
- var pushAll = pushWhile(Data_Function["const"](true));
- var iterator = function iterator(f) {
- return Data_Functor.map(Control_Monad_ST_Internal.functorST)(Iterator.create(f))(Control_Monad_ST_Internal["new"](0));
- };
- var iterate = function iterate(iter) {
- return function (f) {
- return function __do() {
- var $$break = Control_Monad_ST_Internal["new"](false)();
- while (Data_Functor.map(Control_Monad_ST_Internal.functorST)(Data_HeytingAlgebra.not(Data_HeytingAlgebra.heytingAlgebraBoolean))(Control_Monad_ST_Internal.read($$break))()) {
- (function __do() {
- var mx = next(iter)();
- if (mx instanceof Data_Maybe.Just) {
- return f(mx.value0)();
- }
- ;
- if (mx instanceof Data_Maybe.Nothing) {
- return Data_Functor["void"](Control_Monad_ST_Internal.functorST)(Control_Monad_ST_Internal.write(true)($$break))();
- }
- ;
- throw new Error("Failed pattern match at Data.Array.ST.Iterator (line 42, column 5 - line 44, column 47): " + [mx.constructor.name]);
- })();
- }
- ;
- return {};
- };
- };
- };
- var exhausted = function () {
- var $13 = Data_Functor.map(Control_Monad_ST_Internal.functorST)(Data_Maybe.isNothing);
- return function ($14) {
- return $13(peek($14));
- };
- }();
- module.exports = {
- iterator: iterator,
- iterate: iterate,
- next: next,
- peek: peek,
- exhausted: exhausted,
- pushWhile: pushWhile,
- pushAll: pushAll
- };
- },{"../Control.Monad.ST.Internal/index.js":"../output/Control.Monad.ST.Internal/index.js","../Data.Array.ST/index.js":"../output/Data.Array.ST/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.HeytingAlgebra/index.js":"../output/Data.HeytingAlgebra/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js"}],"../output/Data.Array/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Control_Alt = require("../Control.Alt/index.js");
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Category = require("../Control.Category/index.js");
- var Control_Lazy = require("../Control.Lazy/index.js");
- var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js");
- var Control_Monad_ST_Internal = require("../Control.Monad.ST.Internal/index.js");
- var Data_Array_ST = require("../Data.Array.ST/index.js");
- var Data_Array_ST_Iterator = require("../Data.Array.ST.Iterator/index.js");
- var Data_Boolean = require("../Data.Boolean/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Foldable = require("../Data.Foldable/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Ordering = require("../Data.Ordering/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Traversable = require("../Data.Traversable/index.js");
- var Data_Tuple = require("../Data.Tuple/index.js");
- var Data_Unfoldable = require("../Data.Unfoldable/index.js");
- var zipWithA = function zipWithA(dictApplicative) {
- return function (f) {
- return function (xs) {
- return function (ys) {
- return Data_Traversable.sequence(Data_Traversable.traversableArray)(dictApplicative)($foreign.zipWith(f)(xs)(ys));
- };
- };
- };
- };
- var zip = $foreign.zipWith(Data_Tuple.Tuple.create);
- var updateAtIndices = function updateAtIndices(dictFoldable) {
- return function (us) {
- return function (xs) {
- return Data_Array_ST.withArray(function (res) {
- return Data_Foldable.traverse_(Control_Monad_ST_Internal.applicativeST)(dictFoldable)(function (v) {
- return Data_Array_ST.poke(v.value0)(v.value1)(res);
- })(us);
- })(xs)();
- };
- };
- };
- var updateAt = $foreign["_updateAt"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
- var unsafeIndex = function unsafeIndex(dictPartial) {
- return $foreign.unsafeIndexImpl;
- };
- var uncons = $foreign["uncons'"](Data_Function["const"](Data_Maybe.Nothing.value))(function (x) {
- return function (xs) {
- return new Data_Maybe.Just({
- head: x,
- tail: xs
- });
- };
- });
- var toUnfoldable = function toUnfoldable(dictUnfoldable) {
- return function (xs) {
- var len = $foreign.length(xs);
- var f = function f(i) {
- if (i < len) {
- return new Data_Maybe.Just(new Data_Tuple.Tuple(unsafeIndex()(xs)(i), i + 1 | 0));
- }
- ;
- if (Data_Boolean.otherwise) {
- return Data_Maybe.Nothing.value;
- }
- ;
- throw new Error("Failed pattern match at Data.Array (line 143, column 3 - line 145, column 26): " + [i.constructor.name]);
- };
- return Data_Unfoldable.unfoldr(dictUnfoldable)(f)(0);
- };
- };
- var takeEnd = function takeEnd(n) {
- return function (xs) {
- return $foreign.drop($foreign.length(xs) - n | 0)(xs);
- };
- };
- var tail = $foreign["uncons'"](Data_Function["const"](Data_Maybe.Nothing.value))(function (v) {
- return function (xs) {
- return new Data_Maybe.Just(xs);
- };
- });
- var sortBy = function sortBy(comp) {
- return function (xs) {
- var comp$prime = function comp$prime(x) {
- return function (y) {
- var v = comp(x)(y);
- if (v instanceof Data_Ordering.GT) {
- return 1;
- }
- ;
- if (v instanceof Data_Ordering.EQ) {
- return 0;
- }
- ;
- if (v instanceof Data_Ordering.LT) {
- return -1 | 0;
- }
- ;
- throw new Error("Failed pattern match at Data.Array (line 702, column 15 - line 705, column 13): " + [v.constructor.name]);
- };
- };
- return $foreign.sortImpl(comp$prime)(xs);
- };
- };
- var sortWith = function sortWith(dictOrd) {
- return function (f) {
- return sortBy(Data_Ord.comparing(dictOrd)(f));
- };
- };
- var sort = function sort(dictOrd) {
- return function (xs) {
- return sortBy(Data_Ord.compare(dictOrd))(xs);
- };
- };
- var singleton = function singleton(a) {
- return [a];
- };
- var $$null = function $$null(xs) {
- return $foreign.length(xs) === 0;
- };
- var nubByEq = function nubByEq(eq) {
- return function (xs) {
- return function __do() {
- var arr = Data_Array_ST.empty();
- Control_Monad_ST_Internal.foreach(xs)(function (x) {
- return function __do() {
- var e = Data_Functor.map(Control_Monad_ST_Internal.functorST)(function () {
- var $84 = Data_HeytingAlgebra.not(Data_HeytingAlgebra.heytingAlgebraBoolean);
- var $85 = Data_Foldable.any(Data_Foldable.foldableArray)(Data_HeytingAlgebra.heytingAlgebraBoolean)(function (v) {
- return eq(v)(x);
- });
- return function ($86) {
- return $84($85($86));
- };
- }())(Data_Array_ST.unsafeFreeze(arr))();
- return Control_Applicative.when(Control_Monad_ST_Internal.applicativeST)(e)(Data_Functor["void"](Control_Monad_ST_Internal.functorST)(Data_Array_ST.push(x)(arr)))();
- };
- })();
- return Data_Array_ST.unsafeFreeze(arr)();
- }();
- };
- };
- var nubEq = function nubEq(dictEq) {
- return nubByEq(Data_Eq.eq(dictEq));
- };
- var modifyAtIndices = function modifyAtIndices(dictFoldable) {
- return function (is) {
- return function (f) {
- return function (xs) {
- return Data_Array_ST.withArray(function (res) {
- return Data_Foldable.traverse_(Control_Monad_ST_Internal.applicativeST)(dictFoldable)(function (i) {
- return Data_Array_ST.modify(i)(f)(res);
- })(is);
- })(xs)();
- };
- };
- };
- };
- var mapWithIndex = function mapWithIndex(f) {
- return function (xs) {
- return $foreign.zipWith(f)($foreign.range(0)($foreign.length(xs) - 1 | 0))(xs);
- };
- };
- var some = function some(dictAlternative) {
- return function (dictLazy) {
- return function (v) {
- return Control_Apply.apply(dictAlternative.Applicative0().Apply0())(Data_Functor.map(dictAlternative.Plus1().Alt0().Functor0())($foreign.cons)(v))(Control_Lazy.defer(dictLazy)(function (v1) {
- return many(dictAlternative)(dictLazy)(v);
- }));
- };
- };
- };
- var many = function many(dictAlternative) {
- return function (dictLazy) {
- return function (v) {
- return Control_Alt.alt(dictAlternative.Plus1().Alt0())(some(dictAlternative)(dictLazy)(v))(Control_Applicative.pure(dictAlternative.Applicative0())([]));
- };
- };
- };
- var insertAt = $foreign["_insertAt"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
- var init = function init(xs) {
- if ($$null(xs)) {
- return Data_Maybe.Nothing.value;
- }
- ;
- if (Data_Boolean.otherwise) {
- return new Data_Maybe.Just($foreign.slice(0)($foreign.length(xs) - 1 | 0)(xs));
- }
- ;
- throw new Error("Failed pattern match at Data.Array (line 323, column 1 - line 323, column 45): " + [xs.constructor.name]);
- };
- var index = $foreign.indexImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
- var last = function last(xs) {
- return index(xs)($foreign.length(xs) - 1 | 0);
- };
- var unsnoc = function unsnoc(xs) {
- return Control_Apply.apply(Data_Maybe.applyMaybe)(Data_Functor.map(Data_Maybe.functorMaybe)(function (v) {
- return function (v1) {
- return {
- init: v,
- last: v1
- };
- };
- })(init(xs)))(last(xs));
- };
- var modifyAt = function modifyAt(i) {
- return function (f) {
- return function (xs) {
- var go = function go(x) {
- return updateAt(i)(f(x))(xs);
- };
- return Data_Maybe.maybe(Data_Maybe.Nothing.value)(go)(index(xs)(i));
- };
- };
- };
- var span = function span(p) {
- return function (arr) {
- var go = function go($copy_i) {
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(i) {
- var v = index(arr)(i);
- if (v instanceof Data_Maybe.Just) {
- var $60 = p(v.value0);
- if ($60) {
- $copy_i = i + 1 | 0;
- return;
- }
- ;
- $tco_done = true;
- return new Data_Maybe.Just(i);
- }
- ;
- if (v instanceof Data_Maybe.Nothing) {
- $tco_done = true;
- return Data_Maybe.Nothing.value;
- }
- ;
- throw new Error("Failed pattern match at Data.Array (line 834, column 5 - line 836, column 25): " + [v.constructor.name]);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($copy_i);
- }
- ;
- return $tco_result;
- };
- var breakIndex = go(0);
- if (breakIndex instanceof Data_Maybe.Just && breakIndex.value0 === 0) {
- return {
- init: [],
- rest: arr
- };
- }
- ;
- if (breakIndex instanceof Data_Maybe.Just) {
- return {
- init: $foreign.slice(0)(breakIndex.value0)(arr),
- rest: $foreign.slice(breakIndex.value0)($foreign.length(arr))(arr)
- };
- }
- ;
- if (breakIndex instanceof Data_Maybe.Nothing) {
- return {
- init: arr,
- rest: []
- };
- }
- ;
- throw new Error("Failed pattern match at Data.Array (line 821, column 3 - line 827, column 30): " + [breakIndex.constructor.name]);
- };
- };
- var takeWhile = function takeWhile(p) {
- return function (xs) {
- return span(p)(xs).init;
- };
- };
- var unzip = function unzip(xs) {
- return function __do() {
- var fsts = Data_Array_ST.empty();
- var snds = Data_Array_ST.empty();
- var iter = Data_Array_ST_Iterator.iterator(function (v) {
- return index(xs)(v);
- })();
- Data_Array_ST_Iterator.iterate(iter)(function (v) {
- return function __do() {
- Data_Functor["void"](Control_Monad_ST_Internal.functorST)(Data_Array_ST.push(v.value0)(fsts))();
- return Data_Functor["void"](Control_Monad_ST_Internal.functorST)(Data_Array_ST.push(v.value1)(snds))();
- };
- })();
- var fsts$prime = Data_Array_ST.unsafeFreeze(fsts)();
- var snds$prime = Data_Array_ST.unsafeFreeze(snds)();
- return new Data_Tuple.Tuple(fsts$prime, snds$prime);
- }();
- };
- var head = function head(xs) {
- return index(xs)(0);
- };
- var nubBy = function nubBy(comp) {
- return function (xs) {
- var indexedAndSorted = sortBy(function (x) {
- return function (y) {
- return comp(Data_Tuple.snd(x))(Data_Tuple.snd(y));
- };
- })(mapWithIndex(Data_Tuple.Tuple.create)(xs));
- var v = head(indexedAndSorted);
- if (v instanceof Data_Maybe.Nothing) {
- return [];
- }
- ;
- if (v instanceof Data_Maybe.Just) {
- return Data_Functor.map(Data_Functor.functorArray)(Data_Tuple.snd)(sortWith(Data_Ord.ordInt)(Data_Tuple.fst)(function __do() {
- var result = Data_Array_ST.unsafeThaw(singleton(v.value0))();
- Control_Monad_ST_Internal.foreach(indexedAndSorted)(function (v1) {
- return function __do() {
- var lst = Data_Functor.map(Control_Monad_ST_Internal.functorST)(function () {
- var $87 = function (dictPartial) {
- var $89 = Data_Maybe.fromJust();
- return function ($90) {
- return $89(last($90));
- };
- }();
- return function ($88) {
- return Data_Tuple.snd($87($88));
- };
- }())(Data_Array_ST.unsafeFreeze(result))();
- return Control_Applicative.when(Control_Monad_ST_Internal.applicativeST)(Data_Eq.notEq(Data_Ordering.eqOrdering)(comp(lst)(v1.value1))(Data_Ordering.EQ.value))(Data_Functor["void"](Control_Monad_ST_Internal.functorST)(Data_Array_ST.push(v1)(result)))();
- };
- })();
- return Data_Array_ST.unsafeFreeze(result)();
- }()));
- }
- ;
- throw new Error("Failed pattern match at Data.Array (line 903, column 17 - line 911, column 29): " + [v.constructor.name]);
- };
- };
- var nub = function nub(dictOrd) {
- return nubBy(Data_Ord.compare(dictOrd));
- };
- var groupBy = function groupBy(op) {
- return function (xs) {
- return function __do() {
- var result = Data_Array_ST.empty();
- var iter = Data_Array_ST_Iterator.iterator(function (v) {
- return index(xs)(v);
- })();
- Data_Array_ST_Iterator.iterate(iter)(function (x) {
- return Data_Functor["void"](Control_Monad_ST_Internal.functorST)(function __do() {
- var sub = Data_Array_ST.empty();
- Data_Array_ST.push(x)(sub)();
- Data_Array_ST_Iterator.pushWhile(op(x))(iter)(sub)();
- var grp = Data_Array_ST.unsafeFreeze(sub)();
- return Data_Array_ST.push(grp)(result)();
- });
- })();
- return Data_Array_ST.unsafeFreeze(result)();
- }();
- };
- };
- var group = function group(dictEq) {
- return function (xs) {
- return groupBy(Data_Eq.eq(dictEq))(xs);
- };
- };
- var group$prime = function group$prime(dictOrd) {
- var $91 = group(dictOrd.Eq0());
- var $92 = sort(dictOrd);
- return function ($93) {
- return $91($92($93));
- };
- };
- var fromFoldable = function fromFoldable(dictFoldable) {
- return $foreign.fromFoldableImpl(Data_Foldable.foldr(dictFoldable));
- };
- var foldRecM = function foldRecM(dictMonadRec) {
- return function (f) {
- return function (a) {
- return function (array) {
- var go = function go(res) {
- return function (i) {
- if (i >= $foreign.length(array)) {
- return Control_Applicative.pure(dictMonadRec.Monad0().Applicative0())(new Control_Monad_Rec_Class.Done(res));
- }
- ;
- if (Data_Boolean.otherwise) {
- return Control_Bind.bind(dictMonadRec.Monad0().Bind1())(f(res)(unsafeIndex()(array)(i)))(function (res$prime) {
- return Control_Applicative.pure(dictMonadRec.Monad0().Applicative0())(new Control_Monad_Rec_Class.Loop({
- a: res$prime,
- b: i + 1 | 0
- }));
- });
- }
- ;
- throw new Error("Failed pattern match at Data.Array (line 1101, column 3 - line 1105, column 42): " + [res.constructor.name, i.constructor.name]);
- };
- };
- return Control_Monad_Rec_Class.tailRecM2(dictMonadRec)(go)(a)(0);
- };
- };
- };
- };
- var foldM = function foldM(dictMonad) {
- return function (f) {
- return function (a) {
- return $foreign["uncons'"](function (v) {
- return Control_Applicative.pure(dictMonad.Applicative0())(a);
- })(function (b) {
- return function (bs) {
- return Control_Bind.bind(dictMonad.Bind1())(f(a)(b))(function (a$prime) {
- return foldM(dictMonad)(f)(a$prime)(bs);
- });
- };
- });
- };
- };
- };
- var findLastIndex = $foreign.findLastIndexImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
- var insertBy = function insertBy(cmp) {
- return function (x) {
- return function (ys) {
- var i = Data_Maybe.maybe(0)(function (v) {
- return v + 1 | 0;
- })(findLastIndex(function (y) {
- return Data_Eq.eq(Data_Ordering.eqOrdering)(cmp(x)(y))(Data_Ordering.GT.value);
- })(ys));
- return Data_Maybe.fromJust()(insertAt(i)(x)(ys));
- };
- };
- };
- var insert = function insert(dictOrd) {
- return insertBy(Data_Ord.compare(dictOrd));
- };
- var findIndex = $foreign.findIndexImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
- var intersectBy = function intersectBy(eq) {
- return function (xs) {
- return function (ys) {
- return $foreign.filter(function (x) {
- return Data_Maybe.isJust(findIndex(eq(x))(ys));
- })(xs);
- };
- };
- };
- var intersect = function intersect(dictEq) {
- return intersectBy(Data_Eq.eq(dictEq));
- };
- var elemLastIndex = function elemLastIndex(dictEq) {
- return function (x) {
- return findLastIndex(function (v) {
- return Data_Eq.eq(dictEq)(v)(x);
- });
- };
- };
- var elemIndex = function elemIndex(dictEq) {
- return function (x) {
- return findIndex(function (v) {
- return Data_Eq.eq(dictEq)(v)(x);
- });
- };
- };
- var dropWhile = function dropWhile(p) {
- return function (xs) {
- return span(p)(xs).rest;
- };
- };
- var dropEnd = function dropEnd(n) {
- return function (xs) {
- return $foreign.take($foreign.length(xs) - n | 0)(xs);
- };
- };
- var deleteAt = $foreign["_deleteAt"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
- var deleteBy = function deleteBy(v) {
- return function (v1) {
- return function (v2) {
- if (v2.length === 0) {
- return [];
- }
- ;
- return Data_Maybe.maybe(v2)(function (i) {
- return Data_Maybe.fromJust()(deleteAt(i)(v2));
- })(findIndex(v(v1))(v2));
- };
- };
- };
- var unionBy = function unionBy(eq) {
- return function (xs) {
- return function (ys) {
- return Data_Semigroup.append(Data_Semigroup.semigroupArray)(xs)(Data_Foldable.foldl(Data_Foldable.foldableArray)(Data_Function.flip(deleteBy(eq)))(nubByEq(eq)(ys))(xs));
- };
- };
- };
- var union = function union(dictEq) {
- return unionBy(Data_Eq.eq(dictEq));
- };
- var $$delete = function $$delete(dictEq) {
- return deleteBy(Data_Eq.eq(dictEq));
- };
- var difference = function difference(dictEq) {
- return Data_Foldable.foldr(Data_Foldable.foldableArray)($$delete(dictEq));
- };
- var concatMap = Data_Function.flip(Control_Bind.bind(Control_Bind.bindArray));
- var mapMaybe = function mapMaybe(f) {
- return concatMap(function () {
- var $94 = Data_Maybe.maybe([])(singleton);
- return function ($95) {
- return $94(f($95));
- };
- }());
- };
- var filterA = function filterA(dictApplicative) {
- return function (p) {
- var $96 = Data_Functor.map(dictApplicative.Apply0().Functor0())(mapMaybe(function (v) {
- if (v.value1) {
- return new Data_Maybe.Just(v.value0);
- }
- ;
- return Data_Maybe.Nothing.value;
- }));
- var $97 = Data_Traversable.traverse(Data_Traversable.traversableArray)(dictApplicative)(function (x) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Tuple.Tuple.create(x))(p(x));
- });
- return function ($98) {
- return $96($97($98));
- };
- };
- };
- var catMaybes = mapMaybe(Control_Category.identity(Control_Category.categoryFn));
- var alterAt = function alterAt(i) {
- return function (f) {
- return function (xs) {
- var go = function go(x) {
- var v = f(x);
- if (v instanceof Data_Maybe.Nothing) {
- return deleteAt(i)(xs);
- }
- ;
- if (v instanceof Data_Maybe.Just) {
- return updateAt(i)(v.value0)(xs);
- }
- ;
- throw new Error("Failed pattern match at Data.Array (line 544, column 10 - line 546, column 32): " + [v.constructor.name]);
- };
- return Data_Maybe.maybe(Data_Maybe.Nothing.value)(go)(index(xs)(i));
- };
- };
- };
- module.exports = {
- fromFoldable: fromFoldable,
- toUnfoldable: toUnfoldable,
- singleton: singleton,
- some: some,
- many: many,
- "null": $$null,
- insert: insert,
- insertBy: insertBy,
- head: head,
- last: last,
- tail: tail,
- init: init,
- uncons: uncons,
- unsnoc: unsnoc,
- index: index,
- elemIndex: elemIndex,
- elemLastIndex: elemLastIndex,
- findIndex: findIndex,
- findLastIndex: findLastIndex,
- insertAt: insertAt,
- deleteAt: deleteAt,
- updateAt: updateAt,
- updateAtIndices: updateAtIndices,
- modifyAt: modifyAt,
- modifyAtIndices: modifyAtIndices,
- alterAt: alterAt,
- concatMap: concatMap,
- filterA: filterA,
- mapMaybe: mapMaybe,
- catMaybes: catMaybes,
- mapWithIndex: mapWithIndex,
- sort: sort,
- sortBy: sortBy,
- sortWith: sortWith,
- takeEnd: takeEnd,
- takeWhile: takeWhile,
- dropEnd: dropEnd,
- dropWhile: dropWhile,
- span: span,
- group: group,
- "group'": group$prime,
- groupBy: groupBy,
- nub: nub,
- nubEq: nubEq,
- nubBy: nubBy,
- nubByEq: nubByEq,
- union: union,
- unionBy: unionBy,
- "delete": $$delete,
- deleteBy: deleteBy,
- difference: difference,
- intersect: intersect,
- intersectBy: intersectBy,
- zipWithA: zipWithA,
- zip: zip,
- unzip: unzip,
- foldM: foldM,
- foldRecM: foldRecM,
- unsafeIndex: unsafeIndex,
- range: $foreign.range,
- replicate: $foreign.replicate,
- length: $foreign.length,
- cons: $foreign.cons,
- snoc: $foreign.snoc,
- reverse: $foreign.reverse,
- concat: $foreign.concat,
- filter: $foreign.filter,
- partition: $foreign.partition,
- slice: $foreign.slice,
- take: $foreign.take,
- drop: $foreign.drop,
- zipWith: $foreign.zipWith
- };
- },{"./foreign.js":"../output/Data.Array/foreign.js","../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Lazy/index.js":"../output/Control.Lazy/index.js","../Control.Monad.Rec.Class/index.js":"../output/Control.Monad.Rec.Class/index.js","../Control.Monad.ST.Internal/index.js":"../output/Control.Monad.ST.Internal/index.js","../Data.Array.ST/index.js":"../output/Data.Array.ST/index.js","../Data.Array.ST.Iterator/index.js":"../output/Data.Array.ST.Iterator/index.js","../Data.Boolean/index.js":"../output/Data.Boolean/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.HeytingAlgebra/index.js":"../output/Data.HeytingAlgebra/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js","../Data.Unfoldable/index.js":"../output/Data.Unfoldable/index.js"}],"../output/Foreign.Generic.Internal/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js");
- var Data_Boolean = require("../Data.Boolean/index.js");
- var Data_Identity = require("../Data.Identity/index.js");
- var Foreign = require("../Foreign/index.js");
- var isObject = function isObject(v) {
- return Foreign.tagOf(v) === "Object";
- };
- var readObject = function readObject(value) {
- if (isObject(value)) {
- return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Foreign.unsafeFromForeign(value));
- }
- ;
- if (Data_Boolean.otherwise) {
- return Foreign.fail(new Foreign.TypeMismatch("Object", Foreign.tagOf(value)));
- }
- ;
- throw new Error("Failed pattern match at Foreign.Generic.Internal (line 13, column 1 - line 13, column 44): " + [value.constructor.name]);
- };
- module.exports = {
- isObject: isObject,
- readObject: readObject
- };
- },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Monad.Except.Trans/index.js":"../output/Control.Monad.Except.Trans/index.js","../Data.Boolean/index.js":"../output/Data.Boolean/index.js","../Data.Identity/index.js":"../output/Data.Identity/index.js","../Foreign/index.js":"../output/Foreign/index.js"}],"../output/Foreign.Index/foreign.js":[function(require,module,exports) {
- "use strict";
- exports.unsafeReadPropImpl = function (f, s, key, value) {
- return value == null ? f : s(value[key]);
- };
- exports.unsafeHasOwnProperty = function (prop, value) {
- return Object.prototype.hasOwnProperty.call(value, prop);
- };
- exports.unsafeHasProperty = function (prop, value) {
- return prop in value;
- };
- },{}],"../output/Foreign.Index/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Identity = require("../Data.Identity/index.js");
- var Foreign = require("../Foreign/index.js");
- var Indexable = function Indexable(ix) {
- this.ix = ix;
- };
- var Index = function Index(errorAt, hasOwnProperty, hasProperty, index) {
- this.errorAt = errorAt;
- this.hasOwnProperty = hasOwnProperty;
- this.hasProperty = hasProperty;
- this.index = index;
- };
- var unsafeReadProp = function unsafeReadProp(k) {
- return function (value) {
- return $foreign.unsafeReadPropImpl(Foreign.fail(new Foreign.TypeMismatch("object", Foreign.typeOf(value))), Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity)), k, value);
- };
- };
- var readProp = unsafeReadProp;
- var readIndex = unsafeReadProp;
- var ix = function ix(dict) {
- return dict.ix;
- };
- var index = function index(dict) {
- return dict.index;
- };
- var indexableExceptT = new Indexable(function (dictIndex) {
- return function (f) {
- return function (i) {
- return Control_Bind.bindFlipped(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Data_Function.flip(index(dictIndex))(i))(f);
- };
- };
- });
- var indexableForeign = new Indexable(function (dictIndex) {
- return index(dictIndex);
- });
- var hasPropertyImpl = function hasPropertyImpl(v) {
- return function (value) {
- if (Foreign.isNull(value)) {
- return false;
- }
- ;
- if (Foreign.isUndefined(value)) {
- return false;
- }
- ;
- if (Foreign.typeOf(value) === "object" || Foreign.typeOf(value) === "function") {
- return $foreign.unsafeHasProperty(v, value);
- }
- ;
- return false;
- };
- };
- var hasProperty = function hasProperty(dict) {
- return dict.hasProperty;
- };
- var hasOwnPropertyImpl = function hasOwnPropertyImpl(v) {
- return function (value) {
- if (Foreign.isNull(value)) {
- return false;
- }
- ;
- if (Foreign.isUndefined(value)) {
- return false;
- }
- ;
- if (Foreign.typeOf(value) === "object" || Foreign.typeOf(value) === "function") {
- return $foreign.unsafeHasOwnProperty(v, value);
- }
- ;
- return false;
- };
- };
- var indexInt = new Index(Foreign.ErrorAtIndex.create, hasOwnPropertyImpl, hasPropertyImpl, Data_Function.flip(readIndex));
- var indexString = new Index(Foreign.ErrorAtProperty.create, hasOwnPropertyImpl, hasPropertyImpl, Data_Function.flip(readProp));
- var hasOwnProperty = function hasOwnProperty(dict) {
- return dict.hasOwnProperty;
- };
- var errorAt = function errorAt(dict) {
- return dict.errorAt;
- };
- module.exports = {
- Index: Index,
- Indexable: Indexable,
- readProp: readProp,
- readIndex: readIndex,
- ix: ix,
- index: index,
- hasProperty: hasProperty,
- hasOwnProperty: hasOwnProperty,
- errorAt: errorAt,
- indexString: indexString,
- indexInt: indexInt,
- indexableForeign: indexableForeign,
- indexableExceptT: indexableExceptT
- };
- },{"./foreign.js":"../output/Foreign.Index/foreign.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad.Except.Trans/index.js":"../output/Control.Monad.Except.Trans/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Identity/index.js":"../output/Data.Identity/index.js","../Foreign/index.js":"../output/Foreign/index.js"}],"../output/Foreign.NullOrUndefined/foreign.js":[function(require,module,exports) {
- exports['null'] = null;
- exports['undefined'] = undefined;
- },{}],"../output/Foreign.NullOrUndefined/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Identity = require("../Data.Identity/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Foreign = require("../Foreign/index.js");
- var readNullOrUndefined = function readNullOrUndefined(v) {
- return function (value) {
- if (Foreign.isNull(value) || Foreign.isUndefined(value)) {
- return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Data_Maybe.Nothing.value);
- }
- ;
- return Data_Functor.map(Control_Monad_Except_Trans.functorExceptT(Data_Identity.functorIdentity))(Data_Maybe.Just.create)(v(value));
- };
- };
- module.exports = {
- readNullOrUndefined: readNullOrUndefined,
- "undefined": $foreign["undefined"],
- "null": $foreign["null"]
- };
- },{"./foreign.js":"../output/Foreign.NullOrUndefined/foreign.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Monad.Except.Trans/index.js":"../output/Control.Monad.Except.Trans/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Identity/index.js":"../output/Data.Identity/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Foreign/index.js":"../output/Foreign/index.js"}],"../output/Foreign.Object/foreign.js":[function(require,module,exports) {
- "use strict";
- exports._copyST = function (m) {
- return function () {
- var r = {};
- for (var k in m) {
- if (hasOwnProperty.call(m, k)) {
- r[k] = m[k];
- }
- }
- return r;
- };
- };
- exports.empty = {};
- exports.runST = function (f) {
- return f();
- };
- exports._fmapObject = function (m0, f) {
- var m = {};
- for (var k in m0) {
- if (hasOwnProperty.call(m0, k)) {
- m[k] = f(m0[k]);
- }
- }
- return m;
- };
- exports._mapWithKey = function (m0, f) {
- var m = {};
- for (var k in m0) {
- if (hasOwnProperty.call(m0, k)) {
- m[k] = f(k)(m0[k]);
- }
- }
- return m;
- };
- exports._foldM = function (bind) {
- return function (f) {
- return function (mz) {
- return function (m) {
- var acc = mz;
- function g(k) {
- return function (z) {
- return f(z)(k)(m[k]);
- };
- }
- for (var k in m) {
- if (hasOwnProperty.call(m, k)) {
- acc = bind(acc)(g(k));
- }
- }
- return acc;
- };
- };
- };
- };
- exports._foldSCObject = function (m, z, f, fromMaybe) {
- var acc = z;
- for (var k in m) {
- if (hasOwnProperty.call(m, k)) {
- var maybeR = f(acc)(k)(m[k]);
- var r = fromMaybe(null)(maybeR);
- if (r === null) return acc;else acc = r;
- }
- }
- return acc;
- };
- exports.all = function (f) {
- return function (m) {
- for (var k in m) {
- if (hasOwnProperty.call(m, k) && !f(k)(m[k])) return false;
- }
- return true;
- };
- };
- exports.size = function (m) {
- var s = 0;
- for (var k in m) {
- if (hasOwnProperty.call(m, k)) {
- ++s;
- }
- }
- return s;
- };
- exports._lookup = function (no, yes, k, m) {
- return k in m ? yes(m[k]) : no;
- };
- exports._lookupST = function (no, yes, k, m) {
- return function () {
- return k in m ? yes(m[k]) : no;
- };
- };
- function toArrayWithKey(f) {
- return function (m) {
- var r = [];
- for (var k in m) {
- if (hasOwnProperty.call(m, k)) {
- r.push(f(k)(m[k]));
- }
- }
- return r;
- };
- }
- exports.toArrayWithKey = toArrayWithKey;
- exports.keys = Object.keys || toArrayWithKey(function (k) {
- return function () {
- return k;
- };
- });
- },{}],"../output/Data.Function.Uncurried/foreign.js":[function(require,module,exports) {
- "use strict"; // module Data.Function.Uncurried
- exports.mkFn0 = function (fn) {
- return function () {
- return fn({});
- };
- };
- exports.mkFn2 = function (fn) {
- /* jshint maxparams: 2 */
- return function (a, b) {
- return fn(a)(b);
- };
- };
- exports.mkFn3 = function (fn) {
- /* jshint maxparams: 3 */
- return function (a, b, c) {
- return fn(a)(b)(c);
- };
- };
- exports.mkFn4 = function (fn) {
- /* jshint maxparams: 4 */
- return function (a, b, c, d) {
- return fn(a)(b)(c)(d);
- };
- };
- exports.mkFn5 = function (fn) {
- /* jshint maxparams: 5 */
- return function (a, b, c, d, e) {
- return fn(a)(b)(c)(d)(e);
- };
- };
- exports.mkFn6 = function (fn) {
- /* jshint maxparams: 6 */
- return function (a, b, c, d, e, f) {
- return fn(a)(b)(c)(d)(e)(f);
- };
- };
- exports.mkFn7 = function (fn) {
- /* jshint maxparams: 7 */
- return function (a, b, c, d, e, f, g) {
- return fn(a)(b)(c)(d)(e)(f)(g);
- };
- };
- exports.mkFn8 = function (fn) {
- /* jshint maxparams: 8 */
- return function (a, b, c, d, e, f, g, h) {
- return fn(a)(b)(c)(d)(e)(f)(g)(h);
- };
- };
- exports.mkFn9 = function (fn) {
- /* jshint maxparams: 9 */
- return function (a, b, c, d, e, f, g, h, i) {
- return fn(a)(b)(c)(d)(e)(f)(g)(h)(i);
- };
- };
- exports.mkFn10 = function (fn) {
- /* jshint maxparams: 10 */
- return function (a, b, c, d, e, f, g, h, i, j) {
- return fn(a)(b)(c)(d)(e)(f)(g)(h)(i)(j);
- };
- };
- exports.runFn0 = function (fn) {
- return fn();
- };
- exports.runFn2 = function (fn) {
- return function (a) {
- return function (b) {
- return fn(a, b);
- };
- };
- };
- exports.runFn3 = function (fn) {
- return function (a) {
- return function (b) {
- return function (c) {
- return fn(a, b, c);
- };
- };
- };
- };
- exports.runFn4 = function (fn) {
- return function (a) {
- return function (b) {
- return function (c) {
- return function (d) {
- return fn(a, b, c, d);
- };
- };
- };
- };
- };
- exports.runFn5 = function (fn) {
- return function (a) {
- return function (b) {
- return function (c) {
- return function (d) {
- return function (e) {
- return fn(a, b, c, d, e);
- };
- };
- };
- };
- };
- };
- exports.runFn6 = function (fn) {
- return function (a) {
- return function (b) {
- return function (c) {
- return function (d) {
- return function (e) {
- return function (f) {
- return fn(a, b, c, d, e, f);
- };
- };
- };
- };
- };
- };
- };
- exports.runFn7 = function (fn) {
- return function (a) {
- return function (b) {
- return function (c) {
- return function (d) {
- return function (e) {
- return function (f) {
- return function (g) {
- return fn(a, b, c, d, e, f, g);
- };
- };
- };
- };
- };
- };
- };
- };
- exports.runFn8 = function (fn) {
- return function (a) {
- return function (b) {
- return function (c) {
- return function (d) {
- return function (e) {
- return function (f) {
- return function (g) {
- return function (h) {
- return fn(a, b, c, d, e, f, g, h);
- };
- };
- };
- };
- };
- };
- };
- };
- };
- exports.runFn9 = function (fn) {
- return function (a) {
- return function (b) {
- return function (c) {
- return function (d) {
- return function (e) {
- return function (f) {
- return function (g) {
- return function (h) {
- return function (i) {
- return fn(a, b, c, d, e, f, g, h, i);
- };
- };
- };
- };
- };
- };
- };
- };
- };
- };
- exports.runFn10 = function (fn) {
- return function (a) {
- return function (b) {
- return function (c) {
- return function (d) {
- return function (e) {
- return function (f) {
- return function (g) {
- return function (h) {
- return function (i) {
- return function (j) {
- return fn(a, b, c, d, e, f, g, h, i, j);
- };
- };
- };
- };
- };
- };
- };
- };
- };
- };
- };
- },{}],"../output/Data.Function.Uncurried/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var runFn1 = function runFn1(f) {
- return f;
- };
- var mkFn1 = function mkFn1(f) {
- return f;
- };
- module.exports = {
- mkFn1: mkFn1,
- runFn1: runFn1,
- mkFn0: $foreign.mkFn0,
- mkFn2: $foreign.mkFn2,
- mkFn3: $foreign.mkFn3,
- mkFn4: $foreign.mkFn4,
- mkFn5: $foreign.mkFn5,
- mkFn6: $foreign.mkFn6,
- mkFn7: $foreign.mkFn7,
- mkFn8: $foreign.mkFn8,
- mkFn9: $foreign.mkFn9,
- mkFn10: $foreign.mkFn10,
- runFn0: $foreign.runFn0,
- runFn2: $foreign.runFn2,
- runFn3: $foreign.runFn3,
- runFn4: $foreign.runFn4,
- runFn5: $foreign.runFn5,
- runFn6: $foreign.runFn6,
- runFn7: $foreign.runFn7,
- runFn8: $foreign.runFn8,
- runFn9: $foreign.runFn9,
- runFn10: $foreign.runFn10
- };
- },{"./foreign.js":"../output/Data.Function.Uncurried/foreign.js"}],"../output/Foreign.Object.ST/foreign.js":[function(require,module,exports) {
- "use strict";
- exports["new"] = function () {
- return {};
- };
- exports.peekImpl = function (just) {
- return function (nothing) {
- return function (k) {
- return function (m) {
- return function () {
- return {}.hasOwnProperty.call(m, k) ? just(m[k]) : nothing;
- };
- };
- };
- };
- };
- exports.poke = function (k) {
- return function (v) {
- return function (m) {
- return function () {
- m[k] = v;
- return m;
- };
- };
- };
- };
- exports["delete"] = function (k) {
- return function (m) {
- return function () {
- delete m[k];
- return m;
- };
- };
- };
- },{}],"../output/Foreign.Object.ST/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var peek = $foreign.peekImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
- module.exports = {
- peek: peek,
- "new": $foreign["new"],
- poke: $foreign.poke,
- "delete": $foreign["delete"]
- };
- },{"./foreign.js":"../output/Foreign.Object.ST/foreign.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js"}],"../output/Unsafe.Coerce/foreign.js":[function(require,module,exports) {
- "use strict"; // module Unsafe.Coerce
- exports.unsafeCoerce = function (x) {
- return x;
- };
- },{}],"../output/Unsafe.Coerce/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- module.exports = {
- unsafeCoerce: $foreign.unsafeCoerce
- };
- },{"./foreign.js":"../output/Unsafe.Coerce/foreign.js"}],"../output/Foreign.Object/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Category = require("../Control.Category/index.js");
- var Control_Monad_ST_Internal = require("../Control.Monad.ST.Internal/index.js");
- var Data_Array = require("../Data.Array/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Foldable = require("../Data.Foldable/index.js");
- var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Function_Uncurried = require("../Data.Function.Uncurried/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Data_Traversable = require("../Data.Traversable/index.js");
- var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js");
- var Data_Tuple = require("../Data.Tuple/index.js");
- var Data_Unfoldable = require("../Data.Unfoldable/index.js");
- var Foreign_Object_ST = require("../Foreign.Object.ST/index.js");
- var Unsafe_Coerce = require("../Unsafe.Coerce/index.js");
- var values = $foreign.toArrayWithKey(function (v) {
- return function (v1) {
- return v1;
- };
- });
- var toUnfoldable = function toUnfoldable(dictUnfoldable) {
- var $36 = Data_Array.toUnfoldable(dictUnfoldable);
- var $37 = $foreign.toArrayWithKey(Data_Tuple.Tuple.create);
- return function ($38) {
- return $36($37($38));
- };
- };
- var toAscUnfoldable = function toAscUnfoldable(dictUnfoldable) {
- var $39 = Data_Array.toUnfoldable(dictUnfoldable);
- var $40 = Data_Array.sortWith(Data_Ord.ordString)(Data_Tuple.fst);
- var $41 = $foreign.toArrayWithKey(Data_Tuple.Tuple.create);
- return function ($42) {
- return $39($40($41($42)));
- };
- };
- var toAscArray = toAscUnfoldable(Data_Unfoldable.unfoldableArray);
- var toArray = $foreign.toArrayWithKey(Data_Tuple.Tuple.create);
- var thawST = $foreign["_copyST"];
- var singleton = function singleton(k) {
- return function (v) {
- return $foreign.runST(Control_Bind.bindFlipped(Control_Monad_ST_Internal.bindST)(Foreign_Object_ST.poke(k)(v))(Foreign_Object_ST["new"]));
- };
- };
- var showObject = function showObject(dictShow) {
- return new Data_Show.Show(function (m) {
- return "(fromFoldable " + (Data_Show.show(Data_Show.showArray(Data_Tuple.showTuple(Data_Show.showString)(dictShow)))(toArray(m)) + ")");
- });
- };
- var mutate = function mutate(f) {
- return function (m) {
- return $foreign.runST(function __do() {
- var s = thawST(m)();
- f(s)();
- return s;
- });
- };
- };
- var member = Data_Function_Uncurried.runFn4($foreign["_lookup"])(false)(Data_Function["const"](true));
- var mapWithKey = function mapWithKey(f) {
- return function (m) {
- return $foreign["_mapWithKey"](m, f);
- };
- };
- var lookup = Data_Function_Uncurried.runFn4($foreign["_lookup"])(Data_Maybe.Nothing.value)(Data_Maybe.Just.create);
- var isSubmap = function isSubmap(dictEq) {
- return function (m1) {
- return function (m2) {
- var f = function f(k) {
- return function (v) {
- return $foreign["_lookup"](false, Data_Eq.eq(dictEq)(v), k, m2);
- };
- };
- return $foreign.all(f)(m1);
- };
- };
- };
- var isEmpty = $foreign.all(function (v) {
- return function (v1) {
- return false;
- };
- });
- var insert = function insert(k) {
- return function (v) {
- return mutate(Foreign_Object_ST.poke(k)(v));
- };
- };
- var functorObject = new Data_Functor.Functor(function (f) {
- return function (m) {
- return $foreign["_fmapObject"](m, f);
- };
- });
- var functorWithIndexObject = new Data_FunctorWithIndex.FunctorWithIndex(function () {
- return functorObject;
- }, mapWithKey);
- var fromHomogeneous = function fromHomogeneous(dictHomogeneous) {
- return Unsafe_Coerce.unsafeCoerce;
- };
- var fromFoldableWith = function fromFoldableWith(dictFoldable) {
- return function (f) {
- return function (l) {
- return $foreign.runST(function __do() {
- var s = Foreign_Object_ST["new"]();
- Data_Foldable.for_(Control_Monad_ST_Internal.applicativeST)(dictFoldable)(l)(function (v) {
- return function __do() {
- var v$prime = $foreign["_lookupST"](v.value1, f(v.value1), v.value0, s)();
- return Foreign_Object_ST.poke(v.value0)(v$prime)(s)();
- };
- })();
- return s;
- });
- };
- };
- };
- var fromFoldable = function fromFoldable(dictFoldable) {
- return function (l) {
- return $foreign.runST(function __do() {
- var s = Foreign_Object_ST["new"]();
- Control_Monad_ST_Internal.foreach(Data_Array.fromFoldable(dictFoldable)(l))(function (v) {
- return Data_Functor["void"](Control_Monad_ST_Internal.functorST)(Foreign_Object_ST.poke(v.value0)(v.value1)(s));
- })();
- return s;
- });
- };
- };
- var freezeST = $foreign["_copyST"];
- var foldMaybe = function foldMaybe(f) {
- return function (z) {
- return function (m) {
- return $foreign["_foldSCObject"](m, z, f, Data_Maybe.fromMaybe);
- };
- };
- };
- var foldM = function foldM(dictMonad) {
- return function (f) {
- return function (z) {
- return $foreign["_foldM"](Control_Bind.bind(dictMonad.Bind1()))(f)(Control_Applicative.pure(dictMonad.Applicative0())(z));
- };
- };
- };
- var semigroupObject = function semigroupObject(dictSemigroup) {
- return new Data_Semigroup.Semigroup(function (m1) {
- return function (m2) {
- return mutate(function (s1) {
- return foldM(Control_Monad_ST_Internal.monadST)(function (s2) {
- return function (k) {
- return function (v2) {
- return Foreign_Object_ST.poke(k)($foreign["_lookup"](v2, function (v1) {
- return Data_Semigroup.append(dictSemigroup)(v1)(v2);
- }, k, m2))(s2);
- };
- };
- })(s1)(m1);
- })(m2);
- };
- });
- };
- var monoidObject = function monoidObject(dictSemigroup) {
- return new Data_Monoid.Monoid(function () {
- return semigroupObject(dictSemigroup);
- }, $foreign.empty);
- };
- var union = function union(m) {
- return mutate(function (s) {
- return foldM(Control_Monad_ST_Internal.monadST)(function (s$prime) {
- return function (k) {
- return function (v) {
- return Foreign_Object_ST.poke(k)(v)(s$prime);
- };
- };
- })(s)(m);
- });
- };
- var unions = function unions(dictFoldable) {
- return Data_Foldable.foldl(dictFoldable)(union)($foreign.empty);
- };
- var fold = $foreign["_foldM"](Data_Function.applyFlipped);
- var foldMap = function foldMap(dictMonoid) {
- return function (f) {
- return fold(function (acc) {
- return function (k) {
- return function (v) {
- return Data_Semigroup.append(dictMonoid.Semigroup0())(acc)(f(k)(v));
- };
- };
- })(Data_Monoid.mempty(dictMonoid));
- };
- };
- var foldableObject = new Data_Foldable.Foldable(function (dictMonoid) {
- return function (f) {
- return foldMap(dictMonoid)(Data_Function["const"](f));
- };
- }, function (f) {
- return fold(function (z) {
- return function (v) {
- return f(z);
- };
- });
- }, function (f) {
- return function (z) {
- return function (m) {
- return Data_Foldable.foldr(Data_Foldable.foldableArray)(f)(z)(values(m));
- };
- };
- });
- var foldableWithIndexObject = new Data_FoldableWithIndex.FoldableWithIndex(function () {
- return foldableObject;
- }, function (dictMonoid) {
- return foldMap(dictMonoid);
- }, function (f) {
- return fold(Data_Function.flip(f));
- }, function (f) {
- return function (z) {
- return function (m) {
- return Data_Foldable.foldr(Data_Foldable.foldableArray)(Data_Tuple.uncurry(f))(z)($foreign.toArrayWithKey(Data_Tuple.Tuple.create)(m));
- };
- };
- });
- var traversableWithIndexObject = new Data_TraversableWithIndex.TraversableWithIndex(function () {
- return foldableWithIndexObject;
- }, function () {
- return functorWithIndexObject;
- }, function () {
- return traversableObject;
- }, function (dictApplicative) {
- return function (f) {
- return function (ms) {
- return fold(function (acc) {
- return function (k) {
- return function (v) {
- return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Function.flip(insert(k)))(acc))(f(k)(v));
- };
- };
- })(Control_Applicative.pure(dictApplicative)($foreign.empty))(ms);
- };
- };
- });
- var traversableObject = new Data_Traversable.Traversable(function () {
- return foldableObject;
- }, function () {
- return functorObject;
- }, function (dictApplicative) {
- return Data_Traversable.traverse(traversableObject)(dictApplicative)(Control_Category.identity(Control_Category.categoryFn));
- }, function (dictApplicative) {
- var $43 = Data_TraversableWithIndex.traverseWithIndex(traversableWithIndexObject)(dictApplicative);
- return function ($44) {
- return $43(Data_Function["const"]($44));
- };
- });
- var filterWithKey = function filterWithKey(predicate) {
- return function (m) {
- var go = function () {
- var step = function step(acc) {
- return function (k) {
- return function (v) {
- var $33 = predicate(k)(v);
- if ($33) {
- return Foreign_Object_ST.poke(k)(v)(acc);
- }
- ;
- return Control_Applicative.pure(Control_Monad_ST_Internal.applicativeST)(acc);
- };
- };
- };
- return function __do() {
- var m$prime = Foreign_Object_ST["new"]();
- return foldM(Control_Monad_ST_Internal.monadST)(step)(m$prime)(m)();
- };
- }();
- return $foreign.runST(go);
- };
- };
- var filterKeys = function filterKeys(predicate) {
- return filterWithKey(function ($45) {
- return Data_Function["const"](predicate($45));
- });
- };
- var filter = function filter(predicate) {
- return filterWithKey(Data_Function["const"](predicate));
- };
- var eqObject = function eqObject(dictEq) {
- return new Data_Eq.Eq(function (m1) {
- return function (m2) {
- return isSubmap(dictEq)(m1)(m2) && isSubmap(dictEq)(m2)(m1);
- };
- });
- };
- var ordObject = function ordObject(dictOrd) {
- return new Data_Ord.Ord(function () {
- return eqObject(dictOrd.Eq0());
- }, function (m1) {
- return function (m2) {
- return Data_Ord.compare(Data_Ord.ordArray(Data_Tuple.ordTuple(Data_Ord.ordString)(dictOrd)))(toAscArray(m1))(toAscArray(m2));
- };
- });
- };
- var eq1Object = new Data_Eq.Eq1(function (dictEq) {
- return Data_Eq.eq(eqObject(dictEq));
- });
- var $$delete = function $$delete(k) {
- return mutate(Foreign_Object_ST["delete"](k));
- };
- var pop = function pop(k) {
- return function (m) {
- return Data_Functor.mapFlipped(Data_Maybe.functorMaybe)(lookup(k)(m))(function (a) {
- return new Data_Tuple.Tuple(a, $$delete(k)(m));
- });
- };
- };
- var alter = function alter(f) {
- return function (k) {
- return function (m) {
- var v = f(lookup(k)(m));
- if (v instanceof Data_Maybe.Nothing) {
- return $$delete(k)(m);
- }
- ;
- if (v instanceof Data_Maybe.Just) {
- return insert(k)(v.value0)(m);
- }
- ;
- throw new Error("Failed pattern match at Foreign.Object (line 206, column 15 - line 208, column 25): " + [v.constructor.name]);
- };
- };
- };
- var update = function update(f) {
- return function (k) {
- return function (m) {
- return alter(Data_Maybe.maybe(Data_Maybe.Nothing.value)(f))(k)(m);
- };
- };
- };
- module.exports = {
- isEmpty: isEmpty,
- singleton: singleton,
- insert: insert,
- lookup: lookup,
- toUnfoldable: toUnfoldable,
- toAscUnfoldable: toAscUnfoldable,
- fromFoldable: fromFoldable,
- fromFoldableWith: fromFoldableWith,
- fromHomogeneous: fromHomogeneous,
- "delete": $$delete,
- pop: pop,
- member: member,
- alter: alter,
- update: update,
- mapWithKey: mapWithKey,
- filterWithKey: filterWithKey,
- filterKeys: filterKeys,
- filter: filter,
- values: values,
- union: union,
- unions: unions,
- isSubmap: isSubmap,
- fold: fold,
- foldMap: foldMap,
- foldM: foldM,
- foldMaybe: foldMaybe,
- thawST: thawST,
- freezeST: freezeST,
- functorObject: functorObject,
- functorWithIndexObject: functorWithIndexObject,
- foldableObject: foldableObject,
- foldableWithIndexObject: foldableWithIndexObject,
- traversableObject: traversableObject,
- traversableWithIndexObject: traversableWithIndexObject,
- eqObject: eqObject,
- eq1Object: eq1Object,
- ordObject: ordObject,
- showObject: showObject,
- semigroupObject: semigroupObject,
- monoidObject: monoidObject,
- empty: $foreign.empty,
- size: $foreign.size,
- keys: $foreign.keys,
- all: $foreign.all,
- runST: $foreign.runST,
- toArrayWithKey: $foreign.toArrayWithKey
- };
- },{"./foreign.js":"../output/Foreign.Object/foreign.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Monad.ST.Internal/index.js":"../output/Control.Monad.ST.Internal/index.js","../Data.Array/index.js":"../output/Data.Array/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.FoldableWithIndex/index.js":"../output/Data.FoldableWithIndex/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Function.Uncurried/index.js":"../output/Data.Function.Uncurried/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.FunctorWithIndex/index.js":"../output/Data.FunctorWithIndex/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Data.TraversableWithIndex/index.js":"../output/Data.TraversableWithIndex/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js","../Data.Unfoldable/index.js":"../output/Data.Unfoldable/index.js","../Foreign.Object.ST/index.js":"../output/Foreign.Object.ST/index.js","../Unsafe.Coerce/index.js":"../output/Unsafe.Coerce/index.js"}],"../output/Record.Unsafe.Union/foreign.js":[function(require,module,exports) {
- "use strict";
- exports.unsafeUnionFn = function (r1, r2) {
- var copy = {};
- for (var k1 in r2) {
- if ({}.hasOwnProperty.call(r2, k1)) {
- copy[k1] = r2[k1];
- }
- }
- for (var k2 in r1) {
- if ({}.hasOwnProperty.call(r1, k2)) {
- copy[k2] = r1[k2];
- }
- }
- return copy;
- };
- },{}],"../output/Record.Unsafe.Union/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Data_Function_Uncurried = require("../Data.Function.Uncurried/index.js");
- var unsafeUnion = Data_Function_Uncurried.runFn2($foreign.unsafeUnionFn);
- module.exports = {
- unsafeUnion: unsafeUnion,
- unsafeUnionFn: $foreign.unsafeUnionFn
- };
- },{"./foreign.js":"../output/Record.Unsafe.Union/foreign.js","../Data.Function.Uncurried/index.js":"../output/Data.Function.Uncurried/index.js"}],"../output/Record/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Symbol = require("../Data.Symbol/index.js");
- var Record_Unsafe = require("../Record.Unsafe/index.js");
- var Record_Unsafe_Union = require("../Record.Unsafe.Union/index.js");
- var Type_Data_RowList = require("../Type.Data.RowList/index.js");
- var Unsafe_Coerce = require("../Unsafe.Coerce/index.js");
- var EqualFields = function EqualFields(equalFields) {
- this.equalFields = equalFields;
- };
- var union = function union(dictUnion) {
- return function (l) {
- return function (r) {
- return Record_Unsafe_Union.unsafeUnionFn(l, r);
- };
- };
- };
- var set = function set(dictIsSymbol) {
- return function (dictCons) {
- return function (dictCons1) {
- return function (l) {
- return function (b) {
- return function (r) {
- return Record_Unsafe.unsafeSet(Data_Symbol.reflectSymbol(dictIsSymbol)(l))(b)(r);
- };
- };
- };
- };
- };
- };
- var nub = function nub(dictNub) {
- return Unsafe_Coerce.unsafeCoerce;
- };
- var merge = function merge(dictUnion) {
- return function (dictNub) {
- return function (l) {
- return function (r) {
- return Record_Unsafe_Union.unsafeUnionFn(l, r);
- };
- };
- };
- };
- var insert = function insert(dictIsSymbol) {
- return function (dictLacks) {
- return function (dictCons) {
- return function (l) {
- return function (a) {
- return function (r) {
- return Record_Unsafe.unsafeSet(Data_Symbol.reflectSymbol(dictIsSymbol)(l))(a)(r);
- };
- };
- };
- };
- };
- };
- var get = function get(dictIsSymbol) {
- return function (dictCons) {
- return function (l) {
- return function (r) {
- return Record_Unsafe.unsafeGet(Data_Symbol.reflectSymbol(dictIsSymbol)(l))(r);
- };
- };
- };
- };
- var modify = function modify(dictIsSymbol) {
- return function (dictCons) {
- return function (dictCons1) {
- return function (l) {
- return function (f) {
- return function (r) {
- return set(dictIsSymbol)()()(l)(f(get(dictIsSymbol)()(l)(r)))(r);
- };
- };
- };
- };
- };
- };
- var equalFieldsNil = new EqualFields(function (v) {
- return function (v1) {
- return function (v2) {
- return true;
- };
- };
- });
- var equalFields = function equalFields(dict) {
- return dict.equalFields;
- };
- var equalFieldsCons = function equalFieldsCons(dictIsSymbol) {
- return function (dictEq) {
- return function (dictCons) {
- return function (dictEqualFields) {
- return new EqualFields(function (v) {
- return function (a) {
- return function (b) {
- var get$prime = get(dictIsSymbol)()(Data_Symbol.SProxy.value);
- var equalRest = equalFields(dictEqualFields)(Type_Data_RowList.RLProxy.value);
- return Data_Eq.eq(dictEq)(get$prime(a))(get$prime(b)) && equalRest(a)(b);
- };
- };
- });
- };
- };
- };
- };
- var equal = function equal(dictRowToList) {
- return function (dictEqualFields) {
- return function (a) {
- return function (b) {
- return equalFields(dictEqualFields)(Type_Data_RowList.RLProxy.value)(a)(b);
- };
- };
- };
- };
- var disjointUnion = function disjointUnion(dictUnion) {
- return function (dictNub) {
- return function (l) {
- return function (r) {
- return Record_Unsafe_Union.unsafeUnionFn(l, r);
- };
- };
- };
- };
- var $$delete = function $$delete(dictIsSymbol) {
- return function (dictLacks) {
- return function (dictCons) {
- return function (l) {
- return function (r) {
- return Record_Unsafe.unsafeDelete(Data_Symbol.reflectSymbol(dictIsSymbol)(l))(r);
- };
- };
- };
- };
- };
- var rename = function rename(dictIsSymbol) {
- return function (dictIsSymbol1) {
- return function (dictCons) {
- return function (dictLacks) {
- return function (dictCons1) {
- return function (dictLacks1) {
- return function (prev) {
- return function (next) {
- return function (record) {
- return insert(dictIsSymbol1)()()(next)(get(dictIsSymbol)()(prev)(record))($$delete(dictIsSymbol)()()(prev)(record));
- };
- };
- };
- };
- };
- };
- };
- };
- };
- module.exports = {
- get: get,
- set: set,
- modify: modify,
- insert: insert,
- "delete": $$delete,
- rename: rename,
- equal: equal,
- merge: merge,
- union: union,
- disjointUnion: disjointUnion,
- nub: nub,
- EqualFields: EqualFields,
- equalFields: equalFields,
- equalFieldsCons: equalFieldsCons,
- equalFieldsNil: equalFieldsNil
- };
- },{"../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Symbol/index.js":"../output/Data.Symbol/index.js","../Record.Unsafe/index.js":"../output/Record.Unsafe/index.js","../Record.Unsafe.Union/index.js":"../output/Record.Unsafe.Union/index.js","../Type.Data.RowList/index.js":"../output/Type.Data.RowList/index.js","../Unsafe.Coerce/index.js":"../output/Unsafe.Coerce/index.js"}],"../output/Record.Builder/foreign.js":[function(require,module,exports) {
- "use strict";
- exports.copyRecord = function (rec) {
- var copy = {};
- for (var key in rec) {
- if ({}.hasOwnProperty.call(rec, key)) {
- copy[key] = rec[key];
- }
- }
- return copy;
- };
- exports.unsafeInsert = function (l) {
- return function (a) {
- return function (rec) {
- rec[l] = a;
- return rec;
- };
- };
- };
- exports.unsafeModify = function (l) {
- return function (f) {
- return function (rec) {
- rec[l] = f(rec[l]);
- return rec;
- };
- };
- };
- exports.unsafeDelete = function (l) {
- return function (rec) {
- delete rec[l];
- return rec;
- };
- };
- exports.unsafeRename = function (l1) {
- return function (l2) {
- return function (rec) {
- rec[l2] = rec[l1];
- delete rec[l1];
- return rec;
- };
- };
- };
- },{}],"../output/Record.Builder/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Control_Category = require("../Control.Category/index.js");
- var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
- var Data_Symbol = require("../Data.Symbol/index.js");
- var Record_Unsafe_Union = require("../Record.Unsafe.Union/index.js");
- var Unsafe_Coerce = require("../Unsafe.Coerce/index.js");
- var Builder = function Builder(x) {
- return x;
- };
- var union = function union(dictUnion) {
- return function (r2) {
- return function (r1) {
- return Record_Unsafe_Union.unsafeUnionFn(r1, r2);
- };
- };
- };
- var semigroupoidBuilder = Control_Semigroupoid.semigroupoidFn;
- var rename = function rename(dictIsSymbol) {
- return function (dictIsSymbol1) {
- return function (dictCons) {
- return function (dictLacks) {
- return function (dictCons1) {
- return function (dictLacks1) {
- return function (l1) {
- return function (l2) {
- return function (r1) {
- return $foreign.unsafeRename(Data_Symbol.reflectSymbol(dictIsSymbol)(l1))(Data_Symbol.reflectSymbol(dictIsSymbol1)(l2))(r1);
- };
- };
- };
- };
- };
- };
- };
- };
- };
- var nub = function nub(dictNub) {
- return Unsafe_Coerce.unsafeCoerce;
- };
- var modify = function modify(dictCons) {
- return function (dictCons1) {
- return function (dictIsSymbol) {
- return function (l) {
- return function (f) {
- return function (r1) {
- return $foreign.unsafeModify(Data_Symbol.reflectSymbol(dictIsSymbol)(l))(f)(r1);
- };
- };
- };
- };
- };
- };
- var merge = function merge(dictUnion) {
- return function (dictNub) {
- return function (r2) {
- return function (r1) {
- return Record_Unsafe_Union.unsafeUnionFn(r1, r2);
- };
- };
- };
- };
- var insert = function insert(dictCons) {
- return function (dictLacks) {
- return function (dictIsSymbol) {
- return function (l) {
- return function (a) {
- return function (r1) {
- return $foreign.unsafeInsert(Data_Symbol.reflectSymbol(dictIsSymbol)(l))(a)(r1);
- };
- };
- };
- };
- };
- };
- var disjointUnion = function disjointUnion(dictUnion) {
- return function (dictNub) {
- return function (r1) {
- return function (r2) {
- return Record_Unsafe_Union.unsafeUnionFn(r1, r2);
- };
- };
- };
- };
- var $$delete = function $$delete(dictIsSymbol) {
- return function (dictLacks) {
- return function (dictCons) {
- return function (l) {
- return function (r2) {
- return $foreign.unsafeDelete(Data_Symbol.reflectSymbol(dictIsSymbol)(l))(r2);
- };
- };
- };
- };
- };
- var categoryBuilder = Control_Category.categoryFn;
- var build = function build(v) {
- return function (r1) {
- return v($foreign.copyRecord(r1));
- };
- };
- module.exports = {
- build: build,
- insert: insert,
- modify: modify,
- "delete": $$delete,
- rename: rename,
- merge: merge,
- union: union,
- disjointUnion: disjointUnion,
- nub: nub,
- semigroupoidBuilder: semigroupoidBuilder,
- categoryBuilder: categoryBuilder
- };
- },{"./foreign.js":"../output/Record.Builder/foreign.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Semigroupoid/index.js":"../output/Control.Semigroupoid/index.js","../Data.Symbol/index.js":"../output/Data.Symbol/index.js","../Record.Unsafe.Union/index.js":"../output/Record.Unsafe.Union/index.js","../Unsafe.Coerce/index.js":"../output/Unsafe.Coerce/index.js"}],"../output/Type.Proxy/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Monad = require("../Control.Monad/index.js");
- var Data_BooleanAlgebra = require("../Data.BooleanAlgebra/index.js");
- var Data_Bounded = require("../Data.Bounded/index.js");
- var Data_CommutativeRing = require("../Data.CommutativeRing/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Ordering = require("../Data.Ordering/index.js");
- var Data_Ring = require("../Data.Ring/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Semiring = require("../Data.Semiring/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Proxy3 = function () {
- function Proxy3() {}
- ;
- Proxy3.value = new Proxy3();
- return Proxy3;
- }();
- var Proxy2 = function () {
- function Proxy2() {}
- ;
- Proxy2.value = new Proxy2();
- return Proxy2;
- }();
- var $$Proxy = function () {
- function $$Proxy() {}
- ;
- $$Proxy.value = new $$Proxy();
- return $$Proxy;
- }();
- var showProxy3 = new Data_Show.Show(function (v) {
- return "Proxy3";
- });
- var showProxy2 = new Data_Show.Show(function (v) {
- return "Proxy2";
- });
- var showProxy = new Data_Show.Show(function (v) {
- return "Proxy";
- });
- var semiringProxy3 = new Data_Semiring.Semiring(function (v) {
- return function (v1) {
- return Proxy3.value;
- };
- }, function (v) {
- return function (v1) {
- return Proxy3.value;
- };
- }, Proxy3.value, Proxy3.value);
- var semiringProxy2 = new Data_Semiring.Semiring(function (v) {
- return function (v1) {
- return Proxy2.value;
- };
- }, function (v) {
- return function (v1) {
- return Proxy2.value;
- };
- }, Proxy2.value, Proxy2.value);
- var semiringProxy = new Data_Semiring.Semiring(function (v) {
- return function (v1) {
- return $$Proxy.value;
- };
- }, function (v) {
- return function (v1) {
- return $$Proxy.value;
- };
- }, $$Proxy.value, $$Proxy.value);
- var semigroupProxy3 = new Data_Semigroup.Semigroup(function (v) {
- return function (v1) {
- return Proxy3.value;
- };
- });
- var semigroupProxy2 = new Data_Semigroup.Semigroup(function (v) {
- return function (v1) {
- return Proxy2.value;
- };
- });
- var semigroupProxy = new Data_Semigroup.Semigroup(function (v) {
- return function (v1) {
- return $$Proxy.value;
- };
- });
- var ringProxy3 = new Data_Ring.Ring(function () {
- return semiringProxy3;
- }, function (v) {
- return function (v1) {
- return Proxy3.value;
- };
- });
- var ringProxy2 = new Data_Ring.Ring(function () {
- return semiringProxy2;
- }, function (v) {
- return function (v1) {
- return Proxy2.value;
- };
- });
- var ringProxy = new Data_Ring.Ring(function () {
- return semiringProxy;
- }, function (v) {
- return function (v1) {
- return $$Proxy.value;
- };
- });
- var heytingAlgebraProxy3 = new Data_HeytingAlgebra.HeytingAlgebra(function (v) {
- return function (v1) {
- return Proxy3.value;
- };
- }, function (v) {
- return function (v1) {
- return Proxy3.value;
- };
- }, Proxy3.value, function (v) {
- return function (v1) {
- return Proxy3.value;
- };
- }, function (v) {
- return Proxy3.value;
- }, Proxy3.value);
- var heytingAlgebraProxy2 = new Data_HeytingAlgebra.HeytingAlgebra(function (v) {
- return function (v1) {
- return Proxy2.value;
- };
- }, function (v) {
- return function (v1) {
- return Proxy2.value;
- };
- }, Proxy2.value, function (v) {
- return function (v1) {
- return Proxy2.value;
- };
- }, function (v) {
- return Proxy2.value;
- }, Proxy2.value);
- var heytingAlgebraProxy = new Data_HeytingAlgebra.HeytingAlgebra(function (v) {
- return function (v1) {
- return $$Proxy.value;
- };
- }, function (v) {
- return function (v1) {
- return $$Proxy.value;
- };
- }, $$Proxy.value, function (v) {
- return function (v1) {
- return $$Proxy.value;
- };
- }, function (v) {
- return $$Proxy.value;
- }, $$Proxy.value);
- var functorProxy = new Data_Functor.Functor(function (f) {
- return function (m) {
- return $$Proxy.value;
- };
- });
- var eqProxy3 = new Data_Eq.Eq(function (x) {
- return function (y) {
- return true;
- };
- });
- var ordProxy3 = new Data_Ord.Ord(function () {
- return eqProxy3;
- }, function (x) {
- return function (y) {
- return Data_Ordering.EQ.value;
- };
- });
- var eqProxy2 = new Data_Eq.Eq(function (x) {
- return function (y) {
- return true;
- };
- });
- var ordProxy2 = new Data_Ord.Ord(function () {
- return eqProxy2;
- }, function (x) {
- return function (y) {
- return Data_Ordering.EQ.value;
- };
- });
- var eqProxy = new Data_Eq.Eq(function (x) {
- return function (y) {
- return true;
- };
- });
- var ordProxy = new Data_Ord.Ord(function () {
- return eqProxy;
- }, function (x) {
- return function (y) {
- return Data_Ordering.EQ.value;
- };
- });
- var discardProxy3 = new Control_Bind.Discard(function (dictBind) {
- return Control_Bind.bind(dictBind);
- });
- var discardProxy2 = new Control_Bind.Discard(function (dictBind) {
- return Control_Bind.bind(dictBind);
- });
- var discardProxy = new Control_Bind.Discard(function (dictBind) {
- return Control_Bind.bind(dictBind);
- });
- var commutativeRingProxy3 = new Data_CommutativeRing.CommutativeRing(function () {
- return ringProxy3;
- });
- var commutativeRingProxy2 = new Data_CommutativeRing.CommutativeRing(function () {
- return ringProxy2;
- });
- var commutativeRingProxy = new Data_CommutativeRing.CommutativeRing(function () {
- return ringProxy;
- });
- var boundedProxy3 = new Data_Bounded.Bounded(function () {
- return ordProxy3;
- }, Proxy3.value, Proxy3.value);
- var boundedProxy2 = new Data_Bounded.Bounded(function () {
- return ordProxy2;
- }, Proxy2.value, Proxy2.value);
- var boundedProxy = new Data_Bounded.Bounded(function () {
- return ordProxy;
- }, $$Proxy.value, $$Proxy.value);
- var booleanAlgebraProxy3 = new Data_BooleanAlgebra.BooleanAlgebra(function () {
- return heytingAlgebraProxy3;
- });
- var booleanAlgebraProxy2 = new Data_BooleanAlgebra.BooleanAlgebra(function () {
- return heytingAlgebraProxy2;
- });
- var booleanAlgebraProxy = new Data_BooleanAlgebra.BooleanAlgebra(function () {
- return heytingAlgebraProxy;
- });
- var applyProxy = new Control_Apply.Apply(function () {
- return functorProxy;
- }, function (v) {
- return function (v1) {
- return $$Proxy.value;
- };
- });
- var bindProxy = new Control_Bind.Bind(function () {
- return applyProxy;
- }, function (v) {
- return function (v1) {
- return $$Proxy.value;
- };
- });
- var applicativeProxy = new Control_Applicative.Applicative(function () {
- return applyProxy;
- }, function (v) {
- return $$Proxy.value;
- });
- var monadProxy = new Control_Monad.Monad(function () {
- return applicativeProxy;
- }, function () {
- return bindProxy;
- });
- module.exports = {
- "Proxy": $$Proxy,
- Proxy2: Proxy2,
- Proxy3: Proxy3,
- eqProxy: eqProxy,
- functorProxy: functorProxy,
- ordProxy: ordProxy,
- applicativeProxy: applicativeProxy,
- applyProxy: applyProxy,
- bindProxy: bindProxy,
- booleanAlgebraProxy: booleanAlgebraProxy,
- boundedProxy: boundedProxy,
- commutativeRingProxy: commutativeRingProxy,
- discardProxy: discardProxy,
- heytingAlgebraProxy: heytingAlgebraProxy,
- monadProxy: monadProxy,
- ringProxy: ringProxy,
- semigroupProxy: semigroupProxy,
- semiringProxy: semiringProxy,
- showProxy: showProxy,
- eqProxy2: eqProxy2,
- ordProxy2: ordProxy2,
- booleanAlgebraProxy2: booleanAlgebraProxy2,
- boundedProxy2: boundedProxy2,
- commutativeRingProxy2: commutativeRingProxy2,
- discardProxy2: discardProxy2,
- heytingAlgebraProxy2: heytingAlgebraProxy2,
- ringProxy2: ringProxy2,
- semigroupProxy2: semigroupProxy2,
- semiringProxy2: semiringProxy2,
- showProxy2: showProxy2,
- eqProxy3: eqProxy3,
- ordProxy3: ordProxy3,
- booleanAlgebraProxy3: booleanAlgebraProxy3,
- boundedProxy3: boundedProxy3,
- commutativeRingProxy3: commutativeRingProxy3,
- discardProxy3: discardProxy3,
- heytingAlgebraProxy3: heytingAlgebraProxy3,
- ringProxy3: ringProxy3,
- semigroupProxy3: semigroupProxy3,
- semiringProxy3: semiringProxy3,
- showProxy3: showProxy3
- };
- },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Data.BooleanAlgebra/index.js":"../output/Data.BooleanAlgebra/index.js","../Data.Bounded/index.js":"../output/Data.Bounded/index.js","../Data.CommutativeRing/index.js":"../output/Data.CommutativeRing/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.HeytingAlgebra/index.js":"../output/Data.HeytingAlgebra/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Ring/index.js":"../output/Data.Ring/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Semiring/index.js":"../output/Data.Semiring/index.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Foreign.Generic.Class/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Alt = require("../Control.Alt/index.js");
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Category = require("../Control.Category/index.js");
- var Control_Monad_Except = require("../Control.Monad.Except/index.js");
- var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js");
- var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
- var Data_Array = require("../Data.Array/index.js");
- var Data_Bifunctor = require("../Data.Bifunctor/index.js");
- var Data_Either = require("../Data.Either/index.js");
- var Data_Foldable = require("../Data.Foldable/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Generic_Rep = require("../Data.Generic.Rep/index.js");
- var Data_Identity = require("../Data.Identity/index.js");
- var Data_List = require("../Data.List/index.js");
- var Data_List_Types = require("../Data.List.Types/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Data_Symbol = require("../Data.Symbol/index.js");
- var Data_Traversable = require("../Data.Traversable/index.js");
- var Data_Unfoldable = require("../Data.Unfoldable/index.js");
- var Data_Unit = require("../Data.Unit/index.js");
- var Data_Void = require("../Data.Void/index.js");
- var Foreign = require("../Foreign/index.js");
- var Foreign_Generic_Internal = require("../Foreign.Generic.Internal/index.js");
- var Foreign_Index = require("../Foreign.Index/index.js");
- var Foreign_NullOrUndefined = require("../Foreign.NullOrUndefined/index.js");
- var Foreign_Object = require("../Foreign.Object/index.js");
- var Record = require("../Record/index.js");
- var Record_Builder = require("../Record.Builder/index.js");
- var Type_Data_RowList = require("../Type.Data.RowList/index.js");
- var Type_Proxy = require("../Type.Proxy/index.js");
- var TaggedObject = function () {
- function TaggedObject(value0) {
- this.value0 = value0;
- }
- ;
- TaggedObject.create = function (value0) {
- return new TaggedObject(value0);
- };
- return TaggedObject;
- }();
- var GenericEncodeArgs = function GenericEncodeArgs(encodeArgs) {
- this.encodeArgs = encodeArgs;
- };
- var GenericEncode = function GenericEncode(encodeOpts) {
- this.encodeOpts = encodeOpts;
- };
- var GenericDecodeArgs = function GenericDecodeArgs(decodeArgs) {
- this.decodeArgs = decodeArgs;
- };
- var GenericDecode = function GenericDecode(decodeOpts) {
- this.decodeOpts = decodeOpts;
- };
- var GenericCountArgs = function GenericCountArgs(countArgs) {
- this.countArgs = countArgs;
- };
- var EncodeWithOptions = function EncodeWithOptions(encodeWithOptions) {
- this.encodeWithOptions = encodeWithOptions;
- };
- var EncodeRecord = function EncodeRecord(encodeRecordWithOptions) {
- this.encodeRecordWithOptions = encodeRecordWithOptions;
- };
- var Encode = function Encode(encode) {
- this.encode = encode;
- };
- var DecodeWithOptions = function DecodeWithOptions(decodeWithOptions) {
- this.decodeWithOptions = decodeWithOptions;
- };
- var DecodeRecord = function DecodeRecord(decodeRecordWithOptions) {
- this.decodeRecordWithOptions = decodeRecordWithOptions;
- };
- var Decode = function Decode(decode) {
- this.decode = decode;
- };
- var voidEncode = new Encode(Data_Void.absurd);
- var voidDecode = new Decode(function (v) {
- return Control_Monad_Except_Trans.except(Data_Identity.applicativeIdentity)(new Data_Either.Left(Control_Applicative.pure(Data_List_Types.applicativeNonEmptyList)(new Foreign.ForeignError("Decode: void"))));
- });
- var unitEncode = new Encode(function (v) {
- return Foreign.unsafeToForeign({});
- });
- var unitDecode = new Decode(function (v) {
- return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Data_Unit.unit);
- });
- var stringEncode = new Encode(Foreign.unsafeToForeign);
- var stringDecode = new Decode(Foreign.readString);
- var numberEncode = new Encode(Foreign.unsafeToForeign);
- var numberDecode = new Decode(Foreign.readNumber);
- var intEncode = new Encode(Foreign.unsafeToForeign);
- var intDecode = new Decode(Foreign.readInt);
- var genericEncodeArgsNoArguments = new GenericEncodeArgs(function (v) {
- return Data_Monoid.mempty(Data_Monoid.monoidFn(Data_List_Types.monoidList));
- });
- var genericDecodeNoConstructors = new GenericDecode(function (opts) {
- return function (v) {
- return Foreign.fail(new Foreign.ForeignError("No constructors"));
- };
- });
- var genericDecodeArgsNoArguments = new GenericDecodeArgs(function (v) {
- return function (v1) {
- return function (v2) {
- if (v2 instanceof Data_List_Types.Nil) {
- return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))({
- result: Data_Generic_Rep.NoArguments.value,
- rest: Data_List_Types.Nil.value,
- next: v1
- });
- }
- ;
- return Foreign.fail(new Foreign.ForeignError("Too many constructor arguments"));
- };
- };
- });
- var genericCountArgsNoArguments = new GenericCountArgs(function (v) {
- return new Data_Either.Left(Data_Generic_Rep.NoArguments.value);
- });
- var genericCountArgsArgument = new GenericCountArgs(function (v) {
- return new Data_Either.Right(1);
- });
- var foreignEncode = new Encode(Control_Category.identity(Control_Category.categoryFn));
- var foreignDecode = new Decode(Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity)));
- var encodeWithOptions = function encodeWithOptions(dict) {
- return dict.encodeWithOptions;
- };
- var genericEncodeArgsArgument = function genericEncodeArgsArgument(dictEncodeWithOptions) {
- return new GenericEncodeArgs(function (opts) {
- return function (v) {
- return Data_List.singleton(encodeWithOptions(dictEncodeWithOptions)(opts)(v));
- };
- });
- };
- var encodeRecordWithOptions = function encodeRecordWithOptions(dict) {
- return dict.encodeRecordWithOptions;
- };
- var encodeWithOptionsRecord = function encodeWithOptionsRecord(dictRowToList) {
- return function (dictEncodeRecord) {
- return new EncodeWithOptions(function (opts) {
- var $148 = encodeRecordWithOptions(dictEncodeRecord)(Type_Data_RowList.RLProxy.value)(opts);
- return function ($149) {
- return Foreign.unsafeToForeign($148($149));
- };
- });
- };
- };
- var encodeRecordNil = new EncodeRecord(function (v) {
- return function (v1) {
- return function (v2) {
- return Foreign_Object.empty;
- };
- };
- });
- var encodeRecordCons = function encodeRecordCons(dictCons) {
- return function (dictEncodeRecord) {
- return function (dictIsSymbol) {
- return function (dictEncodeWithOptions) {
- return new EncodeRecord(function (v) {
- return function (opts) {
- return function (rec) {
- var obj = encodeRecordWithOptions(dictEncodeRecord)(Type_Data_RowList.RLProxy.value)(opts)(rec);
- var l = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
- return Foreign_Object.insert(opts.fieldTransform(l))(encodeWithOptions(dictEncodeWithOptions)(opts)(Record.get(dictIsSymbol)()(Data_Symbol.SProxy.value)(rec)))(obj);
- };
- };
- });
- };
- };
- };
- };
- var encodeOpts = function encodeOpts(dict) {
- return dict.encodeOpts;
- };
- var genericEncodeNoConstructors = new GenericEncode(function (opts) {
- return function (a) {
- return encodeOpts(genericEncodeNoConstructors)(opts)(a);
- };
- });
- var genericEncodeSum = function genericEncodeSum(dictGenericEncode) {
- return function (dictGenericEncode1) {
- return new GenericEncode(function (opts) {
- return function (v) {
- if (v instanceof Data_Generic_Rep.Inl) {
- return encodeOpts(dictGenericEncode)({
- sumEncoding: opts.sumEncoding,
- unwrapSingleConstructors: false,
- unwrapSingleArguments: opts.unwrapSingleArguments,
- fieldTransform: opts.fieldTransform
- })(v.value0);
- }
- ;
- if (v instanceof Data_Generic_Rep.Inr) {
- return encodeOpts(dictGenericEncode1)({
- sumEncoding: opts.sumEncoding,
- unwrapSingleConstructors: false,
- unwrapSingleArguments: opts.unwrapSingleArguments,
- fieldTransform: opts.fieldTransform
- })(v.value0);
- }
- ;
- throw new Error("Failed pattern match at Foreign.Generic.Class (line 351, column 1 - line 355, column 85): " + [opts.constructor.name, v.constructor.name]);
- };
- });
- };
- };
- var encodeArgs = function encodeArgs(dict) {
- return dict.encodeArgs;
- };
- var genericEncodeArgsProduct = function genericEncodeArgsProduct(dictGenericEncodeArgs) {
- return function (dictGenericEncodeArgs1) {
- return new GenericEncodeArgs(function (opts) {
- return function (v) {
- return Data_Semigroup.append(Data_List_Types.semigroupList)(encodeArgs(dictGenericEncodeArgs)(opts)(v.value0))(encodeArgs(dictGenericEncodeArgs1)(opts)(v.value1));
- };
- });
- };
- };
- var genericEncodeConstructor = function genericEncodeConstructor(dictIsSymbol) {
- return function (dictGenericEncodeArgs) {
- return new GenericEncode(function (opts) {
- return function (v) {
- var unwrapArguments = function unwrapArguments(v1) {
- if (v1.length === 0) {
- return Data_Maybe.Nothing.value;
- }
- ;
- if (v1.length === 1 && opts.unwrapSingleArguments) {
- return new Data_Maybe.Just(v1[0]);
- }
- ;
- return new Data_Maybe.Just(Foreign.unsafeToForeign(v1));
- };
- var encodeArgsArray = function () {
- var $150 = Data_List.toUnfoldable(Data_Unfoldable.unfoldableArray);
- var $151 = encodeArgs(dictGenericEncodeArgs)(opts);
- return function ($152) {
- return unwrapArguments($150($151($152)));
- };
- }();
- var ctorName = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
- if (opts.unwrapSingleConstructors) {
- return Data_Maybe.maybe(Foreign.unsafeToForeign({}))(Foreign.unsafeToForeign)(encodeArgsArray(v));
- }
- ;
- return Foreign.unsafeToForeign(Foreign_Object.union(Foreign_Object.singleton(opts.sumEncoding.value0.tagFieldName)(Foreign.unsafeToForeign(opts.sumEncoding.value0.constructorTagTransform(ctorName))))(Data_Maybe.maybe(Foreign_Object.empty)(Foreign_Object.singleton(opts.sumEncoding.value0.contentsFieldName))(encodeArgsArray(v))));
- };
- });
- };
- };
- var encode = function encode(dict) {
- return dict.encode;
- };
- var encodeWithOptionsOther = function encodeWithOptionsOther(dictEncode) {
- return new EncodeWithOptions(function (v) {
- return encode(dictEncode);
- });
- };
- var identityEncode = function identityEncode(dictEncode) {
- return new Encode(function () {
- var $153 = encode(dictEncode);
- var $154 = Data_Newtype.unwrap(Data_Identity.newtypeIdentity);
- return function ($155) {
- return $153($154($155));
- };
- }());
- };
- var maybeEncode = function maybeEncode(dictEncode) {
- return new Encode(Data_Maybe.maybe(Foreign_NullOrUndefined["null"])(encode(dictEncode)));
- };
- var objectEncode = function objectEncode(dictEncode) {
- return new Encode(function () {
- var $156 = Foreign_Object.mapWithKey(function (v) {
- return encode(dictEncode);
- });
- return function ($157) {
- return Foreign.unsafeToForeign($156($157));
- };
- }());
- };
- var defaultOptions = {
- sumEncoding: new TaggedObject({
- tagFieldName: "tag",
- contentsFieldName: "contents",
- constructorTagTransform: Control_Category.identity(Control_Category.categoryFn)
- }),
- unwrapSingleConstructors: false,
- unwrapSingleArguments: true,
- fieldTransform: Control_Category.identity(Control_Category.categoryFn)
- };
- var recordEncode = function recordEncode(dictRowToList) {
- return function (dictEncodeRecord) {
- return new Encode(encodeWithOptions(encodeWithOptionsRecord()(dictEncodeRecord))(defaultOptions));
- };
- };
- var decodeWithOptions = function decodeWithOptions(dict) {
- return dict.decodeWithOptions;
- };
- var genericDecodeArgsArgument = function genericDecodeArgsArgument(dictDecodeWithOptions) {
- return new GenericDecodeArgs(function (v) {
- return function (v1) {
- return function (v2) {
- if (v2 instanceof Data_List_Types.Cons) {
- return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Control_Monad_Except.mapExcept(Data_Bifunctor.lmap(Data_Either.bifunctorEither)(Data_Functor.map(Data_List_Types.functorNonEmptyList)(Foreign.ErrorAtIndex.create(v1))))(decodeWithOptions(dictDecodeWithOptions)(v)(v2.value0)))(function (a) {
- return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))({
- result: a,
- rest: v2.value1,
- next: v1 + 1 | 0
- });
- });
- }
- ;
- return Foreign.fail(new Foreign.ForeignError("Not enough constructor arguments"));
- };
- };
- });
- };
- var decodeRecordWithOptions = function decodeRecordWithOptions(dict) {
- return dict.decodeRecordWithOptions;
- };
- var decodeWithOptionsRecord = function decodeWithOptionsRecord(dictRowToList) {
- return function (dictDecodeRecord) {
- return new DecodeWithOptions(function (opts) {
- return Data_Functor.map(Data_Functor.functorFn)(Data_Functor.map(Control_Monad_Except_Trans.functorExceptT(Data_Identity.functorIdentity))(Data_Function.flip(Record_Builder.build)({})))(decodeRecordWithOptions(dictDecodeRecord)(Type_Data_RowList.RLProxy.value)(opts));
- });
- };
- };
- var recordDecode = function recordDecode(dictRowToList) {
- return function (dictDecodeRecord) {
- return new Decode(decodeWithOptions(decodeWithOptionsRecord()(dictDecodeRecord))(defaultOptions));
- };
- };
- var decodeRecordNil = new DecodeRecord(function (v) {
- return function (v1) {
- return function (v2) {
- return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Control_Category.identity(Record_Builder.categoryBuilder));
- };
- };
- });
- var decodeRecordCons = function decodeRecordCons(dictCons) {
- return function (dictDecodeRecord) {
- return function (dictIsSymbol) {
- return function (dictDecodeWithOptions) {
- return function (dictLacks) {
- return new DecodeRecord(function (v) {
- return function (opts) {
- return function (f) {
- return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(decodeRecordWithOptions(dictDecodeRecord)(Type_Data_RowList.RLProxy.value)(opts)(f))(function (builder) {
- var l = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
- var l_transformed = opts.fieldTransform(l);
- return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Foreign_Index.index(Foreign_Index.indexString)(f)(l_transformed))(function (f_) {
- return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Control_Monad_Except.mapExcept(Data_Bifunctor.lmap(Data_Either.bifunctorEither)(Data_Functor.map(Data_List_Types.functorNonEmptyList)(Foreign.ErrorAtProperty.create(l_transformed))))(decodeWithOptions(dictDecodeWithOptions)(opts)(f_)))(function (a) {
- return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Control_Semigroupoid.composeFlipped(Record_Builder.semigroupoidBuilder)(builder)(Record_Builder.insert()()(dictIsSymbol)(Data_Symbol.SProxy.value)(a)));
- });
- });
- });
- };
- };
- });
- };
- };
- };
- };
- };
- var decodeOpts = function decodeOpts(dict) {
- return dict.decodeOpts;
- };
- var genericDecodeSum = function genericDecodeSum(dictGenericDecode) {
- return function (dictGenericDecode1) {
- return new GenericDecode(function (opts) {
- return function (f) {
- var opts$prime = {
- unwrapSingleConstructors: false,
- fieldTransform: opts.fieldTransform,
- sumEncoding: opts.sumEncoding,
- unwrapSingleArguments: opts.unwrapSingleArguments
- };
- return Control_Alt.alt(Control_Monad_Except_Trans.altExceptT(Data_List_Types.semigroupNonEmptyList)(Data_Identity.monadIdentity))(Data_Functor.map(Control_Monad_Except_Trans.functorExceptT(Data_Identity.functorIdentity))(Data_Generic_Rep.Inl.create)(decodeOpts(dictGenericDecode)(opts$prime)(f)))(Data_Functor.map(Control_Monad_Except_Trans.functorExceptT(Data_Identity.functorIdentity))(Data_Generic_Rep.Inr.create)(decodeOpts(dictGenericDecode1)(opts$prime)(f)));
- };
- });
- };
- };
- var decodeArgs = function decodeArgs(dict) {
- return dict.decodeArgs;
- };
- var genericDecodeArgsProduct = function genericDecodeArgsProduct(dictGenericDecodeArgs) {
- return function (dictGenericDecodeArgs1) {
- return new GenericDecodeArgs(function (opts) {
- return function (i) {
- return function (xs) {
- return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(decodeArgs(dictGenericDecodeArgs)(opts)(i)(xs))(function (v) {
- return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(decodeArgs(dictGenericDecodeArgs1)(opts)(v.next)(v.rest))(function (v1) {
- return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))({
- result: new Data_Generic_Rep.Product(v.result, v1.result),
- rest: v1.rest,
- next: v1.next
- });
- });
- });
- };
- };
- });
- };
- };
- var decode = function decode(dict) {
- return dict.decode;
- };
- var decodeWithOptionsOther = function decodeWithOptionsOther(dictDecode) {
- return new DecodeWithOptions(function (v) {
- return decode(dictDecode);
- });
- };
- var identityDecode = function identityDecode(dictDecode) {
- return new Decode(function () {
- var $158 = Data_Functor.map(Control_Monad_Except_Trans.functorExceptT(Data_Identity.functorIdentity))(Data_Identity.Identity);
- var $159 = decode(dictDecode);
- return function ($160) {
- return $158($159($160));
- };
- }());
- };
- var maybeDecode = function maybeDecode(dictDecode) {
- return new Decode(Foreign_NullOrUndefined.readNullOrUndefined(decode(dictDecode)));
- };
- var objectDecode = function objectDecode(dictDecode) {
- return new Decode(Control_Bind.composeKleisliFlipped(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(function () {
- var $161 = Data_Traversable.sequence(Foreign_Object.traversableObject)(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity));
- var $162 = Foreign_Object.mapWithKey(function (v) {
- return decode(dictDecode);
- });
- return function ($163) {
- return $161($162($163));
- };
- }())(Foreign_Generic_Internal.readObject));
- };
- var countArgs = function countArgs(dict) {
- return dict.countArgs;
- };
- var genericCountArgsProduct = function genericCountArgsProduct(dictGenericCountArgs) {
- return function (dictGenericCountArgs1) {
- return new GenericCountArgs(function (v) {
- var v1 = countArgs(dictGenericCountArgs1)(Type_Proxy["Proxy"].value);
- var v2 = countArgs(dictGenericCountArgs)(Type_Proxy["Proxy"].value);
- if (v2 instanceof Data_Either.Left && v1 instanceof Data_Either.Left) {
- return new Data_Either.Left(new Data_Generic_Rep.Product(v2.value0, v1.value0));
- }
- ;
- if (v2 instanceof Data_Either.Left && v1 instanceof Data_Either.Right) {
- return new Data_Either.Right(v1.value0);
- }
- ;
- if (v2 instanceof Data_Either.Right && v1 instanceof Data_Either.Left) {
- return new Data_Either.Right(v2.value0);
- }
- ;
- if (v2 instanceof Data_Either.Right && v1 instanceof Data_Either.Right) {
- return new Data_Either.Right(v2.value0 + v1.value0 | 0);
- }
- ;
- throw new Error("Failed pattern match at Foreign.Generic.Class (line 400, column 5 - line 404, column 40): " + [v2.constructor.name, v1.constructor.name]);
- });
- };
- };
- var genericDecodeConstructor = function genericDecodeConstructor(dictIsSymbol) {
- return function (dictGenericDecodeArgs) {
- return function (dictGenericCountArgs) {
- return new GenericDecode(function (opts) {
- return function (f) {
- var numArgs = countArgs(dictGenericCountArgs)(Type_Proxy["Proxy"].value);
- var readArguments = function readArguments(args) {
- if (numArgs instanceof Data_Either.Left) {
- return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(numArgs.value0);
- }
- ;
- if (numArgs instanceof Data_Either.Right && numArgs.value0 === 1 && opts.unwrapSingleArguments) {
- return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(decodeArgs(dictGenericDecodeArgs)(opts)(0)(Data_List.singleton(args)))(function (v) {
- return Control_Bind.discard(Control_Bind.discardUnit)(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Control_Applicative.unless(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Data_List["null"](v.rest))(Foreign.fail(new Foreign.ForeignError("Expected a single argument"))))(function () {
- return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(v.result);
- });
- });
- }
- ;
- if (numArgs instanceof Data_Either.Right) {
- return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Foreign.readArray(args))(function (vals) {
- return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(decodeArgs(dictGenericDecodeArgs)(opts)(0)(Data_List.fromFoldable(Data_Foldable.foldableArray)(vals)))(function (v) {
- return Control_Bind.discard(Control_Bind.discardUnit)(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Control_Applicative.unless(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Data_List["null"](v.rest))(Foreign.fail(new Foreign.ForeignError("Expected " + (Data_Show.show(Data_Show.showInt)(numArgs.value0) + " constructor arguments")))))(function () {
- return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(v.result);
- });
- });
- });
- }
- ;
- throw new Error("Failed pattern match at Foreign.Generic.Class (line 307, column 9 - line 319, column 24): " + [numArgs.constructor.name]);
- };
- var ctorName = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
- if (opts.unwrapSingleConstructors) {
- return Data_Functor.map(Control_Monad_Except_Trans.functorExceptT(Data_Identity.functorIdentity))(Data_Generic_Rep.Constructor)(readArguments(f));
- }
- ;
- return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Control_Monad_Except.mapExcept(Data_Bifunctor.lmap(Data_Either.bifunctorEither)(Data_Functor.map(Data_List_Types.functorNonEmptyList)(Foreign.ErrorAtProperty.create(opts.sumEncoding.value0.tagFieldName))))(Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Foreign_Index.index(Foreign_Index.indexString)(f)(opts.sumEncoding.value0.tagFieldName))(Foreign.readString))(function (tag) {
- var expected = opts.sumEncoding.value0.constructorTagTransform(ctorName);
- return Control_Bind.discard(Control_Bind.discardUnit)(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Control_Applicative.unless(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(tag === expected)(Foreign.fail(new Foreign.ForeignError("Expected " + (Data_Show.show(Data_Show.showString)(expected) + " tag")))))(function () {
- return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(tag);
- });
- })))(function (tag) {
- return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Control_Monad_Except.mapExcept(Data_Bifunctor.lmap(Data_Either.bifunctorEither)(Data_Functor.map(Data_List_Types.functorNonEmptyList)(Foreign.ErrorAtProperty.create(opts.sumEncoding.value0.contentsFieldName))))(Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Foreign_Index.index(Foreign_Index.indexString)(f)(opts.sumEncoding.value0.contentsFieldName))(readArguments)))(function (args) {
- return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(args);
- });
- });
- };
- });
- };
- };
- };
- var charEncode = new Encode(Foreign.unsafeToForeign);
- var charDecode = new Decode(Foreign.readChar);
- var booleanEncode = new Encode(Foreign.unsafeToForeign);
- var booleanDecode = new Decode(Foreign.readBoolean);
- var arrayEncode = function arrayEncode(dictEncode) {
- return new Encode(function () {
- var $164 = Data_Functor.map(Data_Functor.functorArray)(encode(dictEncode));
- return function ($165) {
- return Foreign.unsafeToForeign($164($165));
- };
- }());
- };
- var arrayDecode = function arrayDecode(dictDecode) {
- return new Decode(function () {
- var readElement = function readElement(i) {
- return function (value) {
- return Control_Monad_Except.mapExcept(Data_Bifunctor.lmap(Data_Either.bifunctorEither)(Data_Functor.map(Data_List_Types.functorNonEmptyList)(Foreign.ErrorAtIndex.create(i))))(decode(dictDecode)(value));
- };
- };
- var readElements = function readElements(arr) {
- return Data_Traversable.sequence(Data_Traversable.traversableArray)(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Data_Array.zipWith(readElement)(Data_Array.range(0)(Data_Array.length(arr)))(arr));
- };
- return Control_Bind.composeKleisli(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Foreign.readArray)(readElements);
- }());
- };
- module.exports = {
- countArgs: countArgs,
- decode: decode,
- decodeArgs: decodeArgs,
- decodeOpts: decodeOpts,
- decodeRecordWithOptions: decodeRecordWithOptions,
- decodeWithOptions: decodeWithOptions,
- encode: encode,
- encodeArgs: encodeArgs,
- encodeOpts: encodeOpts,
- encodeRecordWithOptions: encodeRecordWithOptions,
- encodeWithOptions: encodeWithOptions,
- TaggedObject: TaggedObject,
- defaultOptions: defaultOptions,
- Decode: Decode,
- Encode: Encode,
- DecodeWithOptions: DecodeWithOptions,
- EncodeWithOptions: EncodeWithOptions,
- DecodeRecord: DecodeRecord,
- EncodeRecord: EncodeRecord,
- GenericDecode: GenericDecode,
- GenericEncode: GenericEncode,
- GenericDecodeArgs: GenericDecodeArgs,
- GenericEncodeArgs: GenericEncodeArgs,
- GenericCountArgs: GenericCountArgs,
- voidDecode: voidDecode,
- unitDecode: unitDecode,
- foreignDecode: foreignDecode,
- stringDecode: stringDecode,
- charDecode: charDecode,
- booleanDecode: booleanDecode,
- numberDecode: numberDecode,
- intDecode: intDecode,
- identityDecode: identityDecode,
- arrayDecode: arrayDecode,
- maybeDecode: maybeDecode,
- objectDecode: objectDecode,
- recordDecode: recordDecode,
- voidEncode: voidEncode,
- unitEncode: unitEncode,
- foreignEncode: foreignEncode,
- stringEncode: stringEncode,
- charEncode: charEncode,
- booleanEncode: booleanEncode,
- numberEncode: numberEncode,
- intEncode: intEncode,
- identityEncode: identityEncode,
- arrayEncode: arrayEncode,
- maybeEncode: maybeEncode,
- objectEncode: objectEncode,
- recordEncode: recordEncode,
- decodeWithOptionsRecord: decodeWithOptionsRecord,
- decodeWithOptionsOther: decodeWithOptionsOther,
- encodeWithOptionsRecord: encodeWithOptionsRecord,
- encodeWithOptionsOther: encodeWithOptionsOther,
- decodeRecordNil: decodeRecordNil,
- encodeRecordNil: encodeRecordNil,
- decodeRecordCons: decodeRecordCons,
- encodeRecordCons: encodeRecordCons,
- genericDecodeNoConstructors: genericDecodeNoConstructors,
- genericEncodeNoConstructors: genericEncodeNoConstructors,
- genericDecodeConstructor: genericDecodeConstructor,
- genericEncodeConstructor: genericEncodeConstructor,
- genericDecodeSum: genericDecodeSum,
- genericEncodeSum: genericEncodeSum,
- genericDecodeArgsNoArguments: genericDecodeArgsNoArguments,
- genericEncodeArgsNoArguments: genericEncodeArgsNoArguments,
- genericDecodeArgsArgument: genericDecodeArgsArgument,
- genericEncodeArgsArgument: genericEncodeArgsArgument,
- genericDecodeArgsProduct: genericDecodeArgsProduct,
- genericEncodeArgsProduct: genericEncodeArgsProduct,
- genericCountArgsNoArguments: genericCountArgsNoArguments,
- genericCountArgsArgument: genericCountArgsArgument,
- genericCountArgsProduct: genericCountArgsProduct
- };
- },{"../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Monad.Except/index.js":"../output/Control.Monad.Except/index.js","../Control.Monad.Except.Trans/index.js":"../output/Control.Monad.Except.Trans/index.js","../Control.Semigroupoid/index.js":"../output/Control.Semigroupoid/index.js","../Data.Array/index.js":"../output/Data.Array/index.js","../Data.Bifunctor/index.js":"../output/Data.Bifunctor/index.js","../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Generic.Rep/index.js":"../output/Data.Generic.Rep/index.js","../Data.Identity/index.js":"../output/Data.Identity/index.js","../Data.List/index.js":"../output/Data.List/index.js","../Data.List.Types/index.js":"../output/Data.List.Types/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Symbol/index.js":"../output/Data.Symbol/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Data.Unfoldable/index.js":"../output/Data.Unfoldable/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js","../Data.Void/index.js":"../output/Data.Void/index.js","../Foreign/index.js":"../output/Foreign/index.js","../Foreign.Generic.Internal/index.js":"../output/Foreign.Generic.Internal/index.js","../Foreign.Index/index.js":"../output/Foreign.Index/index.js","../Foreign.NullOrUndefined/index.js":"../output/Foreign.NullOrUndefined/index.js","../Foreign.Object/index.js":"../output/Foreign.Object/index.js","../Record/index.js":"../output/Record/index.js","../Record.Builder/index.js":"../output/Record.Builder/index.js","../Type.Data.RowList/index.js":"../output/Type.Data.RowList/index.js","../Type.Proxy/index.js":"../output/Type.Proxy/index.js"}],"../output/Foreign.JSON/foreign.js":[function(require,module,exports) {
- "use strict";
- exports.parseJSONImpl = function (str) {
- return JSON.parse(str);
- };
- },{}],"../output/Effect.Uncurried/foreign.js":[function(require,module,exports) {
- "use strict";
- exports.mkEffectFn1 = function mkEffectFn1(fn) {
- return function (x) {
- return fn(x)();
- };
- };
- exports.mkEffectFn2 = function mkEffectFn2(fn) {
- return function (a, b) {
- return fn(a)(b)();
- };
- };
- exports.mkEffectFn3 = function mkEffectFn3(fn) {
- return function (a, b, c) {
- return fn(a)(b)(c)();
- };
- };
- exports.mkEffectFn4 = function mkEffectFn4(fn) {
- return function (a, b, c, d) {
- return fn(a)(b)(c)(d)();
- };
- };
- exports.mkEffectFn5 = function mkEffectFn5(fn) {
- return function (a, b, c, d, e) {
- return fn(a)(b)(c)(d)(e)();
- };
- };
- exports.mkEffectFn6 = function mkEffectFn6(fn) {
- return function (a, b, c, d, e, f) {
- return fn(a)(b)(c)(d)(e)(f)();
- };
- };
- exports.mkEffectFn7 = function mkEffectFn7(fn) {
- return function (a, b, c, d, e, f, g) {
- return fn(a)(b)(c)(d)(e)(f)(g)();
- };
- };
- exports.mkEffectFn8 = function mkEffectFn8(fn) {
- return function (a, b, c, d, e, f, g, h) {
- return fn(a)(b)(c)(d)(e)(f)(g)(h)();
- };
- };
- exports.mkEffectFn9 = function mkEffectFn9(fn) {
- return function (a, b, c, d, e, f, g, h, i) {
- return fn(a)(b)(c)(d)(e)(f)(g)(h)(i)();
- };
- };
- exports.mkEffectFn10 = function mkEffectFn10(fn) {
- return function (a, b, c, d, e, f, g, h, i, j) {
- return fn(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)();
- };
- };
- exports.runEffectFn1 = function runEffectFn1(fn) {
- return function (a) {
- return function () {
- return fn(a);
- };
- };
- };
- exports.runEffectFn2 = function runEffectFn2(fn) {
- return function (a) {
- return function (b) {
- return function () {
- return fn(a, b);
- };
- };
- };
- };
- exports.runEffectFn3 = function runEffectFn3(fn) {
- return function (a) {
- return function (b) {
- return function (c) {
- return function () {
- return fn(a, b, c);
- };
- };
- };
- };
- };
- exports.runEffectFn4 = function runEffectFn4(fn) {
- return function (a) {
- return function (b) {
- return function (c) {
- return function (d) {
- return function () {
- return fn(a, b, c, d);
- };
- };
- };
- };
- };
- };
- exports.runEffectFn5 = function runEffectFn5(fn) {
- return function (a) {
- return function (b) {
- return function (c) {
- return function (d) {
- return function (e) {
- return function () {
- return fn(a, b, c, d, e);
- };
- };
- };
- };
- };
- };
- };
- exports.runEffectFn6 = function runEffectFn6(fn) {
- return function (a) {
- return function (b) {
- return function (c) {
- return function (d) {
- return function (e) {
- return function (f) {
- return function () {
- return fn(a, b, c, d, e, f);
- };
- };
- };
- };
- };
- };
- };
- };
- exports.runEffectFn7 = function runEffectFn7(fn) {
- return function (a) {
- return function (b) {
- return function (c) {
- return function (d) {
- return function (e) {
- return function (f) {
- return function (g) {
- return function () {
- return fn(a, b, c, d, e, f, g);
- };
- };
- };
- };
- };
- };
- };
- };
- };
- exports.runEffectFn8 = function runEffectFn8(fn) {
- return function (a) {
- return function (b) {
- return function (c) {
- return function (d) {
- return function (e) {
- return function (f) {
- return function (g) {
- return function (h) {
- return function () {
- return fn(a, b, c, d, e, f, g, h);
- };
- };
- };
- };
- };
- };
- };
- };
- };
- };
- exports.runEffectFn9 = function runEffectFn9(fn) {
- return function (a) {
- return function (b) {
- return function (c) {
- return function (d) {
- return function (e) {
- return function (f) {
- return function (g) {
- return function (h) {
- return function (i) {
- return function () {
- return fn(a, b, c, d, e, f, g, h, i);
- };
- };
- };
- };
- };
- };
- };
- };
- };
- };
- };
- exports.runEffectFn10 = function runEffectFn10(fn) {
- return function (a) {
- return function (b) {
- return function (c) {
- return function (d) {
- return function (e) {
- return function (f) {
- return function (g) {
- return function (h) {
- return function (i) {
- return function (j) {
- return function () {
- return fn(a, b, c, d, e, f, g, h, i, j);
- };
- };
- };
- };
- };
- };
- };
- };
- };
- };
- };
- };
- },{}],"../output/Effect.Uncurried/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- module.exports = {
- mkEffectFn1: $foreign.mkEffectFn1,
- mkEffectFn2: $foreign.mkEffectFn2,
- mkEffectFn3: $foreign.mkEffectFn3,
- mkEffectFn4: $foreign.mkEffectFn4,
- mkEffectFn5: $foreign.mkEffectFn5,
- mkEffectFn6: $foreign.mkEffectFn6,
- mkEffectFn7: $foreign.mkEffectFn7,
- mkEffectFn8: $foreign.mkEffectFn8,
- mkEffectFn9: $foreign.mkEffectFn9,
- mkEffectFn10: $foreign.mkEffectFn10,
- runEffectFn1: $foreign.runEffectFn1,
- runEffectFn2: $foreign.runEffectFn2,
- runEffectFn3: $foreign.runEffectFn3,
- runEffectFn4: $foreign.runEffectFn4,
- runEffectFn5: $foreign.runEffectFn5,
- runEffectFn6: $foreign.runEffectFn6,
- runEffectFn7: $foreign.runEffectFn7,
- runEffectFn8: $foreign.runEffectFn8,
- runEffectFn9: $foreign.runEffectFn9,
- runEffectFn10: $foreign.runEffectFn10
- };
- },{"./foreign.js":"../output/Effect.Uncurried/foreign.js"}],"../output/Effect.Unsafe/foreign.js":[function(require,module,exports) {
- "use strict";
- exports.unsafePerformEffect = function (f) {
- return f();
- };
- },{}],"../output/Effect.Unsafe/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- module.exports = {
- unsafePerformEffect: $foreign.unsafePerformEffect
- };
- },{"./foreign.js":"../output/Effect.Unsafe/foreign.js"}],"../output/Foreign.JSON/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js");
- var Data_Bifunctor = require("../Data.Bifunctor/index.js");
- var Data_Either = require("../Data.Either/index.js");
- var Data_Identity = require("../Data.Identity/index.js");
- var Data_List_Types = require("../Data.List.Types/index.js");
- var Effect_Exception = require("../Effect.Exception/index.js");
- var Effect_Uncurried = require("../Effect.Uncurried/index.js");
- var Effect_Unsafe = require("../Effect.Unsafe/index.js");
- var Foreign = require("../Foreign/index.js");
- var parseJSON = function () {
- var $0 = Data_Bifunctor.lmap(Data_Either.bifunctorEither)(function () {
- var $3 = Control_Applicative.pure(Data_List_Types.applicativeNonEmptyList);
- return function ($4) {
- return $3(Foreign.ForeignError.create(Effect_Exception.message($4)));
- };
- }());
- var $1 = Effect_Uncurried.runEffectFn1($foreign.parseJSONImpl);
- return function ($2) {
- return Control_Monad_Except_Trans.ExceptT(Data_Identity.Identity($0(Effect_Unsafe.unsafePerformEffect(Effect_Exception["try"]($1($2))))));
- };
- }();
- var decodeJSONWith = function decodeJSONWith(f) {
- return Control_Bind.composeKleisliFlipped(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(f)(parseJSON);
- };
- module.exports = {
- parseJSON: parseJSON,
- decodeJSONWith: decodeJSONWith
- };
- },{"./foreign.js":"../output/Foreign.JSON/foreign.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad.Except.Trans/index.js":"../output/Control.Monad.Except.Trans/index.js","../Data.Bifunctor/index.js":"../output/Data.Bifunctor/index.js","../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Identity/index.js":"../output/Data.Identity/index.js","../Data.List.Types/index.js":"../output/Data.List.Types/index.js","../Effect.Exception/index.js":"../output/Effect.Exception/index.js","../Effect.Uncurried/index.js":"../output/Effect.Uncurried/index.js","../Effect.Unsafe/index.js":"../output/Effect.Unsafe/index.js","../Foreign/index.js":"../output/Foreign/index.js"}],"../output/Global.Unsafe/foreign.js":[function(require,module,exports) {
- /* globals exports, JSON */
- "use strict";
- exports.unsafeStringify = function (x) {
- return JSON.stringify(x);
- };
- exports.unsafeToFixed = function (digits) {
- return function (n) {
- return n.toFixed(digits);
- };
- };
- exports.unsafeToExponential = function (digits) {
- return function (n) {
- return n.toExponential(digits);
- };
- };
- exports.unsafeToPrecision = function (digits) {
- return function (n) {
- return n.toPrecision(digits);
- };
- };
- exports.unsafeDecodeURI = decodeURI;
- exports.unsafeEncodeURI = encodeURI;
- exports.unsafeDecodeURIComponent = decodeURIComponent;
- exports.unsafeEncodeURIComponent = encodeURIComponent;
- },{}],"../output/Global.Unsafe/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- module.exports = {
- unsafeStringify: $foreign.unsafeStringify,
- unsafeToFixed: $foreign.unsafeToFixed,
- unsafeToExponential: $foreign.unsafeToExponential,
- unsafeToPrecision: $foreign.unsafeToPrecision,
- unsafeDecodeURI: $foreign.unsafeDecodeURI,
- unsafeEncodeURI: $foreign.unsafeEncodeURI,
- unsafeDecodeURIComponent: $foreign.unsafeDecodeURIComponent,
- unsafeEncodeURIComponent: $foreign.unsafeEncodeURIComponent
- };
- },{"./foreign.js":"../output/Global.Unsafe/foreign.js"}],"../output/Foreign.Generic/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Generic_Rep = require("../Data.Generic.Rep/index.js");
- var Data_Identity = require("../Data.Identity/index.js");
- var Foreign_Generic_Class = require("../Foreign.Generic.Class/index.js");
- var Foreign_JSON = require("../Foreign.JSON/index.js");
- var Global_Unsafe = require("../Global.Unsafe/index.js");
- var genericEncode = function genericEncode(dictGeneric) {
- return function (dictGenericEncode) {
- return function (opts) {
- var $10 = Foreign_Generic_Class.encodeOpts(dictGenericEncode)(opts);
- var $11 = Data_Generic_Rep.from(dictGeneric);
- return function ($12) {
- return $10($11($12));
- };
- };
- };
- };
- var genericEncodeJSON = function genericEncodeJSON(dictGeneric) {
- return function (dictGenericEncode) {
- return function (opts) {
- var $13 = genericEncode(dictGeneric)(dictGenericEncode)(opts);
- return function ($14) {
- return Global_Unsafe.unsafeStringify($13($14));
- };
- };
- };
- };
- var genericDecode = function genericDecode(dictGeneric) {
- return function (dictGenericDecode) {
- return function (opts) {
- var $15 = Data_Functor.map(Control_Monad_Except_Trans.functorExceptT(Data_Identity.functorIdentity))(Data_Generic_Rep.to(dictGeneric));
- var $16 = Foreign_Generic_Class.decodeOpts(dictGenericDecode)(opts);
- return function ($17) {
- return $15($16($17));
- };
- };
- };
- };
- var genericDecodeJSON = function genericDecodeJSON(dictGeneric) {
- return function (dictGenericDecode) {
- return function (opts) {
- return Control_Bind.composeKleisliFlipped(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(genericDecode(dictGeneric)(dictGenericDecode)(opts))(Foreign_JSON.parseJSON);
- };
- };
- };
- var encodeJSON = function encodeJSON(dictEncode) {
- var $18 = Foreign_Generic_Class.encode(dictEncode);
- return function ($19) {
- return Global_Unsafe.unsafeStringify($18($19));
- };
- };
- var decodeJSON = function decodeJSON(dictDecode) {
- return Foreign_JSON.decodeJSONWith(Foreign_Generic_Class.decode(dictDecode));
- };
- module.exports = {
- genericDecode: genericDecode,
- genericEncode: genericEncode,
- decodeJSON: decodeJSON,
- encodeJSON: encodeJSON,
- genericDecodeJSON: genericDecodeJSON,
- genericEncodeJSON: genericEncodeJSON
- };
- },{"../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad.Except.Trans/index.js":"../output/Control.Monad.Except.Trans/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Generic.Rep/index.js":"../output/Data.Generic.Rep/index.js","../Data.Identity/index.js":"../output/Data.Identity/index.js","../Foreign.Generic.Class/index.js":"../output/Foreign.Generic.Class/index.js","../Foreign.JSON/index.js":"../output/Foreign.JSON/index.js","../Global.Unsafe/index.js":"../output/Global.Unsafe/index.js"}],"../output/Browser.Utils/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Monad_Except = require("../Control.Monad.Except/index.js");
- var Data_Either = require("../Data.Either/index.js");
- var Data_Foldable = require("../Data.Foldable/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_List_Types = require("../Data.List.Types/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Effect = require("../Effect/index.js");
- var Effect_Exception = require("../Effect.Exception/index.js");
- var Foreign = require("../Foreign/index.js");
- var Foreign_Generic = require("../Foreign.Generic/index.js");
- var Foreign_Generic_Class = require("../Foreign.Generic.Class/index.js");
- var Listener2 = function Listener2(x) {
- return x;
- };
- var Listener = function Listener(x) {
- return x;
- };
- var unwrapForeign = function unwrapForeign(dictGeneric) {
- return function (dictGenericDecode) {
- return function (d) {
- var v = Control_Monad_Except.runExcept(Foreign_Generic.genericDecode(dictGeneric)(dictGenericDecode)({
- sumEncoding: Foreign_Generic_Class.defaultOptions.sumEncoding,
- unwrapSingleConstructors: true,
- unwrapSingleArguments: Foreign_Generic_Class.defaultOptions.unwrapSingleArguments,
- fieldTransform: Foreign_Generic_Class.defaultOptions.fieldTransform
- })(d));
- if (v instanceof Data_Either.Left) {
- return Effect_Exception["throw"](Data_Foldable.intercalate(Data_List_Types.foldableNonEmptyList)(Data_Monoid.monoidString)(", ")(Data_Functor.map(Data_List_Types.functorNonEmptyList)(Foreign.renderForeignError)(v.value0)));
- }
- ;
- if (v instanceof Data_Either.Right) {
- return Control_Applicative.pure(Effect.applicativeEffect)(v.value0);
- }
- ;
- throw new Error("Failed pattern match at Browser.Utils (line 45, column 19 - line 47, column 24): " + [v.constructor.name]);
- };
- };
- };
- module.exports = {
- unwrapForeign: unwrapForeign,
- mkListenerUnit: $foreign.mkListenerUnit,
- mkListenerOne: $foreign.mkListenerOne,
- mkListenerTwo: $foreign.mkListenerTwo
- };
- },{"./foreign.js":"../output/Browser.Utils/foreign.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Monad.Except/index.js":"../output/Control.Monad.Except/index.js","../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.List.Types/index.js":"../output/Data.List.Types/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Effect/index.js":"../output/Effect/index.js","../Effect.Exception/index.js":"../output/Effect.Exception/index.js","../Foreign/index.js":"../output/Foreign/index.js","../Foreign.Generic/index.js":"../output/Foreign.Generic/index.js","../Foreign.Generic.Class/index.js":"../output/Foreign.Generic.Class/index.js"}],"../output/Effect.Console/foreign.js":[function(require,module,exports) {
- "use strict";
- exports.log = function (s) {
- return function () {
- console.log(s);
- return {};
- };
- };
- exports.warn = function (s) {
- return function () {
- console.warn(s);
- return {};
- };
- };
- exports.error = function (s) {
- return function () {
- console.error(s);
- return {};
- };
- };
- exports.info = function (s) {
- return function () {
- console.info(s);
- return {};
- };
- };
- exports.time = function (s) {
- return function () {
- console.time(s);
- return {};
- };
- };
- exports.timeLog = function (s) {
- return function () {
- console.timeLog(s);
- return {};
- };
- };
- exports.timeEnd = function (s) {
- return function () {
- console.timeEnd(s);
- return {};
- };
- };
- exports.clear = function () {
- console.clear();
- return {};
- };
- },{}],"../output/Effect.Console/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Data_Show = require("../Data.Show/index.js");
- var warnShow = function warnShow(dictShow) {
- return function (a) {
- return $foreign.warn(Data_Show.show(dictShow)(a));
- };
- };
- var logShow = function logShow(dictShow) {
- return function (a) {
- return $foreign.log(Data_Show.show(dictShow)(a));
- };
- };
- var infoShow = function infoShow(dictShow) {
- return function (a) {
- return $foreign.info(Data_Show.show(dictShow)(a));
- };
- };
- var errorShow = function errorShow(dictShow) {
- return function (a) {
- return $foreign.error(Data_Show.show(dictShow)(a));
- };
- };
- module.exports = {
- logShow: logShow,
- warnShow: warnShow,
- errorShow: errorShow,
- infoShow: infoShow,
- log: $foreign.log,
- warn: $foreign.warn,
- error: $foreign.error,
- info: $foreign.info,
- time: $foreign.time,
- timeLog: $foreign.timeLog,
- timeEnd: $foreign.timeEnd,
- clear: $foreign.clear
- };
- },{"./foreign.js":"../output/Effect.Console/foreign.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Browser.Runtime/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Browser_Utils = require("../Browser.Utils/index.js");
- var Control_Monad_Except = require("../Control.Monad.Except/index.js");
- var Data_Either = require("../Data.Either/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Foldable = require("../Data.Foldable/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_List_Types = require("../Data.List.Types/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Effect_Console = require("../Effect.Console/index.js");
- var Foreign = require("../Foreign/index.js");
- var Foreign_Generic = require("../Foreign.Generic/index.js");
- var Foreign_Generic_Class = require("../Foreign.Generic.Class/index.js");
- var postMessageJson = function postMessageJson(dictGeneric) {
- return function (dictGenericEncode) {
- return function (port) {
- return function (d) {
- return $foreign.postMessage(port)(Foreign_Generic.genericEncodeJSON(dictGeneric)(dictGenericEncode)({
- sumEncoding: Foreign_Generic_Class.defaultOptions.sumEncoding,
- unwrapSingleConstructors: true,
- unwrapSingleArguments: Foreign_Generic_Class.defaultOptions.unwrapSingleArguments,
- fieldTransform: Foreign_Generic_Class.defaultOptions.fieldTransform
- })(d));
- };
- };
- };
- };
- var onMessageJsonAddListener = function onMessageJsonAddListener(dictGeneric) {
- return function (dictGenericDecode) {
- return function (port) {
- return function (f) {
- var listener = function listener(msg) {
- var v = Control_Monad_Except.runExcept(Foreign_Generic.genericDecodeJSON(dictGeneric)(dictGenericDecode)({
- sumEncoding: Foreign_Generic_Class.defaultOptions.sumEncoding,
- unwrapSingleConstructors: true,
- unwrapSingleArguments: Foreign_Generic_Class.defaultOptions.unwrapSingleArguments,
- fieldTransform: Foreign_Generic_Class.defaultOptions.fieldTransform
- })(msg));
- if (v instanceof Data_Either.Left) {
- return function __do() {
- Effect_Console.error("error while trying to parse message: " + Data_Foldable.intercalate(Data_List_Types.foldableNonEmptyList)(Data_Monoid.monoidString)(", ")(Data_Functor.map(Data_List_Types.functorNonEmptyList)(Foreign.renderForeignError)(v.value0)))();
- return Effect_Console.error("message was " + msg)();
- };
- }
- ;
- if (v instanceof Data_Either.Right) {
- return f(v.value0);
- }
- ;
- throw new Error("Failed pattern match at Browser.Runtime (line 46, column 24 - line 50, column 32): " + [v.constructor.name]);
- };
- return function __do() {
- var jsonLst = Browser_Utils.mkListenerOne(listener)();
- $foreign.onMessageAddListener(port)(jsonLst)();
- return jsonLst;
- };
- };
- };
- };
- };
- var eqPort = new Data_Eq.Eq($foreign.portEquality);
- module.exports = {
- postMessageJson: postMessageJson,
- onMessageJsonAddListener: onMessageJsonAddListener,
- eqPort: eqPort,
- connect: $foreign.connect,
- onConnectAddListener: $foreign.onConnectAddListener,
- portOnDisconnect: $foreign.portOnDisconnect,
- postMessage: $foreign.postMessage,
- onMessageAddListener: $foreign.onMessageAddListener,
- onMessageRemoveListener: $foreign.onMessageRemoveListener
- };
- },{"./foreign.js":"../output/Browser.Runtime/foreign.js","../Browser.Utils/index.js":"../output/Browser.Utils/index.js","../Control.Monad.Except/index.js":"../output/Control.Monad.Except/index.js","../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.List.Types/index.js":"../output/Data.List.Types/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Effect.Console/index.js":"../output/Effect.Console/index.js","../Foreign/index.js":"../output/Foreign/index.js","../Foreign.Generic/index.js":"../output/Foreign.Generic/index.js","../Foreign.Generic.Class/index.js":"../output/Foreign.Generic.Class/index.js"}],"../output/Browser.Tabs/foreign.js":[function(require,module,exports) {
- "use strict";
- exports.queryImpl = function () {
- return browser.tabs.query({});
- };
- },{}],"../output/Control.Promise/foreign.js":[function(require,module,exports) {
- // module Control.Promise
- exports.promise = function (f) {
- return function () {
- return new Promise(function (success, error) {
- var succF = function succF(s) {
- return function () {
- return success(s);
- };
- };
- var failF = function failF(s) {
- return function () {
- return error(s);
- };
- }; // This indicates the aff was wrong?
- try {
- f(succF)(failF)();
- } catch (e) {
- error(e);
- }
- });
- };
- };
- exports.thenImpl = function (promise) {
- return function (errCB) {
- return function (succCB) {
- return function () {
- promise.then(succCB, errCB);
- };
- };
- };
- };
- },{}],"../output/Effect.Aff/foreign.js":[function(require,module,exports) {
- /* globals setImmediate, clearImmediate, setTimeout, clearTimeout */
- /* jshint -W083, -W098, -W003 */
- "use strict";
- var Aff = function () {
- // A unique value for empty.
- var EMPTY = {};
- /*
- An awkward approximation. We elide evidence we would otherwise need in PS for
- efficiency sake.
- data Aff eff a
- = Pure a
- | Throw Error
- | Catch (Aff eff a) (Error -> Aff eff a)
- | Sync (Eff eff a)
- | Async ((Either Error a -> Eff eff Unit) -> Eff eff (Canceler eff))
- | forall b. Bind (Aff eff b) (b -> Aff eff a)
- | forall b. Bracket (Aff eff b) (BracketConditions eff b) (b -> Aff eff a)
- | forall b. Fork Boolean (Aff eff b) ?(Fiber eff b -> a)
- | Sequential (ParAff aff a)
- */
- var PURE = "Pure";
- var THROW = "Throw";
- var CATCH = "Catch";
- var SYNC = "Sync";
- var ASYNC = "Async";
- var BIND = "Bind";
- var BRACKET = "Bracket";
- var FORK = "Fork";
- var SEQ = "Sequential";
- /*
- data ParAff eff a
- = forall b. Map (b -> a) (ParAff eff b)
- | forall b. Apply (ParAff eff (b -> a)) (ParAff eff b)
- | Alt (ParAff eff a) (ParAff eff a)
- | ?Par (Aff eff a)
- */
- var MAP = "Map";
- var APPLY = "Apply";
- var ALT = "Alt"; // Various constructors used in interpretation
- var CONS = "Cons"; // Cons-list, for stacks
- var RESUME = "Resume"; // Continue indiscriminately
- var RELEASE = "Release"; // Continue with bracket finalizers
- var FINALIZER = "Finalizer"; // A non-interruptible effect
- var FINALIZED = "Finalized"; // Marker for finalization
- var FORKED = "Forked"; // Reference to a forked fiber, with resumption stack
- var FIBER = "Fiber"; // Actual fiber reference
- var THUNK = "Thunk"; // Primed effect, ready to invoke
- function Aff(tag, _1, _2, _3) {
- this.tag = tag;
- this._1 = _1;
- this._2 = _2;
- this._3 = _3;
- }
- function AffCtr(tag) {
- var fn = function fn(_1, _2, _3) {
- return new Aff(tag, _1, _2, _3);
- };
- fn.tag = tag;
- return fn;
- }
- function nonCanceler(error) {
- return new Aff(PURE, void 0);
- }
- function runEff(eff) {
- try {
- eff();
- } catch (error) {
- setTimeout(function () {
- throw error;
- }, 0);
- }
- }
- function runSync(left, right, eff) {
- try {
- return right(eff());
- } catch (error) {
- return left(error);
- }
- }
- function runAsync(left, eff, k) {
- try {
- return eff(k)();
- } catch (error) {
- k(left(error))();
- return nonCanceler;
- }
- }
- var Scheduler = function () {
- var limit = 1024;
- var size = 0;
- var ix = 0;
- var queue = new Array(limit);
- var draining = false;
- function drain() {
- var thunk;
- draining = true;
- while (size !== 0) {
- size--;
- thunk = queue[ix];
- queue[ix] = void 0;
- ix = (ix + 1) % limit;
- thunk();
- }
- draining = false;
- }
- return {
- isDraining: function isDraining() {
- return draining;
- },
- enqueue: function enqueue(cb) {
- var i, tmp;
- if (size === limit) {
- tmp = draining;
- drain();
- draining = tmp;
- }
- queue[(ix + size) % limit] = cb;
- size++;
- if (!draining) {
- drain();
- }
- }
- };
- }();
- function Supervisor(util) {
- var fibers = {};
- var fiberId = 0;
- var count = 0;
- return {
- register: function register(fiber) {
- var fid = fiberId++;
- fiber.onComplete({
- rethrow: true,
- handler: function handler(result) {
- return function () {
- count--;
- delete fibers[fid];
- };
- }
- })();
- fibers[fid] = fiber;
- count++;
- },
- isEmpty: function isEmpty() {
- return count === 0;
- },
- killAll: function killAll(killError, cb) {
- return function () {
- if (count === 0) {
- return cb();
- }
- var killCount = 0;
- var kills = {};
- function kill(fid) {
- kills[fid] = fibers[fid].kill(killError, function (result) {
- return function () {
- delete kills[fid];
- killCount--;
- if (util.isLeft(result) && util.fromLeft(result)) {
- setTimeout(function () {
- throw util.fromLeft(result);
- }, 0);
- }
- if (killCount === 0) {
- cb();
- }
- };
- })();
- }
- for (var k in fibers) {
- if (fibers.hasOwnProperty(k)) {
- killCount++;
- kill(k);
- }
- }
- fibers = {};
- fiberId = 0;
- count = 0;
- return function (error) {
- return new Aff(SYNC, function () {
- for (var k in kills) {
- if (kills.hasOwnProperty(k)) {
- kills[k]();
- }
- }
- });
- };
- };
- }
- };
- } // Fiber state machine
- var SUSPENDED = 0; // Suspended, pending a join.
- var CONTINUE = 1; // Interpret the next instruction.
- var STEP_BIND = 2; // Apply the next bind.
- var STEP_RESULT = 3; // Handle potential failure from a result.
- var PENDING = 4; // An async effect is running.
- var RETURN = 5; // The current stack has returned.
- var COMPLETED = 6; // The entire fiber has completed.
- function Fiber(util, supervisor, aff) {
- // Monotonically increasing tick, increased on each asynchronous turn.
- var runTick = 0; // The current branch of the state machine.
- var status = SUSPENDED; // The current point of interest for the state machine branch.
- var step = aff; // Successful step
- var fail = null; // Failure step
- var interrupt = null; // Asynchronous interrupt
- // Stack of continuations for the current fiber.
- var bhead = null;
- var btail = null; // Stack of attempts and finalizers for error recovery. Every `Cons` is also
- // tagged with current `interrupt` state. We use this to track which items
- // should be ignored or evaluated as a result of a kill.
- var attempts = null; // A special state is needed for Bracket, because it cannot be killed. When
- // we enter a bracket acquisition or finalizer, we increment the counter,
- // and then decrement once complete.
- var bracketCount = 0; // Each join gets a new id so they can be revoked.
- var joinId = 0;
- var joins = null;
- var rethrow = true; // Each invocation of `run` requires a tick. When an asynchronous effect is
- // resolved, we must check that the local tick coincides with the fiber
- // tick before resuming. This prevents multiple async continuations from
- // accidentally resuming the same fiber. A common example may be invoking
- // the provided callback in `makeAff` more than once, but it may also be an
- // async effect resuming after the fiber was already cancelled.
- function _run(localRunTick) {
- var tmp, result, attempt;
- while (true) {
- tmp = null;
- result = null;
- attempt = null;
- switch (status) {
- case STEP_BIND:
- status = CONTINUE;
- try {
- step = bhead(step);
- if (btail === null) {
- bhead = null;
- } else {
- bhead = btail._1;
- btail = btail._2;
- }
- } catch (e) {
- status = RETURN;
- fail = util.left(e);
- step = null;
- }
- break;
- case STEP_RESULT:
- if (util.isLeft(step)) {
- status = RETURN;
- fail = step;
- step = null;
- } else if (bhead === null) {
- status = RETURN;
- } else {
- status = STEP_BIND;
- step = util.fromRight(step);
- }
- break;
- case CONTINUE:
- switch (step.tag) {
- case BIND:
- if (bhead) {
- btail = new Aff(CONS, bhead, btail);
- }
- bhead = step._2;
- status = CONTINUE;
- step = step._1;
- break;
- case PURE:
- if (bhead === null) {
- status = RETURN;
- step = util.right(step._1);
- } else {
- status = STEP_BIND;
- step = step._1;
- }
- break;
- case SYNC:
- status = STEP_RESULT;
- step = runSync(util.left, util.right, step._1);
- break;
- case ASYNC:
- status = PENDING;
- step = runAsync(util.left, step._1, function (result) {
- return function () {
- if (runTick !== localRunTick) {
- return;
- }
- runTick++;
- Scheduler.enqueue(function () {
- // It's possible to interrupt the fiber between enqueuing and
- // resuming, so we need to check that the runTick is still
- // valid.
- if (runTick !== localRunTick + 1) {
- return;
- }
- status = STEP_RESULT;
- step = result;
- _run(runTick);
- });
- };
- });
- return;
- case THROW:
- status = RETURN;
- fail = util.left(step._1);
- step = null;
- break;
- // Enqueue the Catch so that we can call the error handler later on
- // in case of an exception.
- case CATCH:
- if (bhead === null) {
- attempts = new Aff(CONS, step, attempts, interrupt);
- } else {
- attempts = new Aff(CONS, step, new Aff(CONS, new Aff(RESUME, bhead, btail), attempts, interrupt), interrupt);
- }
- bhead = null;
- btail = null;
- status = CONTINUE;
- step = step._1;
- break;
- // Enqueue the Bracket so that we can call the appropriate handlers
- // after resource acquisition.
- case BRACKET:
- bracketCount++;
- if (bhead === null) {
- attempts = new Aff(CONS, step, attempts, interrupt);
- } else {
- attempts = new Aff(CONS, step, new Aff(CONS, new Aff(RESUME, bhead, btail), attempts, interrupt), interrupt);
- }
- bhead = null;
- btail = null;
- status = CONTINUE;
- step = step._1;
- break;
- case FORK:
- status = STEP_RESULT;
- tmp = Fiber(util, supervisor, step._2);
- if (supervisor) {
- supervisor.register(tmp);
- }
- if (step._1) {
- tmp.run();
- }
- step = util.right(tmp);
- break;
- case SEQ:
- status = CONTINUE;
- step = sequential(util, supervisor, step._1);
- break;
- }
- break;
- case RETURN:
- bhead = null;
- btail = null; // If the current stack has returned, and we have no other stacks to
- // resume or finalizers to run, the fiber has halted and we can
- // invoke all join callbacks. Otherwise we need to resume.
- if (attempts === null) {
- status = COMPLETED;
- step = interrupt || fail || step;
- } else {
- // The interrupt status for the enqueued item.
- tmp = attempts._3;
- attempt = attempts._1;
- attempts = attempts._2;
- switch (attempt.tag) {
- // We cannot recover from an unmasked interrupt. Otherwise we should
- // continue stepping, or run the exception handler if an exception
- // was raised.
- case CATCH:
- // We should compare the interrupt status as well because we
- // only want it to apply if there has been an interrupt since
- // enqueuing the catch.
- if (interrupt && interrupt !== tmp && bracketCount === 0) {
- status = RETURN;
- } else if (fail) {
- status = CONTINUE;
- step = attempt._2(util.fromLeft(fail));
- fail = null;
- }
- break;
- // We cannot resume from an unmasked interrupt or exception.
- case RESUME:
- // As with Catch, we only want to ignore in the case of an
- // interrupt since enqueing the item.
- if (interrupt && interrupt !== tmp && bracketCount === 0 || fail) {
- status = RETURN;
- } else {
- bhead = attempt._1;
- btail = attempt._2;
- status = STEP_BIND;
- step = util.fromRight(step);
- }
- break;
- // If we have a bracket, we should enqueue the handlers,
- // and continue with the success branch only if the fiber has
- // not been interrupted. If the bracket acquisition failed, we
- // should not run either.
- case BRACKET:
- bracketCount--;
- if (fail === null) {
- result = util.fromRight(step); // We need to enqueue the Release with the same interrupt
- // status as the Bracket that is initiating it.
- attempts = new Aff(CONS, new Aff(RELEASE, attempt._2, result), attempts, tmp); // We should only coninue as long as the interrupt status has not changed or
- // we are currently within a non-interruptable finalizer.
- if (interrupt === tmp || bracketCount > 0) {
- status = CONTINUE;
- step = attempt._3(result);
- }
- }
- break;
- // Enqueue the appropriate handler. We increase the bracket count
- // because it should not be cancelled.
- case RELEASE:
- attempts = new Aff(CONS, new Aff(FINALIZED, step, fail), attempts, interrupt);
- status = CONTINUE; // It has only been killed if the interrupt status has changed
- // since we enqueued the item, and the bracket count is 0. If the
- // bracket count is non-zero then we are in a masked state so it's
- // impossible to be killed.
- if (interrupt && interrupt !== tmp && bracketCount === 0) {
- step = attempt._1.killed(util.fromLeft(interrupt))(attempt._2);
- } else if (fail) {
- step = attempt._1.failed(util.fromLeft(fail))(attempt._2);
- } else {
- step = attempt._1.completed(util.fromRight(step))(attempt._2);
- }
- fail = null;
- bracketCount++;
- break;
- case FINALIZER:
- bracketCount++;
- attempts = new Aff(CONS, new Aff(FINALIZED, step, fail), attempts, interrupt);
- status = CONTINUE;
- step = attempt._1;
- break;
- case FINALIZED:
- bracketCount--;
- status = RETURN;
- step = attempt._1;
- fail = attempt._2;
- break;
- }
- }
- break;
- case COMPLETED:
- for (var k in joins) {
- if (joins.hasOwnProperty(k)) {
- rethrow = rethrow && joins[k].rethrow;
- runEff(joins[k].handler(step));
- }
- }
- joins = null; // If we have an interrupt and a fail, then the thread threw while
- // running finalizers. This should always rethrow in a fresh stack.
- if (interrupt && fail) {
- setTimeout(function () {
- throw util.fromLeft(fail);
- }, 0); // If we have an unhandled exception, and no other fiber has joined
- // then we need to throw the exception in a fresh stack.
- } else if (util.isLeft(step) && rethrow) {
- setTimeout(function () {
- // Guard on reathrow because a completely synchronous fiber can
- // still have an observer which was added after-the-fact.
- if (rethrow) {
- throw util.fromLeft(step);
- }
- }, 0);
- }
- return;
- case SUSPENDED:
- status = CONTINUE;
- break;
- case PENDING:
- return;
- }
- }
- }
- function onComplete(join) {
- return function () {
- if (status === COMPLETED) {
- rethrow = rethrow && join.rethrow;
- join.handler(step)();
- return function () {};
- }
- var jid = joinId++;
- joins = joins || {};
- joins[jid] = join;
- return function () {
- if (joins !== null) {
- delete joins[jid];
- }
- };
- };
- }
- function kill(error, cb) {
- return function () {
- if (status === COMPLETED) {
- cb(util.right(void 0))();
- return function () {};
- }
- var canceler = onComplete({
- rethrow: false,
- handler: function handler()
- /* unused */
- {
- return cb(util.right(void 0));
- }
- })();
- switch (status) {
- case SUSPENDED:
- interrupt = util.left(error);
- status = COMPLETED;
- step = interrupt;
- _run(runTick);
- break;
- case PENDING:
- if (interrupt === null) {
- interrupt = util.left(error);
- }
- if (bracketCount === 0) {
- if (status === PENDING) {
- attempts = new Aff(CONS, new Aff(FINALIZER, step(error)), attempts, interrupt);
- }
- status = RETURN;
- step = null;
- fail = null;
- _run(++runTick);
- }
- break;
- default:
- if (interrupt === null) {
- interrupt = util.left(error);
- }
- if (bracketCount === 0) {
- status = RETURN;
- step = null;
- fail = null;
- }
- }
- return canceler;
- };
- }
- function join(cb) {
- return function () {
- var canceler = onComplete({
- rethrow: false,
- handler: cb
- })();
- if (status === SUSPENDED) {
- _run(runTick);
- }
- return canceler;
- };
- }
- return {
- kill: kill,
- join: join,
- onComplete: onComplete,
- isSuspended: function isSuspended() {
- return status === SUSPENDED;
- },
- run: function run() {
- if (status === SUSPENDED) {
- if (!Scheduler.isDraining()) {
- Scheduler.enqueue(function () {
- _run(runTick);
- });
- } else {
- _run(runTick);
- }
- }
- }
- };
- }
- function runPar(util, supervisor, par, cb) {
- // Table of all forked fibers.
- var fiberId = 0;
- var fibers = {}; // Table of currently running cancelers, as a product of `Alt` behavior.
- var killId = 0;
- var kills = {}; // Error used for early cancelation on Alt branches.
- var early = new Error("[ParAff] Early exit"); // Error used to kill the entire tree.
- var interrupt = null; // The root pointer of the tree.
- var root = EMPTY; // Walks a tree, invoking all the cancelers. Returns the table of pending
- // cancellation fibers.
- function kill(error, par, cb) {
- var step = par;
- var head = null;
- var tail = null;
- var count = 0;
- var kills = {};
- var tmp, kid;
- loop: while (true) {
- tmp = null;
- switch (step.tag) {
- case FORKED:
- if (step._3 === EMPTY) {
- tmp = fibers[step._1];
- kills[count++] = tmp.kill(error, function (result) {
- return function () {
- count--;
- if (count === 0) {
- cb(result)();
- }
- };
- });
- } // Terminal case.
- if (head === null) {
- break loop;
- } // Go down the right side of the tree.
- step = head._2;
- if (tail === null) {
- head = null;
- } else {
- head = tail._1;
- tail = tail._2;
- }
- break;
- case MAP:
- step = step._2;
- break;
- case APPLY:
- case ALT:
- if (head) {
- tail = new Aff(CONS, head, tail);
- }
- head = step;
- step = step._1;
- break;
- }
- }
- if (count === 0) {
- cb(util.right(void 0))();
- } else {
- // Run the cancelation effects. We alias `count` because it's mutable.
- kid = 0;
- tmp = count;
- for (; kid < tmp; kid++) {
- kills[kid] = kills[kid]();
- }
- }
- return kills;
- } // When a fiber resolves, we need to bubble back up the tree with the
- // result, computing the applicative nodes.
- function join(result, head, tail) {
- var fail, step, lhs, rhs, tmp, kid;
- if (util.isLeft(result)) {
- fail = result;
- step = null;
- } else {
- step = result;
- fail = null;
- }
- loop: while (true) {
- lhs = null;
- rhs = null;
- tmp = null;
- kid = null; // We should never continue if the entire tree has been interrupted.
- if (interrupt !== null) {
- return;
- } // We've made it all the way to the root of the tree, which means
- // the tree has fully evaluated.
- if (head === null) {
- cb(fail || step)();
- return;
- } // The tree has already been computed, so we shouldn't try to do it
- // again. This should never happen.
- // TODO: Remove this?
- if (head._3 !== EMPTY) {
- return;
- }
- switch (head.tag) {
- case MAP:
- if (fail === null) {
- head._3 = util.right(head._1(util.fromRight(step)));
- step = head._3;
- } else {
- head._3 = fail;
- }
- break;
- case APPLY:
- lhs = head._1._3;
- rhs = head._2._3; // If we have a failure we should kill the other side because we
- // can't possible yield a result anymore.
- if (fail) {
- head._3 = fail;
- tmp = true;
- kid = killId++;
- kills[kid] = kill(early, fail === lhs ? head._2 : head._1, function ()
- /* unused */
- {
- return function () {
- delete kills[kid];
- if (tmp) {
- tmp = false;
- } else if (tail === null) {
- join(fail, null, null);
- } else {
- join(fail, tail._1, tail._2);
- }
- };
- });
- if (tmp) {
- tmp = false;
- return;
- }
- } else if (lhs === EMPTY || rhs === EMPTY) {
- // We can only proceed if both sides have resolved.
- return;
- } else {
- step = util.right(util.fromRight(lhs)(util.fromRight(rhs)));
- head._3 = step;
- }
- break;
- case ALT:
- lhs = head._1._3;
- rhs = head._2._3; // We can only proceed if both have resolved or we have a success
- if (lhs === EMPTY && util.isLeft(rhs) || rhs === EMPTY && util.isLeft(lhs)) {
- return;
- } // If both sides resolve with an error, we should continue with the
- // first error
- if (lhs !== EMPTY && util.isLeft(lhs) && rhs !== EMPTY && util.isLeft(rhs)) {
- fail = step === lhs ? rhs : lhs;
- step = null;
- head._3 = fail;
- } else {
- head._3 = step;
- tmp = true;
- kid = killId++; // Once a side has resolved, we need to cancel the side that is still
- // pending before we can continue.
- kills[kid] = kill(early, step === lhs ? head._2 : head._1, function ()
- /* unused */
- {
- return function () {
- delete kills[kid];
- if (tmp) {
- tmp = false;
- } else if (tail === null) {
- join(step, null, null);
- } else {
- join(step, tail._1, tail._2);
- }
- };
- });
- if (tmp) {
- tmp = false;
- return;
- }
- }
- break;
- }
- if (tail === null) {
- head = null;
- } else {
- head = tail._1;
- tail = tail._2;
- }
- }
- }
- function resolve(fiber) {
- return function (result) {
- return function () {
- delete fibers[fiber._1];
- fiber._3 = result;
- join(result, fiber._2._1, fiber._2._2);
- };
- };
- } // Walks the applicative tree, substituting non-applicative nodes with
- // `FORKED` nodes. In this tree, all applicative nodes use the `_3` slot
- // as a mutable slot for memoization. In an unresolved state, the `_3`
- // slot is `EMPTY`. In the cases of `ALT` and `APPLY`, we always walk
- // the left side first, because both operations are left-associative. As
- // we `RETURN` from those branches, we then walk the right side.
- function run() {
- var status = CONTINUE;
- var step = par;
- var head = null;
- var tail = null;
- var tmp, fid;
- loop: while (true) {
- tmp = null;
- fid = null;
- switch (status) {
- case CONTINUE:
- switch (step.tag) {
- case MAP:
- if (head) {
- tail = new Aff(CONS, head, tail);
- }
- head = new Aff(MAP, step._1, EMPTY, EMPTY);
- step = step._2;
- break;
- case APPLY:
- if (head) {
- tail = new Aff(CONS, head, tail);
- }
- head = new Aff(APPLY, EMPTY, step._2, EMPTY);
- step = step._1;
- break;
- case ALT:
- if (head) {
- tail = new Aff(CONS, head, tail);
- }
- head = new Aff(ALT, EMPTY, step._2, EMPTY);
- step = step._1;
- break;
- default:
- // When we hit a leaf value, we suspend the stack in the `FORKED`.
- // When the fiber resolves, it can bubble back up the tree.
- fid = fiberId++;
- status = RETURN;
- tmp = step;
- step = new Aff(FORKED, fid, new Aff(CONS, head, tail), EMPTY);
- tmp = Fiber(util, supervisor, tmp);
- tmp.onComplete({
- rethrow: false,
- handler: resolve(step)
- })();
- fibers[fid] = tmp;
- if (supervisor) {
- supervisor.register(tmp);
- }
- }
- break;
- case RETURN:
- // Terminal case, we are back at the root.
- if (head === null) {
- break loop;
- } // If we are done with the right side, we need to continue down the
- // left. Otherwise we should continue up the stack.
- if (head._1 === EMPTY) {
- head._1 = step;
- status = CONTINUE;
- step = head._2;
- head._2 = EMPTY;
- } else {
- head._2 = step;
- step = head;
- if (tail === null) {
- head = null;
- } else {
- head = tail._1;
- tail = tail._2;
- }
- }
- }
- } // Keep a reference to the tree root so it can be cancelled.
- root = step;
- for (fid = 0; fid < fiberId; fid++) {
- fibers[fid].run();
- }
- } // Cancels the entire tree. If there are already subtrees being canceled,
- // we need to first cancel those joins. We will then add fresh joins for
- // all pending branches including those that were in the process of being
- // canceled.
- function cancel(error, cb) {
- interrupt = util.left(error);
- var innerKills;
- for (var kid in kills) {
- if (kills.hasOwnProperty(kid)) {
- innerKills = kills[kid];
- for (kid in innerKills) {
- if (innerKills.hasOwnProperty(kid)) {
- innerKills[kid]();
- }
- }
- }
- }
- kills = null;
- var newKills = kill(error, root, cb);
- return function (killError) {
- return new Aff(ASYNC, function (killCb) {
- return function () {
- for (var kid in newKills) {
- if (newKills.hasOwnProperty(kid)) {
- newKills[kid]();
- }
- }
- return nonCanceler;
- };
- });
- };
- }
- run();
- return function (killError) {
- return new Aff(ASYNC, function (killCb) {
- return function () {
- return cancel(killError, killCb);
- };
- });
- };
- }
- function sequential(util, supervisor, par) {
- return new Aff(ASYNC, function (cb) {
- return function () {
- return runPar(util, supervisor, par, cb);
- };
- });
- }
- Aff.EMPTY = EMPTY;
- Aff.Pure = AffCtr(PURE);
- Aff.Throw = AffCtr(THROW);
- Aff.Catch = AffCtr(CATCH);
- Aff.Sync = AffCtr(SYNC);
- Aff.Async = AffCtr(ASYNC);
- Aff.Bind = AffCtr(BIND);
- Aff.Bracket = AffCtr(BRACKET);
- Aff.Fork = AffCtr(FORK);
- Aff.Seq = AffCtr(SEQ);
- Aff.ParMap = AffCtr(MAP);
- Aff.ParApply = AffCtr(APPLY);
- Aff.ParAlt = AffCtr(ALT);
- Aff.Fiber = Fiber;
- Aff.Supervisor = Supervisor;
- Aff.Scheduler = Scheduler;
- Aff.nonCanceler = nonCanceler;
- return Aff;
- }();
- exports._pure = Aff.Pure;
- exports._throwError = Aff.Throw;
- exports._catchError = function (aff) {
- return function (k) {
- return Aff.Catch(aff, k);
- };
- };
- exports._map = function (f) {
- return function (aff) {
- if (aff.tag === Aff.Pure.tag) {
- return Aff.Pure(f(aff._1));
- } else {
- return Aff.Bind(aff, function (value) {
- return Aff.Pure(f(value));
- });
- }
- };
- };
- exports._bind = function (aff) {
- return function (k) {
- return Aff.Bind(aff, k);
- };
- };
- exports._fork = function (immediate) {
- return function (aff) {
- return Aff.Fork(immediate, aff);
- };
- };
- exports._liftEffect = Aff.Sync;
- exports._parAffMap = function (f) {
- return function (aff) {
- return Aff.ParMap(f, aff);
- };
- };
- exports._parAffApply = function (aff1) {
- return function (aff2) {
- return Aff.ParApply(aff1, aff2);
- };
- };
- exports._parAffAlt = function (aff1) {
- return function (aff2) {
- return Aff.ParAlt(aff1, aff2);
- };
- };
- exports.makeAff = Aff.Async;
- exports.generalBracket = function (acquire) {
- return function (options) {
- return function (k) {
- return Aff.Bracket(acquire, options, k);
- };
- };
- };
- exports._makeFiber = function (util, aff) {
- return function () {
- return Aff.Fiber(util, null, aff);
- };
- };
- exports._makeSupervisedFiber = function (util, aff) {
- return function () {
- var supervisor = Aff.Supervisor(util);
- return {
- fiber: Aff.Fiber(util, supervisor, aff),
- supervisor: supervisor
- };
- };
- };
- exports._killAll = function (error, supervisor, cb) {
- return supervisor.killAll(error, cb);
- };
- exports._delay = function () {
- function setDelay(n, k) {
- if (n === 0 && typeof setImmediate !== "undefined") {
- return setImmediate(k);
- } else {
- return setTimeout(k, n);
- }
- }
- function clearDelay(n, t) {
- if (n === 0 && typeof clearImmediate !== "undefined") {
- return clearImmediate(t);
- } else {
- return clearTimeout(t);
- }
- }
- return function (right, ms) {
- return Aff.Async(function (cb) {
- return function () {
- var timer = setDelay(ms, cb(right()));
- return function () {
- return Aff.Sync(function () {
- return right(clearDelay(ms, timer));
- });
- };
- };
- });
- };
- }();
- exports._sequential = Aff.Seq;
- },{}],"../output/Control.Monad.Cont.Trans/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Monad = require("../Control.Monad/index.js");
- var Control_Monad_Cont_Class = require("../Control.Monad.Cont.Class/index.js");
- var Control_Monad_Reader_Class = require("../Control.Monad.Reader.Class/index.js");
- var Control_Monad_State_Class = require("../Control.Monad.State.Class/index.js");
- var Control_Monad_Trans_Class = require("../Control.Monad.Trans.Class/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Effect_Class = require("../Effect.Class/index.js");
- var ContT = function ContT(x) {
- return x;
- };
- var withContT = function withContT(f) {
- return function (v) {
- return function (k) {
- return v(f(k));
- };
- };
- };
- var runContT = function runContT(v) {
- return function (k) {
- return v(k);
- };
- };
- var newtypeContT = new Data_Newtype.Newtype(function (n) {
- return n;
- }, ContT);
- var monadTransContT = new Control_Monad_Trans_Class.MonadTrans(function (dictMonad) {
- return function (m) {
- return function (k) {
- return Control_Bind.bind(dictMonad.Bind1())(m)(k);
- };
- };
- });
- var mapContT = function mapContT(f) {
- return function (v) {
- return function (k) {
- return f(v(k));
- };
- };
- };
- var functorContT = function functorContT(dictFunctor) {
- return new Data_Functor.Functor(function (f) {
- return function (v) {
- return function (k) {
- return v(function (a) {
- return k(f(a));
- });
- };
- };
- });
- };
- var applyContT = function applyContT(dictApply) {
- return new Control_Apply.Apply(function () {
- return functorContT(dictApply.Functor0());
- }, function (v) {
- return function (v1) {
- return function (k) {
- return v(function (g) {
- return v1(function (a) {
- return k(g(a));
- });
- });
- };
- };
- });
- };
- var bindContT = function bindContT(dictBind) {
- return new Control_Bind.Bind(function () {
- return applyContT(dictBind.Apply0());
- }, function (v) {
- return function (k) {
- return function (k$prime) {
- return v(function (a) {
- var v1 = k(a);
- return v1(k$prime);
- });
- };
- };
- });
- };
- var applicativeContT = function applicativeContT(dictApplicative) {
- return new Control_Applicative.Applicative(function () {
- return applyContT(dictApplicative.Apply0());
- }, function (a) {
- return function (k) {
- return k(a);
- };
- });
- };
- var monadContT = function monadContT(dictMonad) {
- return new Control_Monad.Monad(function () {
- return applicativeContT(dictMonad.Applicative0());
- }, function () {
- return bindContT(dictMonad.Bind1());
- });
- };
- var monadAskContT = function monadAskContT(dictMonadAsk) {
- return new Control_Monad_Reader_Class.MonadAsk(function () {
- return monadContT(dictMonadAsk.Monad0());
- }, Control_Monad_Trans_Class.lift(monadTransContT)(dictMonadAsk.Monad0())(Control_Monad_Reader_Class.ask(dictMonadAsk)));
- };
- var monadReaderContT = function monadReaderContT(dictMonadReader) {
- return new Control_Monad_Reader_Class.MonadReader(function () {
- return monadAskContT(dictMonadReader.MonadAsk0());
- }, function (f) {
- return function (v) {
- return function (k) {
- return Control_Bind.bind(dictMonadReader.MonadAsk0().Monad0().Bind1())(Control_Monad_Reader_Class.ask(dictMonadReader.MonadAsk0()))(function (r) {
- return Control_Monad_Reader_Class.local(dictMonadReader)(f)(v(function () {
- var $43 = Control_Monad_Reader_Class.local(dictMonadReader)(Data_Function["const"](r));
- return function ($44) {
- return $43(k($44));
- };
- }()));
- });
- };
- };
- });
- };
- var monadContContT = function monadContContT(dictMonad) {
- return new Control_Monad_Cont_Class.MonadCont(function () {
- return monadContT(dictMonad);
- }, function (f) {
- return function (k) {
- var v = f(function (a) {
- return function (v1) {
- return k(a);
- };
- });
- return v(k);
- };
- });
- };
- var monadEffectContT = function monadEffectContT(dictMonadEffect) {
- return new Effect_Class.MonadEffect(function () {
- return monadContT(dictMonadEffect.Monad0());
- }, function () {
- var $45 = Control_Monad_Trans_Class.lift(monadTransContT)(dictMonadEffect.Monad0());
- var $46 = Effect_Class.liftEffect(dictMonadEffect);
- return function ($47) {
- return $45($46($47));
- };
- }());
- };
- var monadStateContT = function monadStateContT(dictMonadState) {
- return new Control_Monad_State_Class.MonadState(function () {
- return monadContT(dictMonadState.Monad0());
- }, function () {
- var $48 = Control_Monad_Trans_Class.lift(monadTransContT)(dictMonadState.Monad0());
- var $49 = Control_Monad_State_Class.state(dictMonadState);
- return function ($50) {
- return $48($49($50));
- };
- }());
- };
- module.exports = {
- ContT: ContT,
- runContT: runContT,
- mapContT: mapContT,
- withContT: withContT,
- newtypeContT: newtypeContT,
- monadContContT: monadContContT,
- functorContT: functorContT,
- applyContT: applyContT,
- applicativeContT: applicativeContT,
- bindContT: bindContT,
- monadContT: monadContT,
- monadTransContT: monadTransContT,
- monadEffectContT: monadEffectContT,
- monadAskContT: monadAskContT,
- monadReaderContT: monadReaderContT,
- monadStateContT: monadStateContT
- };
- },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Control.Monad.Cont.Class/index.js":"../output/Control.Monad.Cont.Class/index.js","../Control.Monad.Reader.Class/index.js":"../output/Control.Monad.Reader.Class/index.js","../Control.Monad.State.Class/index.js":"../output/Control.Monad.State.Class/index.js","../Control.Monad.Trans.Class/index.js":"../output/Control.Monad.Trans.Class/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Effect.Class/index.js":"../output/Effect.Class/index.js"}],"../output/Control.Monad.Maybe.Trans/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Alt = require("../Control.Alt/index.js");
- var Control_Alternative = require("../Control.Alternative/index.js");
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Category = require("../Control.Category/index.js");
- var Control_Monad = require("../Control.Monad/index.js");
- var Control_Monad_Cont_Class = require("../Control.Monad.Cont.Class/index.js");
- var Control_Monad_Error_Class = require("../Control.Monad.Error.Class/index.js");
- var Control_Monad_Reader_Class = require("../Control.Monad.Reader.Class/index.js");
- var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js");
- var Control_Monad_State_Class = require("../Control.Monad.State.Class/index.js");
- var Control_Monad_Trans_Class = require("../Control.Monad.Trans.Class/index.js");
- var Control_Monad_Writer_Class = require("../Control.Monad.Writer.Class/index.js");
- var Control_MonadPlus = require("../Control.MonadPlus/index.js");
- var Control_MonadZero = require("../Control.MonadZero/index.js");
- var Control_Plus = require("../Control.Plus/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Tuple = require("../Data.Tuple/index.js");
- var Effect_Class = require("../Effect.Class/index.js");
- var MaybeT = function MaybeT(x) {
- return x;
- };
- var runMaybeT = function runMaybeT(v) {
- return v;
- };
- var newtypeMaybeT = new Data_Newtype.Newtype(function (n) {
- return n;
- }, MaybeT);
- var monadTransMaybeT = new Control_Monad_Trans_Class.MonadTrans(function (dictMonad) {
- var $71 = Control_Monad.liftM1(dictMonad)(Data_Maybe.Just.create);
- return function ($72) {
- return MaybeT($71($72));
- };
- });
- var mapMaybeT = function mapMaybeT(f) {
- return function (v) {
- return f(v);
- };
- };
- var functorMaybeT = function functorMaybeT(dictFunctor) {
- return new Data_Functor.Functor(function (f) {
- return function (v) {
- return Data_Functor.map(dictFunctor)(Data_Functor.map(Data_Maybe.functorMaybe)(f))(v);
- };
- });
- };
- var monadMaybeT = function monadMaybeT(dictMonad) {
- return new Control_Monad.Monad(function () {
- return applicativeMaybeT(dictMonad);
- }, function () {
- return bindMaybeT(dictMonad);
- });
- };
- var bindMaybeT = function bindMaybeT(dictMonad) {
- return new Control_Bind.Bind(function () {
- return applyMaybeT(dictMonad);
- }, function (v) {
- return function (f) {
- return Control_Bind.bind(dictMonad.Bind1())(v)(function (v1) {
- if (v1 instanceof Data_Maybe.Nothing) {
- return Control_Applicative.pure(dictMonad.Applicative0())(Data_Maybe.Nothing.value);
- }
- ;
- if (v1 instanceof Data_Maybe.Just) {
- var v2 = f(v1.value0);
- return v2;
- }
- ;
- throw new Error("Failed pattern match at Control.Monad.Maybe.Trans (line 54, column 11 - line 56, column 42): " + [v1.constructor.name]);
- });
- };
- });
- };
- var applyMaybeT = function applyMaybeT(dictMonad) {
- return new Control_Apply.Apply(function () {
- return functorMaybeT(dictMonad.Bind1().Apply0().Functor0());
- }, Control_Monad.ap(monadMaybeT(dictMonad)));
- };
- var applicativeMaybeT = function applicativeMaybeT(dictMonad) {
- return new Control_Applicative.Applicative(function () {
- return applyMaybeT(dictMonad);
- }, function () {
- var $73 = Control_Applicative.pure(dictMonad.Applicative0());
- return function ($74) {
- return MaybeT($73(Data_Maybe.Just.create($74)));
- };
- }());
- };
- var monadAskMaybeT = function monadAskMaybeT(dictMonadAsk) {
- return new Control_Monad_Reader_Class.MonadAsk(function () {
- return monadMaybeT(dictMonadAsk.Monad0());
- }, Control_Monad_Trans_Class.lift(monadTransMaybeT)(dictMonadAsk.Monad0())(Control_Monad_Reader_Class.ask(dictMonadAsk)));
- };
- var monadReaderMaybeT = function monadReaderMaybeT(dictMonadReader) {
- return new Control_Monad_Reader_Class.MonadReader(function () {
- return monadAskMaybeT(dictMonadReader.MonadAsk0());
- }, function (f) {
- return mapMaybeT(Control_Monad_Reader_Class.local(dictMonadReader)(f));
- });
- };
- var monadContMaybeT = function monadContMaybeT(dictMonadCont) {
- return new Control_Monad_Cont_Class.MonadCont(function () {
- return monadMaybeT(dictMonadCont.Monad0());
- }, function (f) {
- return MaybeT(Control_Monad_Cont_Class.callCC(dictMonadCont)(function (c) {
- var v = f(function (a) {
- return MaybeT(c(new Data_Maybe.Just(a)));
- });
- return v;
- }));
- });
- };
- var monadEffectMaybe = function monadEffectMaybe(dictMonadEffect) {
- return new Effect_Class.MonadEffect(function () {
- return monadMaybeT(dictMonadEffect.Monad0());
- }, function () {
- var $75 = Control_Monad_Trans_Class.lift(monadTransMaybeT)(dictMonadEffect.Monad0());
- var $76 = Effect_Class.liftEffect(dictMonadEffect);
- return function ($77) {
- return $75($76($77));
- };
- }());
- };
- var monadRecMaybeT = function monadRecMaybeT(dictMonadRec) {
- return new Control_Monad_Rec_Class.MonadRec(function () {
- return monadMaybeT(dictMonadRec.Monad0());
- }, function (f) {
- var $78 = Control_Monad_Rec_Class.tailRecM(dictMonadRec)(function (a) {
- var v = f(a);
- return Control_Bind.bind(dictMonadRec.Monad0().Bind1())(v)(function (m$prime) {
- return Control_Applicative.pure(dictMonadRec.Monad0().Applicative0())(function () {
- if (m$prime instanceof Data_Maybe.Nothing) {
- return new Control_Monad_Rec_Class.Done(Data_Maybe.Nothing.value);
- }
- ;
- if (m$prime instanceof Data_Maybe.Just && m$prime.value0 instanceof Control_Monad_Rec_Class.Loop) {
- return new Control_Monad_Rec_Class.Loop(m$prime.value0.value0);
- }
- ;
- if (m$prime instanceof Data_Maybe.Just && m$prime.value0 instanceof Control_Monad_Rec_Class.Done) {
- return new Control_Monad_Rec_Class.Done(new Data_Maybe.Just(m$prime.value0.value0));
- }
- ;
- throw new Error("Failed pattern match at Control.Monad.Maybe.Trans (line 84, column 16 - line 87, column 43): " + [m$prime.constructor.name]);
- }());
- });
- });
- return function ($79) {
- return MaybeT($78($79));
- };
- });
- };
- var monadStateMaybeT = function monadStateMaybeT(dictMonadState) {
- return new Control_Monad_State_Class.MonadState(function () {
- return monadMaybeT(dictMonadState.Monad0());
- }, function (f) {
- return Control_Monad_Trans_Class.lift(monadTransMaybeT)(dictMonadState.Monad0())(Control_Monad_State_Class.state(dictMonadState)(f));
- });
- };
- var monadTellMaybeT = function monadTellMaybeT(dictMonadTell) {
- return new Control_Monad_Writer_Class.MonadTell(function () {
- return monadMaybeT(dictMonadTell.Monad0());
- }, function () {
- var $80 = Control_Monad_Trans_Class.lift(monadTransMaybeT)(dictMonadTell.Monad0());
- var $81 = Control_Monad_Writer_Class.tell(dictMonadTell);
- return function ($82) {
- return $80($81($82));
- };
- }());
- };
- var monadWriterMaybeT = function monadWriterMaybeT(dictMonadWriter) {
- return new Control_Monad_Writer_Class.MonadWriter(function () {
- return monadTellMaybeT(dictMonadWriter.MonadTell0());
- }, mapMaybeT(function (m) {
- return Control_Bind.bind(dictMonadWriter.MonadTell0().Monad0().Bind1())(Control_Monad_Writer_Class.listen(dictMonadWriter)(m))(function (v) {
- return Control_Applicative.pure(dictMonadWriter.MonadTell0().Monad0().Applicative0())(Data_Functor.map(Data_Maybe.functorMaybe)(function (r) {
- return new Data_Tuple.Tuple(r, v.value1);
- })(v.value0));
- });
- }), mapMaybeT(function (m) {
- return Control_Monad_Writer_Class.pass(dictMonadWriter)(Control_Bind.bind(dictMonadWriter.MonadTell0().Monad0().Bind1())(m)(function (a) {
- return Control_Applicative.pure(dictMonadWriter.MonadTell0().Monad0().Applicative0())(function () {
- if (a instanceof Data_Maybe.Nothing) {
- return new Data_Tuple.Tuple(Data_Maybe.Nothing.value, Control_Category.identity(Control_Category.categoryFn));
- }
- ;
- if (a instanceof Data_Maybe.Just) {
- return new Data_Tuple.Tuple(new Data_Maybe.Just(a.value0.value0), a.value0.value1);
- }
- ;
- throw new Error("Failed pattern match at Control.Monad.Maybe.Trans (line 121, column 10 - line 123, column 43): " + [a.constructor.name]);
- }());
- }));
- }));
- };
- var monadThrowMaybeT = function monadThrowMaybeT(dictMonadThrow) {
- return new Control_Monad_Error_Class.MonadThrow(function () {
- return monadMaybeT(dictMonadThrow.Monad0());
- }, function (e) {
- return Control_Monad_Trans_Class.lift(monadTransMaybeT)(dictMonadThrow.Monad0())(Control_Monad_Error_Class.throwError(dictMonadThrow)(e));
- });
- };
- var monadErrorMaybeT = function monadErrorMaybeT(dictMonadError) {
- return new Control_Monad_Error_Class.MonadError(function () {
- return monadThrowMaybeT(dictMonadError.MonadThrow0());
- }, function (v) {
- return function (h) {
- return MaybeT(Control_Monad_Error_Class.catchError(dictMonadError)(v)(function (a) {
- var v1 = h(a);
- return v1;
- }));
- };
- });
- };
- var altMaybeT = function altMaybeT(dictMonad) {
- return new Control_Alt.Alt(function () {
- return functorMaybeT(dictMonad.Bind1().Apply0().Functor0());
- }, function (v) {
- return function (v1) {
- return Control_Bind.bind(dictMonad.Bind1())(v)(function (m) {
- if (m instanceof Data_Maybe.Nothing) {
- return v1;
- }
- ;
- return Control_Applicative.pure(dictMonad.Applicative0())(m);
- });
- };
- });
- };
- var plusMaybeT = function plusMaybeT(dictMonad) {
- return new Control_Plus.Plus(function () {
- return altMaybeT(dictMonad);
- }, Control_Applicative.pure(dictMonad.Applicative0())(Data_Maybe.Nothing.value));
- };
- var alternativeMaybeT = function alternativeMaybeT(dictMonad) {
- return new Control_Alternative.Alternative(function () {
- return applicativeMaybeT(dictMonad);
- }, function () {
- return plusMaybeT(dictMonad);
- });
- };
- var monadZeroMaybeT = function monadZeroMaybeT(dictMonad) {
- return new Control_MonadZero.MonadZero(function () {
- return alternativeMaybeT(dictMonad);
- }, function () {
- return monadMaybeT(dictMonad);
- });
- };
- var monadPlusMaybeT = function monadPlusMaybeT(dictMonad) {
- return new Control_MonadPlus.MonadPlus(function () {
- return monadZeroMaybeT(dictMonad);
- });
- };
- module.exports = {
- MaybeT: MaybeT,
- runMaybeT: runMaybeT,
- mapMaybeT: mapMaybeT,
- newtypeMaybeT: newtypeMaybeT,
- functorMaybeT: functorMaybeT,
- applyMaybeT: applyMaybeT,
- applicativeMaybeT: applicativeMaybeT,
- bindMaybeT: bindMaybeT,
- monadMaybeT: monadMaybeT,
- monadTransMaybeT: monadTransMaybeT,
- altMaybeT: altMaybeT,
- plusMaybeT: plusMaybeT,
- alternativeMaybeT: alternativeMaybeT,
- monadPlusMaybeT: monadPlusMaybeT,
- monadZeroMaybeT: monadZeroMaybeT,
- monadRecMaybeT: monadRecMaybeT,
- monadEffectMaybe: monadEffectMaybe,
- monadContMaybeT: monadContMaybeT,
- monadThrowMaybeT: monadThrowMaybeT,
- monadErrorMaybeT: monadErrorMaybeT,
- monadAskMaybeT: monadAskMaybeT,
- monadReaderMaybeT: monadReaderMaybeT,
- monadStateMaybeT: monadStateMaybeT,
- monadTellMaybeT: monadTellMaybeT,
- monadWriterMaybeT: monadWriterMaybeT
- };
- },{"../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Alternative/index.js":"../output/Control.Alternative/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Control.Monad.Cont.Class/index.js":"../output/Control.Monad.Cont.Class/index.js","../Control.Monad.Error.Class/index.js":"../output/Control.Monad.Error.Class/index.js","../Control.Monad.Reader.Class/index.js":"../output/Control.Monad.Reader.Class/index.js","../Control.Monad.Rec.Class/index.js":"../output/Control.Monad.Rec.Class/index.js","../Control.Monad.State.Class/index.js":"../output/Control.Monad.State.Class/index.js","../Control.Monad.Trans.Class/index.js":"../output/Control.Monad.Trans.Class/index.js","../Control.Monad.Writer.Class/index.js":"../output/Control.Monad.Writer.Class/index.js","../Control.MonadPlus/index.js":"../output/Control.MonadPlus/index.js","../Control.MonadZero/index.js":"../output/Control.MonadZero/index.js","../Control.Plus/index.js":"../output/Control.Plus/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js","../Effect.Class/index.js":"../output/Effect.Class/index.js"}],"../output/Control.Monad.Reader.Trans/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Alt = require("../Control.Alt/index.js");
- var Control_Alternative = require("../Control.Alternative/index.js");
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Monad = require("../Control.Monad/index.js");
- var Control_Monad_Cont_Class = require("../Control.Monad.Cont.Class/index.js");
- var Control_Monad_Error_Class = require("../Control.Monad.Error.Class/index.js");
- var Control_Monad_Reader_Class = require("../Control.Monad.Reader.Class/index.js");
- var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js");
- var Control_Monad_State_Class = require("../Control.Monad.State.Class/index.js");
- var Control_Monad_Trans_Class = require("../Control.Monad.Trans.Class/index.js");
- var Control_Monad_Writer_Class = require("../Control.Monad.Writer.Class/index.js");
- var Control_MonadPlus = require("../Control.MonadPlus/index.js");
- var Control_MonadZero = require("../Control.MonadZero/index.js");
- var Control_Plus = require("../Control.Plus/index.js");
- var Data_Distributive = require("../Data.Distributive/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Effect_Class = require("../Effect.Class/index.js");
- var ReaderT = function ReaderT(x) {
- return x;
- };
- var withReaderT = function withReaderT(f) {
- return function (v) {
- return function ($66) {
- return v(f($66));
- };
- };
- };
- var runReaderT = function runReaderT(v) {
- return v;
- };
- var newtypeReaderT = new Data_Newtype.Newtype(function (n) {
- return n;
- }, ReaderT);
- var monadTransReaderT = new Control_Monad_Trans_Class.MonadTrans(function (dictMonad) {
- return function ($67) {
- return ReaderT(Data_Function["const"]($67));
- };
- });
- var mapReaderT = function mapReaderT(f) {
- return function (v) {
- return function ($68) {
- return f(v($68));
- };
- };
- };
- var functorReaderT = function functorReaderT(dictFunctor) {
- return new Data_Functor.Functor(function () {
- var $69 = Data_Functor.map(dictFunctor);
- return function ($70) {
- return mapReaderT($69($70));
- };
- }());
- };
- var distributiveReaderT = function distributiveReaderT(dictDistributive) {
- return new Data_Distributive.Distributive(function () {
- return functorReaderT(dictDistributive.Functor0());
- }, function (dictFunctor) {
- return function (f) {
- var $71 = Data_Distributive.distribute(distributiveReaderT(dictDistributive))(dictFunctor);
- var $72 = Data_Functor.map(dictFunctor)(f);
- return function ($73) {
- return $71($72($73));
- };
- };
- }, function (dictFunctor) {
- return function (a) {
- return function (e) {
- return Data_Distributive.collect(dictDistributive)(dictFunctor)(function (r) {
- return r(e);
- })(a);
- };
- };
- });
- };
- var applyReaderT = function applyReaderT(dictApply) {
- return new Control_Apply.Apply(function () {
- return functorReaderT(dictApply.Functor0());
- }, function (v) {
- return function (v1) {
- return function (r) {
- return Control_Apply.apply(dictApply)(v(r))(v1(r));
- };
- };
- });
- };
- var bindReaderT = function bindReaderT(dictBind) {
- return new Control_Bind.Bind(function () {
- return applyReaderT(dictBind.Apply0());
- }, function (v) {
- return function (k) {
- return function (r) {
- return Control_Bind.bind(dictBind)(v(r))(function (a) {
- var v1 = k(a);
- return v1(r);
- });
- };
- };
- });
- };
- var semigroupReaderT = function semigroupReaderT(dictApply) {
- return function (dictSemigroup) {
- return new Data_Semigroup.Semigroup(Control_Apply.lift2(applyReaderT(dictApply))(Data_Semigroup.append(dictSemigroup)));
- };
- };
- var applicativeReaderT = function applicativeReaderT(dictApplicative) {
- return new Control_Applicative.Applicative(function () {
- return applyReaderT(dictApplicative.Apply0());
- }, function () {
- var $74 = Control_Applicative.pure(dictApplicative);
- return function ($75) {
- return ReaderT(Data_Function["const"]($74($75)));
- };
- }());
- };
- var monadReaderT = function monadReaderT(dictMonad) {
- return new Control_Monad.Monad(function () {
- return applicativeReaderT(dictMonad.Applicative0());
- }, function () {
- return bindReaderT(dictMonad.Bind1());
- });
- };
- var monadAskReaderT = function monadAskReaderT(dictMonad) {
- return new Control_Monad_Reader_Class.MonadAsk(function () {
- return monadReaderT(dictMonad);
- }, Control_Applicative.pure(dictMonad.Applicative0()));
- };
- var monadReaderReaderT = function monadReaderReaderT(dictMonad) {
- return new Control_Monad_Reader_Class.MonadReader(function () {
- return monadAskReaderT(dictMonad);
- }, withReaderT);
- };
- var monadContReaderT = function monadContReaderT(dictMonadCont) {
- return new Control_Monad_Cont_Class.MonadCont(function () {
- return monadReaderT(dictMonadCont.Monad0());
- }, function (f) {
- return function (r) {
- return Control_Monad_Cont_Class.callCC(dictMonadCont)(function (c) {
- var v = f(function ($76) {
- return ReaderT(Data_Function["const"](c($76)));
- });
- return v(r);
- });
- };
- });
- };
- var monadEffectReader = function monadEffectReader(dictMonadEffect) {
- return new Effect_Class.MonadEffect(function () {
- return monadReaderT(dictMonadEffect.Monad0());
- }, function () {
- var $77 = Control_Monad_Trans_Class.lift(monadTransReaderT)(dictMonadEffect.Monad0());
- var $78 = Effect_Class.liftEffect(dictMonadEffect);
- return function ($79) {
- return $77($78($79));
- };
- }());
- };
- var monadRecReaderT = function monadRecReaderT(dictMonadRec) {
- return new Control_Monad_Rec_Class.MonadRec(function () {
- return monadReaderT(dictMonadRec.Monad0());
- }, function (k) {
- return function (a) {
- var k$prime = function k$prime(r) {
- return function (a$prime) {
- var v = k(a$prime);
- return Control_Bind.bindFlipped(dictMonadRec.Monad0().Bind1())(Control_Applicative.pure(dictMonadRec.Monad0().Applicative0()))(v(r));
- };
- };
- return function (r) {
- return Control_Monad_Rec_Class.tailRecM(dictMonadRec)(k$prime(r))(a);
- };
- };
- });
- };
- var monadStateReaderT = function monadStateReaderT(dictMonadState) {
- return new Control_Monad_State_Class.MonadState(function () {
- return monadReaderT(dictMonadState.Monad0());
- }, function () {
- var $80 = Control_Monad_Trans_Class.lift(monadTransReaderT)(dictMonadState.Monad0());
- var $81 = Control_Monad_State_Class.state(dictMonadState);
- return function ($82) {
- return $80($81($82));
- };
- }());
- };
- var monadTellReaderT = function monadTellReaderT(dictMonadTell) {
- return new Control_Monad_Writer_Class.MonadTell(function () {
- return monadReaderT(dictMonadTell.Monad0());
- }, function () {
- var $83 = Control_Monad_Trans_Class.lift(monadTransReaderT)(dictMonadTell.Monad0());
- var $84 = Control_Monad_Writer_Class.tell(dictMonadTell);
- return function ($85) {
- return $83($84($85));
- };
- }());
- };
- var monadWriterReaderT = function monadWriterReaderT(dictMonadWriter) {
- return new Control_Monad_Writer_Class.MonadWriter(function () {
- return monadTellReaderT(dictMonadWriter.MonadTell0());
- }, mapReaderT(Control_Monad_Writer_Class.listen(dictMonadWriter)), mapReaderT(Control_Monad_Writer_Class.pass(dictMonadWriter)));
- };
- var monadThrowReaderT = function monadThrowReaderT(dictMonadThrow) {
- return new Control_Monad_Error_Class.MonadThrow(function () {
- return monadReaderT(dictMonadThrow.Monad0());
- }, function () {
- var $86 = Control_Monad_Trans_Class.lift(monadTransReaderT)(dictMonadThrow.Monad0());
- var $87 = Control_Monad_Error_Class.throwError(dictMonadThrow);
- return function ($88) {
- return $86($87($88));
- };
- }());
- };
- var monadErrorReaderT = function monadErrorReaderT(dictMonadError) {
- return new Control_Monad_Error_Class.MonadError(function () {
- return monadThrowReaderT(dictMonadError.MonadThrow0());
- }, function (v) {
- return function (h) {
- return function (r) {
- return Control_Monad_Error_Class.catchError(dictMonadError)(v(r))(function (e) {
- var v1 = h(e);
- return v1(r);
- });
- };
- };
- });
- };
- var monoidReaderT = function monoidReaderT(dictApplicative) {
- return function (dictMonoid) {
- return new Data_Monoid.Monoid(function () {
- return semigroupReaderT(dictApplicative.Apply0())(dictMonoid.Semigroup0());
- }, Control_Applicative.pure(applicativeReaderT(dictApplicative))(Data_Monoid.mempty(dictMonoid)));
- };
- };
- var altReaderT = function altReaderT(dictAlt) {
- return new Control_Alt.Alt(function () {
- return functorReaderT(dictAlt.Functor0());
- }, function (v) {
- return function (v1) {
- return function (r) {
- return Control_Alt.alt(dictAlt)(v(r))(v1(r));
- };
- };
- });
- };
- var plusReaderT = function plusReaderT(dictPlus) {
- return new Control_Plus.Plus(function () {
- return altReaderT(dictPlus.Alt0());
- }, Data_Function["const"](Control_Plus.empty(dictPlus)));
- };
- var alternativeReaderT = function alternativeReaderT(dictAlternative) {
- return new Control_Alternative.Alternative(function () {
- return applicativeReaderT(dictAlternative.Applicative0());
- }, function () {
- return plusReaderT(dictAlternative.Plus1());
- });
- };
- var monadZeroReaderT = function monadZeroReaderT(dictMonadZero) {
- return new Control_MonadZero.MonadZero(function () {
- return alternativeReaderT(dictMonadZero.Alternative1());
- }, function () {
- return monadReaderT(dictMonadZero.Monad0());
- });
- };
- var monadPlusReaderT = function monadPlusReaderT(dictMonadPlus) {
- return new Control_MonadPlus.MonadPlus(function () {
- return monadZeroReaderT(dictMonadPlus.MonadZero0());
- });
- };
- module.exports = {
- ReaderT: ReaderT,
- runReaderT: runReaderT,
- withReaderT: withReaderT,
- mapReaderT: mapReaderT,
- newtypeReaderT: newtypeReaderT,
- functorReaderT: functorReaderT,
- applyReaderT: applyReaderT,
- applicativeReaderT: applicativeReaderT,
- altReaderT: altReaderT,
- plusReaderT: plusReaderT,
- alternativeReaderT: alternativeReaderT,
- bindReaderT: bindReaderT,
- monadReaderT: monadReaderT,
- monadZeroReaderT: monadZeroReaderT,
- semigroupReaderT: semigroupReaderT,
- monoidReaderT: monoidReaderT,
- monadPlusReaderT: monadPlusReaderT,
- monadTransReaderT: monadTransReaderT,
- monadEffectReader: monadEffectReader,
- monadContReaderT: monadContReaderT,
- monadThrowReaderT: monadThrowReaderT,
- monadErrorReaderT: monadErrorReaderT,
- monadAskReaderT: monadAskReaderT,
- monadReaderReaderT: monadReaderReaderT,
- monadStateReaderT: monadStateReaderT,
- monadTellReaderT: monadTellReaderT,
- monadWriterReaderT: monadWriterReaderT,
- distributiveReaderT: distributiveReaderT,
- monadRecReaderT: monadRecReaderT
- };
- },{"../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Alternative/index.js":"../output/Control.Alternative/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Control.Monad.Cont.Class/index.js":"../output/Control.Monad.Cont.Class/index.js","../Control.Monad.Error.Class/index.js":"../output/Control.Monad.Error.Class/index.js","../Control.Monad.Reader.Class/index.js":"../output/Control.Monad.Reader.Class/index.js","../Control.Monad.Rec.Class/index.js":"../output/Control.Monad.Rec.Class/index.js","../Control.Monad.State.Class/index.js":"../output/Control.Monad.State.Class/index.js","../Control.Monad.Trans.Class/index.js":"../output/Control.Monad.Trans.Class/index.js","../Control.Monad.Writer.Class/index.js":"../output/Control.Monad.Writer.Class/index.js","../Control.MonadPlus/index.js":"../output/Control.MonadPlus/index.js","../Control.MonadZero/index.js":"../output/Control.MonadZero/index.js","../Control.Plus/index.js":"../output/Control.Plus/index.js","../Data.Distributive/index.js":"../output/Data.Distributive/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Effect.Class/index.js":"../output/Effect.Class/index.js"}],"../output/Control.Monad.Writer.Trans/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Alt = require("../Control.Alt/index.js");
- var Control_Alternative = require("../Control.Alternative/index.js");
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Monad = require("../Control.Monad/index.js");
- var Control_Monad_Cont_Class = require("../Control.Monad.Cont.Class/index.js");
- var Control_Monad_Error_Class = require("../Control.Monad.Error.Class/index.js");
- var Control_Monad_Reader_Class = require("../Control.Monad.Reader.Class/index.js");
- var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js");
- var Control_Monad_State_Class = require("../Control.Monad.State.Class/index.js");
- var Control_Monad_Trans_Class = require("../Control.Monad.Trans.Class/index.js");
- var Control_Monad_Writer_Class = require("../Control.Monad.Writer.Class/index.js");
- var Control_MonadPlus = require("../Control.MonadPlus/index.js");
- var Control_MonadZero = require("../Control.MonadZero/index.js");
- var Control_Plus = require("../Control.Plus/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Tuple = require("../Data.Tuple/index.js");
- var Data_Unit = require("../Data.Unit/index.js");
- var Effect_Class = require("../Effect.Class/index.js");
- var WriterT = function WriterT(x) {
- return x;
- };
- var runWriterT = function runWriterT(v) {
- return v;
- };
- var newtypeWriterT = new Data_Newtype.Newtype(function (n) {
- return n;
- }, WriterT);
- var monadTransWriterT = function monadTransWriterT(dictMonoid) {
- return new Control_Monad_Trans_Class.MonadTrans(function (dictMonad) {
- return function (m) {
- return Control_Bind.bind(dictMonad.Bind1())(m)(function (a) {
- return Control_Applicative.pure(dictMonad.Applicative0())(new Data_Tuple.Tuple(a, Data_Monoid.mempty(dictMonoid)));
- });
- };
- });
- };
- var mapWriterT = function mapWriterT(f) {
- return function (v) {
- return f(v);
- };
- };
- var functorWriterT = function functorWriterT(dictFunctor) {
- return new Data_Functor.Functor(function (f) {
- return mapWriterT(Data_Functor.map(dictFunctor)(function (v) {
- return new Data_Tuple.Tuple(f(v.value0), v.value1);
- }));
- });
- };
- var execWriterT = function execWriterT(dictFunctor) {
- return function (v) {
- return Data_Functor.map(dictFunctor)(Data_Tuple.snd)(v);
- };
- };
- var applyWriterT = function applyWriterT(dictSemigroup) {
- return function (dictApply) {
- return new Control_Apply.Apply(function () {
- return functorWriterT(dictApply.Functor0());
- }, function (v) {
- return function (v1) {
- var k = function k(v3) {
- return function (v4) {
- return new Data_Tuple.Tuple(v3.value0(v4.value0), Data_Semigroup.append(dictSemigroup)(v3.value1)(v4.value1));
- };
- };
- return Control_Apply.apply(dictApply)(Data_Functor.map(dictApply.Functor0())(k)(v))(v1);
- };
- });
- };
- };
- var bindWriterT = function bindWriterT(dictSemigroup) {
- return function (dictBind) {
- return new Control_Bind.Bind(function () {
- return applyWriterT(dictSemigroup)(dictBind.Apply0());
- }, function (v) {
- return function (k) {
- return WriterT(Control_Bind.bind(dictBind)(v)(function (v1) {
- var v2 = k(v1.value0);
- return Data_Functor.map(dictBind.Apply0().Functor0())(function (v3) {
- return new Data_Tuple.Tuple(v3.value0, Data_Semigroup.append(dictSemigroup)(v1.value1)(v3.value1));
- })(v2);
- }));
- };
- });
- };
- };
- var applicativeWriterT = function applicativeWriterT(dictMonoid) {
- return function (dictApplicative) {
- return new Control_Applicative.Applicative(function () {
- return applyWriterT(dictMonoid.Semigroup0())(dictApplicative.Apply0());
- }, function (a) {
- return WriterT(Control_Applicative.pure(dictApplicative)(new Data_Tuple.Tuple(a, Data_Monoid.mempty(dictMonoid))));
- });
- };
- };
- var monadWriterT = function monadWriterT(dictMonoid) {
- return function (dictMonad) {
- return new Control_Monad.Monad(function () {
- return applicativeWriterT(dictMonoid)(dictMonad.Applicative0());
- }, function () {
- return bindWriterT(dictMonoid.Semigroup0())(dictMonad.Bind1());
- });
- };
- };
- var monadAskWriterT = function monadAskWriterT(dictMonoid) {
- return function (dictMonadAsk) {
- return new Control_Monad_Reader_Class.MonadAsk(function () {
- return monadWriterT(dictMonoid)(dictMonadAsk.Monad0());
- }, Control_Monad_Trans_Class.lift(monadTransWriterT(dictMonoid))(dictMonadAsk.Monad0())(Control_Monad_Reader_Class.ask(dictMonadAsk)));
- };
- };
- var monadReaderWriterT = function monadReaderWriterT(dictMonoid) {
- return function (dictMonadReader) {
- return new Control_Monad_Reader_Class.MonadReader(function () {
- return monadAskWriterT(dictMonoid)(dictMonadReader.MonadAsk0());
- }, function (f) {
- return mapWriterT(Control_Monad_Reader_Class.local(dictMonadReader)(f));
- });
- };
- };
- var monadContWriterT = function monadContWriterT(dictMonoid) {
- return function (dictMonadCont) {
- return new Control_Monad_Cont_Class.MonadCont(function () {
- return monadWriterT(dictMonoid)(dictMonadCont.Monad0());
- }, function (f) {
- return WriterT(Control_Monad_Cont_Class.callCC(dictMonadCont)(function (c) {
- var v = f(function (a) {
- return WriterT(c(new Data_Tuple.Tuple(a, Data_Monoid.mempty(dictMonoid))));
- });
- return v;
- }));
- });
- };
- };
- var monadEffectWriter = function monadEffectWriter(dictMonoid) {
- return function (dictMonadEffect) {
- return new Effect_Class.MonadEffect(function () {
- return monadWriterT(dictMonoid)(dictMonadEffect.Monad0());
- }, function () {
- var $121 = Control_Monad_Trans_Class.lift(monadTransWriterT(dictMonoid))(dictMonadEffect.Monad0());
- var $122 = Effect_Class.liftEffect(dictMonadEffect);
- return function ($123) {
- return $121($122($123));
- };
- }());
- };
- };
- var monadRecWriterT = function monadRecWriterT(dictMonoid) {
- return function (dictMonadRec) {
- return new Control_Monad_Rec_Class.MonadRec(function () {
- return monadWriterT(dictMonoid)(dictMonadRec.Monad0());
- }, function (f) {
- return function (a) {
- var f$prime = function f$prime(v) {
- var v1 = f(v.value0);
- return Control_Bind.bind(dictMonadRec.Monad0().Bind1())(v1)(function (v2) {
- return Control_Applicative.pure(dictMonadRec.Monad0().Applicative0())(function () {
- if (v2.value0 instanceof Control_Monad_Rec_Class.Loop) {
- return new Control_Monad_Rec_Class.Loop(new Data_Tuple.Tuple(v2.value0.value0, Data_Semigroup.append(dictMonoid.Semigroup0())(v.value1)(v2.value1)));
- }
- ;
- if (v2.value0 instanceof Control_Monad_Rec_Class.Done) {
- return new Control_Monad_Rec_Class.Done(new Data_Tuple.Tuple(v2.value0.value0, Data_Semigroup.append(dictMonoid.Semigroup0())(v.value1)(v2.value1)));
- }
- ;
- throw new Error("Failed pattern match at Control.Monad.Writer.Trans (line 83, column 16 - line 85, column 47): " + [v2.value0.constructor.name]);
- }());
- });
- };
- return WriterT(Control_Monad_Rec_Class.tailRecM(dictMonadRec)(f$prime)(new Data_Tuple.Tuple(a, Data_Monoid.mempty(dictMonoid))));
- };
- });
- };
- };
- var monadStateWriterT = function monadStateWriterT(dictMonoid) {
- return function (dictMonadState) {
- return new Control_Monad_State_Class.MonadState(function () {
- return monadWriterT(dictMonoid)(dictMonadState.Monad0());
- }, function (f) {
- return Control_Monad_Trans_Class.lift(monadTransWriterT(dictMonoid))(dictMonadState.Monad0())(Control_Monad_State_Class.state(dictMonadState)(f));
- });
- };
- };
- var monadTellWriterT = function monadTellWriterT(dictMonoid) {
- return function (dictMonad) {
- return new Control_Monad_Writer_Class.MonadTell(function () {
- return monadWriterT(dictMonoid)(dictMonad);
- }, function () {
- var $124 = Control_Applicative.pure(dictMonad.Applicative0());
- var $125 = Data_Tuple.Tuple.create(Data_Unit.unit);
- return function ($126) {
- return WriterT($124($125($126)));
- };
- }());
- };
- };
- var monadWriterWriterT = function monadWriterWriterT(dictMonoid) {
- return function (dictMonad) {
- return new Control_Monad_Writer_Class.MonadWriter(function () {
- return monadTellWriterT(dictMonoid)(dictMonad);
- }, function (v) {
- return Control_Bind.bind(dictMonad.Bind1())(v)(function (v1) {
- return Control_Applicative.pure(dictMonad.Applicative0())(new Data_Tuple.Tuple(new Data_Tuple.Tuple(v1.value0, v1.value1), v1.value1));
- });
- }, function (v) {
- return Control_Bind.bind(dictMonad.Bind1())(v)(function (v1) {
- return Control_Applicative.pure(dictMonad.Applicative0())(new Data_Tuple.Tuple(v1.value0.value0, v1.value0.value1(v1.value1)));
- });
- });
- };
- };
- var monadThrowWriterT = function monadThrowWriterT(dictMonoid) {
- return function (dictMonadThrow) {
- return new Control_Monad_Error_Class.MonadThrow(function () {
- return monadWriterT(dictMonoid)(dictMonadThrow.Monad0());
- }, function (e) {
- return Control_Monad_Trans_Class.lift(monadTransWriterT(dictMonoid))(dictMonadThrow.Monad0())(Control_Monad_Error_Class.throwError(dictMonadThrow)(e));
- });
- };
- };
- var monadErrorWriterT = function monadErrorWriterT(dictMonoid) {
- return function (dictMonadError) {
- return new Control_Monad_Error_Class.MonadError(function () {
- return monadThrowWriterT(dictMonoid)(dictMonadError.MonadThrow0());
- }, function (v) {
- return function (h) {
- return WriterT(Control_Monad_Error_Class.catchError(dictMonadError)(v)(function (e) {
- var v1 = h(e);
- return v1;
- }));
- };
- });
- };
- };
- var altWriterT = function altWriterT(dictAlt) {
- return new Control_Alt.Alt(function () {
- return functorWriterT(dictAlt.Functor0());
- }, function (v) {
- return function (v1) {
- return Control_Alt.alt(dictAlt)(v)(v1);
- };
- });
- };
- var plusWriterT = function plusWriterT(dictPlus) {
- return new Control_Plus.Plus(function () {
- return altWriterT(dictPlus.Alt0());
- }, Control_Plus.empty(dictPlus));
- };
- var alternativeWriterT = function alternativeWriterT(dictMonoid) {
- return function (dictAlternative) {
- return new Control_Alternative.Alternative(function () {
- return applicativeWriterT(dictMonoid)(dictAlternative.Applicative0());
- }, function () {
- return plusWriterT(dictAlternative.Plus1());
- });
- };
- };
- var monadZeroWriterT = function monadZeroWriterT(dictMonoid) {
- return function (dictMonadZero) {
- return new Control_MonadZero.MonadZero(function () {
- return alternativeWriterT(dictMonoid)(dictMonadZero.Alternative1());
- }, function () {
- return monadWriterT(dictMonoid)(dictMonadZero.Monad0());
- });
- };
- };
- var monadPlusWriterT = function monadPlusWriterT(dictMonoid) {
- return function (dictMonadPlus) {
- return new Control_MonadPlus.MonadPlus(function () {
- return monadZeroWriterT(dictMonoid)(dictMonadPlus.MonadZero0());
- });
- };
- };
- module.exports = {
- WriterT: WriterT,
- runWriterT: runWriterT,
- execWriterT: execWriterT,
- mapWriterT: mapWriterT,
- newtypeWriterT: newtypeWriterT,
- functorWriterT: functorWriterT,
- applyWriterT: applyWriterT,
- applicativeWriterT: applicativeWriterT,
- altWriterT: altWriterT,
- plusWriterT: plusWriterT,
- alternativeWriterT: alternativeWriterT,
- bindWriterT: bindWriterT,
- monadWriterT: monadWriterT,
- monadRecWriterT: monadRecWriterT,
- monadZeroWriterT: monadZeroWriterT,
- monadPlusWriterT: monadPlusWriterT,
- monadTransWriterT: monadTransWriterT,
- monadEffectWriter: monadEffectWriter,
- monadContWriterT: monadContWriterT,
- monadThrowWriterT: monadThrowWriterT,
- monadErrorWriterT: monadErrorWriterT,
- monadAskWriterT: monadAskWriterT,
- monadReaderWriterT: monadReaderWriterT,
- monadStateWriterT: monadStateWriterT,
- monadTellWriterT: monadTellWriterT,
- monadWriterWriterT: monadWriterWriterT
- };
- },{"../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Alternative/index.js":"../output/Control.Alternative/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Control.Monad.Cont.Class/index.js":"../output/Control.Monad.Cont.Class/index.js","../Control.Monad.Error.Class/index.js":"../output/Control.Monad.Error.Class/index.js","../Control.Monad.Reader.Class/index.js":"../output/Control.Monad.Reader.Class/index.js","../Control.Monad.Rec.Class/index.js":"../output/Control.Monad.Rec.Class/index.js","../Control.Monad.State.Class/index.js":"../output/Control.Monad.State.Class/index.js","../Control.Monad.Trans.Class/index.js":"../output/Control.Monad.Trans.Class/index.js","../Control.Monad.Writer.Class/index.js":"../output/Control.Monad.Writer.Class/index.js","../Control.MonadPlus/index.js":"../output/Control.MonadPlus/index.js","../Control.MonadZero/index.js":"../output/Control.MonadZero/index.js","../Control.Plus/index.js":"../output/Control.Plus/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js","../Effect.Class/index.js":"../output/Effect.Class/index.js"}],"../output/Data.Functor.App/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Unsafe_Coerce = require("../Unsafe.Coerce/index.js");
- var App = function App(x) {
- return x;
- };
- var traversableWithIndexApp = function traversableWithIndexApp(dictTraversableWithIndex) {
- return dictTraversableWithIndex;
- };
- var traversableApp = function traversableApp(dictTraversable) {
- return dictTraversable;
- };
- var showApp = function showApp(dictShow) {
- return new Data_Show.Show(function (v) {
- return "(App " + (Data_Show.show(dictShow)(v) + ")");
- });
- };
- var semigroupApp = function semigroupApp(dictApply) {
- return function (dictSemigroup) {
- return new Data_Semigroup.Semigroup(function (v) {
- return function (v1) {
- return Control_Apply.lift2(dictApply)(Data_Semigroup.append(dictSemigroup))(v)(v1);
- };
- });
- };
- };
- var plusApp = function plusApp(dictPlus) {
- return dictPlus;
- };
- var newtypeApp = new Data_Newtype.Newtype(function (n) {
- return n;
- }, App);
- var monoidApp = function monoidApp(dictApplicative) {
- return function (dictMonoid) {
- return new Data_Monoid.Monoid(function () {
- return semigroupApp(dictApplicative.Apply0())(dictMonoid.Semigroup0());
- }, Control_Applicative.pure(dictApplicative)(Data_Monoid.mempty(dictMonoid)));
- };
- };
- var monadZeroApp = function monadZeroApp(dictMonadZero) {
- return dictMonadZero;
- };
- var monadPlusApp = function monadPlusApp(dictMonadPlus) {
- return dictMonadPlus;
- };
- var monadApp = function monadApp(dictMonad) {
- return dictMonad;
- };
- var lazyApp = function lazyApp(dictLazy) {
- return dictLazy;
- };
- var hoistLowerApp = Unsafe_Coerce.unsafeCoerce;
- var hoistLiftApp = Unsafe_Coerce.unsafeCoerce;
- var hoistApp = function hoistApp(f) {
- return function (v) {
- return f(v);
- };
- };
- var functorWithIndexApp = function functorWithIndexApp(dictFunctorWithIndex) {
- return dictFunctorWithIndex;
- };
- var functorApp = function functorApp(dictFunctor) {
- return dictFunctor;
- };
- var foldableWithIndexApp = function foldableWithIndexApp(dictFoldableWithIndex) {
- return dictFoldableWithIndex;
- };
- var foldableApp = function foldableApp(dictFoldable) {
- return dictFoldable;
- };
- var extendApp = function extendApp(dictExtend) {
- return dictExtend;
- };
- var eqApp = function eqApp(dictEq1) {
- return function (dictEq) {
- return new Data_Eq.Eq(function (x) {
- return function (y) {
- return Data_Eq.eq1(dictEq1)(dictEq)(x)(y);
- };
- });
- };
- };
- var ordApp = function ordApp(dictOrd1) {
- return function (dictOrd) {
- return new Data_Ord.Ord(function () {
- return eqApp(dictOrd1.Eq10())(dictOrd.Eq0());
- }, function (x) {
- return function (y) {
- return Data_Ord.compare1(dictOrd1)(dictOrd)(x)(y);
- };
- });
- };
- };
- var eq1App = function eq1App(dictEq1) {
- return new Data_Eq.Eq1(function (dictEq) {
- return Data_Eq.eq(eqApp(dictEq1)(dictEq));
- });
- };
- var ord1App = function ord1App(dictOrd1) {
- return new Data_Ord.Ord1(function () {
- return eq1App(dictOrd1.Eq10());
- }, function (dictOrd) {
- return Data_Ord.compare(ordApp(dictOrd1)(dictOrd));
- });
- };
- var comonadApp = function comonadApp(dictComonad) {
- return dictComonad;
- };
- var bindApp = function bindApp(dictBind) {
- return dictBind;
- };
- var applyApp = function applyApp(dictApply) {
- return dictApply;
- };
- var applicativeApp = function applicativeApp(dictApplicative) {
- return dictApplicative;
- };
- var alternativeApp = function alternativeApp(dictAlternative) {
- return dictAlternative;
- };
- var altApp = function altApp(dictAlt) {
- return dictAlt;
- };
- module.exports = {
- App: App,
- hoistApp: hoistApp,
- hoistLiftApp: hoistLiftApp,
- hoistLowerApp: hoistLowerApp,
- newtypeApp: newtypeApp,
- eqApp: eqApp,
- eq1App: eq1App,
- ordApp: ordApp,
- ord1App: ord1App,
- showApp: showApp,
- semigroupApp: semigroupApp,
- monoidApp: monoidApp,
- functorApp: functorApp,
- functorWithIndexApp: functorWithIndexApp,
- applyApp: applyApp,
- applicativeApp: applicativeApp,
- bindApp: bindApp,
- monadApp: monadApp,
- altApp: altApp,
- plusApp: plusApp,
- alternativeApp: alternativeApp,
- monadZeroApp: monadZeroApp,
- monadPlusApp: monadPlusApp,
- lazyApp: lazyApp,
- foldableApp: foldableApp,
- traversableApp: traversableApp,
- foldableWithIndexApp: foldableWithIndexApp,
- traversableWithIndexApp: traversableWithIndexApp,
- extendApp: extendApp,
- comonadApp: comonadApp
- };
- },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Unsafe.Coerce/index.js":"../output/Unsafe.Coerce/index.js"}],"../output/Data.Functor.Compose/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Alt = require("../Control.Alt/index.js");
- var Control_Alternative = require("../Control.Alternative/index.js");
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Category = require("../Control.Category/index.js");
- var Control_Plus = require("../Control.Plus/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Foldable = require("../Data.Foldable/index.js");
- var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Functor_App = require("../Data.Functor.App/index.js");
- var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Data_Traversable = require("../Data.Traversable/index.js");
- var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js");
- var Data_Tuple = require("../Data.Tuple/index.js");
- var Compose = function Compose(x) {
- return x;
- };
- var showCompose = function showCompose(dictShow) {
- return new Data_Show.Show(function (v) {
- return "(Compose " + (Data_Show.show(dictShow)(v) + ")");
- });
- };
- var newtypeCompose = new Data_Newtype.Newtype(function (n) {
- return n;
- }, Compose);
- var functorCompose = function functorCompose(dictFunctor) {
- return function (dictFunctor1) {
- return new Data_Functor.Functor(function (f) {
- return function (v) {
- return Compose(Data_Functor.map(dictFunctor)(Data_Functor.map(dictFunctor1)(f))(v));
- };
- });
- };
- };
- var functorWithIndexCompose = function functorWithIndexCompose(dictFunctorWithIndex) {
- return function (dictFunctorWithIndex1) {
- return new Data_FunctorWithIndex.FunctorWithIndex(function () {
- return functorCompose(dictFunctorWithIndex.Functor0())(dictFunctorWithIndex1.Functor0());
- }, function (f) {
- return function (v) {
- return Compose(Data_FunctorWithIndex.mapWithIndex(dictFunctorWithIndex)(function () {
- var $100 = Data_FunctorWithIndex.mapWithIndex(dictFunctorWithIndex1);
- var $101 = Data_Tuple.curry(f);
- return function ($102) {
- return $100($101($102));
- };
- }())(v));
- };
- });
- };
- };
- var foldableCompose = function foldableCompose(dictFoldable) {
- return function (dictFoldable1) {
- return new Data_Foldable.Foldable(function (dictMonoid) {
- return function (f) {
- return function (v) {
- return Data_Foldable.foldMap(dictFoldable)(dictMonoid)(Data_Foldable.foldMap(dictFoldable1)(dictMonoid)(f))(v);
- };
- };
- }, function (f) {
- return function (i) {
- return function (v) {
- return Data_Foldable.foldl(dictFoldable)(Data_Foldable.foldl(dictFoldable1)(f))(i)(v);
- };
- };
- }, function (f) {
- return function (i) {
- return function (v) {
- return Data_Foldable.foldr(dictFoldable)(Data_Function.flip(Data_Foldable.foldr(dictFoldable1)(f)))(i)(v);
- };
- };
- });
- };
- };
- var foldableWithIndexCompose = function foldableWithIndexCompose(dictFoldableWithIndex) {
- return function (dictFoldableWithIndex1) {
- return new Data_FoldableWithIndex.FoldableWithIndex(function () {
- return foldableCompose(dictFoldableWithIndex.Foldable0())(dictFoldableWithIndex1.Foldable0());
- }, function (dictMonoid) {
- return function (f) {
- return function (v) {
- return Data_FoldableWithIndex.foldMapWithIndex(dictFoldableWithIndex)(dictMonoid)(function () {
- var $103 = Data_FoldableWithIndex.foldMapWithIndex(dictFoldableWithIndex1)(dictMonoid);
- var $104 = Data_Tuple.curry(f);
- return function ($105) {
- return $103($104($105));
- };
- }())(v);
- };
- };
- }, function (f) {
- return function (i) {
- return function (v) {
- return Data_FoldableWithIndex.foldlWithIndex(dictFoldableWithIndex)(function () {
- var $106 = Data_FoldableWithIndex.foldlWithIndex(dictFoldableWithIndex1);
- var $107 = Data_Tuple.curry(f);
- return function ($108) {
- return $106($107($108));
- };
- }())(i)(v);
- };
- };
- }, function (f) {
- return function (i) {
- return function (v) {
- return Data_FoldableWithIndex.foldrWithIndex(dictFoldableWithIndex)(function (a) {
- return Data_Function.flip(Data_FoldableWithIndex.foldrWithIndex(dictFoldableWithIndex1)(Data_Tuple.curry(f)(a)));
- })(i)(v);
- };
- };
- });
- };
- };
- var traversableCompose = function traversableCompose(dictTraversable) {
- return function (dictTraversable1) {
- return new Data_Traversable.Traversable(function () {
- return foldableCompose(dictTraversable.Foldable1())(dictTraversable1.Foldable1());
- }, function () {
- return functorCompose(dictTraversable.Functor0())(dictTraversable1.Functor0());
- }, function (dictApplicative) {
- return Data_Traversable.traverse(traversableCompose(dictTraversable)(dictTraversable1))(dictApplicative)(Control_Category.identity(Control_Category.categoryFn));
- }, function (dictApplicative) {
- return function (f) {
- return function (v) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Compose)(Data_Traversable.traverse(dictTraversable)(dictApplicative)(Data_Traversable.traverse(dictTraversable1)(dictApplicative)(f))(v));
- };
- };
- });
- };
- };
- var traversableWithIndexCompose = function traversableWithIndexCompose(dictTraversableWithIndex) {
- return function (dictTraversableWithIndex1) {
- return new Data_TraversableWithIndex.TraversableWithIndex(function () {
- return foldableWithIndexCompose(dictTraversableWithIndex.FoldableWithIndex1())(dictTraversableWithIndex1.FoldableWithIndex1());
- }, function () {
- return functorWithIndexCompose(dictTraversableWithIndex.FunctorWithIndex0())(dictTraversableWithIndex1.FunctorWithIndex0());
- }, function () {
- return traversableCompose(dictTraversableWithIndex.Traversable2())(dictTraversableWithIndex1.Traversable2());
- }, function (dictApplicative) {
- return function (f) {
- return function (v) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Compose)(Data_TraversableWithIndex.traverseWithIndex(dictTraversableWithIndex)(dictApplicative)(function () {
- var $109 = Data_TraversableWithIndex.traverseWithIndex(dictTraversableWithIndex1)(dictApplicative);
- var $110 = Data_Tuple.curry(f);
- return function ($111) {
- return $109($110($111));
- };
- }())(v));
- };
- };
- });
- };
- };
- var eqCompose = function eqCompose(dictEq1) {
- return function (dictEq11) {
- return function (dictEq) {
- return new Data_Eq.Eq(function (v) {
- return function (v1) {
- return Data_Eq.eq1(dictEq1)(Data_Functor_App.eqApp(dictEq11)(dictEq))(Data_Functor_App.hoistLiftApp(v))(Data_Functor_App.hoistLiftApp(v1));
- };
- });
- };
- };
- };
- var ordCompose = function ordCompose(dictOrd1) {
- return function (dictOrd11) {
- return function (dictOrd) {
- return new Data_Ord.Ord(function () {
- return eqCompose(dictOrd1.Eq10())(dictOrd11.Eq10())(dictOrd.Eq0());
- }, function (v) {
- return function (v1) {
- return Data_Ord.compare1(dictOrd1)(Data_Functor_App.ordApp(dictOrd11)(dictOrd))(Data_Functor_App.hoistLiftApp(v))(Data_Functor_App.hoistLiftApp(v1));
- };
- });
- };
- };
- };
- var eq1Compose = function eq1Compose(dictEq1) {
- return function (dictEq11) {
- return new Data_Eq.Eq1(function (dictEq) {
- return Data_Eq.eq(eqCompose(dictEq1)(dictEq11)(dictEq));
- });
- };
- };
- var ord1Compose = function ord1Compose(dictOrd1) {
- return function (dictOrd11) {
- return new Data_Ord.Ord1(function () {
- return eq1Compose(dictOrd1.Eq10())(dictOrd11.Eq10());
- }, function (dictOrd) {
- return Data_Ord.compare(ordCompose(dictOrd1)(dictOrd11)(dictOrd));
- });
- };
- };
- var bihoistCompose = function bihoistCompose(dictFunctor) {
- return function (natF) {
- return function (natG) {
- return function (v) {
- return natF(Data_Functor.map(dictFunctor)(natG)(v));
- };
- };
- };
- };
- var applyCompose = function applyCompose(dictApply) {
- return function (dictApply1) {
- return new Control_Apply.Apply(function () {
- return functorCompose(dictApply.Functor0())(dictApply1.Functor0());
- }, function (v) {
- return function (v1) {
- return Compose(Control_Apply.apply(dictApply)(Data_Functor.map(dictApply.Functor0())(Control_Apply.apply(dictApply1))(v))(v1));
- };
- });
- };
- };
- var applicativeCompose = function applicativeCompose(dictApplicative) {
- return function (dictApplicative1) {
- return new Control_Applicative.Applicative(function () {
- return applyCompose(dictApplicative.Apply0())(dictApplicative1.Apply0());
- }, function () {
- var $112 = Control_Applicative.pure(dictApplicative);
- var $113 = Control_Applicative.pure(dictApplicative1);
- return function ($114) {
- return Compose($112($113($114)));
- };
- }());
- };
- };
- var altCompose = function altCompose(dictAlt) {
- return function (dictFunctor) {
- return new Control_Alt.Alt(function () {
- return functorCompose(dictAlt.Functor0())(dictFunctor);
- }, function (v) {
- return function (v1) {
- return Compose(Control_Alt.alt(dictAlt)(v)(v1));
- };
- });
- };
- };
- var plusCompose = function plusCompose(dictPlus) {
- return function (dictFunctor) {
- return new Control_Plus.Plus(function () {
- return altCompose(dictPlus.Alt0())(dictFunctor);
- }, Control_Plus.empty(dictPlus));
- };
- };
- var alternativeCompose = function alternativeCompose(dictAlternative) {
- return function (dictApplicative) {
- return new Control_Alternative.Alternative(function () {
- return applicativeCompose(dictAlternative.Applicative0())(dictApplicative);
- }, function () {
- return plusCompose(dictAlternative.Plus1())(dictApplicative.Apply0().Functor0());
- });
- };
- };
- module.exports = {
- Compose: Compose,
- bihoistCompose: bihoistCompose,
- newtypeCompose: newtypeCompose,
- eqCompose: eqCompose,
- eq1Compose: eq1Compose,
- ordCompose: ordCompose,
- ord1Compose: ord1Compose,
- showCompose: showCompose,
- functorCompose: functorCompose,
- functorWithIndexCompose: functorWithIndexCompose,
- applyCompose: applyCompose,
- applicativeCompose: applicativeCompose,
- foldableCompose: foldableCompose,
- foldableWithIndexCompose: foldableWithIndexCompose,
- traversableCompose: traversableCompose,
- traversableWithIndexCompose: traversableWithIndexCompose,
- altCompose: altCompose,
- plusCompose: plusCompose,
- alternativeCompose: alternativeCompose
- };
- },{"../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Alternative/index.js":"../output/Control.Alternative/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Plus/index.js":"../output/Control.Plus/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.FoldableWithIndex/index.js":"../output/Data.FoldableWithIndex/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Functor.App/index.js":"../output/Data.Functor.App/index.js","../Data.FunctorWithIndex/index.js":"../output/Data.FunctorWithIndex/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Data.TraversableWithIndex/index.js":"../output/Data.TraversableWithIndex/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js"}],"../output/Control.Parallel.Class/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Alt = require("../Control.Alt/index.js");
- var Control_Alternative = require("../Control.Alternative/index.js");
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Monad_Cont_Trans = require("../Control.Monad.Cont.Trans/index.js");
- var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js");
- var Control_Monad_Maybe_Trans = require("../Control.Monad.Maybe.Trans/index.js");
- var Control_Monad_Reader_Trans = require("../Control.Monad.Reader.Trans/index.js");
- var Control_Monad_Writer_Trans = require("../Control.Monad.Writer.Trans/index.js");
- var Control_Plus = require("../Control.Plus/index.js");
- var Data_Either = require("../Data.Either/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Functor_Compose = require("../Data.Functor.Compose/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Unit = require("../Data.Unit/index.js");
- var Effect_Class = require("../Effect.Class/index.js");
- var Effect_Ref = require("../Effect.Ref/index.js");
- var ParCont = function ParCont(x) {
- return x;
- };
- var Parallel = function Parallel(Applicative1, Monad0, parallel, sequential) {
- this.Applicative1 = Applicative1;
- this.Monad0 = Monad0;
- this.parallel = parallel;
- this.sequential = sequential;
- };
- var sequential = function sequential(dict) {
- return dict.sequential;
- };
- var parallel = function parallel(dict) {
- return dict.parallel;
- };
- var newtypeParCont = new Data_Newtype.Newtype(function (n) {
- return n;
- }, ParCont);
- var monadParWriterT = function monadParWriterT(dictMonoid) {
- return function (dictParallel) {
- return new Parallel(function () {
- return Control_Monad_Writer_Trans.applicativeWriterT(dictMonoid)(dictParallel.Applicative1());
- }, function () {
- return Control_Monad_Writer_Trans.monadWriterT(dictMonoid)(dictParallel.Monad0());
- }, Control_Monad_Writer_Trans.mapWriterT(parallel(dictParallel)), Control_Monad_Writer_Trans.mapWriterT(sequential(dictParallel)));
- };
- };
- var monadParReaderT = function monadParReaderT(dictParallel) {
- return new Parallel(function () {
- return Control_Monad_Reader_Trans.applicativeReaderT(dictParallel.Applicative1());
- }, function () {
- return Control_Monad_Reader_Trans.monadReaderT(dictParallel.Monad0());
- }, Control_Monad_Reader_Trans.mapReaderT(parallel(dictParallel)), Control_Monad_Reader_Trans.mapReaderT(sequential(dictParallel)));
- };
- var monadParMaybeT = function monadParMaybeT(dictParallel) {
- return new Parallel(function () {
- return Data_Functor_Compose.applicativeCompose(dictParallel.Applicative1())(Data_Maybe.applicativeMaybe);
- }, function () {
- return Control_Monad_Maybe_Trans.monadMaybeT(dictParallel.Monad0());
- }, function (v) {
- return parallel(dictParallel)(v);
- }, function (v) {
- return sequential(dictParallel)(v);
- });
- };
- var monadParExceptT = function monadParExceptT(dictParallel) {
- return new Parallel(function () {
- return Data_Functor_Compose.applicativeCompose(dictParallel.Applicative1())(Data_Either.applicativeEither);
- }, function () {
- return Control_Monad_Except_Trans.monadExceptT(dictParallel.Monad0());
- }, function (v) {
- return parallel(dictParallel)(v);
- }, function (v) {
- return sequential(dictParallel)(v);
- });
- };
- var monadParParCont = function monadParParCont(dictMonadEffect) {
- return new Parallel(function () {
- return applicativeParCont(dictMonadEffect);
- }, function () {
- return Control_Monad_Cont_Trans.monadContT(dictMonadEffect.Monad0());
- }, ParCont, function (v) {
- return v;
- });
- };
- var functorParCont = function functorParCont(dictMonadEffect) {
- return new Data_Functor.Functor(function (f) {
- var $40 = parallel(monadParParCont(dictMonadEffect));
- var $41 = Data_Functor.map(Control_Monad_Cont_Trans.functorContT(dictMonadEffect.Monad0().Bind1().Apply0().Functor0()))(f);
- var $42 = sequential(monadParParCont(dictMonadEffect));
- return function ($43) {
- return $40($41($42($43)));
- };
- });
- };
- var applyParCont = function applyParCont(dictMonadEffect) {
- return new Control_Apply.Apply(function () {
- return functorParCont(dictMonadEffect);
- }, function (v) {
- return function (v1) {
- return ParCont(function (k) {
- return Control_Bind.bind(dictMonadEffect.Monad0().Bind1())(Effect_Class.liftEffect(dictMonadEffect)(Effect_Ref["new"](Data_Maybe.Nothing.value)))(function (ra) {
- return Control_Bind.bind(dictMonadEffect.Monad0().Bind1())(Effect_Class.liftEffect(dictMonadEffect)(Effect_Ref["new"](Data_Maybe.Nothing.value)))(function (rb) {
- return Control_Bind.discard(Control_Bind.discardUnit)(dictMonadEffect.Monad0().Bind1())(Control_Monad_Cont_Trans.runContT(v)(function (a) {
- return Control_Bind.bind(dictMonadEffect.Monad0().Bind1())(Effect_Class.liftEffect(dictMonadEffect)(Effect_Ref.read(rb)))(function (mb) {
- if (mb instanceof Data_Maybe.Nothing) {
- return Effect_Class.liftEffect(dictMonadEffect)(Effect_Ref.write(new Data_Maybe.Just(a))(ra));
- }
- ;
- if (mb instanceof Data_Maybe.Just) {
- return k(a(mb.value0));
- }
- ;
- throw new Error("Failed pattern match at Control.Parallel.Class (line 71, column 7 - line 73, column 26): " + [mb.constructor.name]);
- });
- }))(function () {
- return Control_Monad_Cont_Trans.runContT(v1)(function (b) {
- return Control_Bind.bind(dictMonadEffect.Monad0().Bind1())(Effect_Class.liftEffect(dictMonadEffect)(Effect_Ref.read(ra)))(function (ma) {
- if (ma instanceof Data_Maybe.Nothing) {
- return Effect_Class.liftEffect(dictMonadEffect)(Effect_Ref.write(new Data_Maybe.Just(b))(rb));
- }
- ;
- if (ma instanceof Data_Maybe.Just) {
- return k(ma.value0(b));
- }
- ;
- throw new Error("Failed pattern match at Control.Parallel.Class (line 77, column 7 - line 79, column 26): " + [ma.constructor.name]);
- });
- });
- });
- });
- });
- });
- };
- });
- };
- var applicativeParCont = function applicativeParCont(dictMonadEffect) {
- return new Control_Applicative.Applicative(function () {
- return applyParCont(dictMonadEffect);
- }, function () {
- var $44 = parallel(monadParParCont(dictMonadEffect));
- var $45 = Control_Applicative.pure(Control_Monad_Cont_Trans.applicativeContT(dictMonadEffect.Monad0().Applicative0()));
- return function ($46) {
- return $44($45($46));
- };
- }());
- };
- var altParCont = function altParCont(dictMonadEffect) {
- return new Control_Alt.Alt(function () {
- return functorParCont(dictMonadEffect);
- }, function (v) {
- return function (v1) {
- return ParCont(function (k) {
- return Control_Bind.bind(dictMonadEffect.Monad0().Bind1())(Effect_Class.liftEffect(dictMonadEffect)(Effect_Ref["new"](false)))(function (done) {
- return Control_Bind.discard(Control_Bind.discardUnit)(dictMonadEffect.Monad0().Bind1())(Control_Monad_Cont_Trans.runContT(v)(function (a) {
- return Control_Bind.bind(dictMonadEffect.Monad0().Bind1())(Effect_Class.liftEffect(dictMonadEffect)(Effect_Ref.read(done)))(function (b) {
- if (b) {
- return Control_Applicative.pure(dictMonadEffect.Monad0().Applicative0())(Data_Unit.unit);
- }
- ;
- return Control_Bind.discard(Control_Bind.discardUnit)(dictMonadEffect.Monad0().Bind1())(Effect_Class.liftEffect(dictMonadEffect)(Effect_Ref.write(true)(done)))(function () {
- return k(a);
- });
- });
- }))(function () {
- return Control_Monad_Cont_Trans.runContT(v1)(function (a) {
- return Control_Bind.bind(dictMonadEffect.Monad0().Bind1())(Effect_Class.liftEffect(dictMonadEffect)(Effect_Ref.read(done)))(function (b) {
- if (b) {
- return Control_Applicative.pure(dictMonadEffect.Monad0().Applicative0())(Data_Unit.unit);
- }
- ;
- return Control_Bind.discard(Control_Bind.discardUnit)(dictMonadEffect.Monad0().Bind1())(Effect_Class.liftEffect(dictMonadEffect)(Effect_Ref.write(true)(done)))(function () {
- return k(a);
- });
- });
- });
- });
- });
- });
- };
- });
- };
- var plusParCont = function plusParCont(dictMonadEffect) {
- return new Control_Plus.Plus(function () {
- return altParCont(dictMonadEffect);
- }, ParCont(function (v) {
- return Control_Applicative.pure(dictMonadEffect.Monad0().Applicative0())(Data_Unit.unit);
- }));
- };
- var alternativeParCont = function alternativeParCont(dictMonadEffect) {
- return new Control_Alternative.Alternative(function () {
- return applicativeParCont(dictMonadEffect);
- }, function () {
- return plusParCont(dictMonadEffect);
- });
- };
- module.exports = {
- parallel: parallel,
- sequential: sequential,
- Parallel: Parallel,
- ParCont: ParCont,
- monadParExceptT: monadParExceptT,
- monadParReaderT: monadParReaderT,
- monadParWriterT: monadParWriterT,
- monadParMaybeT: monadParMaybeT,
- newtypeParCont: newtypeParCont,
- functorParCont: functorParCont,
- applyParCont: applyParCont,
- applicativeParCont: applicativeParCont,
- altParCont: altParCont,
- plusParCont: plusParCont,
- alternativeParCont: alternativeParCont,
- monadParParCont: monadParParCont
- };
- },{"../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Alternative/index.js":"../output/Control.Alternative/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad.Cont.Trans/index.js":"../output/Control.Monad.Cont.Trans/index.js","../Control.Monad.Except.Trans/index.js":"../output/Control.Monad.Except.Trans/index.js","../Control.Monad.Maybe.Trans/index.js":"../output/Control.Monad.Maybe.Trans/index.js","../Control.Monad.Reader.Trans/index.js":"../output/Control.Monad.Reader.Trans/index.js","../Control.Monad.Writer.Trans/index.js":"../output/Control.Monad.Writer.Trans/index.js","../Control.Plus/index.js":"../output/Control.Plus/index.js","../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Functor.Compose/index.js":"../output/Data.Functor.Compose/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js","../Effect.Class/index.js":"../output/Effect.Class/index.js","../Effect.Ref/index.js":"../output/Effect.Ref/index.js"}],"../output/Control.Parallel/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Category = require("../Control.Category/index.js");
- var Control_Parallel_Class = require("../Control.Parallel.Class/index.js");
- var Data_Foldable = require("../Data.Foldable/index.js");
- var Data_Traversable = require("../Data.Traversable/index.js");
- var parTraverse_ = function parTraverse_(dictParallel) {
- return function (dictFoldable) {
- return function (f) {
- var $17 = Control_Parallel_Class.sequential(dictParallel);
- var $18 = Data_Foldable.traverse_(dictParallel.Applicative1())(dictFoldable)(function () {
- var $20 = Control_Parallel_Class.parallel(dictParallel);
- return function ($21) {
- return $20(f($21));
- };
- }());
- return function ($19) {
- return $17($18($19));
- };
- };
- };
- };
- var parTraverse = function parTraverse(dictParallel) {
- return function (dictTraversable) {
- return function (f) {
- var $22 = Control_Parallel_Class.sequential(dictParallel);
- var $23 = Data_Traversable.traverse(dictTraversable)(dictParallel.Applicative1())(function () {
- var $25 = Control_Parallel_Class.parallel(dictParallel);
- return function ($26) {
- return $25(f($26));
- };
- }());
- return function ($24) {
- return $22($23($24));
- };
- };
- };
- };
- var parSequence_ = function parSequence_(dictParallel) {
- return function (dictFoldable) {
- return parTraverse_(dictParallel)(dictFoldable)(Control_Category.identity(Control_Category.categoryFn));
- };
- };
- var parSequence = function parSequence(dictParallel) {
- return function (dictTraversable) {
- return parTraverse(dictParallel)(dictTraversable)(Control_Category.identity(Control_Category.categoryFn));
- };
- };
- var parOneOfMap = function parOneOfMap(dictParallel) {
- return function (dictAlternative) {
- return function (dictFoldable) {
- return function (dictFunctor) {
- return function (f) {
- var $27 = Control_Parallel_Class.sequential(dictParallel);
- var $28 = Data_Foldable.oneOfMap(dictFoldable)(dictAlternative.Plus1())(function () {
- var $30 = Control_Parallel_Class.parallel(dictParallel);
- return function ($31) {
- return $30(f($31));
- };
- }());
- return function ($29) {
- return $27($28($29));
- };
- };
- };
- };
- };
- };
- var parOneOf = function parOneOf(dictParallel) {
- return function (dictAlternative) {
- return function (dictFoldable) {
- return function (dictFunctor) {
- var $32 = Control_Parallel_Class.sequential(dictParallel);
- var $33 = Data_Foldable.oneOfMap(dictFoldable)(dictAlternative.Plus1())(Control_Parallel_Class.parallel(dictParallel));
- return function ($34) {
- return $32($33($34));
- };
- };
- };
- };
- };
- var parApply = function parApply(dictParallel) {
- return function (mf) {
- return function (ma) {
- return Control_Parallel_Class.sequential(dictParallel)(Control_Apply.apply(dictParallel.Applicative1().Apply0())(Control_Parallel_Class.parallel(dictParallel)(mf))(Control_Parallel_Class.parallel(dictParallel)(ma)));
- };
- };
- };
- module.exports = {
- parApply: parApply,
- parTraverse: parTraverse,
- parTraverse_: parTraverse_,
- parSequence: parSequence,
- parSequence_: parSequence_,
- parOneOf: parOneOf,
- parOneOfMap: parOneOfMap
- };
- },{"../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Parallel.Class/index.js":"../output/Control.Parallel.Class/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js"}],"../output/Effect.Aff/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Control_Alt = require("../Control.Alt/index.js");
- var Control_Alternative = require("../Control.Alternative/index.js");
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Lazy = require("../Control.Lazy/index.js");
- var Control_Monad = require("../Control.Monad/index.js");
- var Control_Monad_Error_Class = require("../Control.Monad.Error.Class/index.js");
- var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js");
- var Control_Parallel = require("../Control.Parallel/index.js");
- var Control_Parallel_Class = require("../Control.Parallel.Class/index.js");
- var Control_Plus = require("../Control.Plus/index.js");
- var Data_Either = require("../Data.Either/index.js");
- var Data_Foldable = require("../Data.Foldable/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Unit = require("../Data.Unit/index.js");
- var Effect = require("../Effect/index.js");
- var Effect_Class = require("../Effect.Class/index.js");
- var Effect_Exception = require("../Effect.Exception/index.js");
- var Effect_Unsafe = require("../Effect.Unsafe/index.js");
- var Partial_Unsafe = require("../Partial.Unsafe/index.js");
- var Unsafe_Coerce = require("../Unsafe.Coerce/index.js");
- var Fiber = function Fiber(x) {
- return x;
- };
- var FFIUtil = function FFIUtil(x) {
- return x;
- };
- var Canceler = function Canceler(x) {
- return x;
- };
- var suspendAff = $foreign["_fork"](false);
- var newtypeCanceler = new Data_Newtype.Newtype(function (n) {
- return n;
- }, Canceler);
- var functorParAff = new Data_Functor.Functor($foreign["_parAffMap"]);
- var functorAff = new Data_Functor.Functor($foreign["_map"]);
- var forkAff = $foreign["_fork"](true);
- var ffiUtil = function () {
- var unsafeFromRight = function unsafeFromRight(v) {
- if (v instanceof Data_Either.Right) {
- return v.value0;
- }
- ;
- if (v instanceof Data_Either.Left) {
- return Partial_Unsafe.unsafeCrashWith("unsafeFromRight: Left");
- }
- ;
- throw new Error("Failed pattern match at Effect.Aff (line 400, column 21 - line 402, column 54): " + [v.constructor.name]);
- };
- var unsafeFromLeft = function unsafeFromLeft(v) {
- if (v instanceof Data_Either.Left) {
- return v.value0;
- }
- ;
- if (v instanceof Data_Either.Right) {
- return Partial_Unsafe.unsafeCrashWith("unsafeFromLeft: Right");
- }
- ;
- throw new Error("Failed pattern match at Effect.Aff (line 395, column 20 - line 397, column 54): " + [v.constructor.name]);
- };
- var isLeft = function isLeft(v) {
- if (v instanceof Data_Either.Left) {
- return true;
- }
- ;
- if (v instanceof Data_Either.Right) {
- return false;
- }
- ;
- throw new Error("Failed pattern match at Effect.Aff (line 390, column 12 - line 392, column 20): " + [v.constructor.name]);
- };
- return {
- isLeft: isLeft,
- fromLeft: unsafeFromLeft,
- fromRight: unsafeFromRight,
- left: Data_Either.Left.create,
- right: Data_Either.Right.create
- };
- }();
- var makeFiber = function makeFiber(aff) {
- return $foreign["_makeFiber"](ffiUtil, aff);
- };
- var launchAff = function launchAff(aff) {
- return function __do() {
- var fiber = makeFiber(aff)();
- fiber.run();
- return fiber;
- };
- };
- var launchAff_ = function () {
- var $43 = Data_Functor["void"](Effect.functorEffect);
- return function ($44) {
- return $43(launchAff($44));
- };
- }();
- var launchSuspendedAff = makeFiber;
- var delay = function delay(v) {
- return $foreign["_delay"](Data_Either.Right.create, v);
- };
- var bracket = function bracket(acquire) {
- return function (completed) {
- return $foreign.generalBracket(acquire)({
- killed: Data_Function["const"](completed),
- failed: Data_Function["const"](completed),
- completed: Data_Function["const"](completed)
- });
- };
- };
- var applyParAff = new Control_Apply.Apply(function () {
- return functorParAff;
- }, $foreign["_parAffApply"]);
- var semigroupParAff = function semigroupParAff(dictSemigroup) {
- return new Data_Semigroup.Semigroup(Control_Apply.lift2(applyParAff)(Data_Semigroup.append(dictSemigroup)));
- };
- var monadAff = new Control_Monad.Monad(function () {
- return applicativeAff;
- }, function () {
- return bindAff;
- });
- var bindAff = new Control_Bind.Bind(function () {
- return applyAff;
- }, $foreign["_bind"]);
- var applyAff = new Control_Apply.Apply(function () {
- return functorAff;
- }, Control_Monad.ap(monadAff));
- var applicativeAff = new Control_Applicative.Applicative(function () {
- return applyAff;
- }, $foreign["_pure"]);
- var cancelWith = function cancelWith(aff) {
- return function (v) {
- return $foreign.generalBracket(Control_Applicative.pure(applicativeAff)(Data_Unit.unit))({
- killed: function killed(e) {
- return function (v1) {
- return v(e);
- };
- },
- failed: Data_Function["const"](Control_Applicative.pure(applicativeAff)),
- completed: Data_Function["const"](Control_Applicative.pure(applicativeAff))
- })(Data_Function["const"](aff));
- };
- };
- var $$finally = function $$finally(fin) {
- return function (a) {
- return bracket(Control_Applicative.pure(applicativeAff)(Data_Unit.unit))(Data_Function["const"](fin))(Data_Function["const"](a));
- };
- };
- var invincible = function invincible(a) {
- return bracket(a)(Data_Function["const"](Control_Applicative.pure(applicativeAff)(Data_Unit.unit)))(Control_Applicative.pure(applicativeAff));
- };
- var lazyAff = new Control_Lazy.Lazy(function (f) {
- return Control_Bind.bind(bindAff)(Control_Applicative.pure(applicativeAff)(Data_Unit.unit))(f);
- });
- var semigroupAff = function semigroupAff(dictSemigroup) {
- return new Data_Semigroup.Semigroup(Control_Apply.lift2(applyAff)(Data_Semigroup.append(dictSemigroup)));
- };
- var monadEffectAff = new Effect_Class.MonadEffect(function () {
- return monadAff;
- }, $foreign["_liftEffect"]);
- var effectCanceler = function () {
- var $45 = Effect_Class.liftEffect(monadEffectAff);
- return function ($46) {
- return Canceler(Data_Function["const"]($45($46)));
- };
- }();
- var joinFiber = function joinFiber(v) {
- return $foreign.makeAff(function (k) {
- return Data_Functor.map(Effect.functorEffect)(effectCanceler)(v.join(k));
- });
- };
- var functorFiber = new Data_Functor.Functor(function (f) {
- return function (t) {
- return Effect_Unsafe.unsafePerformEffect(makeFiber(Data_Functor.map(functorAff)(f)(joinFiber(t))));
- };
- });
- var applyFiber = new Control_Apply.Apply(function () {
- return functorFiber;
- }, function (t1) {
- return function (t2) {
- return Effect_Unsafe.unsafePerformEffect(makeFiber(Control_Apply.apply(applyAff)(joinFiber(t1))(joinFiber(t2))));
- };
- });
- var applicativeFiber = new Control_Applicative.Applicative(function () {
- return applyFiber;
- }, function (a) {
- return Effect_Unsafe.unsafePerformEffect(makeFiber(Control_Applicative.pure(applicativeAff)(a)));
- });
- var killFiber = function killFiber(e) {
- return function (v) {
- return Control_Bind.bind(bindAff)(Effect_Class.liftEffect(monadEffectAff)(v.isSuspended))(function (v1) {
- if (v1) {
- return Effect_Class.liftEffect(monadEffectAff)(Data_Functor["void"](Effect.functorEffect)(v.kill(e, Data_Function["const"](Control_Applicative.pure(Effect.applicativeEffect)(Data_Unit.unit)))));
- }
- ;
- return $foreign.makeAff(function (k) {
- return Data_Functor.map(Effect.functorEffect)(effectCanceler)(v.kill(e, k));
- });
- });
- };
- };
- var fiberCanceler = function () {
- var $47 = Data_Function.flip(killFiber);
- return function ($48) {
- return Canceler($47($48));
- };
- }();
- var monadThrowAff = new Control_Monad_Error_Class.MonadThrow(function () {
- return monadAff;
- }, $foreign["_throwError"]);
- var monadErrorAff = new Control_Monad_Error_Class.MonadError(function () {
- return monadThrowAff;
- }, $foreign["_catchError"]);
- var attempt = Control_Monad_Error_Class["try"](monadErrorAff);
- var runAff = function runAff(k) {
- return function (aff) {
- return launchAff(Control_Bind.bindFlipped(bindAff)(function () {
- var $49 = Effect_Class.liftEffect(monadEffectAff);
- return function ($50) {
- return $49(k($50));
- };
- }())(Control_Monad_Error_Class["try"](monadErrorAff)(aff)));
- };
- };
- var runAff_ = function runAff_(k) {
- return function (aff) {
- return Data_Functor["void"](Effect.functorEffect)(runAff(k)(aff));
- };
- };
- var runSuspendedAff = function runSuspendedAff(k) {
- return function (aff) {
- return launchSuspendedAff(Control_Bind.bindFlipped(bindAff)(function () {
- var $51 = Effect_Class.liftEffect(monadEffectAff);
- return function ($52) {
- return $51(k($52));
- };
- }())(Control_Monad_Error_Class["try"](monadErrorAff)(aff)));
- };
- };
- var parallelAff = new Control_Parallel_Class.Parallel(function () {
- return applicativeParAff;
- }, function () {
- return monadAff;
- }, Unsafe_Coerce.unsafeCoerce, $foreign["_sequential"]);
- var applicativeParAff = new Control_Applicative.Applicative(function () {
- return applyParAff;
- }, function () {
- var $53 = Control_Parallel_Class.parallel(parallelAff);
- var $54 = Control_Applicative.pure(applicativeAff);
- return function ($55) {
- return $53($54($55));
- };
- }());
- var monoidParAff = function monoidParAff(dictMonoid) {
- return new Data_Monoid.Monoid(function () {
- return semigroupParAff(dictMonoid.Semigroup0());
- }, Control_Applicative.pure(applicativeParAff)(Data_Monoid.mempty(dictMonoid)));
- };
- var semigroupCanceler = new Data_Semigroup.Semigroup(function (v) {
- return function (v1) {
- return function (err) {
- return Control_Parallel.parSequence_(parallelAff)(Data_Foldable.foldableArray)([v(err), v1(err)]);
- };
- };
- });
- var supervise = function supervise(aff) {
- var killError = Effect_Exception.error("[Aff] Child fiber outlived parent");
- var killAll = function killAll(err) {
- return function (sup) {
- return $foreign.makeAff(function (k) {
- return $foreign["_killAll"](err, sup.supervisor, k(Control_Applicative.pure(Data_Either.applicativeEither)(Data_Unit.unit)));
- });
- };
- };
- var acquire = function __do() {
- var sup = $foreign["_makeSupervisedFiber"](ffiUtil, aff)();
- sup.fiber.run();
- return sup;
- };
- return $foreign.generalBracket(Effect_Class.liftEffect(monadEffectAff)(acquire))({
- killed: function killed(err) {
- return function (sup) {
- return Control_Parallel.parSequence_(parallelAff)(Data_Foldable.foldableArray)([killFiber(err)(sup.fiber), killAll(err)(sup)]);
- };
- },
- failed: Data_Function["const"](killAll(killError)),
- completed: Data_Function["const"](killAll(killError))
- })(function ($56) {
- return joinFiber(function (v) {
- return v.fiber;
- }($56));
- });
- };
- var monadRecAff = new Control_Monad_Rec_Class.MonadRec(function () {
- return monadAff;
- }, function (k) {
- var go = function go(a) {
- return Control_Bind.bind(bindAff)(k(a))(function (res) {
- if (res instanceof Control_Monad_Rec_Class.Done) {
- return Control_Applicative.pure(applicativeAff)(res.value0);
- }
- ;
- if (res instanceof Control_Monad_Rec_Class.Loop) {
- return go(res.value0);
- }
- ;
- throw new Error("Failed pattern match at Effect.Aff (line 100, column 7 - line 102, column 22): " + [res.constructor.name]);
- });
- };
- return go;
- });
- var monoidAff = function monoidAff(dictMonoid) {
- return new Data_Monoid.Monoid(function () {
- return semigroupAff(dictMonoid.Semigroup0());
- }, Control_Applicative.pure(applicativeAff)(Data_Monoid.mempty(dictMonoid)));
- };
- var nonCanceler = Data_Function["const"](Control_Applicative.pure(applicativeAff)(Data_Unit.unit));
- var monoidCanceler = new Data_Monoid.Monoid(function () {
- return semigroupCanceler;
- }, nonCanceler);
- var never = $foreign.makeAff(function (v) {
- return Control_Applicative.pure(Effect.applicativeEffect)(Data_Monoid.mempty(monoidCanceler));
- });
- var apathize = function () {
- var $57 = Data_Functor.map(functorAff)(Data_Function["const"](Data_Unit.unit));
- return function ($58) {
- return $57(attempt($58));
- };
- }();
- var altParAff = new Control_Alt.Alt(function () {
- return functorParAff;
- }, $foreign["_parAffAlt"]);
- var altAff = new Control_Alt.Alt(function () {
- return functorAff;
- }, function (a1) {
- return function (a2) {
- return Control_Monad_Error_Class.catchError(monadErrorAff)(a1)(Data_Function["const"](a2));
- };
- });
- var plusAff = new Control_Plus.Plus(function () {
- return altAff;
- }, Control_Monad_Error_Class.throwError(monadThrowAff)(Effect_Exception.error("Always fails")));
- var plusParAff = new Control_Plus.Plus(function () {
- return altParAff;
- }, Control_Parallel_Class.parallel(parallelAff)(Control_Plus.empty(plusAff)));
- var alternativeParAff = new Control_Alternative.Alternative(function () {
- return applicativeParAff;
- }, function () {
- return plusParAff;
- });
- module.exports = {
- Canceler: Canceler,
- launchAff: launchAff,
- launchAff_: launchAff_,
- launchSuspendedAff: launchSuspendedAff,
- runAff: runAff,
- runAff_: runAff_,
- runSuspendedAff: runSuspendedAff,
- forkAff: forkAff,
- suspendAff: suspendAff,
- supervise: supervise,
- attempt: attempt,
- apathize: apathize,
- delay: delay,
- never: never,
- "finally": $$finally,
- invincible: invincible,
- killFiber: killFiber,
- joinFiber: joinFiber,
- cancelWith: cancelWith,
- bracket: bracket,
- nonCanceler: nonCanceler,
- effectCanceler: effectCanceler,
- fiberCanceler: fiberCanceler,
- functorAff: functorAff,
- applyAff: applyAff,
- applicativeAff: applicativeAff,
- bindAff: bindAff,
- monadAff: monadAff,
- semigroupAff: semigroupAff,
- monoidAff: monoidAff,
- altAff: altAff,
- plusAff: plusAff,
- monadRecAff: monadRecAff,
- monadThrowAff: monadThrowAff,
- monadErrorAff: monadErrorAff,
- monadEffectAff: monadEffectAff,
- lazyAff: lazyAff,
- functorParAff: functorParAff,
- applyParAff: applyParAff,
- applicativeParAff: applicativeParAff,
- semigroupParAff: semigroupParAff,
- monoidParAff: monoidParAff,
- altParAff: altParAff,
- plusParAff: plusParAff,
- alternativeParAff: alternativeParAff,
- parallelAff: parallelAff,
- functorFiber: functorFiber,
- applyFiber: applyFiber,
- applicativeFiber: applicativeFiber,
- newtypeCanceler: newtypeCanceler,
- semigroupCanceler: semigroupCanceler,
- monoidCanceler: monoidCanceler,
- makeAff: $foreign.makeAff,
- generalBracket: $foreign.generalBracket
- };
- },{"./foreign.js":"../output/Effect.Aff/foreign.js","../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Alternative/index.js":"../output/Control.Alternative/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Lazy/index.js":"../output/Control.Lazy/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Control.Monad.Error.Class/index.js":"../output/Control.Monad.Error.Class/index.js","../Control.Monad.Rec.Class/index.js":"../output/Control.Monad.Rec.Class/index.js","../Control.Parallel/index.js":"../output/Control.Parallel/index.js","../Control.Parallel.Class/index.js":"../output/Control.Parallel.Class/index.js","../Control.Plus/index.js":"../output/Control.Plus/index.js","../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js","../Effect/index.js":"../output/Effect/index.js","../Effect.Class/index.js":"../output/Effect.Class/index.js","../Effect.Exception/index.js":"../output/Effect.Exception/index.js","../Effect.Unsafe/index.js":"../output/Effect.Unsafe/index.js","../Partial.Unsafe/index.js":"../output/Partial.Unsafe/index.js","../Unsafe.Coerce/index.js":"../output/Unsafe.Coerce/index.js"}],"../output/Control.Promise/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Control_Alt = require("../Control.Alt/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Category = require("../Control.Category/index.js");
- var Control_Monad_Except = require("../Control.Monad.Except/index.js");
- var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js");
- var Data_Either = require("../Data.Either/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Identity = require("../Data.Identity/index.js");
- var Data_List_Types = require("../Data.List.Types/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Effect = require("../Effect/index.js");
- var Effect_Aff = require("../Effect.Aff/index.js");
- var Effect_Class = require("../Effect.Class/index.js");
- var Effect_Exception = require("../Effect.Exception/index.js");
- var Foreign = require("../Foreign/index.js");
- var toAff$prime = function toAff$prime(customCoerce) {
- return function (p) {
- return Effect_Aff.makeAff(function (cb) {
- return Data_Functor.voidRight(Effect.functorEffect)(Data_Monoid.mempty(Effect_Aff.monoidCanceler))($foreign.thenImpl(p)(function ($1) {
- return cb(Data_Either.Left.create(customCoerce($1)))();
- })(function ($2) {
- return cb(Data_Either.Right.create($2))();
- }));
- });
- };
- };
- var fromAff = function fromAff(aff) {
- return $foreign.promise(function (succ) {
- return function (err) {
- return Effect_Aff.runAff_(Data_Either.either(err)(succ))(aff);
- };
- });
- };
- var coerce = function coerce(fn) {
- return Data_Either.either(function (v) {
- return Effect_Exception.error("Promise failed, couldn't extract JS Error or String");
- })(Control_Category.identity(Control_Category.categoryFn))(Control_Monad_Except.runExcept(Control_Alt.alt(Control_Monad_Except_Trans.altExceptT(Data_List_Types.semigroupNonEmptyList)(Data_Identity.monadIdentity))(Foreign.unsafeReadTagged("Error")(fn))(Data_Functor.map(Control_Monad_Except_Trans.functorExceptT(Data_Identity.functorIdentity))(Effect_Exception.error)(Foreign.readString(fn)))));
- };
- var toAff = toAff$prime(coerce);
- var toAffE = function toAffE(f) {
- return Control_Bind.bind(Effect_Aff.bindAff)(Effect_Class.liftEffect(Effect_Aff.monadEffectAff)(f))(toAff);
- };
- module.exports = {
- fromAff: fromAff,
- toAff: toAff,
- "toAff'": toAff$prime,
- toAffE: toAffE
- };
- },{"./foreign.js":"../output/Control.Promise/foreign.js","../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Monad.Except/index.js":"../output/Control.Monad.Except/index.js","../Control.Monad.Except.Trans/index.js":"../output/Control.Monad.Except.Trans/index.js","../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Identity/index.js":"../output/Data.Identity/index.js","../Data.List.Types/index.js":"../output/Data.List.Types/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Effect/index.js":"../output/Effect/index.js","../Effect.Aff/index.js":"../output/Effect.Aff/index.js","../Effect.Class/index.js":"../output/Effect.Class/index.js","../Effect.Exception/index.js":"../output/Effect.Exception/index.js","../Foreign/index.js":"../output/Foreign/index.js"}],"../output/Data.Generic.Rep.Show/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Data_Foldable = require("../Data.Foldable/index.js");
- var Data_Generic_Rep = require("../Data.Generic.Rep/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Data_Symbol = require("../Data.Symbol/index.js");
- var GenericShowArgs = function GenericShowArgs(genericShowArgs) {
- this.genericShowArgs = genericShowArgs;
- };
- var GenericShow = function GenericShow(genericShow$prime) {
- this["genericShow'"] = genericShow$prime;
- };
- var genericShowArgsNoArguments = new GenericShowArgs(function (v) {
- return [];
- });
- var genericShowArgsArgument = function genericShowArgsArgument(dictShow) {
- return new GenericShowArgs(function (v) {
- return [Data_Show.show(dictShow)(v)];
- });
- };
- var genericShowArgs = function genericShowArgs(dict) {
- return dict.genericShowArgs;
- };
- var genericShowArgsProduct = function genericShowArgsProduct(dictGenericShowArgs) {
- return function (dictGenericShowArgs1) {
- return new GenericShowArgs(function (v) {
- return Data_Semigroup.append(Data_Semigroup.semigroupArray)(genericShowArgs(dictGenericShowArgs)(v.value0))(genericShowArgs(dictGenericShowArgs1)(v.value1));
- });
- };
- };
- var genericShowConstructor = function genericShowConstructor(dictGenericShowArgs) {
- return function (dictIsSymbol) {
- return new GenericShow(function (v) {
- var ctor = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
- var v1 = genericShowArgs(dictGenericShowArgs)(v);
- if (v1.length === 0) {
- return ctor;
- }
- ;
- return "(" + (Data_Foldable.intercalate(Data_Foldable.foldableArray)(Data_Monoid.monoidString)(" ")(Data_Semigroup.append(Data_Semigroup.semigroupArray)([ctor])(v1)) + ")");
- });
- };
- };
- var genericShow$prime = function genericShow$prime(dict) {
- return dict["genericShow'"];
- };
- var genericShowNoConstructors = new GenericShow(function (a) {
- return genericShow$prime(genericShowNoConstructors)(a);
- });
- var genericShowSum = function genericShowSum(dictGenericShow) {
- return function (dictGenericShow1) {
- return new GenericShow(function (v) {
- if (v instanceof Data_Generic_Rep.Inl) {
- return genericShow$prime(dictGenericShow)(v.value0);
- }
- ;
- if (v instanceof Data_Generic_Rep.Inr) {
- return genericShow$prime(dictGenericShow1)(v.value0);
- }
- ;
- throw new Error("Failed pattern match at Data.Generic.Rep.Show (line 26, column 1 - line 28, column 40): " + [v.constructor.name]);
- });
- };
- };
- var genericShow = function genericShow(dictGeneric) {
- return function (dictGenericShow) {
- return function (x) {
- return genericShow$prime(dictGenericShow)(Data_Generic_Rep.from(dictGeneric)(x));
- };
- };
- };
- module.exports = {
- GenericShow: GenericShow,
- "genericShow'": genericShow$prime,
- genericShow: genericShow,
- GenericShowArgs: GenericShowArgs,
- genericShowArgs: genericShowArgs,
- genericShowNoConstructors: genericShowNoConstructors,
- genericShowArgsNoArguments: genericShowArgsNoArguments,
- genericShowSum: genericShowSum,
- genericShowArgsProduct: genericShowArgsProduct,
- genericShowConstructor: genericShowConstructor,
- genericShowArgsArgument: genericShowArgsArgument
- };
- },{"../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.Generic.Rep/index.js":"../output/Data.Generic.Rep/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Symbol/index.js":"../output/Data.Symbol/index.js"}],"../output/Data.Number.Format/foreign.js":[function(require,module,exports) {
- function wrap(method) {
- return function (d) {
- return function (num) {
- return method.apply(num, [d]);
- };
- };
- }
- exports.toPrecisionNative = wrap(Number.prototype.toPrecision);
- exports.toFixedNative = wrap(Number.prototype.toFixed);
- exports.toExponentialNative = wrap(Number.prototype.toExponential);
- exports.toString = function (num) {
- return num.toString();
- };
- },{}],"../output/Data.Number.Format/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Precision = function () {
- function Precision(value0) {
- this.value0 = value0;
- }
- ;
- Precision.create = function (value0) {
- return new Precision(value0);
- };
- return Precision;
- }();
- var Fixed = function () {
- function Fixed(value0) {
- this.value0 = value0;
- }
- ;
- Fixed.create = function (value0) {
- return new Fixed(value0);
- };
- return Fixed;
- }();
- var Exponential = function () {
- function Exponential(value0) {
- this.value0 = value0;
- }
- ;
- Exponential.create = function (value0) {
- return new Exponential(value0);
- };
- return Exponential;
- }();
- var toStringWith = function toStringWith(v) {
- if (v instanceof Precision) {
- return $foreign.toPrecisionNative(v.value0);
- }
- ;
- if (v instanceof Fixed) {
- return $foreign.toFixedNative(v.value0);
- }
- ;
- if (v instanceof Exponential) {
- return $foreign.toExponentialNative(v.value0);
- }
- ;
- throw new Error("Failed pattern match at Data.Number.Format (line 59, column 1 - line 59, column 40): " + [v.constructor.name]);
- };
- var precision = function () {
- var $5 = Data_Ord.clamp(Data_Ord.ordInt)(1)(21);
- return function ($6) {
- return Precision.create($5($6));
- };
- }();
- var fixed = function () {
- var $7 = Data_Ord.clamp(Data_Ord.ordInt)(0)(20);
- return function ($8) {
- return Fixed.create($7($8));
- };
- }();
- var exponential = function () {
- var $9 = Data_Ord.clamp(Data_Ord.ordInt)(0)(20);
- return function ($10) {
- return Exponential.create($9($10));
- };
- }();
- module.exports = {
- precision: precision,
- fixed: fixed,
- exponential: exponential,
- toStringWith: toStringWith,
- toString: $foreign.toString
- };
- },{"./foreign.js":"../output/Data.Number.Format/foreign.js","../Data.Ord/index.js":"../output/Data.Ord/index.js"}],"../output/Browser.Tabs/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Browser_Utils = require("../Browser.Utils/index.js");
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Promise = require("../Control.Promise/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Foldable = require("../Data.Foldable/index.js");
- var Data_Generic_Rep = require("../Data.Generic.Rep/index.js");
- var Data_Generic_Rep_Show = require("../Data.Generic.Rep.Show/index.js");
- var Data_List = require("../Data.List/index.js");
- var Data_List_Types = require("../Data.List.Types/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Number_Format = require("../Data.Number.Format/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Data_Symbol = require("../Data.Symbol/index.js");
- var Data_Traversable = require("../Data.Traversable/index.js");
- var Effect = require("../Effect/index.js");
- var Effect_Aff = require("../Effect.Aff/index.js");
- var Effect_Class = require("../Effect.Class/index.js");
- var Foreign_Generic = require("../Foreign.Generic/index.js");
- var Foreign_Generic_Class = require("../Foreign.Generic.Class/index.js");
- var WindowId = function WindowId(x) {
- return x;
- };
- var TabId = function TabId(x) {
- return x;
- };
- var Tab = function Tab(x) {
- return x;
- };
- var showWindowId = new Data_Show.Show(function (v) {
- return Data_Number_Format.toString(v);
- });
- var showTabId = new Data_Show.Show(function (v) {
- return Data_Number_Format.toString(v);
- });
- var newtypeTab = new Data_Newtype.Newtype(function (n) {
- return n;
- }, Tab);
- var genWindowId = new Data_Generic_Rep.Generic(function (x) {
- return x;
- }, function (x) {
- return x;
- });
- var genTabId = new Data_Generic_Rep.Generic(function (x) {
- return x;
- }, function (x) {
- return x;
- });
- var genTab = new Data_Generic_Rep.Generic(function (x) {
- return x;
- }, function (x) {
- return x;
- });
- var showTab = new Data_Show.Show(Data_Generic_Rep_Show.genericShow(genTab)(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsArgument(Data_Show.showRecord()(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
- return "active";
- }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
- return "attention";
- }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
- return "audible";
- }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
- return "autoDiscardable";
- }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
- return "cookieStoreId";
- }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
- return "discarded";
- }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
- return "favIconUrl";
- }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
- return "height";
- }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
- return "hidden";
- }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
- return "highlighted";
- }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
- return "id";
- }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
- return "incognito";
- }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
- return "index";
- }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
- return "isArticle";
- }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
- return "isInReaderMode";
- }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
- return "lastAccessed";
- }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
- return "openerTabId";
- }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
- return "pinned";
- }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
- return "sessionId";
- }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
- return "status";
- }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
- return "title";
- }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
- return "url";
- }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
- return "width";
- }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
- return "windowId";
- }))(Data_Show.showRecordFieldsNil)(showWindowId))(Data_Maybe.showMaybe(Data_Show.showNumber)))(Data_Maybe.showMaybe(Data_Show.showString)))(Data_Show.showString))(Data_Maybe.showMaybe(Data_Show.showString)))(Data_Maybe.showMaybe(Data_Show.showString)))(Data_Show.showBoolean))(Data_Maybe.showMaybe(showTabId)))(Data_Show.showNumber))(Data_Show.showBoolean))(Data_Maybe.showMaybe(Data_Show.showBoolean)))(Data_Show.showNumber))(Data_Show.showBoolean))(showTabId))(Data_Show.showBoolean))(Data_Show.showBoolean))(Data_Maybe.showMaybe(Data_Show.showNumber)))(Data_Maybe.showMaybe(Data_Show.showString)))(Data_Maybe.showMaybe(Data_Show.showBoolean)))(Data_Maybe.showMaybe(Data_Show.showString)))(Data_Maybe.showMaybe(Data_Show.showBoolean)))(Data_Maybe.showMaybe(Data_Show.showBoolean)))(Data_Maybe.showMaybe(Data_Show.showBoolean)))(Data_Show.showBoolean))))(new Data_Symbol.IsSymbol(function () {
- return "Tab";
- }))));
- var eqWindowId = new Data_Eq.Eq(function (x) {
- return function (y) {
- return x === y;
- };
- });
- var ordWindowId = new Data_Ord.Ord(function () {
- return eqWindowId;
- }, function (x) {
- return function (y) {
- return Data_Ord.compare(Data_Ord.ordNumber)(x)(y);
- };
- });
- var eqTabId = new Data_Eq.Eq(function (x) {
- return function (y) {
- return x === y;
- };
- });
- var ordTabId = new Data_Ord.Ord(function () {
- return eqTabId;
- }, function (x) {
- return function (y) {
- return Data_Ord.compare(Data_Ord.ordNumber)(x)(y);
- };
- });
- var encodeWindowId = new Foreign_Generic_Class.Encode(function (x) {
- return Foreign_Generic.genericEncode(genWindowId)(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "WindowId";
- }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.numberEncode))))({
- sumEncoding: Foreign_Generic_Class.defaultOptions.sumEncoding,
- unwrapSingleConstructors: true,
- unwrapSingleArguments: Foreign_Generic_Class.defaultOptions.unwrapSingleArguments,
- fieldTransform: Foreign_Generic_Class.defaultOptions.fieldTransform
- })(x);
- });
- var encodeTabId = new Foreign_Generic_Class.Encode(function (x) {
- return Foreign_Generic.genericEncode(genTabId)(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "TabId";
- }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.numberEncode))))({
- sumEncoding: Foreign_Generic_Class.defaultOptions.sumEncoding,
- unwrapSingleConstructors: true,
- unwrapSingleArguments: Foreign_Generic_Class.defaultOptions.unwrapSingleArguments,
- fieldTransform: Foreign_Generic_Class.defaultOptions.fieldTransform
- })(x);
- });
- var encodeTab = new Foreign_Generic_Class.Encode(function (x) {
- return Foreign_Generic.genericEncode(genTab)(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "Tab";
- }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsRecord()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordCons()(Foreign_Generic_Class.encodeRecordNil)(new Data_Symbol.IsSymbol(function () {
- return "windowId";
- }))(Foreign_Generic_Class.encodeWithOptionsOther(encodeWindowId)))(new Data_Symbol.IsSymbol(function () {
- return "width";
- }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(Foreign_Generic_Class.numberEncode))))(new Data_Symbol.IsSymbol(function () {
- return "url";
- }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(Foreign_Generic_Class.stringEncode))))(new Data_Symbol.IsSymbol(function () {
- return "title";
- }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.stringEncode)))(new Data_Symbol.IsSymbol(function () {
- return "status";
- }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(Foreign_Generic_Class.stringEncode))))(new Data_Symbol.IsSymbol(function () {
- return "sessionId";
- }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(Foreign_Generic_Class.stringEncode))))(new Data_Symbol.IsSymbol(function () {
- return "pinned";
- }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.booleanEncode)))(new Data_Symbol.IsSymbol(function () {
- return "openerTabId";
- }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(encodeTabId))))(new Data_Symbol.IsSymbol(function () {
- return "lastAccessed";
- }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.numberEncode)))(new Data_Symbol.IsSymbol(function () {
- return "isInReaderMode";
- }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.booleanEncode)))(new Data_Symbol.IsSymbol(function () {
- return "isArticle";
- }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(Foreign_Generic_Class.booleanEncode))))(new Data_Symbol.IsSymbol(function () {
- return "index";
- }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.numberEncode)))(new Data_Symbol.IsSymbol(function () {
- return "incognito";
- }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.booleanEncode)))(new Data_Symbol.IsSymbol(function () {
- return "id";
- }))(Foreign_Generic_Class.encodeWithOptionsOther(encodeTabId)))(new Data_Symbol.IsSymbol(function () {
- return "highlighted";
- }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.booleanEncode)))(new Data_Symbol.IsSymbol(function () {
- return "hidden";
- }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.booleanEncode)))(new Data_Symbol.IsSymbol(function () {
- return "height";
- }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(Foreign_Generic_Class.numberEncode))))(new Data_Symbol.IsSymbol(function () {
- return "favIconUrl";
- }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(Foreign_Generic_Class.stringEncode))))(new Data_Symbol.IsSymbol(function () {
- return "discarded";
- }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(Foreign_Generic_Class.booleanEncode))))(new Data_Symbol.IsSymbol(function () {
- return "cookieStoreId";
- }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(Foreign_Generic_Class.stringEncode))))(new Data_Symbol.IsSymbol(function () {
- return "autoDiscardable";
- }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(Foreign_Generic_Class.booleanEncode))))(new Data_Symbol.IsSymbol(function () {
- return "audible";
- }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(Foreign_Generic_Class.booleanEncode))))(new Data_Symbol.IsSymbol(function () {
- return "attention";
- }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(Foreign_Generic_Class.booleanEncode))))(new Data_Symbol.IsSymbol(function () {
- return "active";
- }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.booleanEncode))))))({
- sumEncoding: Foreign_Generic_Class.defaultOptions.sumEncoding,
- unwrapSingleConstructors: true,
- unwrapSingleArguments: Foreign_Generic_Class.defaultOptions.unwrapSingleArguments,
- fieldTransform: Foreign_Generic_Class.defaultOptions.fieldTransform
- })(x);
- });
- var decodeWindowId = new Foreign_Generic_Class.Decode(function (x) {
- return Foreign_Generic.genericDecode(genWindowId)(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "WindowId";
- }))(Foreign_Generic_Class.genericDecodeArgsArgument(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.numberDecode)))(Foreign_Generic_Class.genericCountArgsArgument))({
- sumEncoding: Foreign_Generic_Class.defaultOptions.sumEncoding,
- unwrapSingleConstructors: true,
- unwrapSingleArguments: Foreign_Generic_Class.defaultOptions.unwrapSingleArguments,
- fieldTransform: Foreign_Generic_Class.defaultOptions.fieldTransform
- })(x);
- });
- var decodeTabId = new Foreign_Generic_Class.Decode(function (x) {
- return Foreign_Generic.genericDecode(genTabId)(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "TabId";
- }))(Foreign_Generic_Class.genericDecodeArgsArgument(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.numberDecode)))(Foreign_Generic_Class.genericCountArgsArgument))({
- sumEncoding: Foreign_Generic_Class.defaultOptions.sumEncoding,
- unwrapSingleConstructors: true,
- unwrapSingleArguments: Foreign_Generic_Class.defaultOptions.unwrapSingleArguments,
- fieldTransform: Foreign_Generic_Class.defaultOptions.fieldTransform
- })(x);
- });
- var query = Control_Bind.bind(Effect_Aff.bindAff)(Control_Promise.toAffE($foreign.queryImpl))(function (tabsArray) {
- var tabsList = Data_List.fromFoldable(Data_Foldable.foldableArray)(tabsArray);
- return Control_Bind.bind(Effect_Aff.bindAff)(Effect_Class.liftEffect(Effect_Aff.monadEffectAff)(Data_Traversable.traverse(Data_List_Types.traversableList)(Effect.applicativeEffect)(Browser_Utils.unwrapForeign(genTab)(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "Tab";
- }))(Foreign_Generic_Class.genericDecodeArgsArgument(Foreign_Generic_Class.decodeWithOptionsRecord()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordNil)(new Data_Symbol.IsSymbol(function () {
- return "windowId";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(decodeWindowId))())(new Data_Symbol.IsSymbol(function () {
- return "width";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.numberDecode)))())(new Data_Symbol.IsSymbol(function () {
- return "url";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
- return "title";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.stringDecode))())(new Data_Symbol.IsSymbol(function () {
- return "status";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
- return "sessionId";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
- return "pinned";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
- return "openerTabId";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(decodeTabId)))())(new Data_Symbol.IsSymbol(function () {
- return "lastAccessed";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.numberDecode))())(new Data_Symbol.IsSymbol(function () {
- return "isInReaderMode";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
- return "isArticle";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
- return "index";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.numberDecode))())(new Data_Symbol.IsSymbol(function () {
- return "incognito";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
- return "id";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(decodeTabId))())(new Data_Symbol.IsSymbol(function () {
- return "highlighted";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
- return "hidden";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
- return "height";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.numberDecode)))())(new Data_Symbol.IsSymbol(function () {
- return "favIconUrl";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
- return "discarded";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
- return "cookieStoreId";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
- return "autoDiscardable";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
- return "audible";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
- return "attention";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
- return "active";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())))(Foreign_Generic_Class.genericCountArgsArgument)))(tabsList)))(function (parsed) {
- return Control_Applicative.pure(Effect_Aff.applicativeAff)(parsed);
- });
- });
- var decodeTab = new Foreign_Generic_Class.Decode(function (x) {
- return Foreign_Generic.genericDecode(genTab)(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "Tab";
- }))(Foreign_Generic_Class.genericDecodeArgsArgument(Foreign_Generic_Class.decodeWithOptionsRecord()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordNil)(new Data_Symbol.IsSymbol(function () {
- return "windowId";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(decodeWindowId))())(new Data_Symbol.IsSymbol(function () {
- return "width";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.numberDecode)))())(new Data_Symbol.IsSymbol(function () {
- return "url";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
- return "title";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.stringDecode))())(new Data_Symbol.IsSymbol(function () {
- return "status";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
- return "sessionId";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
- return "pinned";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
- return "openerTabId";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(decodeTabId)))())(new Data_Symbol.IsSymbol(function () {
- return "lastAccessed";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.numberDecode))())(new Data_Symbol.IsSymbol(function () {
- return "isInReaderMode";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
- return "isArticle";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
- return "index";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.numberDecode))())(new Data_Symbol.IsSymbol(function () {
- return "incognito";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
- return "id";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(decodeTabId))())(new Data_Symbol.IsSymbol(function () {
- return "highlighted";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
- return "hidden";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
- return "height";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.numberDecode)))())(new Data_Symbol.IsSymbol(function () {
- return "favIconUrl";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
- return "discarded";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
- return "cookieStoreId";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
- return "autoDiscardable";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
- return "audible";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
- return "attention";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
- return "active";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())))(Foreign_Generic_Class.genericCountArgsArgument))({
- sumEncoding: Foreign_Generic_Class.defaultOptions.sumEncoding,
- unwrapSingleConstructors: true,
- unwrapSingleArguments: Foreign_Generic_Class.defaultOptions.unwrapSingleArguments,
- fieldTransform: Foreign_Generic_Class.defaultOptions.fieldTransform
- })(x);
- });
- module.exports = {
- TabId: TabId,
- Tab: Tab,
- query: query,
- eqWindowId: eqWindowId,
- ordWindowId: ordWindowId,
- showWindowId: showWindowId,
- genWindowId: genWindowId,
- encodeWindowId: encodeWindowId,
- decodeWindowId: decodeWindowId,
- eqTabId: eqTabId,
- ordTabId: ordTabId,
- showTabId: showTabId,
- genTabId: genTabId,
- encodeTabId: encodeTabId,
- decodeTabId: decodeTabId,
- newtypeTab: newtypeTab,
- genTab: genTab,
- showTab: showTab,
- encodeTab: encodeTab,
- decodeTab: decodeTab
- };
- },{"./foreign.js":"../output/Browser.Tabs/foreign.js","../Browser.Utils/index.js":"../output/Browser.Utils/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Promise/index.js":"../output/Control.Promise/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.Generic.Rep/index.js":"../output/Data.Generic.Rep/index.js","../Data.Generic.Rep.Show/index.js":"../output/Data.Generic.Rep.Show/index.js","../Data.List/index.js":"../output/Data.List/index.js","../Data.List.Types/index.js":"../output/Data.List.Types/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Number.Format/index.js":"../output/Data.Number.Format/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Symbol/index.js":"../output/Data.Symbol/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Effect/index.js":"../output/Effect/index.js","../Effect.Aff/index.js":"../output/Effect.Aff/index.js","../Effect.Class/index.js":"../output/Effect.Class/index.js","../Foreign.Generic/index.js":"../output/Foreign.Generic/index.js","../Foreign.Generic.Class/index.js":"../output/Foreign.Generic.Class/index.js"}],"../output/Browser.Tabs.OnCreated/foreign.js":[function(require,module,exports) {
- "use stricts";
- exports.addListenerImpl = function (listener) {
- return function () {
- browser.tabs.onCreated.addListener(listener);
- };
- };
- exports.removeListener = function (listener) {
- return function () {
- return browser.tabs.onCreated.removeListener(listener);
- };
- };
- },{}],"../output/Browser.Tabs.OnCreated/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Browser_Tabs = require("../Browser.Tabs/index.js");
- var Browser_Utils = require("../Browser.Utils/index.js");
- var Control_Monad_Except = require("../Control.Monad.Except/index.js");
- var Data_Either = require("../Data.Either/index.js");
- var Data_Foldable = require("../Data.Foldable/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_List_Types = require("../Data.List.Types/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Data_Symbol = require("../Data.Symbol/index.js");
- var Effect_Exception = require("../Effect.Exception/index.js");
- var Foreign = require("../Foreign/index.js");
- var Foreign_Generic = require("../Foreign.Generic/index.js");
- var Foreign_Generic_Class = require("../Foreign.Generic.Class/index.js");
- var addListener = function addListener(listener) {
- var foreignListener = function foreignListener(f) {
- var v = Control_Monad_Except.runExcept(Foreign_Generic.genericDecode(Browser_Tabs.genTab)(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "Tab";
- }))(Foreign_Generic_Class.genericDecodeArgsArgument(Foreign_Generic_Class.decodeWithOptionsRecord()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordCons()(Foreign_Generic_Class.decodeRecordNil)(new Data_Symbol.IsSymbol(function () {
- return "windowId";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Browser_Tabs.decodeWindowId))())(new Data_Symbol.IsSymbol(function () {
- return "width";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.numberDecode)))())(new Data_Symbol.IsSymbol(function () {
- return "url";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
- return "title";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.stringDecode))())(new Data_Symbol.IsSymbol(function () {
- return "status";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
- return "sessionId";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
- return "pinned";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
- return "openerTabId";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Browser_Tabs.decodeTabId)))())(new Data_Symbol.IsSymbol(function () {
- return "lastAccessed";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.numberDecode))())(new Data_Symbol.IsSymbol(function () {
- return "isInReaderMode";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
- return "isArticle";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
- return "index";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.numberDecode))())(new Data_Symbol.IsSymbol(function () {
- return "incognito";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
- return "id";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Browser_Tabs.decodeTabId))())(new Data_Symbol.IsSymbol(function () {
- return "highlighted";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
- return "hidden";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
- return "height";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.numberDecode)))())(new Data_Symbol.IsSymbol(function () {
- return "favIconUrl";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
- return "discarded";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
- return "cookieStoreId";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
- return "autoDiscardable";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
- return "audible";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
- return "attention";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
- return "active";
- }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())))(Foreign_Generic_Class.genericCountArgsArgument))({
- sumEncoding: Foreign_Generic_Class.defaultOptions.sumEncoding,
- unwrapSingleConstructors: true,
- unwrapSingleArguments: Foreign_Generic_Class.defaultOptions.unwrapSingleArguments,
- fieldTransform: Foreign_Generic_Class.defaultOptions.fieldTransform
- })(f));
- if (v instanceof Data_Either.Left) {
- return Effect_Exception["throw"](Data_Foldable.intercalate(Data_List_Types.foldableNonEmptyList)(Data_Monoid.monoidString)(", ")(Data_Functor.map(Data_List_Types.functorNonEmptyList)(Foreign.renderForeignError)(v.value0)));
- }
- ;
- if (v instanceof Data_Either.Right) {
- return listener(v.value0);
- }
- ;
- throw new Error("Failed pattern match at Browser.Tabs.OnCreated (line 24, column 23 - line 26, column 30): " + [v.constructor.name]);
- };
- return function __do() {
- var lst = Browser_Utils.mkListenerOne(foreignListener)();
- return $foreign.addListenerImpl(lst)();
- };
- };
- module.exports = {
- addListener: addListener,
- removeListener: $foreign.removeListener
- };
- },{"./foreign.js":"../output/Browser.Tabs.OnCreated/foreign.js","../Browser.Tabs/index.js":"../output/Browser.Tabs/index.js","../Browser.Utils/index.js":"../output/Browser.Utils/index.js","../Control.Monad.Except/index.js":"../output/Control.Monad.Except/index.js","../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.List.Types/index.js":"../output/Data.List.Types/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Symbol/index.js":"../output/Data.Symbol/index.js","../Effect.Exception/index.js":"../output/Effect.Exception/index.js","../Foreign/index.js":"../output/Foreign/index.js","../Foreign.Generic/index.js":"../output/Foreign.Generic/index.js","../Foreign.Generic.Class/index.js":"../output/Foreign.Generic.Class/index.js"}],"../output/Browser.Tabs.OnRemoved/foreign.js":[function(require,module,exports) {
- "use stricts";
- exports.addListener = function (listener) {
- return function () {
- browser.tabs.onRemoved.addListener(listener);
- };
- };
- exports.removeListener = function (listener) {
- return function () {
- return browser.tabs.onRemoved.removeListener(listener);
- };
- };
- },{}],"../output/Browser.Tabs.OnRemoved/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- module.exports = {
- addListener: $foreign.addListener,
- removeListener: $foreign.removeListener
- };
- },{"./foreign.js":"../output/Browser.Tabs.OnRemoved/foreign.js"}],"../output/Data.Array.NonEmpty.Internal/foreign.js":[function(require,module,exports) {
- "use strict";
- exports.fold1Impl = function (f) {
- return function (xs) {
- var acc = xs[0];
- var len = xs.length;
- for (var i = 1; i < len; i++) {
- acc = f(acc)(xs[i]);
- }
- return acc;
- };
- };
- exports.traverse1Impl = function () {
- function Cont(fn) {
- this.fn = fn;
- }
- var emptyList = {};
- var ConsCell = function ConsCell(head, tail) {
- this.head = head;
- this.tail = tail;
- };
- function finalCell(head) {
- return new ConsCell(head, emptyList);
- }
- function consList(x) {
- return function (xs) {
- return new ConsCell(x, xs);
- };
- }
- function listToArray(list) {
- var arr = [];
- var xs = list;
- while (xs !== emptyList) {
- arr.push(xs.head);
- xs = xs.tail;
- }
- return arr;
- }
- return function (apply) {
- return function (map) {
- return function (f) {
- var buildFrom = function buildFrom(x, ys) {
- return apply(map(consList)(f(x)))(ys);
- };
- var go = function go(acc, currentLen, xs) {
- if (currentLen === 0) {
- return acc;
- } else {
- var last = xs[currentLen - 1];
- return new Cont(function () {
- var built = go(buildFrom(last, acc), currentLen - 1, xs);
- return built;
- });
- }
- };
- return function (array) {
- var acc = map(finalCell)(f(array[array.length - 1]));
- var result = go(acc, array.length - 1, array);
- while (result instanceof Cont) {
- result = result.fn();
- }
- return map(listToArray)(result);
- };
- };
- };
- };
- }();
- },{}],"../output/Data.Array.NonEmpty.Internal/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Control_Alt = require("../Control.Alt/index.js");
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Monad = require("../Control.Monad/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Foldable = require("../Data.Foldable/index.js");
- var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Semigroup_Foldable = require("../Data.Semigroup.Foldable/index.js");
- var Data_Semigroup_Traversable = require("../Data.Semigroup.Traversable/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Data_Traversable = require("../Data.Traversable/index.js");
- var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js");
- var Data_Unfoldable1 = require("../Data.Unfoldable1/index.js");
- var NonEmptyArray = function NonEmptyArray(x) {
- return x;
- };
- var unfoldable1NonEmptyArray = Data_Unfoldable1.unfoldable1Array;
- var traversableWithIndexNonEmptyArray = Data_TraversableWithIndex.traversableWithIndexArray;
- var traversableNonEmptyArray = Data_Traversable.traversableArray;
- var showNonEmptyArray = function showNonEmptyArray(dictShow) {
- return new Data_Show.Show(function (v) {
- return "(NonEmptyArray " + (Data_Show.show(Data_Show.showArray(dictShow))(v) + ")");
- });
- };
- var semigroupNonEmptyArray = Data_Semigroup.semigroupArray;
- var ordNonEmptyArray = function ordNonEmptyArray(dictOrd) {
- return Data_Ord.ordArray(dictOrd);
- };
- var ord1NonEmptyArray = Data_Ord.ord1Array;
- var monadNonEmptyArray = Control_Monad.monadArray;
- var functorWithIndexNonEmptyArray = Data_FunctorWithIndex.functorWithIndexArray;
- var functorNonEmptyArray = Data_Functor.functorArray;
- var foldableWithIndexNonEmptyArray = Data_FoldableWithIndex.foldableWithIndexArray;
- var foldableNonEmptyArray = Data_Foldable.foldableArray;
- var foldable1NonEmptyArray = new Data_Semigroup_Foldable.Foldable1(function () {
- return foldableNonEmptyArray;
- }, function (dictSemigroup) {
- return $foreign.fold1Impl(Data_Semigroup.append(dictSemigroup));
- }, function (dictSemigroup) {
- return Data_Semigroup_Foldable.foldMap1Default(foldable1NonEmptyArray)(functorNonEmptyArray)(dictSemigroup);
- });
- var traversable1NonEmptyArray = new Data_Semigroup_Traversable.Traversable1(function () {
- return foldable1NonEmptyArray;
- }, function () {
- return traversableNonEmptyArray;
- }, function (dictApply) {
- return Data_Semigroup_Traversable.sequence1Default(traversable1NonEmptyArray)(dictApply);
- }, function (dictApply) {
- return $foreign.traverse1Impl(Control_Apply.apply(dictApply))(Data_Functor.map(dictApply.Functor0()));
- });
- var eqNonEmptyArray = function eqNonEmptyArray(dictEq) {
- return Data_Eq.eqArray(dictEq);
- };
- var eq1NonEmptyArray = Data_Eq.eq1Array;
- var bindNonEmptyArray = Control_Bind.bindArray;
- var applyNonEmptyArray = Control_Apply.applyArray;
- var applicativeNonEmptyArray = Control_Applicative.applicativeArray;
- var altNonEmptyArray = Control_Alt.altArray;
- module.exports = {
- showNonEmptyArray: showNonEmptyArray,
- eqNonEmptyArray: eqNonEmptyArray,
- eq1NonEmptyArray: eq1NonEmptyArray,
- ordNonEmptyArray: ordNonEmptyArray,
- ord1NonEmptyArray: ord1NonEmptyArray,
- semigroupNonEmptyArray: semigroupNonEmptyArray,
- functorNonEmptyArray: functorNonEmptyArray,
- functorWithIndexNonEmptyArray: functorWithIndexNonEmptyArray,
- foldableNonEmptyArray: foldableNonEmptyArray,
- foldableWithIndexNonEmptyArray: foldableWithIndexNonEmptyArray,
- foldable1NonEmptyArray: foldable1NonEmptyArray,
- unfoldable1NonEmptyArray: unfoldable1NonEmptyArray,
- traversableNonEmptyArray: traversableNonEmptyArray,
- traversableWithIndexNonEmptyArray: traversableWithIndexNonEmptyArray,
- traversable1NonEmptyArray: traversable1NonEmptyArray,
- applyNonEmptyArray: applyNonEmptyArray,
- applicativeNonEmptyArray: applicativeNonEmptyArray,
- bindNonEmptyArray: bindNonEmptyArray,
- monadNonEmptyArray: monadNonEmptyArray,
- altNonEmptyArray: altNonEmptyArray
- };
- },{"./foreign.js":"../output/Data.Array.NonEmpty.Internal/foreign.js","../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.FoldableWithIndex/index.js":"../output/Data.FoldableWithIndex/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.FunctorWithIndex/index.js":"../output/Data.FunctorWithIndex/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Semigroup.Foldable/index.js":"../output/Data.Semigroup.Foldable/index.js","../Data.Semigroup.Traversable/index.js":"../output/Data.Semigroup.Traversable/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Data.TraversableWithIndex/index.js":"../output/Data.TraversableWithIndex/index.js","../Data.Unfoldable1/index.js":"../output/Data.Unfoldable1/index.js"}],"../output/Data.Array.NonEmpty/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Bind = require("../Control.Bind/index.js");
- var Data_Array = require("../Data.Array/index.js");
- var Data_Array_NonEmpty_Internal = require("../Data.Array.NonEmpty.Internal/index.js");
- var Data_Bifunctor = require("../Data.Bifunctor/index.js");
- var Data_Boolean = require("../Data.Boolean/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_NonEmpty = require("../Data.NonEmpty/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Tuple = require("../Data.Tuple/index.js");
- var Data_Unfoldable1 = require("../Data.Unfoldable1/index.js");
- var Unsafe_Coerce = require("../Unsafe.Coerce/index.js");
- var unsafeFromArrayF = Unsafe_Coerce.unsafeCoerce;
- var unsafeFromArray = Unsafe_Coerce.unsafeCoerce;
- var toArray = Unsafe_Coerce.unsafeCoerce;
- var unionBy$prime = function unionBy$prime(eq) {
- return function (xs) {
- var $39 = Data_Array.unionBy(eq)(toArray(xs));
- return function ($40) {
- return unsafeFromArray($39($40));
- };
- };
- };
- var union$prime = function union$prime(dictEq) {
- return unionBy$prime(Data_Eq.eq(dictEq));
- };
- var unionBy = function unionBy(eq) {
- return function (xs) {
- var $41 = unionBy$prime(eq)(xs);
- return function ($42) {
- return $41(toArray($42));
- };
- };
- };
- var union = function union(dictEq) {
- return unionBy(Data_Eq.eq(dictEq));
- };
- var unzip = function () {
- var $43 = Data_Bifunctor.bimap(Data_Tuple.bifunctorTuple)(unsafeFromArray)(unsafeFromArray);
- return function ($44) {
- return $43(Data_Array.unzip(toArray($44)));
- };
- }();
- var updateAt = function updateAt(i) {
- return function (x) {
- var $45 = Data_Array.updateAt(i)(x);
- return function ($46) {
- return unsafeFromArrayF($45(toArray($46)));
- };
- };
- };
- var zip = function zip(xs) {
- return function (ys) {
- return unsafeFromArray(Data_Array.zip(toArray(xs))(toArray(ys)));
- };
- };
- var zipWith = function zipWith(f) {
- return function (xs) {
- return function (ys) {
- return unsafeFromArray(Data_Array.zipWith(f)(toArray(xs))(toArray(ys)));
- };
- };
- };
- var zipWithA = function zipWithA(dictApplicative) {
- return function (f) {
- return function (xs) {
- return function (ys) {
- return unsafeFromArrayF(Data_Array.zipWithA(dictApplicative)(f)(toArray(xs))(toArray(ys)));
- };
- };
- };
- };
- var some = function some(dictAlternative) {
- return function (dictLazy) {
- var $47 = Data_Array.some(dictAlternative)(dictLazy);
- return function ($48) {
- return unsafeFromArrayF($47($48));
- };
- };
- };
- var snoc$prime = function snoc$prime(xs) {
- return function (x) {
- return unsafeFromArray(Data_Array.snoc(xs)(x));
- };
- };
- var snoc = function snoc(xs) {
- return function (x) {
- return unsafeFromArray(Data_Array.snoc(toArray(xs))(x));
- };
- };
- var singleton = function singleton($49) {
- return unsafeFromArray(Data_Array.singleton($49));
- };
- var replicate = function replicate(i) {
- return function (x) {
- return unsafeFromArray(Data_Array.replicate(Data_Ord.max(Data_Ord.ordInt)(1)(i))(x));
- };
- };
- var range = function range(x) {
- return function (y) {
- return unsafeFromArray(Data_Array.range(x)(y));
- };
- };
- var modifyAt = function modifyAt(i) {
- return function (f) {
- var $50 = Data_Array.modifyAt(i)(f);
- return function ($51) {
- return unsafeFromArrayF($50(toArray($51)));
- };
- };
- };
- var intersectBy$prime = function intersectBy$prime(eq) {
- return function (xs) {
- return Data_Array.intersectBy(eq)(toArray(xs));
- };
- };
- var intersectBy = function intersectBy(eq) {
- return function (xs) {
- var $52 = intersectBy$prime(eq)(xs);
- return function ($53) {
- return $52(toArray($53));
- };
- };
- };
- var intersect$prime = function intersect$prime(dictEq) {
- return intersectBy$prime(Data_Eq.eq(dictEq));
- };
- var intersect = function intersect(dictEq) {
- return intersectBy(Data_Eq.eq(dictEq));
- };
- var insertAt = function insertAt(i) {
- return function (x) {
- var $54 = Data_Array.insertAt(i)(x);
- return function ($55) {
- return unsafeFromArrayF($54(toArray($55)));
- };
- };
- };
- var fromFoldable1 = function fromFoldable1(dictFoldable1) {
- var $56 = Data_Array.fromFoldable(dictFoldable1.Foldable0());
- return function ($57) {
- return unsafeFromArray($56($57));
- };
- };
- var fromArray = function fromArray(xs) {
- if (Data_Array.length(xs) > 0) {
- return new Data_Maybe.Just(unsafeFromArray(xs));
- }
- ;
- if (Data_Boolean.otherwise) {
- return Data_Maybe.Nothing.value;
- }
- ;
- throw new Error("Failed pattern match at Data.Array.NonEmpty (line 134, column 1 - line 134, column 58): " + [xs.constructor.name]);
- };
- var fromFoldable = function fromFoldable(dictFoldable) {
- var $58 = Data_Array.fromFoldable(dictFoldable);
- return function ($59) {
- return fromArray($58($59));
- };
- };
- var difference$prime = function difference$prime(dictEq) {
- return function (xs) {
- return Data_Array.difference(dictEq)(toArray(xs));
- };
- };
- var cons$prime = function cons$prime(x) {
- return function (xs) {
- return unsafeFromArray(Data_Array.cons(x)(xs));
- };
- };
- var fromNonEmpty = function fromNonEmpty(v) {
- return cons$prime(v.value0)(v.value1);
- };
- var concatMap = Data_Function.flip(Control_Bind.bind(Data_Array_NonEmpty_Internal.bindNonEmptyArray));
- var concat = function () {
- var $60 = Data_Functor.map(Data_Array_NonEmpty_Internal.functorNonEmptyArray)(toArray);
- return function ($61) {
- return unsafeFromArray(Data_Array.concat(toArray($60($61))));
- };
- }();
- var appendArray = function appendArray(xs) {
- return function (ys) {
- return unsafeFromArray(Data_Semigroup.append(Data_Semigroup.semigroupArray)(toArray(xs))(ys));
- };
- };
- var alterAt = function alterAt(i) {
- return function (f) {
- var $62 = Data_Array.alterAt(i)(f);
- return function ($63) {
- return $62(toArray($63));
- };
- };
- };
- var adaptMaybe = function adaptMaybe(f) {
- var $64 = Data_Maybe.fromJust();
- return function ($65) {
- return $64(f(toArray($65)));
- };
- };
- var head = adaptMaybe(Data_Array.head);
- var init = adaptMaybe(Data_Array.init);
- var last = adaptMaybe(Data_Array.last);
- var tail = adaptMaybe(Data_Array.tail);
- var uncons = adaptMaybe(Data_Array.uncons);
- var toNonEmpty = function toNonEmpty($66) {
- return function (v) {
- return new Data_NonEmpty.NonEmpty(v.head, v.tail);
- }(uncons($66));
- };
- var unsnoc = adaptMaybe(Data_Array.unsnoc);
- var adaptAny = function adaptAny(f) {
- return function ($67) {
- return f(toArray($67));
- };
- };
- var catMaybes = adaptAny(Data_Array.catMaybes);
- var $$delete = function $$delete(dictEq) {
- return function (x) {
- return adaptAny(Data_Array["delete"](dictEq)(x));
- };
- };
- var deleteAt = function deleteAt(i) {
- return adaptAny(Data_Array.deleteAt(i));
- };
- var deleteBy = function deleteBy(f) {
- return function (x) {
- return adaptAny(Data_Array.deleteBy(f)(x));
- };
- };
- var difference = function difference(dictEq) {
- return function (xs) {
- return adaptAny(difference$prime(dictEq)(xs));
- };
- };
- var drop = function drop(i) {
- return adaptAny(Data_Array.drop(i));
- };
- var dropEnd = function dropEnd(i) {
- return adaptAny(Data_Array.dropEnd(i));
- };
- var dropWhile = function dropWhile(f) {
- return adaptAny(Data_Array.dropWhile(f));
- };
- var elemIndex = function elemIndex(dictEq) {
- return function (x) {
- return adaptAny(Data_Array.elemIndex(dictEq)(x));
- };
- };
- var elemLastIndex = function elemLastIndex(dictEq) {
- return function (x) {
- return adaptAny(Data_Array.elemLastIndex(dictEq)(x));
- };
- };
- var filter = function filter(f) {
- return adaptAny(Data_Array.filter(f));
- };
- var filterA = function filterA(dictApplicative) {
- return function (f) {
- return adaptAny(Data_Array.filterA(dictApplicative)(f));
- };
- };
- var findIndex = function findIndex(x) {
- return adaptAny(Data_Array.findIndex(x));
- };
- var findLastIndex = function findLastIndex(x) {
- return adaptAny(Data_Array.findLastIndex(x));
- };
- var foldM = function foldM(dictMonad) {
- return function (f) {
- return function (acc) {
- return adaptAny(Data_Array.foldM(dictMonad)(f)(acc));
- };
- };
- };
- var foldRecM = function foldRecM(dictMonadRec) {
- return function (f) {
- return function (acc) {
- return adaptAny(Data_Array.foldRecM(dictMonadRec)(f)(acc));
- };
- };
- };
- var index = adaptAny(Data_Array.index);
- var length = adaptAny(Data_Array.length);
- var mapMaybe = function mapMaybe(f) {
- return adaptAny(Data_Array.mapMaybe(f));
- };
- var partition = function partition(f) {
- return adaptAny(Data_Array.partition(f));
- };
- var slice = function slice(start) {
- return function (end) {
- return adaptAny(Data_Array.slice(start)(end));
- };
- };
- var span = function span(f) {
- return adaptAny(Data_Array.span(f));
- };
- var take = function take(i) {
- return adaptAny(Data_Array.take(i));
- };
- var takeEnd = function takeEnd(i) {
- return adaptAny(Data_Array.takeEnd(i));
- };
- var takeWhile = function takeWhile(f) {
- return adaptAny(Data_Array.takeWhile(f));
- };
- var toUnfoldable = function toUnfoldable(dictUnfoldable) {
- return adaptAny(Data_Array.toUnfoldable(dictUnfoldable));
- };
- var unsafeAdapt = function unsafeAdapt(f) {
- var $68 = adaptAny(f);
- return function ($69) {
- return unsafeFromArray($68($69));
- };
- };
- var cons = function cons(x) {
- return unsafeAdapt(Data_Array.cons(x));
- };
- var insert = function insert(dictOrd) {
- return function (x) {
- return unsafeAdapt(Data_Array.insert(dictOrd)(x));
- };
- };
- var insertBy = function insertBy(f) {
- return function (x) {
- return unsafeAdapt(Data_Array.insertBy(f)(x));
- };
- };
- var modifyAtIndices = function modifyAtIndices(dictFoldable) {
- return function (is) {
- return function (f) {
- return unsafeAdapt(Data_Array.modifyAtIndices(dictFoldable)(is)(f));
- };
- };
- };
- var nub = function nub(dictOrd) {
- return unsafeAdapt(Data_Array.nub(dictOrd));
- };
- var nubBy = function nubBy(f) {
- return unsafeAdapt(Data_Array.nubBy(f));
- };
- var nubByEq = function nubByEq(f) {
- return unsafeAdapt(Data_Array.nubByEq(f));
- };
- var nubEq = function nubEq(dictEq) {
- return unsafeAdapt(Data_Array.nubEq(dictEq));
- };
- var reverse = unsafeAdapt(Data_Array.reverse);
- var sort = function sort(dictOrd) {
- return unsafeAdapt(Data_Array.sort(dictOrd));
- };
- var sortBy = function sortBy(f) {
- return unsafeAdapt(Data_Array.sortBy(f));
- };
- var sortWith = function sortWith(dictOrd) {
- return function (f) {
- return unsafeAdapt(Data_Array.sortWith(dictOrd)(f));
- };
- };
- var updateAtIndices = function updateAtIndices(dictFoldable) {
- return function (pairs) {
- return unsafeAdapt(Data_Array.updateAtIndices(dictFoldable)(pairs));
- };
- };
- var unsafeIndex = function unsafeIndex(dictPartial) {
- return adaptAny(Data_Array.unsafeIndex());
- };
- var toUnfoldable1 = function toUnfoldable1(dictUnfoldable1) {
- return function (xs) {
- var len = length(xs);
- var f = function f(i) {
- return Data_Tuple.Tuple.create(unsafeIndex()(xs)(i))(function () {
- var $38 = i < (len - 1 | 0);
- if ($38) {
- return new Data_Maybe.Just(i + 1 | 0);
- }
- ;
- return Data_Maybe.Nothing.value;
- }());
- };
- return Data_Unfoldable1.unfoldr1(dictUnfoldable1)(f)(0);
- };
- };
- module.exports = {
- fromArray: fromArray,
- fromNonEmpty: fromNonEmpty,
- toArray: toArray,
- toNonEmpty: toNonEmpty,
- fromFoldable: fromFoldable,
- fromFoldable1: fromFoldable1,
- toUnfoldable: toUnfoldable,
- toUnfoldable1: toUnfoldable1,
- singleton: singleton,
- range: range,
- replicate: replicate,
- some: some,
- length: length,
- cons: cons,
- "cons'": cons$prime,
- snoc: snoc,
- "snoc'": snoc$prime,
- appendArray: appendArray,
- insert: insert,
- insertBy: insertBy,
- head: head,
- last: last,
- tail: tail,
- init: init,
- uncons: uncons,
- unsnoc: unsnoc,
- index: index,
- elemIndex: elemIndex,
- elemLastIndex: elemLastIndex,
- findIndex: findIndex,
- findLastIndex: findLastIndex,
- insertAt: insertAt,
- deleteAt: deleteAt,
- updateAt: updateAt,
- updateAtIndices: updateAtIndices,
- modifyAt: modifyAt,
- modifyAtIndices: modifyAtIndices,
- alterAt: alterAt,
- reverse: reverse,
- concat: concat,
- concatMap: concatMap,
- filter: filter,
- partition: partition,
- filterA: filterA,
- mapMaybe: mapMaybe,
- catMaybes: catMaybes,
- sort: sort,
- sortBy: sortBy,
- sortWith: sortWith,
- slice: slice,
- take: take,
- takeEnd: takeEnd,
- takeWhile: takeWhile,
- drop: drop,
- dropEnd: dropEnd,
- dropWhile: dropWhile,
- span: span,
- nub: nub,
- nubBy: nubBy,
- nubEq: nubEq,
- nubByEq: nubByEq,
- union: union,
- "union'": union$prime,
- unionBy: unionBy,
- "unionBy'": unionBy$prime,
- "delete": $$delete,
- deleteBy: deleteBy,
- difference: difference,
- "difference'": difference$prime,
- intersect: intersect,
- "intersect'": intersect$prime,
- intersectBy: intersectBy,
- "intersectBy'": intersectBy$prime,
- zipWith: zipWith,
- zipWithA: zipWithA,
- zip: zip,
- unzip: unzip,
- foldM: foldM,
- foldRecM: foldRecM,
- unsafeIndex: unsafeIndex
- };
- },{"../Control.Bind/index.js":"../output/Control.Bind/index.js","../Data.Array/index.js":"../output/Data.Array/index.js","../Data.Array.NonEmpty.Internal/index.js":"../output/Data.Array.NonEmpty.Internal/index.js","../Data.Bifunctor/index.js":"../output/Data.Bifunctor/index.js","../Data.Boolean/index.js":"../output/Data.Boolean/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.NonEmpty/index.js":"../output/Data.NonEmpty/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js","../Data.Unfoldable1/index.js":"../output/Data.Unfoldable1/index.js","../Unsafe.Coerce/index.js":"../output/Unsafe.Coerce/index.js"}],"../output/Data.Profunctor/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Category = require("../Control.Category/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Profunctor = function Profunctor(dimap) {
- this.dimap = dimap;
- };
- var profunctorFn = new Profunctor(function (a2b) {
- return function (c2d) {
- return function (b2c) {
- return function ($9) {
- return c2d(b2c(a2b($9)));
- };
- };
- };
- });
- var dimap = function dimap(dict) {
- return dict.dimap;
- };
- var lcmap = function lcmap(dictProfunctor) {
- return function (a2b) {
- return dimap(dictProfunctor)(a2b)(Control_Category.identity(Control_Category.categoryFn));
- };
- };
- var rmap = function rmap(dictProfunctor) {
- return function (b2c) {
- return dimap(dictProfunctor)(Control_Category.identity(Control_Category.categoryFn))(b2c);
- };
- };
- var unwrapIso = function unwrapIso(dictProfunctor) {
- return function (dictNewtype) {
- return dimap(dictProfunctor)(Data_Newtype.wrap(dictNewtype))(Data_Newtype.unwrap(dictNewtype));
- };
- };
- var wrapIso = function wrapIso(dictProfunctor) {
- return function (dictNewtype) {
- return function (v) {
- return dimap(dictProfunctor)(Data_Newtype.unwrap(dictNewtype))(Data_Newtype.wrap(dictNewtype));
- };
- };
- };
- var arr = function arr(dictCategory) {
- return function (dictProfunctor) {
- return function (f) {
- return rmap(dictProfunctor)(f)(Control_Category.identity(dictCategory));
- };
- };
- };
- module.exports = {
- dimap: dimap,
- Profunctor: Profunctor,
- lcmap: lcmap,
- rmap: rmap,
- arr: arr,
- unwrapIso: unwrapIso,
- wrapIso: wrapIso,
- profunctorFn: profunctorFn
- };
- },{"../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js"}],"../output/Data.Profunctor.Choice/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Category = require("../Control.Category/index.js");
- var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
- var Data_Either = require("../Data.Either/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Profunctor = require("../Data.Profunctor/index.js");
- var Choice = function Choice(Profunctor0, left, right) {
- this.Profunctor0 = Profunctor0;
- this.left = left;
- this.right = right;
- };
- var right = function right(dict) {
- return dict.right;
- };
- var left = function left(dict) {
- return dict.left;
- };
- var splitChoice = function splitChoice(dictCategory) {
- return function (dictChoice) {
- return function (l) {
- return function (r) {
- return Control_Semigroupoid.composeFlipped(dictCategory.Semigroupoid0())(left(dictChoice)(l))(right(dictChoice)(r));
- };
- };
- };
- };
- var fanin = function fanin(dictCategory) {
- return function (dictChoice) {
- return function (l) {
- return function (r) {
- var join = Data_Profunctor.dimap(dictChoice.Profunctor0())(Data_Either.either(Control_Category.identity(Control_Category.categoryFn))(Control_Category.identity(Control_Category.categoryFn)))(Control_Category.identity(Control_Category.categoryFn))(Control_Category.identity(dictCategory));
- return Control_Semigroupoid.composeFlipped(dictCategory.Semigroupoid0())(splitChoice(dictCategory)(dictChoice)(l)(r))(join);
- };
- };
- };
- };
- var choiceFn = new Choice(function () {
- return Data_Profunctor.profunctorFn;
- }, function (v) {
- return function (v1) {
- if (v1 instanceof Data_Either.Left) {
- return Data_Either.Left.create(v(v1.value0));
- }
- ;
- if (v1 instanceof Data_Either.Right) {
- return new Data_Either.Right(v1.value0);
- }
- ;
- throw new Error("Failed pattern match at Data.Profunctor.Choice (line 32, column 1 - line 35, column 16): " + [v.constructor.name, v1.constructor.name]);
- };
- }, Data_Functor.map(Data_Either.functorEither));
- module.exports = {
- left: left,
- right: right,
- Choice: Choice,
- splitChoice: splitChoice,
- fanin: fanin,
- choiceFn: choiceFn
- };
- },{"../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Semigroupoid/index.js":"../output/Control.Semigroupoid/index.js","../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Profunctor/index.js":"../output/Data.Profunctor/index.js"}],"../output/Data.Profunctor.Closed/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
- var Data_Profunctor = require("../Data.Profunctor/index.js");
- var Closed = function Closed(Profunctor0, closed) {
- this.Profunctor0 = Profunctor0;
- this.closed = closed;
- };
- var closedFunction = new Closed(function () {
- return Data_Profunctor.profunctorFn;
- }, Control_Semigroupoid.compose(Control_Semigroupoid.semigroupoidFn));
- var closed = function closed(dict) {
- return dict.closed;
- };
- module.exports = {
- closed: closed,
- Closed: Closed,
- closedFunction: closedFunction
- };
- },{"../Control.Semigroupoid/index.js":"../output/Control.Semigroupoid/index.js","../Data.Profunctor/index.js":"../output/Data.Profunctor/index.js"}],"../output/Data.Profunctor.Strong/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Category = require("../Control.Category/index.js");
- var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Profunctor = require("../Data.Profunctor/index.js");
- var Data_Tuple = require("../Data.Tuple/index.js");
- var Strong = function Strong(Profunctor0, first, second) {
- this.Profunctor0 = Profunctor0;
- this.first = first;
- this.second = second;
- };
- var strongFn = new Strong(function () {
- return Data_Profunctor.profunctorFn;
- }, function (a2b) {
- return function (v) {
- return new Data_Tuple.Tuple(a2b(v.value0), v.value1);
- };
- }, Data_Functor.map(Data_Tuple.functorTuple));
- var second = function second(dict) {
- return dict.second;
- };
- var first = function first(dict) {
- return dict.first;
- };
- var splitStrong = function splitStrong(dictCategory) {
- return function (dictStrong) {
- return function (l) {
- return function (r) {
- return Control_Semigroupoid.composeFlipped(dictCategory.Semigroupoid0())(first(dictStrong)(l))(second(dictStrong)(r));
- };
- };
- };
- };
- var fanout = function fanout(dictCategory) {
- return function (dictStrong) {
- return function (l) {
- return function (r) {
- var split = Data_Profunctor.dimap(dictStrong.Profunctor0())(Control_Category.identity(Control_Category.categoryFn))(function (a) {
- return new Data_Tuple.Tuple(a, a);
- })(Control_Category.identity(dictCategory));
- return Control_Semigroupoid.composeFlipped(dictCategory.Semigroupoid0())(split)(splitStrong(dictCategory)(dictStrong)(l)(r));
- };
- };
- };
- };
- module.exports = {
- first: first,
- second: second,
- Strong: Strong,
- splitStrong: splitStrong,
- fanout: fanout,
- strongFn: strongFn
- };
- },{"../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Semigroupoid/index.js":"../output/Control.Semigroupoid/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Profunctor/index.js":"../output/Data.Profunctor/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js"}],"../output/Data.Profunctor.Star/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Alt = require("../Control.Alt/index.js");
- var Control_Alternative = require("../Control.Alternative/index.js");
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Category = require("../Control.Category/index.js");
- var Control_Monad = require("../Control.Monad/index.js");
- var Control_MonadPlus = require("../Control.MonadPlus/index.js");
- var Control_MonadZero = require("../Control.MonadZero/index.js");
- var Control_Plus = require("../Control.Plus/index.js");
- var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
- var Data_Distributive = require("../Data.Distributive/index.js");
- var Data_Either = require("../Data.Either/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Functor_Invariant = require("../Data.Functor.Invariant/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Profunctor = require("../Data.Profunctor/index.js");
- var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js");
- var Data_Profunctor_Closed = require("../Data.Profunctor.Closed/index.js");
- var Data_Profunctor_Strong = require("../Data.Profunctor.Strong/index.js");
- var Data_Tuple = require("../Data.Tuple/index.js");
- var Star = function Star(x) {
- return x;
- };
- var semigroupoidStar = function semigroupoidStar(dictBind) {
- return new Control_Semigroupoid.Semigroupoid(function (v) {
- return function (v1) {
- return function (x) {
- return Control_Bind.bind(dictBind)(v1(x))(v);
- };
- };
- });
- };
- var profunctorStar = function profunctorStar(dictFunctor) {
- return new Data_Profunctor.Profunctor(function (f) {
- return function (g) {
- return function (v) {
- var $78 = Data_Functor.map(dictFunctor)(g);
- return function ($79) {
- return $78(v(f($79)));
- };
- };
- };
- });
- };
- var strongStar = function strongStar(dictFunctor) {
- return new Data_Profunctor_Strong.Strong(function () {
- return profunctorStar(dictFunctor);
- }, function (v) {
- return function (v1) {
- return Data_Functor.map(dictFunctor)(function (v2) {
- return new Data_Tuple.Tuple(v2, v1.value1);
- })(v(v1.value0));
- };
- }, function (v) {
- return function (v1) {
- return Data_Functor.map(dictFunctor)(Data_Tuple.Tuple.create(v1.value0))(v(v1.value1));
- };
- });
- };
- var newtypeStar = new Data_Newtype.Newtype(function (n) {
- return n;
- }, Star);
- var invariantStar = function invariantStar(dictInvariant) {
- return new Data_Functor_Invariant.Invariant(function (f) {
- return function (g) {
- return function (v) {
- var $80 = Data_Functor_Invariant.imap(dictInvariant)(f)(g);
- return function ($81) {
- return $80(v($81));
- };
- };
- };
- });
- };
- var hoistStar = function hoistStar(f) {
- return function (v) {
- return function ($82) {
- return f(v($82));
- };
- };
- };
- var functorStar = function functorStar(dictFunctor) {
- return new Data_Functor.Functor(function (f) {
- return function (v) {
- var $83 = Data_Functor.map(dictFunctor)(f);
- return function ($84) {
- return $83(v($84));
- };
- };
- });
- };
- var distributiveStar = function distributiveStar(dictDistributive) {
- return new Data_Distributive.Distributive(function () {
- return functorStar(dictDistributive.Functor0());
- }, function (dictFunctor) {
- return function (f) {
- var $85 = Data_Distributive.distribute(distributiveStar(dictDistributive))(dictFunctor);
- var $86 = Data_Functor.map(dictFunctor)(f);
- return function ($87) {
- return $85($86($87));
- };
- };
- }, function (dictFunctor) {
- return function (f) {
- return function (a) {
- return Data_Distributive.collect(dictDistributive)(dictFunctor)(function (v) {
- return v(a);
- })(f);
- };
- };
- });
- };
- var closedStar = function closedStar(dictDistributive) {
- return new Data_Profunctor_Closed.Closed(function () {
- return profunctorStar(dictDistributive.Functor0());
- }, function (v) {
- return function (g) {
- return Data_Distributive.distribute(dictDistributive)(Data_Functor.functorFn)(function ($88) {
- return v(g($88));
- });
- };
- });
- };
- var choiceStar = function choiceStar(dictApplicative) {
- return new Data_Profunctor_Choice.Choice(function () {
- return profunctorStar(dictApplicative.Apply0().Functor0());
- }, function (v) {
- return Star(Data_Either.either(function () {
- var $89 = Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Either.Left.create);
- return function ($90) {
- return $89(v($90));
- };
- }())(function () {
- var $91 = Control_Applicative.pure(dictApplicative);
- return function ($92) {
- return $91(Data_Either.Right.create($92));
- };
- }()));
- }, function (v) {
- return Star(Data_Either.either(function () {
- var $93 = Control_Applicative.pure(dictApplicative);
- return function ($94) {
- return $93(Data_Either.Left.create($94));
- };
- }())(function () {
- var $95 = Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Either.Right.create);
- return function ($96) {
- return $95(v($96));
- };
- }()));
- });
- };
- var categoryStar = function categoryStar(dictMonad) {
- return new Control_Category.Category(function () {
- return semigroupoidStar(dictMonad.Bind1());
- }, Control_Applicative.pure(dictMonad.Applicative0()));
- };
- var applyStar = function applyStar(dictApply) {
- return new Control_Apply.Apply(function () {
- return functorStar(dictApply.Functor0());
- }, function (v) {
- return function (v1) {
- return function (a) {
- return Control_Apply.apply(dictApply)(v(a))(v1(a));
- };
- };
- });
- };
- var bindStar = function bindStar(dictBind) {
- return new Control_Bind.Bind(function () {
- return applyStar(dictBind.Apply0());
- }, function (v) {
- return function (f) {
- return function (x) {
- return Control_Bind.bind(dictBind)(v(x))(function (a) {
- var v1 = f(a);
- return v1(x);
- });
- };
- };
- });
- };
- var applicativeStar = function applicativeStar(dictApplicative) {
- return new Control_Applicative.Applicative(function () {
- return applyStar(dictApplicative.Apply0());
- }, function (a) {
- return function (v) {
- return Control_Applicative.pure(dictApplicative)(a);
- };
- });
- };
- var monadStar = function monadStar(dictMonad) {
- return new Control_Monad.Monad(function () {
- return applicativeStar(dictMonad.Applicative0());
- }, function () {
- return bindStar(dictMonad.Bind1());
- });
- };
- var altStar = function altStar(dictAlt) {
- return new Control_Alt.Alt(function () {
- return functorStar(dictAlt.Functor0());
- }, function (v) {
- return function (v1) {
- return function (a) {
- return Control_Alt.alt(dictAlt)(v(a))(v1(a));
- };
- };
- });
- };
- var plusStar = function plusStar(dictPlus) {
- return new Control_Plus.Plus(function () {
- return altStar(dictPlus.Alt0());
- }, function (v) {
- return Control_Plus.empty(dictPlus);
- });
- };
- var alternativeStar = function alternativeStar(dictAlternative) {
- return new Control_Alternative.Alternative(function () {
- return applicativeStar(dictAlternative.Applicative0());
- }, function () {
- return plusStar(dictAlternative.Plus1());
- });
- };
- var monadZeroStar = function monadZeroStar(dictMonadZero) {
- return new Control_MonadZero.MonadZero(function () {
- return alternativeStar(dictMonadZero.Alternative1());
- }, function () {
- return monadStar(dictMonadZero.Monad0());
- });
- };
- var monadPlusStar = function monadPlusStar(dictMonadPlus) {
- return new Control_MonadPlus.MonadPlus(function () {
- return monadZeroStar(dictMonadPlus.MonadZero0());
- });
- };
- module.exports = {
- Star: Star,
- hoistStar: hoistStar,
- newtypeStar: newtypeStar,
- semigroupoidStar: semigroupoidStar,
- categoryStar: categoryStar,
- functorStar: functorStar,
- invariantStar: invariantStar,
- applyStar: applyStar,
- applicativeStar: applicativeStar,
- bindStar: bindStar,
- monadStar: monadStar,
- altStar: altStar,
- plusStar: plusStar,
- alternativeStar: alternativeStar,
- monadZeroStar: monadZeroStar,
- monadPlusStar: monadPlusStar,
- distributiveStar: distributiveStar,
- profunctorStar: profunctorStar,
- strongStar: strongStar,
- choiceStar: choiceStar,
- closedStar: closedStar
- };
- },{"../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Alternative/index.js":"../output/Control.Alternative/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Control.MonadPlus/index.js":"../output/Control.MonadPlus/index.js","../Control.MonadZero/index.js":"../output/Control.MonadZero/index.js","../Control.Plus/index.js":"../output/Control.Plus/index.js","../Control.Semigroupoid/index.js":"../output/Control.Semigroupoid/index.js","../Data.Distributive/index.js":"../output/Data.Distributive/index.js","../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Functor.Invariant/index.js":"../output/Data.Functor.Invariant/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Profunctor/index.js":"../output/Data.Profunctor/index.js","../Data.Profunctor.Choice/index.js":"../output/Data.Profunctor.Choice/index.js","../Data.Profunctor.Closed/index.js":"../output/Data.Profunctor.Closed/index.js","../Data.Profunctor.Strong/index.js":"../output/Data.Profunctor.Strong/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js"}],"../output/Data.Lens.Internal.Wander/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Identity = require("../Data.Identity/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js");
- var Data_Profunctor_Star = require("../Data.Profunctor.Star/index.js");
- var Data_Profunctor_Strong = require("../Data.Profunctor.Strong/index.js");
- var Wander = function Wander(Choice1, Strong0, wander) {
- this.Choice1 = Choice1;
- this.Strong0 = Strong0;
- this.wander = wander;
- };
- var wanderStar = function wanderStar(dictApplicative) {
- return new Wander(function () {
- return Data_Profunctor_Star.choiceStar(dictApplicative);
- }, function () {
- return Data_Profunctor_Star.strongStar(dictApplicative.Apply0().Functor0());
- }, function (t) {
- return function (v) {
- return t(dictApplicative)(v);
- };
- });
- };
- var wanderFunction = new Wander(function () {
- return Data_Profunctor_Choice.choiceFn;
- }, function () {
- return Data_Profunctor_Strong.strongFn;
- }, function (t) {
- return Data_Newtype.alaF(Data_Functor.functorFn)(Data_Functor.functorFn)(Data_Identity.newtypeIdentity)(Data_Identity.newtypeIdentity)(Data_Identity.Identity)(t(Data_Identity.applicativeIdentity));
- });
- var wander = function wander(dict) {
- return dict.wander;
- };
- module.exports = {
- wander: wander,
- Wander: Wander,
- wanderFunction: wanderFunction,
- wanderStar: wanderStar
- };
- },{"../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Identity/index.js":"../output/Data.Identity/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Profunctor.Choice/index.js":"../output/Data.Profunctor.Choice/index.js","../Data.Profunctor.Star/index.js":"../output/Data.Profunctor.Star/index.js","../Data.Profunctor.Strong/index.js":"../output/Data.Profunctor.Strong/index.js"}],"../output/Data.Lazy/foreign.js":[function(require,module,exports) {
- "use strict";
- exports.defer = function (thunk) {
- var v = null;
- return function () {
- if (thunk === undefined) return v;
- v = thunk();
- thunk = undefined; // eslint-disable-line no-param-reassign
- return v;
- };
- };
- exports.force = function (l) {
- return l();
- };
- },{}],"../output/Data.Lazy/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Comonad = require("../Control.Comonad/index.js");
- var Control_Extend = require("../Control.Extend/index.js");
- var Control_Lazy = require("../Control.Lazy/index.js");
- var Control_Monad = require("../Control.Monad/index.js");
- var Data_BooleanAlgebra = require("../Data.BooleanAlgebra/index.js");
- var Data_Bounded = require("../Data.Bounded/index.js");
- var Data_CommutativeRing = require("../Data.CommutativeRing/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_EuclideanRing = require("../Data.EuclideanRing/index.js");
- var Data_Foldable = require("../Data.Foldable/index.js");
- var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Functor_Invariant = require("../Data.Functor.Invariant/index.js");
- var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
- var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Ring = require("../Data.Ring/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Semigroup_Foldable = require("../Data.Semigroup.Foldable/index.js");
- var Data_Semigroup_Traversable = require("../Data.Semigroup.Traversable/index.js");
- var Data_Semiring = require("../Data.Semiring/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Data_Traversable = require("../Data.Traversable/index.js");
- var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js");
- var Data_Unit = require("../Data.Unit/index.js");
- var showLazy = function showLazy(dictShow) {
- return new Data_Show.Show(function (x) {
- return "(defer \\_ -> " + (Data_Show.show(dictShow)($foreign.force(x)) + ")");
- });
- };
- var semiringLazy = function semiringLazy(dictSemiring) {
- return new Data_Semiring.Semiring(function (a) {
- return function (b) {
- return $foreign.defer(function (v) {
- return Data_Semiring.add(dictSemiring)($foreign.force(a))($foreign.force(b));
- });
- };
- }, function (a) {
- return function (b) {
- return $foreign.defer(function (v) {
- return Data_Semiring.mul(dictSemiring)($foreign.force(a))($foreign.force(b));
- });
- };
- }, $foreign.defer(function (v) {
- return Data_Semiring.one(dictSemiring);
- }), $foreign.defer(function (v) {
- return Data_Semiring.zero(dictSemiring);
- }));
- };
- var semigroupLazy = function semigroupLazy(dictSemigroup) {
- return new Data_Semigroup.Semigroup(function (a) {
- return function (b) {
- return $foreign.defer(function (v) {
- return Data_Semigroup.append(dictSemigroup)($foreign.force(a))($foreign.force(b));
- });
- };
- });
- };
- var ringLazy = function ringLazy(dictRing) {
- return new Data_Ring.Ring(function () {
- return semiringLazy(dictRing.Semiring0());
- }, function (a) {
- return function (b) {
- return $foreign.defer(function (v) {
- return Data_Ring.sub(dictRing)($foreign.force(a))($foreign.force(b));
- });
- };
- });
- };
- var monoidLazy = function monoidLazy(dictMonoid) {
- return new Data_Monoid.Monoid(function () {
- return semigroupLazy(dictMonoid.Semigroup0());
- }, $foreign.defer(function (v) {
- return Data_Monoid.mempty(dictMonoid);
- }));
- };
- var lazyLazy = new Control_Lazy.Lazy(function (f) {
- return $foreign.defer(function (v) {
- return $foreign.force(f(Data_Unit.unit));
- });
- });
- var functorLazy = new Data_Functor.Functor(function (f) {
- return function (l) {
- return $foreign.defer(function (v) {
- return f($foreign.force(l));
- });
- };
- });
- var functorWithIndexLazy = new Data_FunctorWithIndex.FunctorWithIndex(function () {
- return functorLazy;
- }, function (f) {
- return Data_Functor.map(functorLazy)(f(Data_Unit.unit));
- });
- var invariantLazy = new Data_Functor_Invariant.Invariant(Data_Functor_Invariant.imapF(functorLazy));
- var foldableLazy = new Data_Foldable.Foldable(function (dictMonoid) {
- return function (f) {
- return function (l) {
- return f($foreign.force(l));
- };
- };
- }, function (f) {
- return function (z) {
- return function (l) {
- return f(z)($foreign.force(l));
- };
- };
- }, function (f) {
- return function (z) {
- return function (l) {
- return f($foreign.force(l))(z);
- };
- };
- });
- var foldableWithIndexLazy = new Data_FoldableWithIndex.FoldableWithIndex(function () {
- return foldableLazy;
- }, function (dictMonoid) {
- return function (f) {
- return Data_Foldable.foldMap(foldableLazy)(dictMonoid)(f(Data_Unit.unit));
- };
- }, function (f) {
- return Data_Foldable.foldl(foldableLazy)(f(Data_Unit.unit));
- }, function (f) {
- return Data_Foldable.foldr(foldableLazy)(f(Data_Unit.unit));
- });
- var traversableLazy = new Data_Traversable.Traversable(function () {
- return foldableLazy;
- }, function () {
- return functorLazy;
- }, function (dictApplicative) {
- return function (l) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(function ($42) {
- return $foreign.defer(Data_Function["const"]($42));
- })($foreign.force(l));
- };
- }, function (dictApplicative) {
- return function (f) {
- return function (l) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(function ($43) {
- return $foreign.defer(Data_Function["const"]($43));
- })(f($foreign.force(l)));
- };
- };
- });
- var traversableWithIndexLazy = new Data_TraversableWithIndex.TraversableWithIndex(function () {
- return foldableWithIndexLazy;
- }, function () {
- return functorWithIndexLazy;
- }, function () {
- return traversableLazy;
- }, function (dictApplicative) {
- return function (f) {
- return Data_Traversable.traverse(traversableLazy)(dictApplicative)(f(Data_Unit.unit));
- };
- });
- var foldable1Lazy = new Data_Semigroup_Foldable.Foldable1(function () {
- return foldableLazy;
- }, function (dictSemigroup) {
- return Data_Semigroup_Foldable.fold1Default(foldable1Lazy)(dictSemigroup);
- }, function (dictSemigroup) {
- return function (f) {
- return function (l) {
- return f($foreign.force(l));
- };
- };
- });
- var traversable1Lazy = new Data_Semigroup_Traversable.Traversable1(function () {
- return foldable1Lazy;
- }, function () {
- return traversableLazy;
- }, function (dictApply) {
- return function (l) {
- return Data_Functor.map(dictApply.Functor0())(function ($44) {
- return $foreign.defer(Data_Function["const"]($44));
- })($foreign.force(l));
- };
- }, function (dictApply) {
- return function (f) {
- return function (l) {
- return Data_Functor.map(dictApply.Functor0())(function ($45) {
- return $foreign.defer(Data_Function["const"]($45));
- })(f($foreign.force(l)));
- };
- };
- });
- var extendLazy = new Control_Extend.Extend(function () {
- return functorLazy;
- }, function (f) {
- return function (x) {
- return $foreign.defer(function (v) {
- return f(x);
- });
- };
- });
- var eqLazy = function eqLazy(dictEq) {
- return new Data_Eq.Eq(function (x) {
- return function (y) {
- return Data_Eq.eq(dictEq)($foreign.force(x))($foreign.force(y));
- };
- });
- };
- var ordLazy = function ordLazy(dictOrd) {
- return new Data_Ord.Ord(function () {
- return eqLazy(dictOrd.Eq0());
- }, function (x) {
- return function (y) {
- return Data_Ord.compare(dictOrd)($foreign.force(x))($foreign.force(y));
- };
- });
- };
- var eq1Lazy = new Data_Eq.Eq1(function (dictEq) {
- return Data_Eq.eq(eqLazy(dictEq));
- });
- var ord1Lazy = new Data_Ord.Ord1(function () {
- return eq1Lazy;
- }, function (dictOrd) {
- return Data_Ord.compare(ordLazy(dictOrd));
- });
- var comonadLazy = new Control_Comonad.Comonad(function () {
- return extendLazy;
- }, $foreign.force);
- var commutativeRingLazy = function commutativeRingLazy(dictCommutativeRing) {
- return new Data_CommutativeRing.CommutativeRing(function () {
- return ringLazy(dictCommutativeRing.Ring0());
- });
- };
- var euclideanRingLazy = function euclideanRingLazy(dictEuclideanRing) {
- return new Data_EuclideanRing.EuclideanRing(function () {
- return commutativeRingLazy(dictEuclideanRing.CommutativeRing0());
- }, function () {
- var $46 = Data_EuclideanRing.degree(dictEuclideanRing);
- return function ($47) {
- return $46($foreign.force($47));
- };
- }(), function (a) {
- return function (b) {
- return $foreign.defer(function (v) {
- return Data_EuclideanRing.div(dictEuclideanRing)($foreign.force(a))($foreign.force(b));
- });
- };
- }, function (a) {
- return function (b) {
- return $foreign.defer(function (v) {
- return Data_EuclideanRing.mod(dictEuclideanRing)($foreign.force(a))($foreign.force(b));
- });
- };
- });
- };
- var boundedLazy = function boundedLazy(dictBounded) {
- return new Data_Bounded.Bounded(function () {
- return ordLazy(dictBounded.Ord0());
- }, $foreign.defer(function (v) {
- return Data_Bounded.bottom(dictBounded);
- }), $foreign.defer(function (v) {
- return Data_Bounded.top(dictBounded);
- }));
- };
- var applyLazy = new Control_Apply.Apply(function () {
- return functorLazy;
- }, function (f) {
- return function (x) {
- return $foreign.defer(function (v) {
- return $foreign.force(f)($foreign.force(x));
- });
- };
- });
- var bindLazy = new Control_Bind.Bind(function () {
- return applyLazy;
- }, function (l) {
- return function (f) {
- return $foreign.defer(function (v) {
- return $foreign.force(f($foreign.force(l)));
- });
- };
- });
- var heytingAlgebraLazy = function heytingAlgebraLazy(dictHeytingAlgebra) {
- return new Data_HeytingAlgebra.HeytingAlgebra(function (a) {
- return function (b) {
- return Control_Apply.apply(applyLazy)(Data_Functor.map(functorLazy)(Data_HeytingAlgebra.conj(dictHeytingAlgebra))(a))(b);
- };
- }, function (a) {
- return function (b) {
- return Control_Apply.apply(applyLazy)(Data_Functor.map(functorLazy)(Data_HeytingAlgebra.disj(dictHeytingAlgebra))(a))(b);
- };
- }, $foreign.defer(function (v) {
- return Data_HeytingAlgebra.ff(dictHeytingAlgebra);
- }), function (a) {
- return function (b) {
- return Control_Apply.apply(applyLazy)(Data_Functor.map(functorLazy)(Data_HeytingAlgebra.implies(dictHeytingAlgebra))(a))(b);
- };
- }, function (a) {
- return Data_Functor.map(functorLazy)(Data_HeytingAlgebra.not(dictHeytingAlgebra))(a);
- }, $foreign.defer(function (v) {
- return Data_HeytingAlgebra.tt(dictHeytingAlgebra);
- }));
- };
- var booleanAlgebraLazy = function booleanAlgebraLazy(dictBooleanAlgebra) {
- return new Data_BooleanAlgebra.BooleanAlgebra(function () {
- return heytingAlgebraLazy(dictBooleanAlgebra.HeytingAlgebra0());
- });
- };
- var applicativeLazy = new Control_Applicative.Applicative(function () {
- return applyLazy;
- }, function (a) {
- return $foreign.defer(function (v) {
- return a;
- });
- });
- var monadLazy = new Control_Monad.Monad(function () {
- return applicativeLazy;
- }, function () {
- return bindLazy;
- });
- module.exports = {
- semiringLazy: semiringLazy,
- ringLazy: ringLazy,
- commutativeRingLazy: commutativeRingLazy,
- euclideanRingLazy: euclideanRingLazy,
- eqLazy: eqLazy,
- eq1Lazy: eq1Lazy,
- ordLazy: ordLazy,
- ord1Lazy: ord1Lazy,
- boundedLazy: boundedLazy,
- semigroupLazy: semigroupLazy,
- monoidLazy: monoidLazy,
- heytingAlgebraLazy: heytingAlgebraLazy,
- booleanAlgebraLazy: booleanAlgebraLazy,
- functorLazy: functorLazy,
- functorWithIndexLazy: functorWithIndexLazy,
- foldableLazy: foldableLazy,
- foldableWithIndexLazy: foldableWithIndexLazy,
- foldable1Lazy: foldable1Lazy,
- traversableLazy: traversableLazy,
- traversableWithIndexLazy: traversableWithIndexLazy,
- traversable1Lazy: traversable1Lazy,
- invariantLazy: invariantLazy,
- applyLazy: applyLazy,
- applicativeLazy: applicativeLazy,
- bindLazy: bindLazy,
- monadLazy: monadLazy,
- extendLazy: extendLazy,
- comonadLazy: comonadLazy,
- showLazy: showLazy,
- lazyLazy: lazyLazy,
- defer: $foreign.defer,
- force: $foreign.force
- };
- },{"./foreign.js":"../output/Data.Lazy/foreign.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Comonad/index.js":"../output/Control.Comonad/index.js","../Control.Extend/index.js":"../output/Control.Extend/index.js","../Control.Lazy/index.js":"../output/Control.Lazy/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Data.BooleanAlgebra/index.js":"../output/Data.BooleanAlgebra/index.js","../Data.Bounded/index.js":"../output/Data.Bounded/index.js","../Data.CommutativeRing/index.js":"../output/Data.CommutativeRing/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.EuclideanRing/index.js":"../output/Data.EuclideanRing/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.FoldableWithIndex/index.js":"../output/Data.FoldableWithIndex/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Functor.Invariant/index.js":"../output/Data.Functor.Invariant/index.js","../Data.FunctorWithIndex/index.js":"../output/Data.FunctorWithIndex/index.js","../Data.HeytingAlgebra/index.js":"../output/Data.HeytingAlgebra/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ring/index.js":"../output/Data.Ring/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Semigroup.Foldable/index.js":"../output/Data.Semigroup.Foldable/index.js","../Data.Semigroup.Traversable/index.js":"../output/Data.Semigroup.Traversable/index.js","../Data.Semiring/index.js":"../output/Data.Semiring/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Data.TraversableWithIndex/index.js":"../output/Data.TraversableWithIndex/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Data.List.Lazy.Types/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Alt = require("../Control.Alt/index.js");
- var Control_Alternative = require("../Control.Alternative/index.js");
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Category = require("../Control.Category/index.js");
- var Control_Comonad = require("../Control.Comonad/index.js");
- var Control_Extend = require("../Control.Extend/index.js");
- var Control_Lazy = require("../Control.Lazy/index.js");
- var Control_Monad = require("../Control.Monad/index.js");
- var Control_MonadPlus = require("../Control.MonadPlus/index.js");
- var Control_MonadZero = require("../Control.MonadZero/index.js");
- var Control_Plus = require("../Control.Plus/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Foldable = require("../Data.Foldable/index.js");
- var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
- var Data_Lazy = require("../Data.Lazy/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_NonEmpty = require("../Data.NonEmpty/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Ordering = require("../Data.Ordering/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Semiring = require("../Data.Semiring/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Data_Traversable = require("../Data.Traversable/index.js");
- var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js");
- var Data_Tuple = require("../Data.Tuple/index.js");
- var Data_Unfoldable = require("../Data.Unfoldable/index.js");
- var Data_Unfoldable1 = require("../Data.Unfoldable1/index.js");
- var List = function List(x) {
- return x;
- };
- var Nil = function () {
- function Nil() {}
- ;
- Nil.value = new Nil();
- return Nil;
- }();
- var Cons = function () {
- function Cons(value0, value1) {
- this.value0 = value0;
- this.value1 = value1;
- }
- ;
- Cons.create = function (value0) {
- return function (value1) {
- return new Cons(value0, value1);
- };
- };
- return Cons;
- }();
- var NonEmptyList = function NonEmptyList(x) {
- return x;
- };
- var nil = List(Data_Lazy.defer(function (v) {
- return Nil.value;
- }));
- var newtypeNonEmptyList = new Data_Newtype.Newtype(function (n) {
- return n;
- }, NonEmptyList);
- var newtypeList = new Data_Newtype.Newtype(function (n) {
- return n;
- }, List);
- var step = function () {
- var $215 = Data_Newtype.unwrap(newtypeList);
- return function ($216) {
- return Data_Lazy.force($215($216));
- };
- }();
- var semigroupList = new Data_Semigroup.Semigroup(function (xs) {
- return function (ys) {
- var go = function go(v) {
- if (v instanceof Nil) {
- return step(ys);
- }
- ;
- if (v instanceof Cons) {
- return new Cons(v.value0, Data_Semigroup.append(semigroupList)(v.value1)(ys));
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy.Types (line 98, column 5 - line 98, column 21): " + [v.constructor.name]);
- };
- return Data_Functor.map(Data_Lazy.functorLazy)(go)(Data_Newtype.unwrap(newtypeList)(xs));
- };
- });
- var showList = function showList(dictShow) {
- return new Data_Show.Show(function (xs) {
- var go = function go(v) {
- if (v instanceof Nil) {
- return "Nil";
- }
- ;
- if (v instanceof Cons) {
- return "(Cons " + (Data_Show.show(dictShow)(v.value0) + (" " + (go(step(v.value1)) + ")")));
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy.Types (line 64, column 5 - line 64, column 19): " + [v.constructor.name]);
- };
- return "fromStrict (" + (go(step(xs)) + ")");
- });
- };
- var showNonEmptyList = function showNonEmptyList(dictShow) {
- return new Data_Show.Show(function (v) {
- return "(NonEmptyList " + (Data_Show.show(Data_Lazy.showLazy(Data_NonEmpty.showNonEmpty(dictShow)(showList(dictShow))))(v) + ")");
- });
- };
- var monoidList = new Data_Monoid.Monoid(function () {
- return semigroupList;
- }, nil);
- var lazyList = new Control_Lazy.Lazy(function (f) {
- return List(Data_Lazy.defer(function ($217) {
- return step(f($217));
- }));
- });
- var functorList = new Data_Functor.Functor(function (f) {
- return function (xs) {
- var go = function go(v) {
- if (v instanceof Nil) {
- return Nil.value;
- }
- ;
- if (v instanceof Cons) {
- return new Cons(f(v.value0), Data_Functor.map(functorList)(f)(v.value1));
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy.Types (line 107, column 5 - line 107, column 17): " + [v.constructor.name]);
- };
- return Data_Functor.map(Data_Lazy.functorLazy)(go)(Data_Newtype.unwrap(newtypeList)(xs));
- };
- });
- var functorNonEmptyList = new Data_Functor.Functor(function (f) {
- return function (v) {
- return Data_Functor.map(Data_Lazy.functorLazy)(Data_Functor.map(Data_NonEmpty.functorNonEmpty(functorList))(f))(v);
- };
- });
- var eq1List = new Data_Eq.Eq1(function (dictEq) {
- return function (xs) {
- return function (ys) {
- var go = function go($copy_v) {
- return function ($copy_v1) {
- var $tco_var_v = $copy_v;
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(v, v1) {
- if (v instanceof Nil && v1 instanceof Nil) {
- $tco_done = true;
- return true;
- }
- ;
- if (v instanceof Cons && v1 instanceof Cons && Data_Eq.eq(dictEq)(v.value0)(v1.value0)) {
- $tco_var_v = step(v.value1);
- $copy_v1 = step(v1.value1);
- return;
- }
- ;
- $tco_done = true;
- return false;
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($tco_var_v, $copy_v1);
- }
- ;
- return $tco_result;
- };
- };
- return go(step(xs))(step(ys));
- };
- };
- });
- var eqList = function eqList(dictEq) {
- return new Data_Eq.Eq(Data_Eq.eq1(eq1List)(dictEq));
- };
- var eqNonEmptyList = function eqNonEmptyList(dictEq) {
- return Data_Lazy.eqLazy(Data_NonEmpty.eqNonEmpty(eq1List)(dictEq));
- };
- var ord1List = new Data_Ord.Ord1(function () {
- return eq1List;
- }, function (dictOrd) {
- return function (xs) {
- return function (ys) {
- var go = function go($copy_v) {
- return function ($copy_v1) {
- var $tco_var_v = $copy_v;
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(v, v1) {
- if (v instanceof Nil && v1 instanceof Nil) {
- $tco_done = true;
- return Data_Ordering.EQ.value;
- }
- ;
- if (v instanceof Nil) {
- $tco_done = true;
- return Data_Ordering.LT.value;
- }
- ;
- if (v1 instanceof Nil) {
- $tco_done = true;
- return Data_Ordering.GT.value;
- }
- ;
- if (v instanceof Cons && v1 instanceof Cons) {
- var v2 = Data_Ord.compare(dictOrd)(v.value0)(v1.value0);
- if (v2 instanceof Data_Ordering.EQ) {
- $tco_var_v = step(v.value1);
- $copy_v1 = step(v1.value1);
- return;
- }
- ;
- $tco_done = true;
- return v2;
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy.Types (line 84, column 5 - line 84, column 20): " + [v.constructor.name, v1.constructor.name]);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($tco_var_v, $copy_v1);
- }
- ;
- return $tco_result;
- };
- };
- return go(step(xs))(step(ys));
- };
- };
- });
- var ordList = function ordList(dictOrd) {
- return new Data_Ord.Ord(function () {
- return eqList(dictOrd.Eq0());
- }, Data_Ord.compare1(ord1List)(dictOrd));
- };
- var ordNonEmptyList = function ordNonEmptyList(dictOrd) {
- return Data_Lazy.ordLazy(Data_NonEmpty.ordNonEmpty(ord1List)(dictOrd));
- };
- var cons = function cons(x) {
- return function (xs) {
- return List(Data_Lazy.defer(function (v) {
- return new Cons(x, xs);
- }));
- };
- };
- var foldableList = new Data_Foldable.Foldable(function (dictMonoid) {
- return function (f) {
- return Data_Foldable.foldl(foldableList)(function (b) {
- return function (a) {
- return Data_Semigroup.append(dictMonoid.Semigroup0())(b)(f(a));
- };
- })(Data_Monoid.mempty(dictMonoid));
- };
- }, function (op) {
- var go = function go($copy_b) {
- return function ($copy_xs) {
- var $tco_var_b = $copy_b;
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(b, xs) {
- var v = step(xs);
- if (v instanceof Nil) {
- $tco_done = true;
- return b;
- }
- ;
- if (v instanceof Cons) {
- $tco_var_b = op(b)(v.value0);
- $copy_xs = v.value1;
- return;
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy.Types (line 122, column 7 - line 124, column 40): " + [v.constructor.name]);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($tco_var_b, $copy_xs);
- }
- ;
- return $tco_result;
- };
- };
- return go;
- }, function (op) {
- return function (z) {
- return function (xs) {
- var rev = Data_Foldable.foldl(foldableList)(Data_Function.flip(cons))(nil);
- return Data_Foldable.foldl(foldableList)(Data_Function.flip(op))(z)(rev(xs));
- };
- };
- });
- var extendList = new Control_Extend.Extend(function () {
- return functorList;
- }, function (f) {
- return function (l) {
- var go = function go(a) {
- return function (v) {
- var acc$prime = cons(a)(v.acc);
- return {
- val: cons(f(acc$prime))(v.val),
- acc: acc$prime
- };
- };
- };
- var v = step(l);
- if (v instanceof Nil) {
- return nil;
- }
- ;
- if (v instanceof Cons) {
- return cons(f(l))(Data_Foldable.foldr(foldableList)(go)({
- val: nil,
- acc: nil
- })(v.value1).val);
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy.Types (line 194, column 5 - line 197, column 55): " + [v.constructor.name]);
- };
- });
- var extendNonEmptyList = new Control_Extend.Extend(function () {
- return functorNonEmptyList;
- }, function (f) {
- return function (v) {
- var go = function go(a) {
- return function (v1) {
- return {
- val: cons(f(Data_Lazy.defer(function (v2) {
- return new Data_NonEmpty.NonEmpty(a, v1.acc);
- })))(v1.val),
- acc: cons(a)(v1.acc)
- };
- };
- };
- var v1 = Data_Lazy.force(v);
- return NonEmptyList(Data_Lazy.defer(function (v2) {
- return new Data_NonEmpty.NonEmpty(f(v), Data_Foldable.foldr(foldableList)(go)({
- val: nil,
- acc: nil
- })(v1.value1).val);
- }));
- };
- });
- var foldableNonEmptyList = new Data_Foldable.Foldable(function (dictMonoid) {
- return function (f) {
- return function (v) {
- return Data_Foldable.foldMap(Data_NonEmpty.foldableNonEmpty(foldableList))(dictMonoid)(f)(Data_Lazy.force(v));
- };
- };
- }, function (f) {
- return function (b) {
- return function (v) {
- return Data_Foldable.foldl(Data_NonEmpty.foldableNonEmpty(foldableList))(f)(b)(Data_Lazy.force(v));
- };
- };
- }, function (f) {
- return function (b) {
- return function (v) {
- return Data_Foldable.foldr(Data_NonEmpty.foldableNonEmpty(foldableList))(f)(b)(Data_Lazy.force(v));
- };
- };
- });
- var foldableWithIndexList = new Data_FoldableWithIndex.FoldableWithIndex(function () {
- return foldableList;
- }, function (dictMonoid) {
- return function (f) {
- return Data_FoldableWithIndex.foldlWithIndex(foldableWithIndexList)(function (i) {
- return function (acc) {
- var $218 = Data_Semigroup.append(dictMonoid.Semigroup0())(acc);
- var $219 = f(i);
- return function ($220) {
- return $218($219($220));
- };
- };
- })(Data_Monoid.mempty(dictMonoid));
- };
- }, function (f) {
- return function (acc) {
- var $221 = Data_Foldable.foldl(foldableList)(function (v) {
- return function (a) {
- return new Data_Tuple.Tuple(v.value0 + 1 | 0, f(v.value0)(v.value1)(a));
- };
- })(new Data_Tuple.Tuple(0, acc));
- return function ($222) {
- return Data_Tuple.snd($221($222));
- };
- };
- }, function (f) {
- return function (b) {
- return function (xs) {
- var v = function () {
- var rev = Data_Foldable.foldl(foldableList)(function (v1) {
- return function (a) {
- return new Data_Tuple.Tuple(v1.value0 + 1 | 0, cons(a)(v1.value1));
- };
- });
- return rev(new Data_Tuple.Tuple(0, nil))(xs);
- }();
- return Data_Tuple.snd(Data_Foldable.foldl(foldableList)(function (v1) {
- return function (a) {
- return new Data_Tuple.Tuple(v1.value0 - 1 | 0, f(v1.value0 - 1 | 0)(a)(v1.value1));
- };
- })(new Data_Tuple.Tuple(v.value0, b))(v.value1));
- };
- };
- });
- var foldableWithIndexNonEmptyList = new Data_FoldableWithIndex.FoldableWithIndex(function () {
- return foldableNonEmptyList;
- }, function (dictMonoid) {
- return function (f) {
- return function (v) {
- return Data_FoldableWithIndex.foldMapWithIndex(Data_NonEmpty.foldableWithIndexNonEmpty(foldableWithIndexList))(dictMonoid)(function () {
- var $223 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1));
- return function ($224) {
- return f($223($224));
- };
- }())(Data_Lazy.force(v));
- };
- };
- }, function (f) {
- return function (b) {
- return function (v) {
- return Data_FoldableWithIndex.foldlWithIndex(Data_NonEmpty.foldableWithIndexNonEmpty(foldableWithIndexList))(function () {
- var $225 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1));
- return function ($226) {
- return f($225($226));
- };
- }())(b)(Data_Lazy.force(v));
- };
- };
- }, function (f) {
- return function (b) {
- return function (v) {
- return Data_FoldableWithIndex.foldrWithIndex(Data_NonEmpty.foldableWithIndexNonEmpty(foldableWithIndexList))(function () {
- var $227 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1));
- return function ($228) {
- return f($227($228));
- };
- }())(b)(Data_Lazy.force(v));
- };
- };
- });
- var functorWithIndexList = new Data_FunctorWithIndex.FunctorWithIndex(function () {
- return functorList;
- }, function (f) {
- return Data_FoldableWithIndex.foldrWithIndex(foldableWithIndexList)(function (i) {
- return function (x) {
- return function (acc) {
- return cons(f(i)(x))(acc);
- };
- };
- })(nil);
- });
- var functorWithIndexNonEmptyList = new Data_FunctorWithIndex.FunctorWithIndex(function () {
- return functorNonEmptyList;
- }, function (f) {
- return function (v) {
- return NonEmptyList(Data_Lazy.defer(function (v1) {
- return Data_FunctorWithIndex.mapWithIndex(Data_NonEmpty.functorWithIndex(functorWithIndexList))(function () {
- var $229 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1));
- return function ($230) {
- return f($229($230));
- };
- }())(Data_Lazy.force(v));
- }));
- };
- });
- var toList = function toList(v) {
- return Control_Lazy.defer(lazyList)(function (v1) {
- var v2 = Data_Lazy.force(v);
- return cons(v2.value0)(v2.value1);
- });
- };
- var semigroupNonEmptyList = new Data_Semigroup.Semigroup(function (v) {
- return function (as$prime) {
- var v1 = Data_Lazy.force(v);
- return Data_Lazy.defer(function (v2) {
- return new Data_NonEmpty.NonEmpty(v1.value0, Data_Semigroup.append(semigroupList)(v1.value1)(toList(as$prime)));
- });
- };
- });
- var traversableList = new Data_Traversable.Traversable(function () {
- return foldableList;
- }, function () {
- return functorList;
- }, function (dictApplicative) {
- return Data_Traversable.traverse(traversableList)(dictApplicative)(Control_Category.identity(Control_Category.categoryFn));
- }, function (dictApplicative) {
- return function (f) {
- return Data_Foldable.foldr(foldableList)(function (a) {
- return function (b) {
- return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(cons)(f(a)))(b);
- };
- })(Control_Applicative.pure(dictApplicative)(nil));
- };
- });
- var traversableNonEmptyList = new Data_Traversable.Traversable(function () {
- return foldableNonEmptyList;
- }, function () {
- return functorNonEmptyList;
- }, function (dictApplicative) {
- return function (v) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(function (xxs) {
- return NonEmptyList(Data_Lazy.defer(function (v1) {
- return xxs;
- }));
- })(Data_Traversable.sequence(Data_NonEmpty.traversableNonEmpty(traversableList))(dictApplicative)(Data_Lazy.force(v)));
- };
- }, function (dictApplicative) {
- return function (f) {
- return function (v) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(function (xxs) {
- return NonEmptyList(Data_Lazy.defer(function (v1) {
- return xxs;
- }));
- })(Data_Traversable.traverse(Data_NonEmpty.traversableNonEmpty(traversableList))(dictApplicative)(f)(Data_Lazy.force(v)));
- };
- };
- });
- var traversableWithIndexList = new Data_TraversableWithIndex.TraversableWithIndex(function () {
- return foldableWithIndexList;
- }, function () {
- return functorWithIndexList;
- }, function () {
- return traversableList;
- }, function (dictApplicative) {
- return function (f) {
- return Data_FoldableWithIndex.foldrWithIndex(foldableWithIndexList)(function (i) {
- return function (a) {
- return function (b) {
- return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(cons)(f(i)(a)))(b);
- };
- };
- })(Control_Applicative.pure(dictApplicative)(nil));
- };
- });
- var traversableWithIndexNonEmptyList = new Data_TraversableWithIndex.TraversableWithIndex(function () {
- return foldableWithIndexNonEmptyList;
- }, function () {
- return functorWithIndexNonEmptyList;
- }, function () {
- return traversableNonEmptyList;
- }, function (dictApplicative) {
- return function (f) {
- return function (v) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(function (xxs) {
- return NonEmptyList(Data_Lazy.defer(function (v1) {
- return xxs;
- }));
- })(Data_TraversableWithIndex.traverseWithIndex(Data_NonEmpty.traversableWithIndexNonEmpty(traversableWithIndexList))(dictApplicative)(function () {
- var $231 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1));
- return function ($232) {
- return f($231($232));
- };
- }())(Data_Lazy.force(v)));
- };
- };
- });
- var unfoldable1List = new Data_Unfoldable1.Unfoldable1(function () {
- var go = function go(f) {
- return function (b) {
- return Control_Lazy.defer(lazyList)(function (v) {
- var v1 = f(b);
- if (v1.value1 instanceof Data_Maybe.Just) {
- return cons(v1.value0)(go(f)(v1.value1.value0));
- }
- ;
- if (v1.value1 instanceof Data_Maybe.Nothing) {
- return cons(v1.value0)(nil);
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy.Types (line 146, column 28 - line 148, column 33): " + [v1.constructor.name]);
- });
- };
- };
- return go;
- }());
- var unfoldableList = new Data_Unfoldable.Unfoldable(function () {
- return unfoldable1List;
- }, function () {
- var go = function go(f) {
- return function (b) {
- return Control_Lazy.defer(lazyList)(function (v) {
- var v1 = f(b);
- if (v1 instanceof Data_Maybe.Nothing) {
- return nil;
- }
- ;
- if (v1 instanceof Data_Maybe.Just) {
- return cons(v1.value0.value0)(go(f)(v1.value0.value1));
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy.Types (line 152, column 28 - line 154, column 39): " + [v1.constructor.name]);
- });
- };
- };
- return go;
- }());
- var unfoldable1NonEmptyList = new Data_Unfoldable1.Unfoldable1(function (f) {
- return function (b) {
- return NonEmptyList(Data_Lazy.defer(function (v) {
- return Data_Unfoldable1.unfoldr1(Data_NonEmpty.unfoldable1NonEmpty(unfoldableList))(f)(b);
- }));
- };
- });
- var comonadNonEmptyList = new Control_Comonad.Comonad(function () {
- return extendNonEmptyList;
- }, function (v) {
- return Data_NonEmpty.head(Data_Lazy.force(v));
- });
- var monadList = new Control_Monad.Monad(function () {
- return applicativeList;
- }, function () {
- return bindList;
- });
- var bindList = new Control_Bind.Bind(function () {
- return applyList;
- }, function (xs) {
- return function (f) {
- var go = function go(v) {
- if (v instanceof Nil) {
- return Nil.value;
- }
- ;
- if (v instanceof Cons) {
- return step(Data_Semigroup.append(semigroupList)(f(v.value0))(Control_Bind.bind(bindList)(v.value1)(f)));
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy.Types (line 175, column 5 - line 175, column 17): " + [v.constructor.name]);
- };
- return Data_Functor.map(Data_Lazy.functorLazy)(go)(Data_Newtype.unwrap(newtypeList)(xs));
- };
- });
- var applyList = new Control_Apply.Apply(function () {
- return functorList;
- }, Control_Monad.ap(monadList));
- var applicativeList = new Control_Applicative.Applicative(function () {
- return applyList;
- }, function (a) {
- return cons(a)(nil);
- });
- var applyNonEmptyList = new Control_Apply.Apply(function () {
- return functorNonEmptyList;
- }, function (v) {
- return function (v1) {
- var v2 = Data_Lazy.force(v1);
- var v3 = Data_Lazy.force(v);
- return Data_Lazy.defer(function (v4) {
- return new Data_NonEmpty.NonEmpty(v3.value0(v2.value0), Data_Semigroup.append(semigroupList)(Control_Apply.apply(applyList)(v3.value1)(cons(v2.value0)(nil)))(Control_Apply.apply(applyList)(cons(v3.value0)(v3.value1))(v2.value1)));
- });
- };
- });
- var bindNonEmptyList = new Control_Bind.Bind(function () {
- return applyNonEmptyList;
- }, function (v) {
- return function (f) {
- var v1 = Data_Lazy.force(v);
- var v2 = Data_Lazy.force(Data_Newtype.unwrap(newtypeNonEmptyList)(f(v1.value0)));
- return Data_Lazy.defer(function (v3) {
- return new Data_NonEmpty.NonEmpty(v2.value0, Data_Semigroup.append(semigroupList)(v2.value1)(Control_Bind.bind(bindList)(v1.value1)(function ($233) {
- return toList(f($233));
- })));
- });
- };
- });
- var altNonEmptyList = new Control_Alt.Alt(function () {
- return functorNonEmptyList;
- }, Data_Semigroup.append(semigroupNonEmptyList));
- var altList = new Control_Alt.Alt(function () {
- return functorList;
- }, Data_Semigroup.append(semigroupList));
- var plusList = new Control_Plus.Plus(function () {
- return altList;
- }, nil);
- var alternativeList = new Control_Alternative.Alternative(function () {
- return applicativeList;
- }, function () {
- return plusList;
- });
- var monadZeroList = new Control_MonadZero.MonadZero(function () {
- return alternativeList;
- }, function () {
- return monadList;
- });
- var monadPlusList = new Control_MonadPlus.MonadPlus(function () {
- return monadZeroList;
- });
- var applicativeNonEmptyList = new Control_Applicative.Applicative(function () {
- return applyNonEmptyList;
- }, function (a) {
- return Data_Lazy.defer(function (v) {
- return Data_NonEmpty.singleton(plusList)(a);
- });
- });
- var monadNonEmptyList = new Control_Monad.Monad(function () {
- return applicativeNonEmptyList;
- }, function () {
- return bindNonEmptyList;
- });
- module.exports = {
- List: List,
- Nil: Nil,
- Cons: Cons,
- step: step,
- nil: nil,
- cons: cons,
- NonEmptyList: NonEmptyList,
- toList: toList,
- newtypeList: newtypeList,
- showList: showList,
- eqList: eqList,
- eq1List: eq1List,
- ordList: ordList,
- ord1List: ord1List,
- lazyList: lazyList,
- semigroupList: semigroupList,
- monoidList: monoidList,
- functorList: functorList,
- functorWithIndexList: functorWithIndexList,
- foldableList: foldableList,
- foldableWithIndexList: foldableWithIndexList,
- unfoldable1List: unfoldable1List,
- unfoldableList: unfoldableList,
- traversableList: traversableList,
- traversableWithIndexList: traversableWithIndexList,
- applyList: applyList,
- applicativeList: applicativeList,
- bindList: bindList,
- monadList: monadList,
- altList: altList,
- plusList: plusList,
- alternativeList: alternativeList,
- monadZeroList: monadZeroList,
- monadPlusList: monadPlusList,
- extendList: extendList,
- newtypeNonEmptyList: newtypeNonEmptyList,
- eqNonEmptyList: eqNonEmptyList,
- ordNonEmptyList: ordNonEmptyList,
- showNonEmptyList: showNonEmptyList,
- functorNonEmptyList: functorNonEmptyList,
- applyNonEmptyList: applyNonEmptyList,
- applicativeNonEmptyList: applicativeNonEmptyList,
- bindNonEmptyList: bindNonEmptyList,
- monadNonEmptyList: monadNonEmptyList,
- altNonEmptyList: altNonEmptyList,
- extendNonEmptyList: extendNonEmptyList,
- comonadNonEmptyList: comonadNonEmptyList,
- semigroupNonEmptyList: semigroupNonEmptyList,
- foldableNonEmptyList: foldableNonEmptyList,
- traversableNonEmptyList: traversableNonEmptyList,
- unfoldable1NonEmptyList: unfoldable1NonEmptyList,
- functorWithIndexNonEmptyList: functorWithIndexNonEmptyList,
- foldableWithIndexNonEmptyList: foldableWithIndexNonEmptyList,
- traversableWithIndexNonEmptyList: traversableWithIndexNonEmptyList
- };
- },{"../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Alternative/index.js":"../output/Control.Alternative/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Comonad/index.js":"../output/Control.Comonad/index.js","../Control.Extend/index.js":"../output/Control.Extend/index.js","../Control.Lazy/index.js":"../output/Control.Lazy/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Control.MonadPlus/index.js":"../output/Control.MonadPlus/index.js","../Control.MonadZero/index.js":"../output/Control.MonadZero/index.js","../Control.Plus/index.js":"../output/Control.Plus/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.FoldableWithIndex/index.js":"../output/Data.FoldableWithIndex/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.FunctorWithIndex/index.js":"../output/Data.FunctorWithIndex/index.js","../Data.Lazy/index.js":"../output/Data.Lazy/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.NonEmpty/index.js":"../output/Data.NonEmpty/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Semiring/index.js":"../output/Data.Semiring/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Data.TraversableWithIndex/index.js":"../output/Data.TraversableWithIndex/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js","../Data.Unfoldable/index.js":"../output/Data.Unfoldable/index.js","../Data.Unfoldable1/index.js":"../output/Data.Unfoldable1/index.js"}],"../output/Data.List.Lazy/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Alt = require("../Control.Alt/index.js");
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Category = require("../Control.Category/index.js");
- var Control_Lazy = require("../Control.Lazy/index.js");
- var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js");
- var Data_Boolean = require("../Data.Boolean/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Foldable = require("../Data.Foldable/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
- var Data_Lazy = require("../Data.Lazy/index.js");
- var Data_List_Lazy_Types = require("../Data.List.Lazy.Types/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_NonEmpty = require("../Data.NonEmpty/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Ordering = require("../Data.Ordering/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Data_Traversable = require("../Data.Traversable/index.js");
- var Data_Tuple = require("../Data.Tuple/index.js");
- var Data_Unfoldable = require("../Data.Unfoldable/index.js");
- var Pattern = function Pattern(x) {
- return x;
- };
- var zipWith = function zipWith(f) {
- return function (xs) {
- return function (ys) {
- var go = function go(v) {
- return function (v1) {
- if (v instanceof Data_List_Lazy_Types.Nil) {
- return Data_List_Lazy_Types.Nil.value;
- }
- ;
- if (v1 instanceof Data_List_Lazy_Types.Nil) {
- return Data_List_Lazy_Types.Nil.value;
- }
- ;
- if (v instanceof Data_List_Lazy_Types.Cons && v1 instanceof Data_List_Lazy_Types.Cons) {
- return new Data_List_Lazy_Types.Cons(f(v.value0)(v1.value0), zipWith(f)(v.value1)(v1.value1));
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy (line 693, column 3 - line 693, column 35): " + [v.constructor.name, v1.constructor.name]);
- };
- };
- return Control_Apply.apply(Data_Lazy.applyLazy)(Data_Functor.map(Data_Lazy.functorLazy)(go)(Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList)(xs)))(Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList)(ys));
- };
- };
- };
- var zipWithA = function zipWithA(dictApplicative) {
- return function (f) {
- return function (xs) {
- return function (ys) {
- return Data_Traversable.sequence(Data_List_Lazy_Types.traversableList)(dictApplicative)(zipWith(f)(xs)(ys));
- };
- };
- };
- };
- var zip = zipWith(Data_Tuple.Tuple.create);
- var updateAt = function updateAt(n) {
- return function (x) {
- return function (xs) {
- var go = function go(v) {
- return function (v1) {
- if (v1 instanceof Data_List_Lazy_Types.Nil) {
- return Data_List_Lazy_Types.Nil.value;
- }
- ;
- if (v === 0 && v1 instanceof Data_List_Lazy_Types.Cons) {
- return new Data_List_Lazy_Types.Cons(x, v1.value1);
- }
- ;
- if (v1 instanceof Data_List_Lazy_Types.Cons) {
- return new Data_List_Lazy_Types.Cons(v1.value0, updateAt(v - 1 | 0)(x)(v1.value1));
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy (line 367, column 3 - line 367, column 17): " + [v.constructor.name, v1.constructor.name]);
- };
- };
- return Data_Functor.map(Data_Lazy.functorLazy)(go(n))(Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList)(xs));
- };
- };
- };
- var unzip = Data_Foldable.foldr(Data_List_Lazy_Types.foldableList)(function (v) {
- return function (v1) {
- return new Data_Tuple.Tuple(Data_List_Lazy_Types.cons(v.value0)(v1.value0), Data_List_Lazy_Types.cons(v.value1)(v1.value1));
- };
- })(new Data_Tuple.Tuple(Data_List_Lazy_Types.nil, Data_List_Lazy_Types.nil));
- var uncons = function uncons(xs) {
- var v = Data_List_Lazy_Types.step(xs);
- if (v instanceof Data_List_Lazy_Types.Nil) {
- return Data_Maybe.Nothing.value;
- }
- ;
- if (v instanceof Data_List_Lazy_Types.Cons) {
- return new Data_Maybe.Just({
- head: v.value0,
- tail: v.value1
- });
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy (line 285, column 13 - line 287, column 44): " + [v.constructor.name]);
- };
- var toUnfoldable = function toUnfoldable(dictUnfoldable) {
- return Data_Unfoldable.unfoldr(dictUnfoldable)(function (xs) {
- return Data_Functor.map(Data_Maybe.functorMaybe)(function (rec) {
- return new Data_Tuple.Tuple(rec.head, rec.tail);
- })(uncons(xs));
- });
- };
- var takeWhile = function takeWhile(p) {
- var go = function go(v) {
- if (v instanceof Data_List_Lazy_Types.Cons && p(v.value0)) {
- return new Data_List_Lazy_Types.Cons(v.value0, takeWhile(p)(v.value1));
- }
- ;
- return Data_List_Lazy_Types.Nil.value;
- };
- var $239 = Data_Functor.map(Data_Lazy.functorLazy)(go);
- var $240 = Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList);
- return function ($241) {
- return Data_List_Lazy_Types.List($239($240($241)));
- };
- };
- var take = function take(n) {
- var go = function go(v) {
- return function (v1) {
- if (v1 instanceof Data_List_Lazy_Types.Nil) {
- return Data_List_Lazy_Types.Nil.value;
- }
- ;
- if (v1 instanceof Data_List_Lazy_Types.Cons) {
- return new Data_List_Lazy_Types.Cons(v1.value0, take(v - 1 | 0)(v1.value1));
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy (line 517, column 3 - line 517, column 32): " + [v.constructor.name, v1.constructor.name]);
- };
- };
- var $119 = n <= 0;
- if ($119) {
- return Data_Function["const"](Data_List_Lazy_Types.nil);
- }
- ;
- var $242 = Data_Functor.map(Data_Lazy.functorLazy)(go(n));
- var $243 = Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList);
- return function ($244) {
- return Data_List_Lazy_Types.List($242($243($244)));
- };
- };
- var tail = function tail(xs) {
- return Data_Functor.map(Data_Maybe.functorMaybe)(function (v) {
- return v.tail;
- })(uncons(xs));
- };
- var stripPrefix = function stripPrefix(dictEq) {
- return function (v) {
- return function (s) {
- var go = function go(prefix) {
- return function (input) {
- var v1 = Data_List_Lazy_Types.step(prefix);
- if (v1 instanceof Data_List_Lazy_Types.Nil) {
- return Data_Maybe.Just.create(new Control_Monad_Rec_Class.Done(input));
- }
- ;
- if (v1 instanceof Data_List_Lazy_Types.Cons) {
- var v2 = Data_List_Lazy_Types.step(input);
- if (v2 instanceof Data_List_Lazy_Types.Cons && Data_Eq.eq(dictEq)(v1.value0)(v2.value0)) {
- return Data_Maybe.Just.create(new Control_Monad_Rec_Class.Loop({
- a: v1.value1,
- b: v2.value1
- }));
- }
- ;
- return Data_Maybe.Nothing.value;
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy (line 499, column 21 - line 503, column 19): " + [v1.constructor.name]);
- };
- };
- return Control_Monad_Rec_Class.tailRecM2(Control_Monad_Rec_Class.monadRecMaybe)(go)(v)(s);
- };
- };
- };
- var span = function span(p) {
- return function (xs) {
- var v = uncons(xs);
- if (v instanceof Data_Maybe.Just && p(v.value0.head)) {
- var v1 = span(p)(v.value0.tail);
- return {
- init: Data_List_Lazy_Types.cons(v.value0.head)(v1.init),
- rest: v1.rest
- };
- }
- ;
- return {
- init: Data_List_Lazy_Types.nil,
- rest: xs
- };
- };
- };
- var snoc = function snoc(xs) {
- return function (x) {
- return Data_Foldable.foldr(Data_List_Lazy_Types.foldableList)(Data_List_Lazy_Types.cons)(Data_List_Lazy_Types.cons(x)(Data_List_Lazy_Types.nil))(xs);
- };
- };
- var singleton = function singleton(a) {
- return Data_List_Lazy_Types.cons(a)(Data_List_Lazy_Types.nil);
- };
- var showPattern = function showPattern(dictShow) {
- return new Data_Show.Show(function (v) {
- return "(Pattern " + (Data_Show.show(Data_List_Lazy_Types.showList(dictShow))(v) + ")");
- });
- };
- var scanrLazy = function scanrLazy(f) {
- return function (acc) {
- return function (xs) {
- var go = function go(v) {
- if (v instanceof Data_List_Lazy_Types.Nil) {
- return Data_List_Lazy_Types.Nil.value;
- }
- ;
- if (v instanceof Data_List_Lazy_Types.Cons) {
- var acc$prime = f(v.value0)(acc);
- return Data_List_Lazy_Types.Cons.create(acc$prime)(scanrLazy(f)(acc$prime)(v.value1));
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy (line 764, column 5 - line 764, column 27): " + [v.constructor.name]);
- };
- return Data_Functor.map(Data_Lazy.functorLazy)(go)(Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList)(xs));
- };
- };
- };
- var reverse = function reverse(xs) {
- return Control_Lazy.defer(Data_List_Lazy_Types.lazyList)(function (v) {
- return Data_Foldable.foldl(Data_List_Lazy_Types.foldableList)(Data_Function.flip(Data_List_Lazy_Types.cons))(Data_List_Lazy_Types.nil)(xs);
- });
- };
- var replicateM = function replicateM(dictMonad) {
- return function (n) {
- return function (m) {
- if (n < 1) {
- return Control_Applicative.pure(dictMonad.Applicative0())(Data_List_Lazy_Types.nil);
- }
- ;
- if (Data_Boolean.otherwise) {
- return Control_Bind.bind(dictMonad.Bind1())(m)(function (a) {
- return Control_Bind.bind(dictMonad.Bind1())(replicateM(dictMonad)(n - 1 | 0)(m))(function (as) {
- return Control_Applicative.pure(dictMonad.Applicative0())(Data_List_Lazy_Types.cons(a)(as));
- });
- });
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy (line 161, column 1 - line 161, column 62): " + [n.constructor.name, m.constructor.name]);
- };
- };
- };
- var repeat = function repeat(x) {
- return Control_Lazy.fix(Data_List_Lazy_Types.lazyList)(function (xs) {
- return Data_List_Lazy_Types.cons(x)(xs);
- });
- };
- var replicate = function replicate(i) {
- return function (xs) {
- return take(i)(repeat(xs));
- };
- };
- var range = function range(start) {
- return function (end) {
- if (start > end) {
- var g = function g(x) {
- if (x >= end) {
- return new Data_Maybe.Just(new Data_Tuple.Tuple(x, x - 1 | 0));
- }
- ;
- if (Data_Boolean.otherwise) {
- return Data_Maybe.Nothing.value;
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy (line 148, column 13 - line 149, column 38): " + [x.constructor.name]);
- };
- return Data_Unfoldable.unfoldr(Data_List_Lazy_Types.unfoldableList)(g)(start);
- }
- ;
- if (Data_Boolean.otherwise) {
- var f = function f(x) {
- if (x <= end) {
- return new Data_Maybe.Just(new Data_Tuple.Tuple(x, x + 1 | 0));
- }
- ;
- if (Data_Boolean.otherwise) {
- return Data_Maybe.Nothing.value;
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy (line 153, column 5 - line 154, column 30): " + [x.constructor.name]);
- };
- return Data_Unfoldable.unfoldr(Data_List_Lazy_Types.unfoldableList)(f)(start);
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy (line 145, column 1 - line 145, column 32): " + [start.constructor.name, end.constructor.name]);
- };
- };
- var partition = function partition(f) {
- var go = function go(x) {
- return function (v) {
- var $147 = f(x);
- if ($147) {
- return {
- yes: Data_List_Lazy_Types.cons(x)(v.yes),
- no: v.no
- };
- }
- ;
- return {
- yes: v.yes,
- no: Data_List_Lazy_Types.cons(x)(v.no)
- };
- };
- };
- return Data_Foldable.foldr(Data_List_Lazy_Types.foldableList)(go)({
- yes: Data_List_Lazy_Types.nil,
- no: Data_List_Lazy_Types.nil
- });
- };
- var $$null = function $$null($245) {
- return Data_Maybe.isNothing(uncons($245));
- };
- var newtypePattern = new Data_Newtype.Newtype(function (n) {
- return n;
- }, Pattern);
- var mapMaybe = function mapMaybe(f) {
- var go = function go($copy_v) {
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(v) {
- if (v instanceof Data_List_Lazy_Types.Nil) {
- $tco_done = true;
- return Data_List_Lazy_Types.Nil.value;
- }
- ;
- if (v instanceof Data_List_Lazy_Types.Cons) {
- var v1 = f(v.value0);
- if (v1 instanceof Data_Maybe.Nothing) {
- $copy_v = Data_List_Lazy_Types.step(v.value1);
- return;
- }
- ;
- if (v1 instanceof Data_Maybe.Just) {
- $tco_done = true;
- return new Data_List_Lazy_Types.Cons(v1.value0, mapMaybe(f)(v.value1));
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy (line 460, column 5 - line 462, column 39): " + [v1.constructor.name]);
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy (line 458, column 3 - line 458, column 15): " + [v.constructor.name]);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($copy_v);
- }
- ;
- return $tco_result;
- };
- var $246 = Data_Functor.map(Data_Lazy.functorLazy)(go);
- var $247 = Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList);
- return function ($248) {
- return Data_List_Lazy_Types.List($246($247($248)));
- };
- };
- var some = function some(dictAlternative) {
- return function (dictLazy) {
- return function (v) {
- return Control_Apply.apply(dictAlternative.Applicative0().Apply0())(Data_Functor.map(dictAlternative.Plus1().Alt0().Functor0())(Data_List_Lazy_Types.cons)(v))(Control_Lazy.defer(dictLazy)(function (v1) {
- return many(dictAlternative)(dictLazy)(v);
- }));
- };
- };
- };
- var many = function many(dictAlternative) {
- return function (dictLazy) {
- return function (v) {
- return Control_Alt.alt(dictAlternative.Plus1().Alt0())(some(dictAlternative)(dictLazy)(v))(Control_Applicative.pure(dictAlternative.Applicative0())(Data_List_Lazy_Types.nil));
- };
- };
- };
- var length = Data_Foldable.foldl(Data_List_Lazy_Types.foldableList)(function (l) {
- return function (v) {
- return l + 1 | 0;
- };
- })(0);
- var last = function () {
- var go = function go($copy_v) {
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(v) {
- if (v instanceof Data_List_Lazy_Types.Cons) {
- if ($$null(v.value1)) {
- $tco_done = true;
- return new Data_Maybe.Just(v.value0);
- }
- ;
- if (Data_Boolean.otherwise) {
- $copy_v = Data_List_Lazy_Types.step(v.value1);
- return;
- }
- ;
- }
- ;
- $tco_done = true;
- return Data_Maybe.Nothing.value;
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($copy_v);
- }
- ;
- return $tco_result;
- };
- return function ($249) {
- return go(Data_List_Lazy_Types.step($249));
- };
- }();
- var iterate = function iterate(f) {
- return function (x) {
- return Control_Lazy.fix(Data_List_Lazy_Types.lazyList)(function (xs) {
- return Data_List_Lazy_Types.cons(x)(Data_Functor.map(Data_List_Lazy_Types.functorList)(f)(xs));
- });
- };
- };
- var insertAt = function insertAt(v) {
- return function (x) {
- return function (xs) {
- if (v === 0) {
- return Data_List_Lazy_Types.cons(x)(xs);
- }
- ;
- var go = function go(v1) {
- if (v1 instanceof Data_List_Lazy_Types.Nil) {
- return new Data_List_Lazy_Types.Cons(x, Data_List_Lazy_Types.nil);
- }
- ;
- if (v1 instanceof Data_List_Lazy_Types.Cons) {
- return new Data_List_Lazy_Types.Cons(v1.value0, insertAt(v - 1 | 0)(x)(v1.value1));
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy (line 340, column 3 - line 340, column 22): " + [v1.constructor.name]);
- };
- return Data_Functor.map(Data_Lazy.functorLazy)(go)(Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList)(xs));
- };
- };
- };
- var init = function () {
- var go = function go(v) {
- if (v instanceof Data_List_Lazy_Types.Cons) {
- if ($$null(v.value1)) {
- return new Data_Maybe.Just(Data_List_Lazy_Types.nil);
- }
- ;
- if (Data_Boolean.otherwise) {
- return Data_Functor.map(Data_Maybe.functorMaybe)(Data_List_Lazy_Types.cons(v.value0))(go(Data_List_Lazy_Types.step(v.value1)));
- }
- ;
- }
- ;
- return Data_Maybe.Nothing.value;
- };
- return function ($250) {
- return go(Data_List_Lazy_Types.step($250));
- };
- }();
- var index = function index(xs) {
- var go = function go($copy_v) {
- return function ($copy_v1) {
- var $tco_var_v = $copy_v;
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(v, v1) {
- if (v instanceof Data_List_Lazy_Types.Nil) {
- $tco_done = true;
- return Data_Maybe.Nothing.value;
- }
- ;
- if (v instanceof Data_List_Lazy_Types.Cons && v1 === 0) {
- $tco_done = true;
- return new Data_Maybe.Just(v.value0);
- }
- ;
- if (v instanceof Data_List_Lazy_Types.Cons) {
- $tco_var_v = Data_List_Lazy_Types.step(v.value1);
- $copy_v1 = v1 - 1 | 0;
- return;
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy (line 299, column 3 - line 299, column 21): " + [v.constructor.name, v1.constructor.name]);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($tco_var_v, $copy_v1);
- }
- ;
- return $tco_result;
- };
- };
- return go(Data_List_Lazy_Types.step(xs));
- };
- var head = function head(xs) {
- return Data_Functor.map(Data_Maybe.functorMaybe)(function (v) {
- return v.head;
- })(uncons(xs));
- };
- var transpose = function transpose(xs) {
- var v = uncons(xs);
- if (v instanceof Data_Maybe.Nothing) {
- return xs;
- }
- ;
- if (v instanceof Data_Maybe.Just) {
- var v1 = uncons(v.value0.head);
- if (v1 instanceof Data_Maybe.Nothing) {
- return transpose(v.value0.tail);
- }
- ;
- if (v1 instanceof Data_Maybe.Just) {
- return Data_List_Lazy_Types.cons(Data_List_Lazy_Types.cons(v1.value0.head)(mapMaybe(head)(v.value0.tail)))(transpose(Data_List_Lazy_Types.cons(v1.value0.tail)(mapMaybe(tail)(v.value0.tail))));
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy (line 734, column 7 - line 738, column 72): " + [v1.constructor.name]);
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy (line 730, column 3 - line 738, column 72): " + [v.constructor.name]);
- };
- var groupBy = function groupBy(eq) {
- var go = function go(v) {
- if (v instanceof Data_List_Lazy_Types.Nil) {
- return Data_List_Lazy_Types.Nil.value;
- }
- ;
- if (v instanceof Data_List_Lazy_Types.Cons) {
- var v1 = span(eq(v.value0))(v.value1);
- return new Data_List_Lazy_Types.Cons(Data_Lazy.defer(function (v2) {
- return new Data_NonEmpty.NonEmpty(v.value0, v1.init);
- }), groupBy(eq)(v1.rest));
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy (line 588, column 3 - line 588, column 15): " + [v.constructor.name]);
- };
- var $251 = Data_Functor.map(Data_Lazy.functorLazy)(go);
- var $252 = Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList);
- return function ($253) {
- return Data_List_Lazy_Types.List($251($252($253)));
- };
- };
- var group = function group(dictEq) {
- return groupBy(Data_Eq.eq(dictEq));
- };
- var fromStep = function () {
- var $254 = Control_Applicative.pure(Data_Lazy.applicativeLazy);
- return function ($255) {
- return Data_List_Lazy_Types.List($254($255));
- };
- }();
- var insertBy = function insertBy(cmp) {
- return function (x) {
- return function (xs) {
- var go = function go(v) {
- if (v instanceof Data_List_Lazy_Types.Nil) {
- return new Data_List_Lazy_Types.Cons(x, Data_List_Lazy_Types.nil);
- }
- ;
- if (v instanceof Data_List_Lazy_Types.Cons) {
- var v1 = cmp(x)(v.value0);
- if (v1 instanceof Data_Ordering.GT) {
- return new Data_List_Lazy_Types.Cons(v.value0, insertBy(cmp)(x)(v.value1));
- }
- ;
- return new Data_List_Lazy_Types.Cons(x, fromStep(v));
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy (line 235, column 3 - line 235, column 22): " + [v.constructor.name]);
- };
- return Data_Functor.map(Data_Lazy.functorLazy)(go)(Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList)(xs));
- };
- };
- };
- var insert = function insert(dictOrd) {
- return insertBy(Data_Ord.compare(dictOrd));
- };
- var fromFoldable = function fromFoldable(dictFoldable) {
- return Data_Foldable.foldr(dictFoldable)(Data_List_Lazy_Types.cons)(Data_List_Lazy_Types.nil);
- };
- var foldrLazy = function foldrLazy(dictLazy) {
- return function (op) {
- return function (z) {
- var go = function go(xs) {
- var v = Data_List_Lazy_Types.step(xs);
- if (v instanceof Data_List_Lazy_Types.Cons) {
- return Control_Lazy.defer(dictLazy)(function (v1) {
- return op(v.value0)(go(v.value1));
- });
- }
- ;
- if (v instanceof Data_List_Lazy_Types.Nil) {
- return z;
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy (line 756, column 13 - line 758, column 15): " + [v.constructor.name]);
- };
- return go;
- };
- };
- };
- var foldM = function foldM(dictMonad) {
- return function (f) {
- return function (a) {
- return function (xs) {
- var v = uncons(xs);
- if (v instanceof Data_Maybe.Nothing) {
- return Control_Applicative.pure(dictMonad.Applicative0())(a);
- }
- ;
- if (v instanceof Data_Maybe.Just) {
- return Control_Bind.bind(dictMonad.Bind1())(f(a)(v.value0.head))(function (a$prime) {
- return foldM(dictMonad)(f)(a$prime)(v.value0.tail);
- });
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy (line 747, column 5 - line 750, column 54): " + [v.constructor.name]);
- };
- };
- };
- };
- var findIndex = function findIndex(fn) {
- var go = function go(n) {
- return function (list) {
- return Control_Bind.bind(Data_Maybe.bindMaybe)(uncons(list))(function (o) {
- var $199 = fn(o.head);
- if ($199) {
- return Control_Applicative.pure(Data_Maybe.applicativeMaybe)(n);
- }
- ;
- return go(n + 1 | 0)(o.tail);
- });
- };
- };
- return go(0);
- };
- var findLastIndex = function findLastIndex(fn) {
- return function (xs) {
- return Data_Functor.map(Data_Maybe.functorMaybe)(function (v) {
- return (length(xs) - 1 | 0) - v | 0;
- })(findIndex(fn)(reverse(xs)));
- };
- };
- var filterM = function filterM(dictMonad) {
- return function (p) {
- return function (list) {
- var v = uncons(list);
- if (v instanceof Data_Maybe.Nothing) {
- return Control_Applicative.pure(dictMonad.Applicative0())(Data_List_Lazy_Types.nil);
- }
- ;
- if (v instanceof Data_Maybe.Just) {
- return Control_Bind.bind(dictMonad.Bind1())(p(v.value0.head))(function (b) {
- return Control_Bind.bind(dictMonad.Bind1())(filterM(dictMonad)(p)(v.value0.tail))(function (xs$prime) {
- return Control_Applicative.pure(dictMonad.Applicative0())(function () {
- if (b) {
- return Data_List_Lazy_Types.cons(v.value0.head)(xs$prime);
- }
- ;
- return xs$prime;
- }());
- });
- });
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy (line 443, column 5 - line 448, column 48): " + [v.constructor.name]);
- };
- };
- };
- var filter = function filter(p) {
- var go = function go($copy_v) {
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(v) {
- if (v instanceof Data_List_Lazy_Types.Nil) {
- $tco_done = true;
- return Data_List_Lazy_Types.Nil.value;
- }
- ;
- if (v instanceof Data_List_Lazy_Types.Cons) {
- if (p(v.value0)) {
- $tco_done = true;
- return new Data_List_Lazy_Types.Cons(v.value0, filter(p)(v.value1));
- }
- ;
- if (Data_Boolean.otherwise) {
- $copy_v = Data_List_Lazy_Types.step(v.value1);
- return;
- }
- ;
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy (line 428, column 3 - line 428, column 15): " + [v.constructor.name]);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($copy_v);
- }
- ;
- return $tco_result;
- };
- var $256 = Data_Functor.map(Data_Lazy.functorLazy)(go);
- var $257 = Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList);
- return function ($258) {
- return Data_List_Lazy_Types.List($256($257($258)));
- };
- };
- var intersectBy = function intersectBy(eq) {
- return function (xs) {
- return function (ys) {
- return filter(function (x) {
- return Data_Foldable.any(Data_List_Lazy_Types.foldableList)(Data_HeytingAlgebra.heytingAlgebraBoolean)(eq(x))(ys);
- })(xs);
- };
- };
- };
- var intersect = function intersect(dictEq) {
- return intersectBy(Data_Eq.eq(dictEq));
- };
- var nubBy = function nubBy(eq) {
- var go = function go(v) {
- if (v instanceof Data_List_Lazy_Types.Nil) {
- return Data_List_Lazy_Types.Nil.value;
- }
- ;
- if (v instanceof Data_List_Lazy_Types.Cons) {
- return new Data_List_Lazy_Types.Cons(v.value0, nubBy(eq)(filter(function (y) {
- return !eq(v.value0)(y);
- })(v.value1)));
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy (line 621, column 3 - line 621, column 15): " + [v.constructor.name]);
- };
- var $259 = Data_Functor.map(Data_Lazy.functorLazy)(go);
- var $260 = Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList);
- return function ($261) {
- return Data_List_Lazy_Types.List($259($260($261)));
- };
- };
- var nub = function nub(dictEq) {
- return nubBy(Data_Eq.eq(dictEq));
- };
- var eqPattern = function eqPattern(dictEq) {
- return new Data_Eq.Eq(function (x) {
- return function (y) {
- return Data_Eq.eq(Data_List_Lazy_Types.eqList(dictEq))(x)(y);
- };
- });
- };
- var ordPattern = function ordPattern(dictOrd) {
- return new Data_Ord.Ord(function () {
- return eqPattern(dictOrd.Eq0());
- }, function (x) {
- return function (y) {
- return Data_Ord.compare(Data_List_Lazy_Types.ordList(dictOrd))(x)(y);
- };
- });
- };
- var elemLastIndex = function elemLastIndex(dictEq) {
- return function (x) {
- return findLastIndex(function (v) {
- return Data_Eq.eq(dictEq)(v)(x);
- });
- };
- };
- var elemIndex = function elemIndex(dictEq) {
- return function (x) {
- return findIndex(function (v) {
- return Data_Eq.eq(dictEq)(v)(x);
- });
- };
- };
- var dropWhile = function dropWhile(p) {
- var go = function go($copy_v) {
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(v) {
- if (v instanceof Data_List_Lazy_Types.Cons && p(v.value0)) {
- $copy_v = Data_List_Lazy_Types.step(v.value1);
- return;
- }
- ;
- $tco_done = true;
- return fromStep(v);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($copy_v);
- }
- ;
- return $tco_result;
- };
- return function ($262) {
- return go(Data_List_Lazy_Types.step($262));
- };
- };
- var drop = function drop(n) {
- var go = function go($copy_v) {
- return function ($copy_v1) {
- var $tco_var_v = $copy_v;
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(v, v1) {
- if (v === 0) {
- $tco_done = true;
- return v1;
- }
- ;
- if (v1 instanceof Data_List_Lazy_Types.Nil) {
- $tco_done = true;
- return Data_List_Lazy_Types.Nil.value;
- }
- ;
- if (v1 instanceof Data_List_Lazy_Types.Cons) {
- $tco_var_v = v - 1 | 0;
- $copy_v1 = Data_List_Lazy_Types.step(v1.value1);
- return;
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy (line 536, column 3 - line 536, column 15): " + [v.constructor.name, v1.constructor.name]);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($tco_var_v, $copy_v1);
- }
- ;
- return $tco_result;
- };
- };
- var $263 = Data_Functor.map(Data_Lazy.functorLazy)(go(n));
- var $264 = Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList);
- return function ($265) {
- return Data_List_Lazy_Types.List($263($264($265)));
- };
- };
- var slice = function slice(start) {
- return function (end) {
- return function (xs) {
- return take(end - start | 0)(drop(start)(xs));
- };
- };
- };
- var deleteBy = function deleteBy(eq) {
- return function (x) {
- return function (xs) {
- var go = function go(v) {
- if (v instanceof Data_List_Lazy_Types.Nil) {
- return Data_List_Lazy_Types.Nil.value;
- }
- ;
- if (v instanceof Data_List_Lazy_Types.Cons) {
- if (eq(x)(v.value0)) {
- return Data_List_Lazy_Types.step(v.value1);
- }
- ;
- if (Data_Boolean.otherwise) {
- return new Data_List_Lazy_Types.Cons(v.value0, deleteBy(eq)(x)(v.value1));
- }
- ;
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy (line 650, column 3 - line 650, column 15): " + [v.constructor.name]);
- };
- return Data_Functor.map(Data_Lazy.functorLazy)(go)(Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList)(xs));
- };
- };
- };
- var unionBy = function unionBy(eq) {
- return function (xs) {
- return function (ys) {
- return Data_Semigroup.append(Data_List_Lazy_Types.semigroupList)(xs)(Data_Foldable.foldl(Data_List_Lazy_Types.foldableList)(Data_Function.flip(deleteBy(eq)))(nubBy(eq)(ys))(xs));
- };
- };
- };
- var union = function union(dictEq) {
- return unionBy(Data_Eq.eq(dictEq));
- };
- var deleteAt = function deleteAt(n) {
- return function (xs) {
- var go = function go(v) {
- return function (v1) {
- if (v1 instanceof Data_List_Lazy_Types.Nil) {
- return Data_List_Lazy_Types.Nil.value;
- }
- ;
- if (v === 0 && v1 instanceof Data_List_Lazy_Types.Cons) {
- return Data_List_Lazy_Types.step(v1.value1);
- }
- ;
- if (v1 instanceof Data_List_Lazy_Types.Cons) {
- return new Data_List_Lazy_Types.Cons(v1.value0, deleteAt(v - 1 | 0)(v1.value1));
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy (line 353, column 3 - line 353, column 17): " + [v.constructor.name, v1.constructor.name]);
- };
- };
- return Data_Functor.map(Data_Lazy.functorLazy)(go(n))(Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList)(xs));
- };
- };
- var $$delete = function $$delete(dictEq) {
- return deleteBy(Data_Eq.eq(dictEq));
- };
- var difference = function difference(dictEq) {
- return Data_Foldable.foldl(Data_List_Lazy_Types.foldableList)(Data_Function.flip($$delete(dictEq)));
- };
- var cycle = function cycle(xs) {
- return Control_Lazy.fix(Data_List_Lazy_Types.lazyList)(function (ys) {
- return Data_Semigroup.append(Data_List_Lazy_Types.semigroupList)(xs)(ys);
- });
- };
- var concatMap = Data_Function.flip(Control_Bind.bind(Data_List_Lazy_Types.bindList));
- var concat = function concat(v) {
- return Control_Bind.bind(Data_List_Lazy_Types.bindList)(v)(Control_Category.identity(Control_Category.categoryFn));
- };
- var catMaybes = mapMaybe(Control_Category.identity(Control_Category.categoryFn));
- var alterAt = function alterAt(n) {
- return function (f) {
- return function (xs) {
- var go = function go(v) {
- return function (v1) {
- if (v1 instanceof Data_List_Lazy_Types.Nil) {
- return Data_List_Lazy_Types.Nil.value;
- }
- ;
- if (v === 0 && v1 instanceof Data_List_Lazy_Types.Cons) {
- var v2 = f(v1.value0);
- if (v2 instanceof Data_Maybe.Nothing) {
- return Data_List_Lazy_Types.step(v1.value1);
- }
- ;
- if (v2 instanceof Data_Maybe.Just) {
- return new Data_List_Lazy_Types.Cons(v2.value0, v1.value1);
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy (line 394, column 22 - line 396, column 26): " + [v2.constructor.name]);
- }
- ;
- if (v1 instanceof Data_List_Lazy_Types.Cons) {
- return new Data_List_Lazy_Types.Cons(v1.value0, alterAt(v - 1 | 0)(f)(v1.value1));
- }
- ;
- throw new Error("Failed pattern match at Data.List.Lazy (line 393, column 3 - line 393, column 17): " + [v.constructor.name, v1.constructor.name]);
- };
- };
- return Data_Functor.map(Data_Lazy.functorLazy)(go(n))(Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList)(xs));
- };
- };
- };
- var modifyAt = function modifyAt(n) {
- return function (f) {
- return alterAt(n)(function ($266) {
- return Data_Maybe.Just.create(f($266));
- });
- };
- };
- module.exports = {
- toUnfoldable: toUnfoldable,
- fromFoldable: fromFoldable,
- singleton: singleton,
- range: range,
- replicate: replicate,
- replicateM: replicateM,
- some: some,
- many: many,
- repeat: repeat,
- iterate: iterate,
- cycle: cycle,
- "null": $$null,
- length: length,
- snoc: snoc,
- insert: insert,
- insertBy: insertBy,
- head: head,
- last: last,
- tail: tail,
- init: init,
- uncons: uncons,
- index: index,
- elemIndex: elemIndex,
- elemLastIndex: elemLastIndex,
- findIndex: findIndex,
- findLastIndex: findLastIndex,
- insertAt: insertAt,
- deleteAt: deleteAt,
- updateAt: updateAt,
- modifyAt: modifyAt,
- alterAt: alterAt,
- reverse: reverse,
- concat: concat,
- concatMap: concatMap,
- filter: filter,
- filterM: filterM,
- mapMaybe: mapMaybe,
- catMaybes: catMaybes,
- Pattern: Pattern,
- stripPrefix: stripPrefix,
- slice: slice,
- take: take,
- takeWhile: takeWhile,
- drop: drop,
- dropWhile: dropWhile,
- span: span,
- group: group,
- groupBy: groupBy,
- partition: partition,
- nub: nub,
- nubBy: nubBy,
- union: union,
- unionBy: unionBy,
- "delete": $$delete,
- deleteBy: deleteBy,
- difference: difference,
- intersect: intersect,
- intersectBy: intersectBy,
- zipWith: zipWith,
- zipWithA: zipWithA,
- zip: zip,
- unzip: unzip,
- transpose: transpose,
- foldM: foldM,
- foldrLazy: foldrLazy,
- scanrLazy: scanrLazy,
- eqPattern: eqPattern,
- ordPattern: ordPattern,
- newtypePattern: newtypePattern,
- showPattern: showPattern
- };
- },{"../Control.Alt/index.js":"../output/Control.Alt/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Lazy/index.js":"../output/Control.Lazy/index.js","../Control.Monad.Rec.Class/index.js":"../output/Control.Monad.Rec.Class/index.js","../Data.Boolean/index.js":"../output/Data.Boolean/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.HeytingAlgebra/index.js":"../output/Data.HeytingAlgebra/index.js","../Data.Lazy/index.js":"../output/Data.Lazy/index.js","../Data.List.Lazy.Types/index.js":"../output/Data.List.Lazy.Types/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.NonEmpty/index.js":"../output/Data.NonEmpty/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js","../Data.Unfoldable/index.js":"../output/Data.Unfoldable/index.js"}],"../output/Data.Map.Internal/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Category = require("../Control.Category/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Foldable = require("../Data.Foldable/index.js");
- var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
- var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
- var Data_List = require("../Data.List/index.js");
- var Data_List_Lazy = require("../Data.List.Lazy/index.js");
- var Data_List_Lazy_Types = require("../Data.List.Lazy.Types/index.js");
- var Data_List_Types = require("../Data.List.Types/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Ordering = require("../Data.Ordering/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Data_Traversable = require("../Data.Traversable/index.js");
- var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js");
- var Data_Tuple = require("../Data.Tuple/index.js");
- var Data_Unfoldable = require("../Data.Unfoldable/index.js");
- var Leaf = function () {
- function Leaf() {}
- ;
- Leaf.value = new Leaf();
- return Leaf;
- }();
- var Two = function () {
- function Two(value0, value1, value2, value3) {
- this.value0 = value0;
- this.value1 = value1;
- this.value2 = value2;
- this.value3 = value3;
- }
- ;
- Two.create = function (value0) {
- return function (value1) {
- return function (value2) {
- return function (value3) {
- return new Two(value0, value1, value2, value3);
- };
- };
- };
- };
- return Two;
- }();
- var Three = function () {
- function Three(value0, value1, value2, value3, value4, value5, value6) {
- this.value0 = value0;
- this.value1 = value1;
- this.value2 = value2;
- this.value3 = value3;
- this.value4 = value4;
- this.value5 = value5;
- this.value6 = value6;
- }
- ;
- Three.create = function (value0) {
- return function (value1) {
- return function (value2) {
- return function (value3) {
- return function (value4) {
- return function (value5) {
- return function (value6) {
- return new Three(value0, value1, value2, value3, value4, value5, value6);
- };
- };
- };
- };
- };
- };
- };
- return Three;
- }();
- var TwoLeft = function () {
- function TwoLeft(value0, value1, value2) {
- this.value0 = value0;
- this.value1 = value1;
- this.value2 = value2;
- }
- ;
- TwoLeft.create = function (value0) {
- return function (value1) {
- return function (value2) {
- return new TwoLeft(value0, value1, value2);
- };
- };
- };
- return TwoLeft;
- }();
- var TwoRight = function () {
- function TwoRight(value0, value1, value2) {
- this.value0 = value0;
- this.value1 = value1;
- this.value2 = value2;
- }
- ;
- TwoRight.create = function (value0) {
- return function (value1) {
- return function (value2) {
- return new TwoRight(value0, value1, value2);
- };
- };
- };
- return TwoRight;
- }();
- var ThreeLeft = function () {
- function ThreeLeft(value0, value1, value2, value3, value4, value5) {
- this.value0 = value0;
- this.value1 = value1;
- this.value2 = value2;
- this.value3 = value3;
- this.value4 = value4;
- this.value5 = value5;
- }
- ;
- ThreeLeft.create = function (value0) {
- return function (value1) {
- return function (value2) {
- return function (value3) {
- return function (value4) {
- return function (value5) {
- return new ThreeLeft(value0, value1, value2, value3, value4, value5);
- };
- };
- };
- };
- };
- };
- return ThreeLeft;
- }();
- var ThreeMiddle = function () {
- function ThreeMiddle(value0, value1, value2, value3, value4, value5) {
- this.value0 = value0;
- this.value1 = value1;
- this.value2 = value2;
- this.value3 = value3;
- this.value4 = value4;
- this.value5 = value5;
- }
- ;
- ThreeMiddle.create = function (value0) {
- return function (value1) {
- return function (value2) {
- return function (value3) {
- return function (value4) {
- return function (value5) {
- return new ThreeMiddle(value0, value1, value2, value3, value4, value5);
- };
- };
- };
- };
- };
- };
- return ThreeMiddle;
- }();
- var ThreeRight = function () {
- function ThreeRight(value0, value1, value2, value3, value4, value5) {
- this.value0 = value0;
- this.value1 = value1;
- this.value2 = value2;
- this.value3 = value3;
- this.value4 = value4;
- this.value5 = value5;
- }
- ;
- ThreeRight.create = function (value0) {
- return function (value1) {
- return function (value2) {
- return function (value3) {
- return function (value4) {
- return function (value5) {
- return new ThreeRight(value0, value1, value2, value3, value4, value5);
- };
- };
- };
- };
- };
- };
- return ThreeRight;
- }();
- var KickUp = function () {
- function KickUp(value0, value1, value2, value3) {
- this.value0 = value0;
- this.value1 = value1;
- this.value2 = value2;
- this.value3 = value3;
- }
- ;
- KickUp.create = function (value0) {
- return function (value1) {
- return function (value2) {
- return function (value3) {
- return new KickUp(value0, value1, value2, value3);
- };
- };
- };
- };
- return KickUp;
- }();
- var values = function values(v) {
- if (v instanceof Leaf) {
- return Data_List_Types.Nil.value;
- }
- ;
- if (v instanceof Two) {
- return Data_Semigroup.append(Data_List_Types.semigroupList)(values(v.value0))(Data_Semigroup.append(Data_List_Types.semigroupList)(Control_Applicative.pure(Data_List_Types.applicativeList)(v.value2))(values(v.value3)));
- }
- ;
- if (v instanceof Three) {
- return Data_Semigroup.append(Data_List_Types.semigroupList)(values(v.value0))(Data_Semigroup.append(Data_List_Types.semigroupList)(Control_Applicative.pure(Data_List_Types.applicativeList)(v.value2))(Data_Semigroup.append(Data_List_Types.semigroupList)(values(v.value3))(Data_Semigroup.append(Data_List_Types.semigroupList)(Control_Applicative.pure(Data_List_Types.applicativeList)(v.value5))(values(v.value6)))));
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 612, column 1 - line 612, column 40): " + [v.constructor.name]);
- };
- var size = function size(v) {
- if (v instanceof Leaf) {
- return 0;
- }
- ;
- if (v instanceof Two) {
- return (1 + size(v.value0) | 0) + size(v.value3) | 0;
- }
- ;
- if (v instanceof Three) {
- return ((2 + size(v.value0) | 0) + size(v.value3) | 0) + size(v.value6) | 0;
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 662, column 1 - line 662, column 35): " + [v.constructor.name]);
- };
- var singleton = function singleton(k) {
- return function (v) {
- return new Two(Leaf.value, k, v, Leaf.value);
- };
- };
- var toUnfoldable = function toUnfoldable(dictUnfoldable) {
- return function (m) {
- var go = function go($copy_v) {
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(v) {
- if (v instanceof Data_List_Types.Nil) {
- $tco_done = true;
- return Data_Maybe.Nothing.value;
- }
- ;
- if (v instanceof Data_List_Types.Cons) {
- if (v.value0 instanceof Leaf) {
- $copy_v = v.value1;
- return;
- }
- ;
- if (v.value0 instanceof Two && v.value0.value0 instanceof Leaf && v.value0.value3 instanceof Leaf) {
- $tco_done = true;
- return Data_Maybe.Just.create(new Data_Tuple.Tuple(new Data_Tuple.Tuple(v.value0.value1, v.value0.value2), v.value1));
- }
- ;
- if (v.value0 instanceof Two && v.value0.value0 instanceof Leaf) {
- $tco_done = true;
- return Data_Maybe.Just.create(new Data_Tuple.Tuple(new Data_Tuple.Tuple(v.value0.value1, v.value0.value2), new Data_List_Types.Cons(v.value0.value3, v.value1)));
- }
- ;
- if (v.value0 instanceof Two) {
- $copy_v = new Data_List_Types.Cons(v.value0.value0, new Data_List_Types.Cons(singleton(v.value0.value1)(v.value0.value2), new Data_List_Types.Cons(v.value0.value3, v.value1)));
- return;
- }
- ;
- if (v.value0 instanceof Three) {
- $copy_v = new Data_List_Types.Cons(v.value0.value0, new Data_List_Types.Cons(singleton(v.value0.value1)(v.value0.value2), new Data_List_Types.Cons(v.value0.value3, new Data_List_Types.Cons(singleton(v.value0.value4)(v.value0.value5), new Data_List_Types.Cons(v.value0.value6, v.value1)))));
- return;
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 577, column 18 - line 586, column 71): " + [v.value0.constructor.name]);
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 576, column 3 - line 576, column 19): " + [v.constructor.name]);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($copy_v);
- }
- ;
- return $tco_result;
- };
- return Data_Unfoldable.unfoldr(dictUnfoldable)(go)(new Data_List_Types.Cons(m, Data_List_Types.Nil.value));
- };
- };
- var toAscArray = toUnfoldable(Data_Unfoldable.unfoldableArray);
- var toUnfoldableUnordered = function toUnfoldableUnordered(dictUnfoldable) {
- return function (m) {
- var go = function go($copy_v) {
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(v) {
- if (v instanceof Data_List_Types.Nil) {
- $tco_done = true;
- return Data_Maybe.Nothing.value;
- }
- ;
- if (v instanceof Data_List_Types.Cons) {
- if (v.value0 instanceof Leaf) {
- $copy_v = v.value1;
- return;
- }
- ;
- if (v.value0 instanceof Two) {
- $tco_done = true;
- return Data_Maybe.Just.create(new Data_Tuple.Tuple(new Data_Tuple.Tuple(v.value0.value1, v.value0.value2), new Data_List_Types.Cons(v.value0.value0, new Data_List_Types.Cons(v.value0.value3, v.value1))));
- }
- ;
- if (v.value0 instanceof Three) {
- $tco_done = true;
- return Data_Maybe.Just.create(new Data_Tuple.Tuple(new Data_Tuple.Tuple(v.value0.value1, v.value0.value2), new Data_List_Types.Cons(singleton(v.value0.value4)(v.value0.value5), new Data_List_Types.Cons(v.value0.value0, new Data_List_Types.Cons(v.value0.value3, new Data_List_Types.Cons(v.value0.value6, v.value1))))));
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 598, column 18 - line 603, column 77): " + [v.value0.constructor.name]);
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 597, column 3 - line 597, column 19): " + [v.constructor.name]);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($copy_v);
- }
- ;
- return $tco_result;
- };
- return Data_Unfoldable.unfoldr(dictUnfoldable)(go)(new Data_List_Types.Cons(m, Data_List_Types.Nil.value));
- };
- };
- var showTree = function showTree(dictShow) {
- return function (dictShow1) {
- return function (v) {
- if (v instanceof Leaf) {
- return "Leaf";
- }
- ;
- if (v instanceof Two) {
- return "Two (" + (showTree(dictShow)(dictShow1)(v.value0) + (") (" + (Data_Show.show(dictShow)(v.value1) + (") (" + (Data_Show.show(dictShow1)(v.value2) + (") (" + (showTree(dictShow)(dictShow1)(v.value3) + ")")))))));
- }
- ;
- if (v instanceof Three) {
- return "Three (" + (showTree(dictShow)(dictShow1)(v.value0) + (") (" + (Data_Show.show(dictShow)(v.value1) + (") (" + (Data_Show.show(dictShow1)(v.value2) + (") (" + (showTree(dictShow)(dictShow1)(v.value3) + (") (" + (Data_Show.show(dictShow)(v.value4) + (") (" + (Data_Show.show(dictShow1)(v.value5) + (") (" + (showTree(dictShow)(dictShow1)(v.value6) + ")")))))))))))));
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 153, column 1 - line 153, column 62): " + [v.constructor.name]);
- };
- };
- };
- var showMap = function showMap(dictShow) {
- return function (dictShow1) {
- return new Data_Show.Show(function (m) {
- return "(fromFoldable " + (Data_Show.show(Data_Show.showArray(Data_Tuple.showTuple(dictShow)(dictShow1)))(toAscArray(m)) + ")");
- });
- };
- };
- var lookupLE = function lookupLE(dictOrd) {
- return function (k) {
- var comp = Data_Ord.compare(dictOrd);
- var go = function go(v) {
- if (v instanceof Leaf) {
- return Data_Maybe.Nothing.value;
- }
- ;
- if (v instanceof Two) {
- var v2 = comp(k)(v.value1);
- if (v2 instanceof Data_Ordering.EQ) {
- return new Data_Maybe.Just({
- key: v.value1,
- value: v.value2
- });
- }
- ;
- if (v2 instanceof Data_Ordering.GT) {
- return Data_Maybe.Just.create(Data_Maybe.fromMaybe({
- key: v.value1,
- value: v.value2
- })(go(v.value3)));
- }
- ;
- if (v2 instanceof Data_Ordering.LT) {
- return go(v.value0);
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 225, column 33 - line 228, column 20): " + [v2.constructor.name]);
- }
- ;
- if (v instanceof Three) {
- var v3 = comp(k)(v.value4);
- if (v3 instanceof Data_Ordering.EQ) {
- return new Data_Maybe.Just({
- key: v.value4,
- value: v.value5
- });
- }
- ;
- if (v3 instanceof Data_Ordering.GT) {
- return Data_Maybe.Just.create(Data_Maybe.fromMaybe({
- key: v.value4,
- value: v.value5
- })(go(v.value6)));
- }
- ;
- if (v3 instanceof Data_Ordering.LT) {
- return go(new Two(v.value0, v.value1, v.value2, v.value3));
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 229, column 45 - line 232, column 36): " + [v3.constructor.name]);
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 224, column 5 - line 224, column 22): " + [v.constructor.name]);
- };
- return go;
- };
- };
- var lookupGE = function lookupGE(dictOrd) {
- return function (k) {
- var comp = Data_Ord.compare(dictOrd);
- var go = function go(v) {
- if (v instanceof Leaf) {
- return Data_Maybe.Nothing.value;
- }
- ;
- if (v instanceof Two) {
- var v2 = comp(k)(v.value1);
- if (v2 instanceof Data_Ordering.EQ) {
- return new Data_Maybe.Just({
- key: v.value1,
- value: v.value2
- });
- }
- ;
- if (v2 instanceof Data_Ordering.LT) {
- return Data_Maybe.Just.create(Data_Maybe.fromMaybe({
- key: v.value1,
- value: v.value2
- })(go(v.value0)));
- }
- ;
- if (v2 instanceof Data_Ordering.GT) {
- return go(v.value3);
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 259, column 33 - line 262, column 21): " + [v2.constructor.name]);
- }
- ;
- if (v instanceof Three) {
- var v3 = comp(k)(v.value1);
- if (v3 instanceof Data_Ordering.EQ) {
- return new Data_Maybe.Just({
- key: v.value1,
- value: v.value2
- });
- }
- ;
- if (v3 instanceof Data_Ordering.LT) {
- return Data_Maybe.Just.create(Data_Maybe.fromMaybe({
- key: v.value1,
- value: v.value2
- })(go(v.value0)));
- }
- ;
- if (v3 instanceof Data_Ordering.GT) {
- return go(new Two(v.value3, v.value4, v.value5, v.value6));
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 263, column 45 - line 266, column 37): " + [v3.constructor.name]);
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 258, column 5 - line 258, column 22): " + [v.constructor.name]);
- };
- return go;
- };
- };
- var lookup = function lookup(dictOrd) {
- return function (k) {
- var comp = Data_Ord.compare(dictOrd);
- var go = function go($copy_v) {
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(v) {
- if (v instanceof Leaf) {
- $tco_done = true;
- return Data_Maybe.Nothing.value;
- }
- ;
- if (v instanceof Two) {
- var v2 = comp(k)(v.value1);
- if (v2 instanceof Data_Ordering.EQ) {
- $tco_done = true;
- return new Data_Maybe.Just(v.value2);
- }
- ;
- if (v2 instanceof Data_Ordering.LT) {
- $copy_v = v.value0;
- return;
- }
- ;
- $copy_v = v.value3;
- return;
- }
- ;
- if (v instanceof Three) {
- var v3 = comp(k)(v.value1);
- if (v3 instanceof Data_Ordering.EQ) {
- $tco_done = true;
- return new Data_Maybe.Just(v.value2);
- }
- ;
- var v4 = comp(k)(v.value4);
- if (v4 instanceof Data_Ordering.EQ) {
- $tco_done = true;
- return new Data_Maybe.Just(v.value5);
- }
- ;
- if (v3 instanceof Data_Ordering.LT) {
- $copy_v = v.value0;
- return;
- }
- ;
- if (v4 instanceof Data_Ordering.GT) {
- $copy_v = v.value6;
- return;
- }
- ;
- $copy_v = v.value3;
- return;
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 200, column 5 - line 200, column 22): " + [v.constructor.name]);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($copy_v);
- }
- ;
- return $tco_result;
- };
- return go;
- };
- };
- var member = function member(dictOrd) {
- return function (k) {
- return function (m) {
- return Data_Maybe.isJust(lookup(dictOrd)(k)(m));
- };
- };
- };
- var keys = function keys(v) {
- if (v instanceof Leaf) {
- return Data_List_Types.Nil.value;
- }
- ;
- if (v instanceof Two) {
- return Data_Semigroup.append(Data_List_Types.semigroupList)(keys(v.value0))(Data_Semigroup.append(Data_List_Types.semigroupList)(Control_Applicative.pure(Data_List_Types.applicativeList)(v.value1))(keys(v.value3)));
- }
- ;
- if (v instanceof Three) {
- return Data_Semigroup.append(Data_List_Types.semigroupList)(keys(v.value0))(Data_Semigroup.append(Data_List_Types.semigroupList)(Control_Applicative.pure(Data_List_Types.applicativeList)(v.value1))(Data_Semigroup.append(Data_List_Types.semigroupList)(keys(v.value3))(Data_Semigroup.append(Data_List_Types.semigroupList)(Control_Applicative.pure(Data_List_Types.applicativeList)(v.value4))(keys(v.value6)))));
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 606, column 1 - line 606, column 38): " + [v.constructor.name]);
- };
- var isSubmap = function isSubmap(dictOrd) {
- return function (dictEq) {
- return function (m1) {
- return function (m2) {
- var f = function f(v) {
- return Data_Eq.eq(Data_Maybe.eqMaybe(dictEq))(lookup(dictOrd)(v.value0)(m2))(new Data_Maybe.Just(v.value1));
- };
- return Data_Foldable.all(Data_List_Lazy_Types.foldableList)(Data_HeytingAlgebra.heytingAlgebraBoolean)(f)(toUnfoldable(Data_List_Lazy_Types.unfoldableList)(m1));
- };
- };
- };
- };
- var isEmpty = function isEmpty(v) {
- if (v instanceof Leaf) {
- return true;
- }
- ;
- return false;
- };
- var functorMap = new Data_Functor.Functor(function (v) {
- return function (v1) {
- if (v1 instanceof Leaf) {
- return Leaf.value;
- }
- ;
- if (v1 instanceof Two) {
- return new Two(Data_Functor.map(functorMap)(v)(v1.value0), v1.value1, v(v1.value2), Data_Functor.map(functorMap)(v)(v1.value3));
- }
- ;
- if (v1 instanceof Three) {
- return new Three(Data_Functor.map(functorMap)(v)(v1.value0), v1.value1, v(v1.value2), Data_Functor.map(functorMap)(v)(v1.value3), v1.value4, v(v1.value5), Data_Functor.map(functorMap)(v)(v1.value6));
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 96, column 1 - line 99, column 110): " + [v.constructor.name, v1.constructor.name]);
- };
- });
- var functorWithIndexMap = new Data_FunctorWithIndex.FunctorWithIndex(function () {
- return functorMap;
- }, function (v) {
- return function (v1) {
- if (v1 instanceof Leaf) {
- return Leaf.value;
- }
- ;
- if (v1 instanceof Two) {
- return new Two(Data_FunctorWithIndex.mapWithIndex(functorWithIndexMap)(v)(v1.value0), v1.value1, v(v1.value1)(v1.value2), Data_FunctorWithIndex.mapWithIndex(functorWithIndexMap)(v)(v1.value3));
- }
- ;
- if (v1 instanceof Three) {
- return new Three(Data_FunctorWithIndex.mapWithIndex(functorWithIndexMap)(v)(v1.value0), v1.value1, v(v1.value1)(v1.value2), Data_FunctorWithIndex.mapWithIndex(functorWithIndexMap)(v)(v1.value3), v1.value4, v(v1.value4)(v1.value5), Data_FunctorWithIndex.mapWithIndex(functorWithIndexMap)(v)(v1.value6));
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 101, column 1 - line 104, column 152): " + [v.constructor.name, v1.constructor.name]);
- };
- });
- var fromZipper = function fromZipper($copy_dictOrd) {
- return function ($copy_v) {
- return function ($copy_tree) {
- var $tco_var_dictOrd = $copy_dictOrd;
- var $tco_var_v = $copy_v;
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(dictOrd, v, tree) {
- if (v instanceof Data_List_Types.Nil) {
- $tco_done = true;
- return tree;
- }
- ;
- if (v instanceof Data_List_Types.Cons) {
- if (v.value0 instanceof TwoLeft) {
- $tco_var_dictOrd = dictOrd;
- $tco_var_v = v.value1;
- $copy_tree = new Two(tree, v.value0.value0, v.value0.value1, v.value0.value2);
- return;
- }
- ;
- if (v.value0 instanceof TwoRight) {
- $tco_var_dictOrd = dictOrd;
- $tco_var_v = v.value1;
- $copy_tree = new Two(v.value0.value0, v.value0.value1, v.value0.value2, tree);
- return;
- }
- ;
- if (v.value0 instanceof ThreeLeft) {
- $tco_var_dictOrd = dictOrd;
- $tco_var_v = v.value1;
- $copy_tree = new Three(tree, v.value0.value0, v.value0.value1, v.value0.value2, v.value0.value3, v.value0.value4, v.value0.value5);
- return;
- }
- ;
- if (v.value0 instanceof ThreeMiddle) {
- $tco_var_dictOrd = dictOrd;
- $tco_var_v = v.value1;
- $copy_tree = new Three(v.value0.value0, v.value0.value1, v.value0.value2, tree, v.value0.value3, v.value0.value4, v.value0.value5);
- return;
- }
- ;
- if (v.value0 instanceof ThreeRight) {
- $tco_var_dictOrd = dictOrd;
- $tco_var_v = v.value1;
- $copy_tree = new Three(v.value0.value0, v.value0.value1, v.value0.value2, v.value0.value3, v.value0.value4, v.value0.value5, tree);
- return;
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 418, column 3 - line 423, column 88): " + [v.value0.constructor.name]);
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 415, column 1 - line 415, column 80): " + [v.constructor.name, tree.constructor.name]);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($tco_var_dictOrd, $tco_var_v, $copy_tree);
- }
- ;
- return $tco_result;
- };
- };
- };
- var insert = function insert(dictOrd) {
- return function (k) {
- return function (v) {
- var up = function up($copy_v1) {
- return function ($copy_v2) {
- var $tco_var_v1 = $copy_v1;
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(v1, v2) {
- if (v1 instanceof Data_List_Types.Nil) {
- $tco_done = true;
- return new Two(v2.value0, v2.value1, v2.value2, v2.value3);
- }
- ;
- if (v1 instanceof Data_List_Types.Cons) {
- if (v1.value0 instanceof TwoLeft) {
- $tco_done = true;
- return fromZipper(dictOrd)(v1.value1)(new Three(v2.value0, v2.value1, v2.value2, v2.value3, v1.value0.value0, v1.value0.value1, v1.value0.value2));
- }
- ;
- if (v1.value0 instanceof TwoRight) {
- $tco_done = true;
- return fromZipper(dictOrd)(v1.value1)(new Three(v1.value0.value0, v1.value0.value1, v1.value0.value2, v2.value0, v2.value1, v2.value2, v2.value3));
- }
- ;
- if (v1.value0 instanceof ThreeLeft) {
- $tco_var_v1 = v1.value1;
- $copy_v2 = new KickUp(new Two(v2.value0, v2.value1, v2.value2, v2.value3), v1.value0.value0, v1.value0.value1, new Two(v1.value0.value2, v1.value0.value3, v1.value0.value4, v1.value0.value5));
- return;
- }
- ;
- if (v1.value0 instanceof ThreeMiddle) {
- $tco_var_v1 = v1.value1;
- $copy_v2 = new KickUp(new Two(v1.value0.value0, v1.value0.value1, v1.value0.value2, v2.value0), v2.value1, v2.value2, new Two(v2.value3, v1.value0.value3, v1.value0.value4, v1.value0.value5));
- return;
- }
- ;
- if (v1.value0 instanceof ThreeRight) {
- $tco_var_v1 = v1.value1;
- $copy_v2 = new KickUp(new Two(v1.value0.value0, v1.value0.value1, v1.value0.value2, v1.value0.value3), v1.value0.value4, v1.value0.value5, new Two(v2.value0, v2.value1, v2.value2, v2.value3));
- return;
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 454, column 5 - line 459, column 108): " + [v1.value0.constructor.name, v2.constructor.name]);
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 451, column 3 - line 451, column 56): " + [v1.constructor.name, v2.constructor.name]);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($tco_var_v1, $copy_v2);
- }
- ;
- return $tco_result;
- };
- };
- var comp = Data_Ord.compare(dictOrd);
- var down = function down($copy_ctx) {
- return function ($copy_v1) {
- var $tco_var_ctx = $copy_ctx;
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(ctx, v1) {
- if (v1 instanceof Leaf) {
- $tco_done = true;
- return up(ctx)(new KickUp(Leaf.value, k, v, Leaf.value));
- }
- ;
- if (v1 instanceof Two) {
- var v2 = comp(k)(v1.value1);
- if (v2 instanceof Data_Ordering.EQ) {
- $tco_done = true;
- return fromZipper(dictOrd)(ctx)(new Two(v1.value0, k, v, v1.value3));
- }
- ;
- if (v2 instanceof Data_Ordering.LT) {
- $tco_var_ctx = new Data_List_Types.Cons(new TwoLeft(v1.value1, v1.value2, v1.value3), ctx);
- $copy_v1 = v1.value0;
- return;
- }
- ;
- $tco_var_ctx = new Data_List_Types.Cons(new TwoRight(v1.value0, v1.value1, v1.value2), ctx);
- $copy_v1 = v1.value3;
- return;
- }
- ;
- if (v1 instanceof Three) {
- var v3 = comp(k)(v1.value1);
- if (v3 instanceof Data_Ordering.EQ) {
- $tco_done = true;
- return fromZipper(dictOrd)(ctx)(new Three(v1.value0, k, v, v1.value3, v1.value4, v1.value5, v1.value6));
- }
- ;
- var v4 = comp(k)(v1.value4);
- if (v4 instanceof Data_Ordering.EQ) {
- $tco_done = true;
- return fromZipper(dictOrd)(ctx)(new Three(v1.value0, v1.value1, v1.value2, v1.value3, k, v, v1.value6));
- }
- ;
- if (v3 instanceof Data_Ordering.LT) {
- $tco_var_ctx = new Data_List_Types.Cons(new ThreeLeft(v1.value1, v1.value2, v1.value3, v1.value4, v1.value5, v1.value6), ctx);
- $copy_v1 = v1.value0;
- return;
- }
- ;
- if (v3 instanceof Data_Ordering.GT && v4 instanceof Data_Ordering.LT) {
- $tco_var_ctx = new Data_List_Types.Cons(new ThreeMiddle(v1.value0, v1.value1, v1.value2, v1.value4, v1.value5, v1.value6), ctx);
- $copy_v1 = v1.value3;
- return;
- }
- ;
- $tco_var_ctx = new Data_List_Types.Cons(new ThreeRight(v1.value0, v1.value1, v1.value2, v1.value3, v1.value4, v1.value5), ctx);
- $copy_v1 = v1.value6;
- return;
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 434, column 3 - line 434, column 55): " + [ctx.constructor.name, v1.constructor.name]);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($tco_var_ctx, $copy_v1);
- }
- ;
- return $tco_result;
- };
- };
- return down(Data_List_Types.Nil.value);
- };
- };
- };
- var pop = function pop(dictOrd) {
- return function (k) {
- var up = function up($copy_ctxs) {
- return function ($copy_tree) {
- var $tco_var_ctxs = $copy_ctxs;
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(ctxs, tree) {
- if (ctxs instanceof Data_List_Types.Nil) {
- $tco_done = true;
- return tree;
- }
- ;
- if (ctxs instanceof Data_List_Types.Cons) {
- if (ctxs.value0 instanceof TwoLeft && ctxs.value0.value2 instanceof Leaf && tree instanceof Leaf) {
- $tco_done = true;
- return fromZipper(dictOrd)(ctxs.value1)(new Two(Leaf.value, ctxs.value0.value0, ctxs.value0.value1, Leaf.value));
- }
- ;
- if (ctxs.value0 instanceof TwoRight && ctxs.value0.value0 instanceof Leaf && tree instanceof Leaf) {
- $tco_done = true;
- return fromZipper(dictOrd)(ctxs.value1)(new Two(Leaf.value, ctxs.value0.value1, ctxs.value0.value2, Leaf.value));
- }
- ;
- if (ctxs.value0 instanceof TwoLeft && ctxs.value0.value2 instanceof Two) {
- $tco_var_ctxs = ctxs.value1;
- $copy_tree = new Three(tree, ctxs.value0.value0, ctxs.value0.value1, ctxs.value0.value2.value0, ctxs.value0.value2.value1, ctxs.value0.value2.value2, ctxs.value0.value2.value3);
- return;
- }
- ;
- if (ctxs.value0 instanceof TwoRight && ctxs.value0.value0 instanceof Two) {
- $tco_var_ctxs = ctxs.value1;
- $copy_tree = new Three(ctxs.value0.value0.value0, ctxs.value0.value0.value1, ctxs.value0.value0.value2, ctxs.value0.value0.value3, ctxs.value0.value1, ctxs.value0.value2, tree);
- return;
- }
- ;
- if (ctxs.value0 instanceof TwoLeft && ctxs.value0.value2 instanceof Three) {
- $tco_done = true;
- return fromZipper(dictOrd)(ctxs.value1)(new Two(new Two(tree, ctxs.value0.value0, ctxs.value0.value1, ctxs.value0.value2.value0), ctxs.value0.value2.value1, ctxs.value0.value2.value2, new Two(ctxs.value0.value2.value3, ctxs.value0.value2.value4, ctxs.value0.value2.value5, ctxs.value0.value2.value6)));
- }
- ;
- if (ctxs.value0 instanceof TwoRight && ctxs.value0.value0 instanceof Three) {
- $tco_done = true;
- return fromZipper(dictOrd)(ctxs.value1)(new Two(new Two(ctxs.value0.value0.value0, ctxs.value0.value0.value1, ctxs.value0.value0.value2, ctxs.value0.value0.value3), ctxs.value0.value0.value4, ctxs.value0.value0.value5, new Two(ctxs.value0.value0.value6, ctxs.value0.value1, ctxs.value0.value2, tree)));
- }
- ;
- if (ctxs.value0 instanceof ThreeLeft && ctxs.value0.value2 instanceof Leaf && ctxs.value0.value5 instanceof Leaf && tree instanceof Leaf) {
- $tco_done = true;
- return fromZipper(dictOrd)(ctxs.value1)(new Three(Leaf.value, ctxs.value0.value0, ctxs.value0.value1, Leaf.value, ctxs.value0.value3, ctxs.value0.value4, Leaf.value));
- }
- ;
- if (ctxs.value0 instanceof ThreeMiddle && ctxs.value0.value0 instanceof Leaf && ctxs.value0.value5 instanceof Leaf && tree instanceof Leaf) {
- $tco_done = true;
- return fromZipper(dictOrd)(ctxs.value1)(new Three(Leaf.value, ctxs.value0.value1, ctxs.value0.value2, Leaf.value, ctxs.value0.value3, ctxs.value0.value4, Leaf.value));
- }
- ;
- if (ctxs.value0 instanceof ThreeRight && ctxs.value0.value0 instanceof Leaf && ctxs.value0.value3 instanceof Leaf && tree instanceof Leaf) {
- $tco_done = true;
- return fromZipper(dictOrd)(ctxs.value1)(new Three(Leaf.value, ctxs.value0.value1, ctxs.value0.value2, Leaf.value, ctxs.value0.value4, ctxs.value0.value5, Leaf.value));
- }
- ;
- if (ctxs.value0 instanceof ThreeLeft && ctxs.value0.value2 instanceof Two) {
- $tco_done = true;
- return fromZipper(dictOrd)(ctxs.value1)(new Two(new Three(tree, ctxs.value0.value0, ctxs.value0.value1, ctxs.value0.value2.value0, ctxs.value0.value2.value1, ctxs.value0.value2.value2, ctxs.value0.value2.value3), ctxs.value0.value3, ctxs.value0.value4, ctxs.value0.value5));
- }
- ;
- if (ctxs.value0 instanceof ThreeMiddle && ctxs.value0.value0 instanceof Two) {
- $tco_done = true;
- return fromZipper(dictOrd)(ctxs.value1)(new Two(new Three(ctxs.value0.value0.value0, ctxs.value0.value0.value1, ctxs.value0.value0.value2, ctxs.value0.value0.value3, ctxs.value0.value1, ctxs.value0.value2, tree), ctxs.value0.value3, ctxs.value0.value4, ctxs.value0.value5));
- }
- ;
- if (ctxs.value0 instanceof ThreeMiddle && ctxs.value0.value5 instanceof Two) {
- $tco_done = true;
- return fromZipper(dictOrd)(ctxs.value1)(new Two(ctxs.value0.value0, ctxs.value0.value1, ctxs.value0.value2, new Three(tree, ctxs.value0.value3, ctxs.value0.value4, ctxs.value0.value5.value0, ctxs.value0.value5.value1, ctxs.value0.value5.value2, ctxs.value0.value5.value3)));
- }
- ;
- if (ctxs.value0 instanceof ThreeRight && ctxs.value0.value3 instanceof Two) {
- $tco_done = true;
- return fromZipper(dictOrd)(ctxs.value1)(new Two(ctxs.value0.value0, ctxs.value0.value1, ctxs.value0.value2, new Three(ctxs.value0.value3.value0, ctxs.value0.value3.value1, ctxs.value0.value3.value2, ctxs.value0.value3.value3, ctxs.value0.value4, ctxs.value0.value5, tree)));
- }
- ;
- if (ctxs.value0 instanceof ThreeLeft && ctxs.value0.value2 instanceof Three) {
- $tco_done = true;
- return fromZipper(dictOrd)(ctxs.value1)(new Three(new Two(tree, ctxs.value0.value0, ctxs.value0.value1, ctxs.value0.value2.value0), ctxs.value0.value2.value1, ctxs.value0.value2.value2, new Two(ctxs.value0.value2.value3, ctxs.value0.value2.value4, ctxs.value0.value2.value5, ctxs.value0.value2.value6), ctxs.value0.value3, ctxs.value0.value4, ctxs.value0.value5));
- }
- ;
- if (ctxs.value0 instanceof ThreeMiddle && ctxs.value0.value0 instanceof Three) {
- $tco_done = true;
- return fromZipper(dictOrd)(ctxs.value1)(new Three(new Two(ctxs.value0.value0.value0, ctxs.value0.value0.value1, ctxs.value0.value0.value2, ctxs.value0.value0.value3), ctxs.value0.value0.value4, ctxs.value0.value0.value5, new Two(ctxs.value0.value0.value6, ctxs.value0.value1, ctxs.value0.value2, tree), ctxs.value0.value3, ctxs.value0.value4, ctxs.value0.value5));
- }
- ;
- if (ctxs.value0 instanceof ThreeMiddle && ctxs.value0.value5 instanceof Three) {
- $tco_done = true;
- return fromZipper(dictOrd)(ctxs.value1)(new Three(ctxs.value0.value0, ctxs.value0.value1, ctxs.value0.value2, new Two(tree, ctxs.value0.value3, ctxs.value0.value4, ctxs.value0.value5.value0), ctxs.value0.value5.value1, ctxs.value0.value5.value2, new Two(ctxs.value0.value5.value3, ctxs.value0.value5.value4, ctxs.value0.value5.value5, ctxs.value0.value5.value6)));
- }
- ;
- if (ctxs.value0 instanceof ThreeRight && ctxs.value0.value3 instanceof Three) {
- $tco_done = true;
- return fromZipper(dictOrd)(ctxs.value1)(new Three(ctxs.value0.value0, ctxs.value0.value1, ctxs.value0.value2, new Two(ctxs.value0.value3.value0, ctxs.value0.value3.value1, ctxs.value0.value3.value2, ctxs.value0.value3.value3), ctxs.value0.value3.value4, ctxs.value0.value3.value5, new Two(ctxs.value0.value3.value6, ctxs.value0.value4, ctxs.value0.value5, tree)));
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 511, column 9 - line 528, column 136): " + [ctxs.value0.constructor.name, tree.constructor.name]);
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 508, column 5 - line 528, column 136): " + [ctxs.constructor.name]);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($tco_var_ctxs, $copy_tree);
- }
- ;
- return $tco_result;
- };
- };
- var removeMaxNode = function removeMaxNode($copy_ctx) {
- return function ($copy_m) {
- var $tco_var_ctx = $copy_ctx;
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(ctx, m) {
- if (m instanceof Two && m.value0 instanceof Leaf && m.value3 instanceof Leaf) {
- $tco_done = true;
- return up(ctx)(Leaf.value);
- }
- ;
- if (m instanceof Two) {
- $tco_var_ctx = new Data_List_Types.Cons(new TwoRight(m.value0, m.value1, m.value2), ctx);
- $copy_m = m.value3;
- return;
- }
- ;
- if (m instanceof Three && m.value0 instanceof Leaf && m.value3 instanceof Leaf && m.value6 instanceof Leaf) {
- $tco_done = true;
- return up(new Data_List_Types.Cons(new TwoRight(Leaf.value, m.value1, m.value2), ctx))(Leaf.value);
- }
- ;
- if (m instanceof Three) {
- $tco_var_ctx = new Data_List_Types.Cons(new ThreeRight(m.value0, m.value1, m.value2, m.value3, m.value4, m.value5), ctx);
- $copy_m = m.value6;
- return;
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 540, column 5 - line 544, column 107): " + [m.constructor.name]);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($tco_var_ctx, $copy_m);
- }
- ;
- return $tco_result;
- };
- };
- var maxNode = function maxNode($copy_m) {
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(m) {
- if (m instanceof Two && m.value3 instanceof Leaf) {
- $tco_done = true;
- return {
- key: m.value1,
- value: m.value2
- };
- }
- ;
- if (m instanceof Two) {
- $copy_m = m.value3;
- return;
- }
- ;
- if (m instanceof Three && m.value6 instanceof Leaf) {
- $tco_done = true;
- return {
- key: m.value4,
- value: m.value5
- };
- }
- ;
- if (m instanceof Three) {
- $copy_m = m.value6;
- return;
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 531, column 33 - line 535, column 45): " + [m.constructor.name]);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($copy_m);
- }
- ;
- return $tco_result;
- };
- var comp = Data_Ord.compare(dictOrd);
- var down = function down($copy_ctx) {
- return function ($copy_m) {
- var $tco_var_ctx = $copy_ctx;
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(ctx, m) {
- if (m instanceof Leaf) {
- $tco_done = true;
- return Data_Maybe.Nothing.value;
- }
- ;
- if (m instanceof Two) {
- var v = comp(k)(m.value1);
- if (m.value3 instanceof Leaf && v instanceof Data_Ordering.EQ) {
- $tco_done = true;
- return new Data_Maybe.Just(new Data_Tuple.Tuple(m.value2, up(ctx)(Leaf.value)));
- }
- ;
- if (v instanceof Data_Ordering.EQ) {
- var max = maxNode(m.value0);
- $tco_done = true;
- return new Data_Maybe.Just(new Data_Tuple.Tuple(m.value2, removeMaxNode(new Data_List_Types.Cons(new TwoLeft(max.key, max.value, m.value3), ctx))(m.value0)));
- }
- ;
- if (v instanceof Data_Ordering.LT) {
- $tco_var_ctx = new Data_List_Types.Cons(new TwoLeft(m.value1, m.value2, m.value3), ctx);
- $copy_m = m.value0;
- return;
- }
- ;
- $tco_var_ctx = new Data_List_Types.Cons(new TwoRight(m.value0, m.value1, m.value2), ctx);
- $copy_m = m.value3;
- return;
- }
- ;
- if (m instanceof Three) {
- var leaves = function () {
- if (m.value0 instanceof Leaf && m.value3 instanceof Leaf && m.value6 instanceof Leaf) {
- return true;
- }
- ;
- return false;
- }();
- var v = comp(k)(m.value4);
- var v3 = comp(k)(m.value1);
- if (leaves && v3 instanceof Data_Ordering.EQ) {
- $tco_done = true;
- return new Data_Maybe.Just(new Data_Tuple.Tuple(m.value2, fromZipper(dictOrd)(ctx)(new Two(Leaf.value, m.value4, m.value5, Leaf.value))));
- }
- ;
- if (leaves && v instanceof Data_Ordering.EQ) {
- $tco_done = true;
- return new Data_Maybe.Just(new Data_Tuple.Tuple(m.value5, fromZipper(dictOrd)(ctx)(new Two(Leaf.value, m.value1, m.value2, Leaf.value))));
- }
- ;
- if (v3 instanceof Data_Ordering.EQ) {
- var max = maxNode(m.value0);
- $tco_done = true;
- return new Data_Maybe.Just(new Data_Tuple.Tuple(m.value2, removeMaxNode(new Data_List_Types.Cons(new ThreeLeft(max.key, max.value, m.value3, m.value4, m.value5, m.value6), ctx))(m.value0)));
- }
- ;
- if (v instanceof Data_Ordering.EQ) {
- var max = maxNode(m.value3);
- $tco_done = true;
- return new Data_Maybe.Just(new Data_Tuple.Tuple(m.value5, removeMaxNode(new Data_List_Types.Cons(new ThreeMiddle(m.value0, m.value1, m.value2, max.key, max.value, m.value6), ctx))(m.value3)));
- }
- ;
- if (v3 instanceof Data_Ordering.LT) {
- $tco_var_ctx = new Data_List_Types.Cons(new ThreeLeft(m.value1, m.value2, m.value3, m.value4, m.value5, m.value6), ctx);
- $copy_m = m.value0;
- return;
- }
- ;
- if (v3 instanceof Data_Ordering.GT && v instanceof Data_Ordering.LT) {
- $tco_var_ctx = new Data_List_Types.Cons(new ThreeMiddle(m.value0, m.value1, m.value2, m.value4, m.value5, m.value6), ctx);
- $copy_m = m.value3;
- return;
- }
- ;
- $tco_var_ctx = new Data_List_Types.Cons(new ThreeRight(m.value0, m.value1, m.value2, m.value3, m.value4, m.value5), ctx);
- $copy_m = m.value6;
- return;
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 481, column 34 - line 504, column 80): " + [m.constructor.name]);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($tco_var_ctx, $copy_m);
- }
- ;
- return $tco_result;
- };
- };
- return down(Data_List_Types.Nil.value);
- };
- };
- var foldableMap = new Data_Foldable.Foldable(function (dictMonoid) {
- return function (f) {
- return function (m) {
- return Data_Foldable.foldMap(Data_List_Types.foldableList)(dictMonoid)(f)(values(m));
- };
- };
- }, function (f) {
- return function (z) {
- return function (m) {
- return Data_Foldable.foldl(Data_List_Types.foldableList)(f)(z)(values(m));
- };
- };
- }, function (f) {
- return function (z) {
- return function (m) {
- return Data_Foldable.foldr(Data_List_Types.foldableList)(f)(z)(values(m));
- };
- };
- });
- var traversableMap = new Data_Traversable.Traversable(function () {
- return foldableMap;
- }, function () {
- return functorMap;
- }, function (dictApplicative) {
- return Data_Traversable.traverse(traversableMap)(dictApplicative)(Control_Category.identity(Control_Category.categoryFn));
- }, function (dictApplicative) {
- return function (f) {
- return function (v) {
- if (v instanceof Leaf) {
- return Control_Applicative.pure(dictApplicative)(Leaf.value);
- }
- ;
- if (v instanceof Two) {
- return Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(Two.create)(Data_Traversable.traverse(traversableMap)(dictApplicative)(f)(v.value0)))(Control_Applicative.pure(dictApplicative)(v.value1)))(f(v.value2)))(Data_Traversable.traverse(traversableMap)(dictApplicative)(f)(v.value3));
- }
- ;
- if (v instanceof Three) {
- return Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(Three.create)(Data_Traversable.traverse(traversableMap)(dictApplicative)(f)(v.value0)))(Control_Applicative.pure(dictApplicative)(v.value1)))(f(v.value2)))(Data_Traversable.traverse(traversableMap)(dictApplicative)(f)(v.value3)))(Control_Applicative.pure(dictApplicative)(v.value4)))(f(v.value5)))(Data_Traversable.traverse(traversableMap)(dictApplicative)(f)(v.value6));
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 119, column 1 - line 134, column 31): " + [f.constructor.name, v.constructor.name]);
- };
- };
- });
- var foldSubmap = function foldSubmap(dictOrd) {
- return function (dictMonoid) {
- return function (kmin) {
- return function (kmax) {
- return function (f) {
- var tooSmall = function () {
- if (kmin instanceof Data_Maybe.Just) {
- return function (k) {
- return Data_Ord.lessThan(dictOrd)(k)(kmin.value0);
- };
- }
- ;
- if (kmin instanceof Data_Maybe.Nothing) {
- return Data_Function["const"](false);
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 319, column 7 - line 323, column 22): " + [kmin.constructor.name]);
- }();
- var tooLarge = function () {
- if (kmax instanceof Data_Maybe.Just) {
- return function (k) {
- return Data_Ord.greaterThan(dictOrd)(k)(kmax.value0);
- };
- }
- ;
- if (kmax instanceof Data_Maybe.Nothing) {
- return Data_Function["const"](false);
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 326, column 7 - line 330, column 22): " + [kmax.constructor.name]);
- }();
- var inBounds = function () {
- if (kmin instanceof Data_Maybe.Just && kmax instanceof Data_Maybe.Just) {
- return function (k) {
- return Data_Ord.lessThanOrEq(dictOrd)(kmin.value0)(k) && Data_Ord.lessThanOrEq(dictOrd)(k)(kmax.value0);
- };
- }
- ;
- if (kmin instanceof Data_Maybe.Just && kmax instanceof Data_Maybe.Nothing) {
- return function (k) {
- return Data_Ord.lessThanOrEq(dictOrd)(kmin.value0)(k);
- };
- }
- ;
- if (kmin instanceof Data_Maybe.Nothing && kmax instanceof Data_Maybe.Just) {
- return function (k) {
- return Data_Ord.lessThanOrEq(dictOrd)(k)(kmax.value0);
- };
- }
- ;
- if (kmin instanceof Data_Maybe.Nothing && kmax instanceof Data_Maybe.Nothing) {
- return Data_Function["const"](true);
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 333, column 7 - line 341, column 21): " + [kmin.constructor.name, kmax.constructor.name]);
- }();
- var go = function go(v) {
- if (v instanceof Leaf) {
- return Data_Monoid.mempty(dictMonoid);
- }
- ;
- if (v instanceof Two) {
- return Data_Semigroup.append(dictMonoid.Semigroup0())(function () {
- var $633 = tooSmall(v.value1);
- if ($633) {
- return Data_Monoid.mempty(dictMonoid);
- }
- ;
- return go(v.value0);
- }())(Data_Semigroup.append(dictMonoid.Semigroup0())(function () {
- var $634 = inBounds(v.value1);
- if ($634) {
- return f(v.value1)(v.value2);
- }
- ;
- return Data_Monoid.mempty(dictMonoid);
- }())(function () {
- var $635 = tooLarge(v.value1);
- if ($635) {
- return Data_Monoid.mempty(dictMonoid);
- }
- ;
- return go(v.value3);
- }()));
- }
- ;
- if (v instanceof Three) {
- return Data_Semigroup.append(dictMonoid.Semigroup0())(function () {
- var $640 = tooSmall(v.value1);
- if ($640) {
- return Data_Monoid.mempty(dictMonoid);
- }
- ;
- return go(v.value0);
- }())(Data_Semigroup.append(dictMonoid.Semigroup0())(function () {
- var $641 = inBounds(v.value1);
- if ($641) {
- return f(v.value1)(v.value2);
- }
- ;
- return Data_Monoid.mempty(dictMonoid);
- }())(Data_Semigroup.append(dictMonoid.Semigroup0())(function () {
- var $642 = tooSmall(v.value4) || tooLarge(v.value1);
- if ($642) {
- return Data_Monoid.mempty(dictMonoid);
- }
- ;
- return go(v.value3);
- }())(Data_Semigroup.append(dictMonoid.Semigroup0())(function () {
- var $643 = inBounds(v.value4);
- if ($643) {
- return f(v.value4)(v.value5);
- }
- ;
- return Data_Monoid.mempty(dictMonoid);
- }())(function () {
- var $644 = tooLarge(v.value4);
- if ($644) {
- return Data_Monoid.mempty(dictMonoid);
- }
- ;
- return go(v.value6);
- }()))));
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 359, column 10 - line 371, column 54): " + [v.constructor.name]);
- };
- return go;
- };
- };
- };
- };
- };
- var findMin = function () {
- var go = function go($copy_v) {
- return function ($copy_v1) {
- var $tco_var_v = $copy_v;
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(v, v1) {
- if (v1 instanceof Leaf) {
- $tco_done = true;
- return v;
- }
- ;
- if (v1 instanceof Two) {
- $tco_var_v = new Data_Maybe.Just({
- key: v1.value1,
- value: v1.value2
- });
- $copy_v1 = v1.value0;
- return;
- }
- ;
- if (v1 instanceof Three) {
- $tco_var_v = new Data_Maybe.Just({
- key: v1.value1,
- value: v1.value2
- });
- $copy_v1 = v1.value0;
- return;
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 297, column 5 - line 297, column 22): " + [v.constructor.name, v1.constructor.name]);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($tco_var_v, $copy_v1);
- }
- ;
- return $tco_result;
- };
- };
- return go(Data_Maybe.Nothing.value);
- }();
- var lookupGT = function lookupGT(dictOrd) {
- return function (k) {
- var comp = Data_Ord.compare(dictOrd);
- var go = function go(v) {
- if (v instanceof Leaf) {
- return Data_Maybe.Nothing.value;
- }
- ;
- if (v instanceof Two) {
- var v2 = comp(k)(v.value1);
- if (v2 instanceof Data_Ordering.EQ) {
- return findMin(v.value3);
- }
- ;
- if (v2 instanceof Data_Ordering.LT) {
- return Data_Maybe.Just.create(Data_Maybe.fromMaybe({
- key: v.value1,
- value: v.value2
- })(go(v.value0)));
- }
- ;
- if (v2 instanceof Data_Ordering.GT) {
- return go(v.value3);
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 276, column 33 - line 279, column 21): " + [v2.constructor.name]);
- }
- ;
- if (v instanceof Three) {
- var v3 = comp(k)(v.value1);
- if (v3 instanceof Data_Ordering.EQ) {
- return findMin(new Two(v.value3, v.value4, v.value5, v.value6));
- }
- ;
- if (v3 instanceof Data_Ordering.LT) {
- return Data_Maybe.Just.create(Data_Maybe.fromMaybe({
- key: v.value1,
- value: v.value2
- })(go(v.value0)));
- }
- ;
- if (v3 instanceof Data_Ordering.GT) {
- return go(new Two(v.value3, v.value4, v.value5, v.value6));
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 280, column 45 - line 283, column 37): " + [v3.constructor.name]);
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 275, column 5 - line 275, column 22): " + [v.constructor.name]);
- };
- return go;
- };
- };
- var findMax = function () {
- var go = function go($copy_v) {
- return function ($copy_v1) {
- var $tco_var_v = $copy_v;
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(v, v1) {
- if (v1 instanceof Leaf) {
- $tco_done = true;
- return v;
- }
- ;
- if (v1 instanceof Two) {
- $tco_var_v = new Data_Maybe.Just({
- key: v1.value1,
- value: v1.value2
- });
- $copy_v1 = v1.value3;
- return;
- }
- ;
- if (v1 instanceof Three) {
- $tco_var_v = new Data_Maybe.Just({
- key: v1.value4,
- value: v1.value5
- });
- $copy_v1 = v1.value6;
- return;
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 289, column 5 - line 289, column 22): " + [v.constructor.name, v1.constructor.name]);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($tco_var_v, $copy_v1);
- }
- ;
- return $tco_result;
- };
- };
- return go(Data_Maybe.Nothing.value);
- }();
- var lookupLT = function lookupLT(dictOrd) {
- return function (k) {
- var comp = Data_Ord.compare(dictOrd);
- var go = function go(v) {
- if (v instanceof Leaf) {
- return Data_Maybe.Nothing.value;
- }
- ;
- if (v instanceof Two) {
- var v2 = comp(k)(v.value1);
- if (v2 instanceof Data_Ordering.EQ) {
- return findMax(v.value0);
- }
- ;
- if (v2 instanceof Data_Ordering.GT) {
- return Data_Maybe.Just.create(Data_Maybe.fromMaybe({
- key: v.value1,
- value: v.value2
- })(go(v.value3)));
- }
- ;
- if (v2 instanceof Data_Ordering.LT) {
- return go(v.value0);
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 242, column 33 - line 245, column 20): " + [v2.constructor.name]);
- }
- ;
- if (v instanceof Three) {
- var v3 = comp(k)(v.value4);
- if (v3 instanceof Data_Ordering.EQ) {
- return findMax(new Two(v.value0, v.value1, v.value2, v.value3));
- }
- ;
- if (v3 instanceof Data_Ordering.GT) {
- return Data_Maybe.Just.create(Data_Maybe.fromMaybe({
- key: v.value4,
- value: v.value5
- })(go(v.value6)));
- }
- ;
- if (v3 instanceof Data_Ordering.LT) {
- return go(new Two(v.value0, v.value1, v.value2, v.value3));
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 246, column 45 - line 249, column 36): " + [v3.constructor.name]);
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 241, column 5 - line 241, column 22): " + [v.constructor.name]);
- };
- return go;
- };
- };
- var eqMap = function eqMap(dictEq) {
- return function (dictEq1) {
- return new Data_Eq.Eq(function (m1) {
- return function (m2) {
- return Data_Eq.eq(Data_Eq.eqArray(Data_Tuple.eqTuple(dictEq)(dictEq1)))(toAscArray(m1))(toAscArray(m2));
- };
- });
- };
- };
- var ordMap = function ordMap(dictOrd) {
- return function (dictOrd1) {
- return new Data_Ord.Ord(function () {
- return eqMap(dictOrd.Eq0())(dictOrd1.Eq0());
- }, function (m1) {
- return function (m2) {
- return Data_Ord.compare(Data_Ord.ordArray(Data_Tuple.ordTuple(dictOrd)(dictOrd1)))(toAscArray(m1))(toAscArray(m2));
- };
- });
- };
- };
- var eq1Map = function eq1Map(dictEq) {
- return new Data_Eq.Eq1(function (dictEq1) {
- return Data_Eq.eq(eqMap(dictEq)(dictEq1));
- });
- };
- var ord1Map = function ord1Map(dictOrd) {
- return new Data_Ord.Ord1(function () {
- return eq1Map(dictOrd.Eq0());
- }, function (dictOrd1) {
- return Data_Ord.compare(ordMap(dictOrd)(dictOrd1));
- });
- };
- var empty = Leaf.value;
- var fromFoldable = function fromFoldable(dictOrd) {
- return function (dictFoldable) {
- return Data_Foldable.foldl(dictFoldable)(function (m) {
- return function (v) {
- return insert(dictOrd)(v.value0)(v.value1)(m);
- };
- })(empty);
- };
- };
- var filterWithKey = function filterWithKey(dictOrd) {
- return function (predicate) {
- var $758 = fromFoldable(dictOrd)(Data_List_Lazy_Types.foldableList);
- var $759 = Data_List_Lazy.filter(Data_Tuple.uncurry(predicate));
- var $760 = toUnfoldable(Data_List_Lazy_Types.unfoldableList);
- return function ($761) {
- return $758($759($760($761)));
- };
- };
- };
- var filter = function filter(dictOrd) {
- return function (predicate) {
- return filterWithKey(dictOrd)(Data_Function["const"](predicate));
- };
- };
- var filterKeys = function filterKeys(dictOrd) {
- return function (predicate) {
- return filterWithKey(dictOrd)(function ($762) {
- return Data_Function["const"](predicate($762));
- });
- };
- };
- var fromFoldableWithIndex = function fromFoldableWithIndex(dictOrd) {
- return function (dictFoldableWithIndex) {
- return Data_FoldableWithIndex.foldlWithIndex(dictFoldableWithIndex)(function (k) {
- return function (m) {
- return function (v) {
- return insert(dictOrd)(k)(v)(m);
- };
- };
- })(empty);
- };
- };
- var intersectionWith = function intersectionWith(dictOrd) {
- return function (f) {
- return function (m1) {
- return function (m2) {
- var go = function go($copy_v) {
- return function ($copy_v1) {
- return function ($copy_m) {
- var $tco_var_v = $copy_v;
- var $tco_var_v1 = $copy_v1;
- var $tco_done = false;
- var $tco_result;
- function $tco_loop(v, v1, m) {
- if (v instanceof Data_List_Types.Nil) {
- $tco_done = true;
- return m;
- }
- ;
- if (v1 instanceof Data_List_Types.Nil) {
- $tco_done = true;
- return m;
- }
- ;
- if (v instanceof Data_List_Types.Cons && v1 instanceof Data_List_Types.Cons) {
- var v2 = Data_Ord.compare(dictOrd)(v.value0.value0)(v1.value0.value0);
- if (v2 instanceof Data_Ordering.LT) {
- $tco_var_v = v.value1;
- $tco_var_v1 = v1;
- $copy_m = m;
- return;
- }
- ;
- if (v2 instanceof Data_Ordering.EQ) {
- $tco_var_v = v.value1;
- $tco_var_v1 = v1.value1;
- $copy_m = insert(dictOrd)(v.value0.value0)(f(v.value0.value1)(v1.value0.value1))(m);
- return;
- }
- ;
- if (v2 instanceof Data_Ordering.GT) {
- $tco_var_v = v;
- $tco_var_v1 = v1.value1;
- $copy_m = m;
- return;
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 641, column 5 - line 644, column 27): " + [v2.constructor.name]);
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 638, column 3 - line 638, column 17): " + [v.constructor.name, v1.constructor.name, m.constructor.name]);
- }
- ;
- while (!$tco_done) {
- $tco_result = $tco_loop($tco_var_v, $tco_var_v1, $copy_m);
- }
- ;
- return $tco_result;
- };
- };
- };
- return go(toUnfoldable(Data_List_Types.unfoldableList)(m1))(toUnfoldable(Data_List_Types.unfoldableList)(m2))(empty);
- };
- };
- };
- };
- var intersection = function intersection(dictOrd) {
- return intersectionWith(dictOrd)(Data_Function["const"]);
- };
- var $$delete = function $$delete(dictOrd) {
- return function (k) {
- return function (m) {
- return Data_Maybe.maybe(m)(Data_Tuple.snd)(pop(dictOrd)(k)(m));
- };
- };
- };
- var difference = function difference(dictOrd) {
- return function (m1) {
- return function (m2) {
- return Data_Foldable.foldl(Data_List_Types.foldableList)(Data_Function.flip($$delete(dictOrd)))(m1)(keys(m2));
- };
- };
- };
- var checkValid = function checkValid(tree) {
- var allHeights = function allHeights(v) {
- if (v instanceof Leaf) {
- return Control_Applicative.pure(Data_List_Types.applicativeList)(0);
- }
- ;
- if (v instanceof Two) {
- return Data_Functor.map(Data_List_Types.functorList)(function (n) {
- return n + 1 | 0;
- })(Data_Semigroup.append(Data_List_Types.semigroupList)(allHeights(v.value0))(allHeights(v.value3)));
- }
- ;
- if (v instanceof Three) {
- return Data_Functor.map(Data_List_Types.functorList)(function (n) {
- return n + 1 | 0;
- })(Data_Semigroup.append(Data_List_Types.semigroupList)(allHeights(v.value0))(Data_Semigroup.append(Data_List_Types.semigroupList)(allHeights(v.value3))(allHeights(v.value6))));
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 188, column 3 - line 188, column 36): " + [v.constructor.name]);
- };
- return Data_List.length(Data_List.nub(Data_Eq.eqInt)(allHeights(tree))) === 1;
- };
- var asList = Control_Category.identity(Control_Category.categoryFn);
- var foldableWithIndexMap = new Data_FoldableWithIndex.FoldableWithIndex(function () {
- return foldableMap;
- }, function (dictMonoid) {
- return function (f) {
- return function (m) {
- return Data_Foldable.foldMap(Data_List_Types.foldableList)(dictMonoid)(Data_Tuple.uncurry(f))(asList(toUnfoldable(Data_List_Types.unfoldableList)(m)));
- };
- };
- }, function (f) {
- return function (z) {
- return function (m) {
- return Data_Foldable.foldl(Data_List_Types.foldableList)(function () {
- var $763 = Data_Function.flip(f);
- return function ($764) {
- return Data_Tuple.uncurry($763($764));
- };
- }())(z)(asList(toUnfoldable(Data_List_Types.unfoldableList)(m)));
- };
- };
- }, function (f) {
- return function (z) {
- return function (m) {
- return Data_Foldable.foldr(Data_List_Types.foldableList)(Data_Tuple.uncurry(f))(z)(asList(toUnfoldable(Data_List_Types.unfoldableList)(m)));
- };
- };
- });
- var mapMaybeWithKey = function mapMaybeWithKey(dictOrd) {
- return function (f) {
- return Data_FoldableWithIndex.foldrWithIndex(foldableWithIndexMap)(function (k) {
- return function (a) {
- return function (acc) {
- return Data_Maybe.maybe(acc)(function (b) {
- return insert(dictOrd)(k)(b)(acc);
- })(f(k)(a));
- };
- };
- })(empty);
- };
- };
- var mapMaybe = function mapMaybe(dictOrd) {
- var $765 = mapMaybeWithKey(dictOrd);
- return function ($766) {
- return $765(Data_Function["const"]($766));
- };
- };
- var traversableWithIndexMap = new Data_TraversableWithIndex.TraversableWithIndex(function () {
- return foldableWithIndexMap;
- }, function () {
- return functorWithIndexMap;
- }, function () {
- return traversableMap;
- }, function (dictApplicative) {
- return function (f) {
- return function (v) {
- if (v instanceof Leaf) {
- return Control_Applicative.pure(dictApplicative)(Leaf.value);
- }
- ;
- if (v instanceof Two) {
- return Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(Two.create)(Data_TraversableWithIndex.traverseWithIndex(traversableWithIndexMap)(dictApplicative)(f)(v.value0)))(Control_Applicative.pure(dictApplicative)(v.value1)))(f(v.value1)(v.value2)))(Data_TraversableWithIndex.traverseWithIndex(traversableWithIndexMap)(dictApplicative)(f)(v.value3));
- }
- ;
- if (v instanceof Three) {
- return Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(Three.create)(Data_TraversableWithIndex.traverseWithIndex(traversableWithIndexMap)(dictApplicative)(f)(v.value0)))(Control_Applicative.pure(dictApplicative)(v.value1)))(f(v.value1)(v.value2)))(Data_TraversableWithIndex.traverseWithIndex(traversableWithIndexMap)(dictApplicative)(f)(v.value3)))(Control_Applicative.pure(dictApplicative)(v.value4)))(f(v.value4)(v.value5)))(Data_TraversableWithIndex.traverseWithIndex(traversableWithIndexMap)(dictApplicative)(f)(v.value6));
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 136, column 1 - line 150, column 40): " + [f.constructor.name, v.constructor.name]);
- };
- };
- });
- var alter = function alter(dictOrd) {
- return function (f) {
- return function (k) {
- return function (m) {
- var v = f(lookup(dictOrd)(k)(m));
- if (v instanceof Data_Maybe.Nothing) {
- return $$delete(dictOrd)(k)(m);
- }
- ;
- if (v instanceof Data_Maybe.Just) {
- return insert(dictOrd)(k)(v.value0)(m);
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 549, column 15 - line 551, column 25): " + [v.constructor.name]);
- };
- };
- };
- };
- var fromFoldableWith = function fromFoldableWith(dictOrd) {
- return function (dictFoldable) {
- return function (f) {
- var combine = function combine(v) {
- return function (v1) {
- if (v1 instanceof Data_Maybe.Just) {
- return Data_Maybe.Just.create(f(v)(v1.value0));
- }
- ;
- if (v1 instanceof Data_Maybe.Nothing) {
- return new Data_Maybe.Just(v);
- }
- ;
- throw new Error("Failed pattern match at Data.Map.Internal (line 566, column 3 - line 566, column 38): " + [v.constructor.name, v1.constructor.name]);
- };
- };
- return Data_Foldable.foldl(dictFoldable)(function (m) {
- return function (v) {
- return alter(dictOrd)(combine(v.value1))(v.value0)(m);
- };
- })(empty);
- };
- };
- };
- var insertWith = function insertWith(dictOrd) {
- return function (f) {
- return function (k) {
- return function (v) {
- return alter(dictOrd)(function () {
- var $767 = Data_Maybe.maybe(v)(Data_Function.flip(f)(v));
- return function ($768) {
- return Data_Maybe.Just.create($767($768));
- };
- }())(k);
- };
- };
- };
- };
- var unionWith = function unionWith(dictOrd) {
- return function (f) {
- return function (m1) {
- return function (m2) {
- var go = function go(m) {
- return function (v) {
- return alter(dictOrd)(function () {
- var $769 = Data_Maybe.maybe(v.value1)(f(v.value1));
- return function ($770) {
- return Data_Maybe.Just.create($769($770));
- };
- }())(v.value0)(m);
- };
- };
- return Data_Foldable.foldl(Data_List_Types.foldableList)(go)(m2)(toUnfoldable(Data_List_Types.unfoldableList)(m1));
- };
- };
- };
- };
- var union = function union(dictOrd) {
- return unionWith(dictOrd)(Data_Function["const"]);
- };
- var semigroupMap = function semigroupMap(dictOrd) {
- return new Data_Semigroup.Semigroup(union(dictOrd));
- };
- var monoidMap = function monoidMap(dictOrd) {
- return new Data_Monoid.Monoid(function () {
- return semigroupMap(dictOrd);
- }, empty);
- };
- var submap = function submap(dictOrd) {
- return function (kmin) {
- return function (kmax) {
- return foldSubmap(dictOrd)(monoidMap(dictOrd))(kmin)(kmax)(singleton);
- };
- };
- };
- var unions = function unions(dictOrd) {
- return function (dictFoldable) {
- return Data_Foldable.foldl(dictFoldable)(union(dictOrd))(empty);
- };
- };
- var update = function update(dictOrd) {
- return function (f) {
- return function (k) {
- return function (m) {
- return alter(dictOrd)(Data_Maybe.maybe(Data_Maybe.Nothing.value)(f))(k)(m);
- };
- };
- };
- };
- module.exports = {
- showTree: showTree,
- empty: empty,
- isEmpty: isEmpty,
- singleton: singleton,
- checkValid: checkValid,
- insert: insert,
- insertWith: insertWith,
- lookup: lookup,
- lookupLE: lookupLE,
- lookupLT: lookupLT,
- lookupGE: lookupGE,
- lookupGT: lookupGT,
- findMin: findMin,
- findMax: findMax,
- foldSubmap: foldSubmap,
- submap: submap,
- fromFoldable: fromFoldable,
- fromFoldableWith: fromFoldableWith,
- fromFoldableWithIndex: fromFoldableWithIndex,
- toUnfoldable: toUnfoldable,
- toUnfoldableUnordered: toUnfoldableUnordered,
- "delete": $$delete,
- pop: pop,
- member: member,
- alter: alter,
- update: update,
- keys: keys,
- values: values,
- union: union,
- unionWith: unionWith,
- unions: unions,
- intersection: intersection,
- intersectionWith: intersectionWith,
- difference: difference,
- isSubmap: isSubmap,
- size: size,
- filterWithKey: filterWithKey,
- filterKeys: filterKeys,
- filter: filter,
- mapMaybeWithKey: mapMaybeWithKey,
- mapMaybe: mapMaybe,
- eq1Map: eq1Map,
- eqMap: eqMap,
- ord1Map: ord1Map,
- ordMap: ordMap,
- showMap: showMap,
- semigroupMap: semigroupMap,
- monoidMap: monoidMap,
- functorMap: functorMap,
- functorWithIndexMap: functorWithIndexMap,
- foldableMap: foldableMap,
- foldableWithIndexMap: foldableWithIndexMap,
- traversableMap: traversableMap,
- traversableWithIndexMap: traversableWithIndexMap
- };
- },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.FoldableWithIndex/index.js":"../output/Data.FoldableWithIndex/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.FunctorWithIndex/index.js":"../output/Data.FunctorWithIndex/index.js","../Data.HeytingAlgebra/index.js":"../output/Data.HeytingAlgebra/index.js","../Data.List/index.js":"../output/Data.List/index.js","../Data.List.Lazy/index.js":"../output/Data.List.Lazy/index.js","../Data.List.Lazy.Types/index.js":"../output/Data.List.Lazy.Types/index.js","../Data.List.Types/index.js":"../output/Data.List.Types/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Data.TraversableWithIndex/index.js":"../output/Data.TraversableWithIndex/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js","../Data.Unfoldable/index.js":"../output/Data.Unfoldable/index.js"}],"../output/Data.Set/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js");
- var Control_Monad_ST_Internal = require("../Control.Monad.ST.Internal/index.js");
- var Data_Array = require("../Data.Array/index.js");
- var Data_Array_ST = require("../Data.Array.ST/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Foldable = require("../Data.Foldable/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_List = require("../Data.List/index.js");
- var Data_List_Types = require("../Data.List.Types/index.js");
- var Data_Map_Internal = require("../Data.Map.Internal/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Ordering = require("../Data.Ordering/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Data_Unit = require("../Data.Unit/index.js");
- var $$Set = function $$Set(x) {
- return x;
- };
- var union = function union(dictOrd) {
- return function (v) {
- return function (v1) {
- return Data_Map_Internal.union(dictOrd)(v)(v1);
- };
- };
- };
- var toList = function toList(v) {
- return Data_Map_Internal.keys(v);
- };
- var toUnfoldable = function toUnfoldable(dictUnfoldable) {
- var $63 = Data_List.toUnfoldable(dictUnfoldable);
- return function ($64) {
- return $63(toList($64));
- };
- };
- var size = function size(v) {
- return Data_Map_Internal.size(v);
- };
- var singleton = function singleton(a) {
- return Data_Map_Internal.singleton(a)(Data_Unit.unit);
- };
- var showSet = function showSet(dictShow) {
- return new Data_Show.Show(function (s) {
- return "(fromFoldable " + (Data_Show.show(Data_List_Types.showList(dictShow))(toList(s)) + ")");
- });
- };
- var semigroupSet = function semigroupSet(dictOrd) {
- return new Data_Semigroup.Semigroup(union(dictOrd));
- };
- var member = function member(dictOrd) {
- return function (a) {
- return function (v) {
- return Data_Map_Internal.member(dictOrd)(a)(v);
- };
- };
- };
- var isEmpty = function isEmpty(v) {
- return Data_Map_Internal.isEmpty(v);
- };
- var insert = function insert(dictOrd) {
- return function (a) {
- return function (v) {
- return Data_Map_Internal.insert(dictOrd)(a)(Data_Unit.unit)(v);
- };
- };
- };
- var foldableSet = new Data_Foldable.Foldable(function (dictMonoid) {
- return function (f) {
- var $65 = Data_Foldable.foldMap(Data_List_Types.foldableList)(dictMonoid)(f);
- return function ($66) {
- return $65(toList($66));
- };
- };
- }, function (f) {
- return function (x) {
- var $67 = Data_Foldable.foldl(Data_List_Types.foldableList)(f)(x);
- return function ($68) {
- return $67(toList($68));
- };
- };
- }, function (f) {
- return function (x) {
- var $69 = Data_Foldable.foldr(Data_List_Types.foldableList)(f)(x);
- return function ($70) {
- return $69(toList($70));
- };
- };
- });
- var findMin = function findMin(v) {
- return Data_Functor.map(Data_Maybe.functorMaybe)(function (v1) {
- return v1.key;
- })(Data_Map_Internal.findMin(v));
- };
- var findMax = function findMax(v) {
- return Data_Functor.map(Data_Maybe.functorMaybe)(function (v1) {
- return v1.key;
- })(Data_Map_Internal.findMax(v));
- };
- var filter = function filter(dictOrd) {
- return function (f) {
- return function (v) {
- return Data_Map_Internal.filterWithKey(dictOrd)(function (k) {
- return function (v1) {
- return f(k);
- };
- })(v);
- };
- };
- };
- var eqSet = function eqSet(dictEq) {
- return new Data_Eq.Eq(function (v) {
- return function (v1) {
- return Data_Eq.eq(Data_Map_Internal.eqMap(dictEq)(Data_Eq.eqUnit))(v)(v1);
- };
- });
- };
- var ordSet = function ordSet(dictOrd) {
- return new Data_Ord.Ord(function () {
- return eqSet(dictOrd.Eq0());
- }, function (s1) {
- return function (s2) {
- return Data_Ord.compare(Data_List_Types.ordList(dictOrd))(toList(s1))(toList(s2));
- };
- });
- };
- var eq1Set = new Data_Eq.Eq1(function (dictEq) {
- return Data_Eq.eq(eqSet(dictEq));
- });
- var ord1Set = new Data_Ord.Ord1(function () {
- return eq1Set;
- }, function (dictOrd) {
- return Data_Ord.compare(ordSet(dictOrd));
- });
- var empty = Data_Map_Internal.empty;
- var fromFoldable = function fromFoldable(dictFoldable) {
- return function (dictOrd) {
- return Data_Foldable.foldl(dictFoldable)(function (m) {
- return function (a) {
- return insert(dictOrd)(a)(m);
- };
- })(empty);
- };
- };
- var intersection = function intersection(dictOrd) {
- return function (s1) {
- return function (s2) {
- var toArray = function () {
- var $71 = Data_Array.fromFoldable(Data_List_Types.foldableList);
- return function ($72) {
- return $71(toList($72));
- };
- }();
- var rs = toArray(s2);
- var rl = Data_Array.length(rs);
- var ls = toArray(s1);
- var ll = Data_Array.length(ls);
- var intersect = function intersect(acc) {
- var go = function go(l) {
- return function (r) {
- var $58 = l < ll && r < rl;
- if ($58) {
- var v = Data_Ord.compare(dictOrd)(ls[l])(rs[r]);
- if (v instanceof Data_Ordering.EQ) {
- return function __do() {
- Data_Array_ST.push(ls[l])(acc)();
- return new Control_Monad_Rec_Class.Loop({
- a: l + 1 | 0,
- b: r + 1 | 0
- });
- };
- }
- ;
- if (v instanceof Data_Ordering.LT) {
- return Control_Applicative.pure(Control_Monad_ST_Internal.applicativeST)(new Control_Monad_Rec_Class.Loop({
- a: l + 1 | 0,
- b: r
- }));
- }
- ;
- if (v instanceof Data_Ordering.GT) {
- return Control_Applicative.pure(Control_Monad_ST_Internal.applicativeST)(new Control_Monad_Rec_Class.Loop({
- a: l,
- b: r + 1 | 0
- }));
- }
- ;
- throw new Error("Failed pattern match at Data.Set (line 176, column 12 - line 181, column 43): " + [v.constructor.name]);
- }
- ;
- return Control_Applicative.pure(Control_Monad_ST_Internal.applicativeST)(new Control_Monad_Rec_Class.Done(acc));
- };
- };
- return Control_Monad_Rec_Class.tailRecM2(Control_Monad_ST_Internal.monadRecST)(go)(0)(0);
- };
- return fromFoldable(Data_Foldable.foldableArray)(dictOrd)(Control_Bind.bind(Control_Monad_ST_Internal.bindST)(Control_Bind.bind(Control_Monad_ST_Internal.bindST)(Data_Array_ST.empty)(intersect))(Data_Array_ST.unsafeFreeze)());
- };
- };
- };
- var map = function map(dictOrd) {
- return function (f) {
- return Data_Foldable.foldl(foldableSet)(function (m) {
- return function (a) {
- return insert(dictOrd)(f(a))(m);
- };
- })(empty);
- };
- };
- var mapMaybe = function mapMaybe(dictOrd) {
- return function (f) {
- return Data_Foldable.foldr(foldableSet)(function (a) {
- return function (acc) {
- return Data_Maybe.maybe(acc)(function (b) {
- return insert(dictOrd)(b)(acc);
- })(f(a));
- };
- })(empty);
- };
- };
- var monoidSet = function monoidSet(dictOrd) {
- return new Data_Monoid.Monoid(function () {
- return semigroupSet(dictOrd);
- }, empty);
- };
- var unions = function unions(dictFoldable) {
- return function (dictOrd) {
- return Data_Foldable.foldl(dictFoldable)(union(dictOrd))(empty);
- };
- };
- var $$delete = function $$delete(dictOrd) {
- return function (a) {
- return function (v) {
- return Data_Map_Internal["delete"](dictOrd)(a)(v);
- };
- };
- };
- var difference = function difference(dictOrd) {
- return function (s1) {
- return function (s2) {
- return Data_Foldable.foldl(Data_List_Types.foldableList)(Data_Function.flip($$delete(dictOrd)))(s1)(toList(s2));
- };
- };
- };
- var subset = function subset(dictOrd) {
- return function (s1) {
- return function (s2) {
- return isEmpty(difference(dictOrd)(s1)(s2));
- };
- };
- };
- var properSubset = function properSubset(dictOrd) {
- return function (s1) {
- return function (s2) {
- return subset(dictOrd)(s1)(s2) && Data_Eq.notEq(eqSet(dictOrd.Eq0()))(s1)(s2);
- };
- };
- };
- var checkValid = function checkValid(v) {
- return Data_Map_Internal.checkValid(v);
- };
- module.exports = {
- fromFoldable: fromFoldable,
- toUnfoldable: toUnfoldable,
- empty: empty,
- isEmpty: isEmpty,
- singleton: singleton,
- map: map,
- checkValid: checkValid,
- insert: insert,
- member: member,
- "delete": $$delete,
- size: size,
- findMin: findMin,
- findMax: findMax,
- union: union,
- unions: unions,
- difference: difference,
- subset: subset,
- properSubset: properSubset,
- intersection: intersection,
- filter: filter,
- mapMaybe: mapMaybe,
- eqSet: eqSet,
- eq1Set: eq1Set,
- showSet: showSet,
- ordSet: ordSet,
- ord1Set: ord1Set,
- monoidSet: monoidSet,
- semigroupSet: semigroupSet,
- foldableSet: foldableSet
- };
- },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Monad.Rec.Class/index.js":"../output/Control.Monad.Rec.Class/index.js","../Control.Monad.ST.Internal/index.js":"../output/Control.Monad.ST.Internal/index.js","../Data.Array/index.js":"../output/Data.Array/index.js","../Data.Array.ST/index.js":"../output/Data.Array.ST/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.List/index.js":"../output/Data.List/index.js","../Data.List.Types/index.js":"../output/Data.List.Types/index.js","../Data.Map.Internal/index.js":"../output/Data.Map.Internal/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Ordering/index.js":"../output/Data.Ordering/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Data.Lens.Index/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Data_Array = require("../Data.Array/index.js");
- var Data_Array_NonEmpty = require("../Data.Array.NonEmpty/index.js");
- var Data_Boolean = require("../Data.Boolean/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Identity = require("../Data.Identity/index.js");
- var Data_Lens_Internal_Wander = require("../Data.Lens.Internal.Wander/index.js");
- var Data_List_Types = require("../Data.List.Types/index.js");
- var Data_Map_Internal = require("../Data.Map.Internal/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Set = require("../Data.Set/index.js");
- var Data_Traversable = require("../Data.Traversable/index.js");
- var Foreign_Object = require("../Foreign.Object/index.js");
- var Index = function Index(ix) {
- this.ix = ix;
- };
- var ix = function ix(dict) {
- return dict.ix;
- };
- var indexSet = function indexSet(dictOrd) {
- return new Index(function (x) {
- return function (dictWander) {
- return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) {
- return function (coalg) {
- var $40 = Control_Applicative.pure(dictApplicative);
- var $41 = Data_Set.insert(dictOrd)(x);
- return function ($42) {
- return $40($41($42));
- };
- };
- });
- };
- });
- };
- var indexNonEmptyArray = new Index(function (n) {
- return function (dictWander) {
- return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) {
- return function (coalg) {
- return function (xs) {
- return Data_Maybe.maybe(Control_Applicative.pure(dictApplicative)(xs))(function () {
- var $43 = Data_Functor.map(dictApplicative.Apply0().Functor0())(function (x) {
- return Data_Maybe.fromMaybe(xs)(Data_Array_NonEmpty.updateAt(n)(x)(xs));
- });
- return function ($44) {
- return $43(coalg($44));
- };
- }())(Data_Array_NonEmpty.index(xs)(n));
- };
- };
- });
- };
- });
- var indexMaybe = new Index(function (v) {
- return function (dictWander) {
- return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) {
- return Data_Traversable.traverse(Data_Traversable.traversableMaybe)(dictApplicative);
- });
- };
- });
- var indexMap = function indexMap(dictOrd) {
- return new Index(function (k) {
- return function (dictWander) {
- return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) {
- return function (coalg) {
- return function (m) {
- return Data_Maybe.maybe(Control_Applicative.pure(dictApplicative)(m))(function () {
- var $45 = Data_Functor.map(dictApplicative.Apply0().Functor0())(function (v) {
- return Data_Map_Internal.insert(dictOrd)(k)(v)(m);
- });
- return function ($46) {
- return $45(coalg($46));
- };
- }())(Data_Map_Internal.lookup(dictOrd)(k)(m));
- };
- };
- });
- };
- });
- };
- var indexList = new Index(function (n) {
- return function (dictWander) {
- if (n < 0) {
- return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) {
- return function (v) {
- return function (xs) {
- return Control_Applicative.pure(dictApplicative)(xs);
- };
- };
- });
- }
- ;
- if (Data_Boolean.otherwise) {
- var go = function go(dictApplicative) {
- return function (v) {
- return function (v1) {
- return function (v2) {
- if (v instanceof Data_List_Types.Nil) {
- return Control_Applicative.pure(dictApplicative)(Data_List_Types.Nil.value);
- }
- ;
- if (v instanceof Data_List_Types.Cons && v1 === 0) {
- return Data_Functor.mapFlipped(dictApplicative.Apply0().Functor0())(v2(v.value0))(function (v3) {
- return new Data_List_Types.Cons(v3, v.value1);
- });
- }
- ;
- if (v instanceof Data_List_Types.Cons) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(function (v3) {
- return new Data_List_Types.Cons(v.value0, v3);
- })(go(dictApplicative)(v.value1)(v1 - 1 | 0)(v2));
- }
- ;
- throw new Error("Failed pattern match at Data.Lens.Index (line 83, column 5 - line 83, column 79): " + [v.constructor.name, v1.constructor.name, v2.constructor.name]);
- };
- };
- };
- };
- return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) {
- return function (coalg) {
- return function (xs) {
- return go(dictApplicative)(xs)(n)(coalg);
- };
- };
- });
- }
- ;
- throw new Error("Failed pattern match at Data.Lens.Index (line 80, column 1 - line 86, column 56): " + [n.constructor.name]);
- };
- });
- var indexIdentity = new Index(function (v) {
- return function (dictWander) {
- return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) {
- return Data_Traversable.traverse(Data_Identity.traversableIdentity)(dictApplicative);
- });
- };
- });
- var indexForeignObject = new Index(function (k) {
- return function (dictWander) {
- return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) {
- return function (coalg) {
- return function (m) {
- return Data_Maybe.maybe(Control_Applicative.pure(dictApplicative)(m))(function () {
- var $47 = Data_Functor.map(dictApplicative.Apply0().Functor0())(function (v) {
- return Foreign_Object.insert(k)(v)(m);
- });
- return function ($48) {
- return $47(coalg($48));
- };
- }())(Foreign_Object.lookup(k)(m));
- };
- };
- });
- };
- });
- var indexArray = new Index(function (n) {
- return function (dictWander) {
- return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) {
- return function (coalg) {
- return function (xs) {
- return Data_Maybe.maybe(Control_Applicative.pure(dictApplicative)(xs))(function () {
- var $49 = Data_Functor.map(dictApplicative.Apply0().Functor0())(function (x) {
- return Data_Maybe.fromMaybe(xs)(Data_Array.updateAt(n)(x)(xs));
- });
- return function ($50) {
- return $49(coalg($50));
- };
- }())(Data_Array.index(xs)(n));
- };
- };
- });
- };
- });
- var indexArr = function indexArr(dictEq) {
- return new Index(function (i) {
- return function (dictWander) {
- return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) {
- return function (coalg) {
- return function (f) {
- return Data_Functor.mapFlipped(dictApplicative.Apply0().Functor0())(coalg(f(i)))(function (a) {
- return function (j) {
- var $39 = Data_Eq.eq(dictEq)(i)(j);
- if ($39) {
- return a;
- }
- ;
- return f(j);
- };
- });
- };
- };
- });
- };
- });
- };
- module.exports = {
- Index: Index,
- ix: ix,
- indexArr: indexArr,
- indexMaybe: indexMaybe,
- indexIdentity: indexIdentity,
- indexArray: indexArray,
- indexNonEmptyArray: indexNonEmptyArray,
- indexList: indexList,
- indexSet: indexSet,
- indexMap: indexMap,
- indexForeignObject: indexForeignObject
- };
- },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Data.Array/index.js":"../output/Data.Array/index.js","../Data.Array.NonEmpty/index.js":"../output/Data.Array.NonEmpty/index.js","../Data.Boolean/index.js":"../output/Data.Boolean/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Identity/index.js":"../output/Data.Identity/index.js","../Data.Lens.Internal.Wander/index.js":"../output/Data.Lens.Internal.Wander/index.js","../Data.List.Types/index.js":"../output/Data.List.Types/index.js","../Data.Map.Internal/index.js":"../output/Data.Map.Internal/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Set/index.js":"../output/Data.Set/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Foreign.Object/index.js":"../output/Foreign.Object/index.js"}],"../output/Data.Lens.Internal.Indexed/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Data_Either = require("../Data.Either/index.js");
- var Data_Lens_Internal_Wander = require("../Data.Lens.Internal.Wander/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Profunctor = require("../Data.Profunctor/index.js");
- var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js");
- var Data_Profunctor_Strong = require("../Data.Profunctor.Strong/index.js");
- var Data_Tuple = require("../Data.Tuple/index.js");
- var Indexed = function Indexed(x) {
- return x;
- };
- var profunctorIndexed = function profunctorIndexed(dictProfunctor) {
- return new Data_Profunctor.Profunctor(function (f) {
- return function (g) {
- return function (v) {
- return Data_Profunctor.dimap(dictProfunctor)(Data_Profunctor_Strong.second(Data_Profunctor_Strong.strongFn)(f))(g)(v);
- };
- };
- });
- };
- var strongIndexed = function strongIndexed(dictStrong) {
- return new Data_Profunctor_Strong.Strong(function () {
- return profunctorIndexed(dictStrong.Profunctor0());
- }, function (v) {
- return Indexed(Data_Profunctor.lcmap(dictStrong.Profunctor0())(function (v1) {
- return new Data_Tuple.Tuple(new Data_Tuple.Tuple(v1.value0, v1.value1.value0), v1.value1.value1);
- })(Data_Profunctor_Strong.first(dictStrong)(v)));
- }, function (v) {
- return Indexed(Data_Profunctor.lcmap(dictStrong.Profunctor0())(function (v1) {
- return new Data_Tuple.Tuple(v1.value1.value0, new Data_Tuple.Tuple(v1.value0, v1.value1.value1));
- })(Data_Profunctor_Strong.second(dictStrong)(v)));
- });
- };
- var newtypeIndexed = new Data_Newtype.Newtype(function (n) {
- return n;
- }, Indexed);
- var choiceIndexed = function choiceIndexed(dictChoice) {
- return new Data_Profunctor_Choice.Choice(function () {
- return profunctorIndexed(dictChoice.Profunctor0());
- }, function (v) {
- return Indexed(Data_Profunctor.lcmap(dictChoice.Profunctor0())(function (v1) {
- return Data_Either.either(function () {
- var $47 = Data_Tuple.Tuple.create(v1.value0);
- return function ($48) {
- return Data_Either.Left.create($47($48));
- };
- }())(Data_Either.Right.create)(v1.value1);
- })(Data_Profunctor_Choice.left(dictChoice)(v)));
- }, function (v) {
- return Indexed(Data_Profunctor.lcmap(dictChoice.Profunctor0())(function (v1) {
- return Data_Either.either(Data_Either.Left.create)(function () {
- var $49 = Data_Tuple.Tuple.create(v1.value0);
- return function ($50) {
- return Data_Either.Right.create($49($50));
- };
- }())(v1.value1);
- })(Data_Profunctor_Choice.right(dictChoice)(v)));
- });
- };
- var wanderIndexed = function wanderIndexed(dictWander) {
- return new Data_Lens_Internal_Wander.Wander(function () {
- return choiceIndexed(dictWander.Choice1());
- }, function () {
- return strongIndexed(dictWander.Strong0());
- }, function (trav) {
- return function (v) {
- return Indexed(Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) {
- return function (ia2fb) {
- return function (v1) {
- return trav(dictApplicative)(function () {
- var $51 = Data_Tuple.Tuple.create(v1.value0);
- return function ($52) {
- return ia2fb($51($52));
- };
- }())(v1.value1);
- };
- };
- })(v));
- };
- });
- };
- module.exports = {
- Indexed: Indexed,
- newtypeIndexed: newtypeIndexed,
- profunctorIndexed: profunctorIndexed,
- strongIndexed: strongIndexed,
- choiceIndexed: choiceIndexed,
- wanderIndexed: wanderIndexed
- };
- },{"../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Lens.Internal.Wander/index.js":"../output/Data.Lens.Internal.Wander/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Profunctor/index.js":"../output/Data.Profunctor/index.js","../Data.Profunctor.Choice/index.js":"../output/Data.Profunctor.Choice/index.js","../Data.Profunctor.Strong/index.js":"../output/Data.Profunctor.Strong/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js"}],"../output/Data.Lens.Internal.Shop/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Data_Profunctor = require("../Data.Profunctor/index.js");
- var Data_Profunctor_Strong = require("../Data.Profunctor.Strong/index.js");
- var Data_Tuple = require("../Data.Tuple/index.js");
- var Shop = function () {
- function Shop(value0, value1) {
- this.value0 = value0;
- this.value1 = value1;
- }
- ;
- Shop.create = function (value0) {
- return function (value1) {
- return new Shop(value0, value1);
- };
- };
- return Shop;
- }();
- var profunctorShop = new Data_Profunctor.Profunctor(function (f) {
- return function (g) {
- return function (v) {
- return new Shop(function ($30) {
- return v.value0(f($30));
- }, function (s) {
- var $31 = v.value1(f(s));
- return function ($32) {
- return g($31($32));
- };
- });
- };
- };
- });
- var strongShop = new Data_Profunctor_Strong.Strong(function () {
- return profunctorShop;
- }, function (v) {
- return new Shop(function (v1) {
- return v.value0(v1.value0);
- }, function (v1) {
- return function (b) {
- return new Data_Tuple.Tuple(v.value1(v1.value0)(b), v1.value1);
- };
- });
- }, function (v) {
- return new Shop(function (v1) {
- return v.value0(v1.value1);
- }, function (v1) {
- return function (b) {
- return new Data_Tuple.Tuple(v1.value0, v.value1(v1.value1)(b));
- };
- });
- });
- module.exports = {
- Shop: Shop,
- profunctorShop: profunctorShop,
- strongShop: strongShop
- };
- },{"../Data.Profunctor/index.js":"../output/Data.Profunctor/index.js","../Data.Profunctor.Strong/index.js":"../output/Data.Profunctor.Strong/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js"}],"../output/Data.Lens.Lens/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Category = require("../Control.Category/index.js");
- var Data_Lens_Internal_Indexed = require("../Data.Lens.Internal.Indexed/index.js");
- var Data_Lens_Internal_Shop = require("../Data.Lens.Internal.Shop/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Profunctor = require("../Data.Profunctor/index.js");
- var Data_Profunctor_Strong = require("../Data.Profunctor.Strong/index.js");
- var Data_Tuple = require("../Data.Tuple/index.js");
- var withLens = function withLens(l) {
- return function (f) {
- var v = l(new Data_Lens_Internal_Shop.Shop(Control_Category.identity(Control_Category.categoryFn), function (v1) {
- return function (b) {
- return b;
- };
- }));
- return f(v.value0)(v.value1);
- };
- };
- var withIndexedLens = function withIndexedLens(l) {
- return function (f) {
- var v = l(new Data_Lens_Internal_Shop.Shop(Control_Category.identity(Control_Category.categoryFn), function (v1) {
- return function (b) {
- return b;
- };
- }));
- return f(v.value0)(v.value1);
- };
- };
- var lensStore = function lensStore(l) {
- return withLens(l)(Control_Apply.lift2(Control_Apply.applyFn)(Data_Tuple.Tuple.create));
- };
- var lens$prime = function lens$prime(to) {
- return function (dictStrong) {
- return function (pab) {
- return Data_Profunctor.dimap(dictStrong.Profunctor0())(to)(function (v) {
- return v.value1(v.value0);
- })(Data_Profunctor_Strong.first(dictStrong)(pab));
- };
- };
- };
- var lens = function lens(get) {
- return function (set) {
- return function (dictStrong) {
- return lens$prime(function (s) {
- return new Data_Tuple.Tuple(get(s), function (b) {
- return set(s)(b);
- });
- })(dictStrong);
- };
- };
- };
- var ilens$prime = function ilens$prime(to) {
- return function (dictStrong) {
- return function (pab) {
- return Data_Profunctor.dimap(dictStrong.Profunctor0())(to)(function (v) {
- return v.value1(v.value0);
- })(Data_Profunctor_Strong.first(dictStrong)(Data_Newtype.un(Data_Lens_Internal_Indexed.newtypeIndexed)(Data_Lens_Internal_Indexed.Indexed)(pab)));
- };
- };
- };
- var ilens = function ilens(get) {
- return function (set) {
- return function (dictStrong) {
- return ilens$prime(function (s) {
- return new Data_Tuple.Tuple(get(s), function (b) {
- return set(s)(b);
- });
- })(dictStrong);
- };
- };
- };
- var cloneLens = function cloneLens(l) {
- return function (dictStrong) {
- return withLens(l)(function (x) {
- return function (y) {
- return function (p) {
- return lens(x)(y)(dictStrong)(p);
- };
- };
- });
- };
- };
- var cloneIndexedLens = function cloneIndexedLens(l) {
- return function (dictStrong) {
- return withIndexedLens(l)(function (x) {
- return function (y) {
- return function (p) {
- return ilens(x)(y)(dictStrong)(p);
- };
- };
- });
- };
- };
- module.exports = {
- lens: lens,
- "lens'": lens$prime,
- withLens: withLens,
- cloneLens: cloneLens,
- ilens: ilens,
- "ilens'": ilens$prime,
- withIndexedLens: withIndexedLens,
- cloneIndexedLens: cloneIndexedLens,
- lensStore: lensStore
- };
- },{"../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Lens.Internal.Indexed/index.js":"../output/Data.Lens.Internal.Indexed/index.js","../Data.Lens.Internal.Shop/index.js":"../output/Data.Lens.Internal.Shop/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Profunctor/index.js":"../output/Data.Profunctor/index.js","../Data.Profunctor.Strong/index.js":"../output/Data.Profunctor.Strong/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js"}],"../output/Data.Lens.At/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Category = require("../Control.Category/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Identity = require("../Data.Identity/index.js");
- var Data_Lens_Index = require("../Data.Lens.Index/index.js");
- var Data_Lens_Lens = require("../Data.Lens.Lens/index.js");
- var Data_Map_Internal = require("../Data.Map.Internal/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Set = require("../Data.Set/index.js");
- var Data_Unit = require("../Data.Unit/index.js");
- var Foreign_Object = require("../Foreign.Object/index.js");
- var At = function At(Index0, at) {
- this.Index0 = Index0;
- this.at = at;
- };
- var atSet = function atSet(dictOrd) {
- return new At(function () {
- return Data_Lens_Index.indexSet(dictOrd);
- }, function (x) {
- return function (dictStrong) {
- var update = function update(v) {
- if (v instanceof Data_Maybe.Nothing) {
- return Data_Set["delete"](dictOrd)(x);
- }
- ;
- if (v instanceof Data_Maybe.Just) {
- return Data_Set.insert(dictOrd)(x);
- }
- ;
- throw new Error("Failed pattern match at Data.Lens.At (line 51, column 7 - line 51, column 34): " + [v.constructor.name]);
- };
- var get = function get(xs) {
- var $13 = Data_Set.member(dictOrd)(x)(xs);
- if ($13) {
- return new Data_Maybe.Just(Data_Unit.unit);
- }
- ;
- return Data_Maybe.Nothing.value;
- };
- return Data_Lens_Lens.lens(get)(Data_Function.flip(update))(dictStrong);
- };
- });
- };
- var atMaybe = new At(function () {
- return Data_Lens_Index.indexMaybe;
- }, function (v) {
- return function (dictStrong) {
- return Data_Lens_Lens.lens(Control_Category.identity(Control_Category.categoryFn))(function (v1) {
- return Control_Category.identity(Control_Category.categoryFn);
- })(dictStrong);
- };
- });
- var atMap = function atMap(dictOrd) {
- return new At(function () {
- return Data_Lens_Index.indexMap(dictOrd);
- }, function (k) {
- return function (dictStrong) {
- return Data_Lens_Lens.lens(Data_Map_Internal.lookup(dictOrd)(k))(function (m) {
- return Data_Maybe.maybe(Data_Map_Internal["delete"](dictOrd)(k)(m))(function (v) {
- return Data_Map_Internal.insert(dictOrd)(k)(v)(m);
- });
- })(dictStrong);
- };
- });
- };
- var atIdentity = new At(function () {
- return Data_Lens_Index.indexIdentity;
- }, function (v) {
- return function (dictStrong) {
- return Data_Lens_Lens.lens(function () {
- var $14 = Data_Newtype.unwrap(Data_Identity.newtypeIdentity);
- return function ($15) {
- return Data_Maybe.Just.create($14($15));
- };
- }())(Data_Function.flip(Data_Maybe.maybe)(Data_Identity.Identity))(dictStrong);
- };
- });
- var atForeignObject = new At(function () {
- return Data_Lens_Index.indexForeignObject;
- }, function (k) {
- return function (dictStrong) {
- return Data_Lens_Lens.lens(Foreign_Object.lookup(k))(function (m) {
- return Data_Maybe.maybe(Foreign_Object["delete"](k)(m))(function (v) {
- return Foreign_Object.insert(k)(v)(m);
- });
- })(dictStrong);
- };
- });
- var at = function at(dict) {
- return dict.at;
- };
- module.exports = {
- At: At,
- at: at,
- atIdentity: atIdentity,
- atMaybe: atMaybe,
- atSet: atSet,
- atMap: atMap,
- atForeignObject: atForeignObject
- };
- },{"../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Identity/index.js":"../output/Data.Identity/index.js","../Data.Lens.Index/index.js":"../output/Data.Lens.Index/index.js","../Data.Lens.Lens/index.js":"../output/Data.Lens.Lens/index.js","../Data.Map.Internal/index.js":"../output/Data.Map.Internal/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Set/index.js":"../output/Data.Set/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js","../Foreign.Object/index.js":"../output/Foreign.Object/index.js"}],"../output/Data.Functor.Contravariant/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Void = require("../Data.Void/index.js");
- var Contravariant = function Contravariant(cmap) {
- this.cmap = cmap;
- };
- var cmap = function cmap(dict) {
- return dict.cmap;
- };
- var cmapFlipped = function cmapFlipped(dictContravariant) {
- return function (x) {
- return function (f) {
- return cmap(dictContravariant)(f)(x);
- };
- };
- };
- var coerce = function coerce(dictContravariant) {
- return function (dictFunctor) {
- return function (a) {
- return Data_Functor.map(dictFunctor)(Data_Void.absurd)(cmap(dictContravariant)(Data_Void.absurd)(a));
- };
- };
- };
- var imapC = function imapC(dictContravariant) {
- return function (v) {
- return function (f) {
- return cmap(dictContravariant)(f);
- };
- };
- };
- module.exports = {
- cmap: cmap,
- Contravariant: Contravariant,
- cmapFlipped: cmapFlipped,
- coerce: coerce,
- imapC: imapC
- };
- },{"../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Void/index.js":"../output/Data.Void/index.js"}],"../output/Data.Const/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
- var Data_Bifoldable = require("../Data.Bifoldable/index.js");
- var Data_Bifunctor = require("../Data.Bifunctor/index.js");
- var Data_Bitraversable = require("../Data.Bitraversable/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Foldable = require("../Data.Foldable/index.js");
- var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Functor_Contravariant = require("../Data.Functor.Contravariant/index.js");
- var Data_Functor_Invariant = require("../Data.Functor.Invariant/index.js");
- var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Data_Traversable = require("../Data.Traversable/index.js");
- var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js");
- var Const = function Const(x) {
- return x;
- };
- var showConst = function showConst(dictShow) {
- return new Data_Show.Show(function (v) {
- return "(Const " + (Data_Show.show(dictShow)(v) + ")");
- });
- };
- var semiringConst = function semiringConst(dictSemiring) {
- return dictSemiring;
- };
- var semigroupoidConst = new Control_Semigroupoid.Semigroupoid(function (v) {
- return function (v1) {
- return v1;
- };
- });
- var semigroupConst = function semigroupConst(dictSemigroup) {
- return dictSemigroup;
- };
- var ringConst = function ringConst(dictRing) {
- return dictRing;
- };
- var ordConst = function ordConst(dictOrd) {
- return dictOrd;
- };
- var newtypeConst = new Data_Newtype.Newtype(function (n) {
- return n;
- }, Const);
- var monoidConst = function monoidConst(dictMonoid) {
- return dictMonoid;
- };
- var heytingAlgebraConst = function heytingAlgebraConst(dictHeytingAlgebra) {
- return dictHeytingAlgebra;
- };
- var functorConst = new Data_Functor.Functor(function (f) {
- return function (m) {
- return m;
- };
- });
- var functorWithIndexConst = new Data_FunctorWithIndex.FunctorWithIndex(function () {
- return functorConst;
- }, function (v) {
- return function (v1) {
- return v1;
- };
- });
- var invariantConst = new Data_Functor_Invariant.Invariant(Data_Functor_Invariant.imapF(functorConst));
- var foldableConst = new Data_Foldable.Foldable(function (dictMonoid) {
- return function (v) {
- return function (v1) {
- return Data_Monoid.mempty(dictMonoid);
- };
- };
- }, function (v) {
- return function (z) {
- return function (v1) {
- return z;
- };
- };
- }, function (v) {
- return function (z) {
- return function (v1) {
- return z;
- };
- };
- });
- var foldableWithIndexConst = new Data_FoldableWithIndex.FoldableWithIndex(function () {
- return foldableConst;
- }, function (dictMonoid) {
- return function (v) {
- return function (v1) {
- return Data_Monoid.mempty(dictMonoid);
- };
- };
- }, function (v) {
- return function (z) {
- return function (v1) {
- return z;
- };
- };
- }, function (v) {
- return function (z) {
- return function (v1) {
- return z;
- };
- };
- });
- var traversableConst = new Data_Traversable.Traversable(function () {
- return foldableConst;
- }, function () {
- return functorConst;
- }, function (dictApplicative) {
- return function (v) {
- return Control_Applicative.pure(dictApplicative)(v);
- };
- }, function (dictApplicative) {
- return function (v) {
- return function (v1) {
- return Control_Applicative.pure(dictApplicative)(v1);
- };
- };
- });
- var traversableWithIndexConst = new Data_TraversableWithIndex.TraversableWithIndex(function () {
- return foldableWithIndexConst;
- }, function () {
- return functorWithIndexConst;
- }, function () {
- return traversableConst;
- }, function (dictApplicative) {
- return function (v) {
- return function (v1) {
- return Control_Applicative.pure(dictApplicative)(v1);
- };
- };
- });
- var euclideanRingConst = function euclideanRingConst(dictEuclideanRing) {
- return dictEuclideanRing;
- };
- var eqConst = function eqConst(dictEq) {
- return dictEq;
- };
- var eq1Const = function eq1Const(dictEq) {
- return new Data_Eq.Eq1(function (dictEq1) {
- return Data_Eq.eq(eqConst(dictEq));
- });
- };
- var ord1Const = function ord1Const(dictOrd) {
- return new Data_Ord.Ord1(function () {
- return eq1Const(dictOrd.Eq0());
- }, function (dictOrd1) {
- return Data_Ord.compare(ordConst(dictOrd));
- });
- };
- var contravariantConst = new Data_Functor_Contravariant.Contravariant(function (v) {
- return function (v1) {
- return v1;
- };
- });
- var commutativeRingConst = function commutativeRingConst(dictCommutativeRing) {
- return dictCommutativeRing;
- };
- var boundedConst = function boundedConst(dictBounded) {
- return dictBounded;
- };
- var booleanAlgebraConst = function booleanAlgebraConst(dictBooleanAlgebra) {
- return dictBooleanAlgebra;
- };
- var bifunctorConst = new Data_Bifunctor.Bifunctor(function (f) {
- return function (v) {
- return function (v1) {
- return f(v1);
- };
- };
- });
- var bifoldableConst = new Data_Bifoldable.Bifoldable(function (dictMonoid) {
- return function (f) {
- return function (v) {
- return function (v1) {
- return f(v1);
- };
- };
- };
- }, function (f) {
- return function (v) {
- return function (z) {
- return function (v1) {
- return f(z)(v1);
- };
- };
- };
- }, function (f) {
- return function (v) {
- return function (z) {
- return function (v1) {
- return f(v1)(z);
- };
- };
- };
- });
- var bitraversableConst = new Data_Bitraversable.Bitraversable(function () {
- return bifoldableConst;
- }, function () {
- return bifunctorConst;
- }, function (dictApplicative) {
- return function (v) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Const)(v);
- };
- }, function (dictApplicative) {
- return function (f) {
- return function (v) {
- return function (v1) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Const)(f(v1));
- };
- };
- };
- });
- var applyConst = function applyConst(dictSemigroup) {
- return new Control_Apply.Apply(function () {
- return functorConst;
- }, function (v) {
- return function (v1) {
- return Data_Semigroup.append(dictSemigroup)(v)(v1);
- };
- });
- };
- var applicativeConst = function applicativeConst(dictMonoid) {
- return new Control_Applicative.Applicative(function () {
- return applyConst(dictMonoid.Semigroup0());
- }, function (v) {
- return Data_Monoid.mempty(dictMonoid);
- });
- };
- module.exports = {
- Const: Const,
- newtypeConst: newtypeConst,
- eqConst: eqConst,
- eq1Const: eq1Const,
- ordConst: ordConst,
- ord1Const: ord1Const,
- boundedConst: boundedConst,
- showConst: showConst,
- semigroupoidConst: semigroupoidConst,
- semigroupConst: semigroupConst,
- monoidConst: monoidConst,
- semiringConst: semiringConst,
- ringConst: ringConst,
- euclideanRingConst: euclideanRingConst,
- commutativeRingConst: commutativeRingConst,
- heytingAlgebraConst: heytingAlgebraConst,
- booleanAlgebraConst: booleanAlgebraConst,
- functorConst: functorConst,
- bifunctorConst: bifunctorConst,
- functorWithIndexConst: functorWithIndexConst,
- invariantConst: invariantConst,
- contravariantConst: contravariantConst,
- applyConst: applyConst,
- applicativeConst: applicativeConst,
- foldableConst: foldableConst,
- foldableWithIndexConst: foldableWithIndexConst,
- bifoldableConst: bifoldableConst,
- traversableConst: traversableConst,
- traversableWithIndexConst: traversableWithIndexConst,
- bitraversableConst: bitraversableConst
- };
- },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Semigroupoid/index.js":"../output/Control.Semigroupoid/index.js","../Data.Bifoldable/index.js":"../output/Data.Bifoldable/index.js","../Data.Bifunctor/index.js":"../output/Data.Bifunctor/index.js","../Data.Bitraversable/index.js":"../output/Data.Bitraversable/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.FoldableWithIndex/index.js":"../output/Data.FoldableWithIndex/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Functor.Contravariant/index.js":"../output/Data.Functor.Contravariant/index.js","../Data.Functor.Invariant/index.js":"../output/Data.Functor.Invariant/index.js","../Data.FunctorWithIndex/index.js":"../output/Data.FunctorWithIndex/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Data.TraversableWithIndex/index.js":"../output/Data.TraversableWithIndex/index.js"}],"../output/Data.Profunctor.Cochoice/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Cochoice = function Cochoice(Profunctor0, unleft, unright) {
- this.Profunctor0 = Profunctor0;
- this.unleft = unleft;
- this.unright = unright;
- };
- var unright = function unright(dict) {
- return dict.unright;
- };
- var unleft = function unleft(dict) {
- return dict.unleft;
- };
- module.exports = {
- unleft: unleft,
- unright: unright,
- Cochoice: Cochoice
- };
- },{}],"../output/Data.Lens.Internal.Forget/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Data_Const = require("../Data.Const/index.js");
- var Data_Either = require("../Data.Either/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Lens_Internal_Wander = require("../Data.Lens.Internal.Wander/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Profunctor = require("../Data.Profunctor/index.js");
- var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js");
- var Data_Profunctor_Cochoice = require("../Data.Profunctor.Cochoice/index.js");
- var Data_Profunctor_Strong = require("../Data.Profunctor.Strong/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Tuple = require("../Data.Tuple/index.js");
- var Forget = function Forget(x) {
- return x;
- };
- var semigroupForget = function semigroupForget(dictSemigroup) {
- return Data_Semigroup.semigroupFn(dictSemigroup);
- };
- var profunctorForget = new Data_Profunctor.Profunctor(function (f) {
- return function (v) {
- return function (v1) {
- return function ($27) {
- return v1(f($27));
- };
- };
- };
- });
- var strongForget = new Data_Profunctor_Strong.Strong(function () {
- return profunctorForget;
- }, function (v) {
- return function ($28) {
- return v(Data_Tuple.fst($28));
- };
- }, function (v) {
- return function ($29) {
- return v(Data_Tuple.snd($29));
- };
- });
- var newtypeForget = new Data_Newtype.Newtype(function (n) {
- return n;
- }, Forget);
- var monoidForget = function monoidForget(dictMonoid) {
- return Data_Monoid.monoidFn(dictMonoid);
- };
- var cochoiceForget = new Data_Profunctor_Cochoice.Cochoice(function () {
- return profunctorForget;
- }, function (v) {
- return function ($30) {
- return v(Data_Either.Left.create($30));
- };
- }, function (v) {
- return function ($31) {
- return v(Data_Either.Right.create($31));
- };
- });
- var choiceForget = function choiceForget(dictMonoid) {
- return new Data_Profunctor_Choice.Choice(function () {
- return profunctorForget;
- }, function (v) {
- return Data_Either.either(v)(Data_Monoid.mempty(Data_Monoid.monoidFn(dictMonoid)));
- }, function (v) {
- return Data_Either.either(Data_Monoid.mempty(Data_Monoid.monoidFn(dictMonoid)))(v);
- });
- };
- var wanderForget = function wanderForget(dictMonoid) {
- return new Data_Lens_Internal_Wander.Wander(function () {
- return choiceForget(dictMonoid);
- }, function () {
- return strongForget;
- }, function (f) {
- return function (v) {
- return Data_Newtype.alaF(Data_Functor.functorFn)(Data_Functor.functorFn)(Data_Const.newtypeConst)(Data_Const.newtypeConst)(Data_Const.Const)(f(Data_Const.applicativeConst(dictMonoid)))(v);
- };
- });
- };
- module.exports = {
- Forget: Forget,
- newtypeForget: newtypeForget,
- semigroupForget: semigroupForget,
- monoidForget: monoidForget,
- profunctorForget: profunctorForget,
- choiceForget: choiceForget,
- strongForget: strongForget,
- cochoiceForget: cochoiceForget,
- wanderForget: wanderForget
- };
- },{"../Data.Const/index.js":"../output/Data.Const/index.js","../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Lens.Internal.Wander/index.js":"../output/Data.Lens.Internal.Wander/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Profunctor/index.js":"../output/Data.Profunctor/index.js","../Data.Profunctor.Choice/index.js":"../output/Data.Profunctor.Choice/index.js","../Data.Profunctor.Cochoice/index.js":"../output/Data.Profunctor.Cochoice/index.js","../Data.Profunctor.Strong/index.js":"../output/Data.Profunctor.Strong/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js"}],"../output/Data.Lens.Fold/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Category = require("../Control.Category/index.js");
- var Data_Array = require("../Data.Array/index.js");
- var Data_Either = require("../Data.Either/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Foldable = require("../Data.Foldable/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
- var Data_Lens_Internal_Forget = require("../Data.Lens.Internal.Forget/index.js");
- var Data_Lens_Internal_Indexed = require("../Data.Lens.Internal.Indexed/index.js");
- var Data_List_Types = require("../Data.List.Types/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Maybe_First = require("../Data.Maybe.First/index.js");
- var Data_Maybe_Last = require("../Data.Maybe.Last/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Data_Monoid_Additive = require("../Data.Monoid.Additive/index.js");
- var Data_Monoid_Conj = require("../Data.Monoid.Conj/index.js");
- var Data_Monoid_Disj = require("../Data.Monoid.Disj/index.js");
- var Data_Monoid_Dual = require("../Data.Monoid.Dual/index.js");
- var Data_Monoid_Endo = require("../Data.Monoid.Endo/index.js");
- var Data_Monoid_Multiplicative = require("../Data.Monoid.Multiplicative/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Profunctor = require("../Data.Profunctor/index.js");
- var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Tuple = require("../Data.Tuple/index.js");
- var Data_Unit = require("../Data.Unit/index.js");
- var unfolded = function unfolded(dictMonoid) {
- return function (f) {
- return function (p) {
- var go = function () {
- var $43 = Data_Maybe.maybe(Data_Monoid.mempty(dictMonoid))(function (v) {
- return Data_Semigroup.append(dictMonoid.Semigroup0())(Data_Newtype.unwrap(Data_Lens_Internal_Forget.newtypeForget)(p)(v.value0))(go(v.value1));
- });
- return function ($44) {
- return $43(f($44));
- };
- }();
- return go;
- };
- };
- };
- var replicated = function replicated(dictMonoid) {
- return function (i) {
- return function (v) {
- var go = function go(v1) {
- return function (x) {
- if (v1 === 0) {
- return Data_Monoid.mempty(Data_Monoid.monoidFn(dictMonoid));
- }
- ;
- return Data_Semigroup.append(Data_Semigroup.semigroupFn(dictMonoid.Semigroup0()))(x)(go(v1 - 1 | 0)(x));
- };
- };
- return go(i)(v);
- };
- };
- };
- var ifoldMapOf = function ifoldMapOf(p) {
- return function (f) {
- return Data_Newtype.unwrap(Data_Lens_Internal_Forget.newtypeForget)(p(Data_Lens_Internal_Indexed.Indexed(Data_Tuple.uncurry(f))));
- };
- };
- var ifoldlOf = function ifoldlOf(p) {
- return function (f) {
- return function (r) {
- var $45 = Data_Function.flip(Data_Newtype.unwrap(Data_Newtype.newtypeEndo))(r);
- var $46 = Data_Newtype.unwrap(Data_Newtype.newtypeDual);
- var $47 = ifoldMapOf(p)(function (i) {
- var $49 = Data_Function.flip(f(i));
- return function ($50) {
- return Data_Monoid_Dual.Dual(Data_Monoid_Endo.Endo($49($50)));
- };
- });
- return function ($48) {
- return $45($46($47($48)));
- };
- };
- };
- };
- var ifoldrOf = function ifoldrOf(p) {
- return function (f) {
- return function (r) {
- var $51 = Data_Function.flip(Data_Newtype.unwrap(Data_Newtype.newtypeEndo))(r);
- var $52 = ifoldMapOf(p)(function (i) {
- var $54 = f(i);
- return function ($55) {
- return Data_Monoid_Endo.Endo($54($55));
- };
- });
- return function ($53) {
- return $51($52($53));
- };
- };
- };
- };
- var itoListOf = function itoListOf(p) {
- return ifoldrOf(p)(function (i) {
- return function (x) {
- return function (xs) {
- return new Data_List_Types.Cons(new Data_Tuple.Tuple(i, x), xs);
- };
- };
- })(Data_List_Types.Nil.value);
- };
- var itraverseOf_ = function itraverseOf_(dictApplicative) {
- return function (p) {
- return function (f) {
- return ifoldrOf(p)(function (i) {
- return function (a) {
- return function (fu) {
- return Control_Apply.applySecond(dictApplicative.Apply0())(Data_Functor["void"](dictApplicative.Apply0().Functor0())(f(i)(a)))(fu);
- };
- };
- })(Control_Applicative.pure(dictApplicative)(Data_Unit.unit));
- };
- };
- };
- var iforOf_ = function iforOf_(dictApplicative) {
- var $56 = itraverseOf_(dictApplicative);
- return function ($57) {
- return Data_Function.flip($56($57));
- };
- };
- var ifindOf = function ifindOf(p) {
- return function (f) {
- return ifoldrOf(p)(function (i) {
- return function (a) {
- return Data_Maybe.maybe(function () {
- var $37 = f(i)(a);
- if ($37) {
- return new Data_Maybe.Just(a);
- }
- ;
- return Data_Maybe.Nothing.value;
- }())(Data_Maybe.Just.create);
- };
- })(Data_Maybe.Nothing.value);
- };
- };
- var ianyOf = function ianyOf(dictHeytingAlgebra) {
- return function (p) {
- return function (f) {
- var $58 = Data_Newtype.unwrap(Data_Newtype.newtypeDisj);
- var $59 = ifoldMapOf(p)(function (i) {
- var $61 = f(i);
- return function ($62) {
- return Data_Monoid_Disj.Disj($61($62));
- };
- });
- return function ($60) {
- return $58($59($60));
- };
- };
- };
- };
- var iallOf = function iallOf(dictHeytingAlgebra) {
- return function (p) {
- return function (f) {
- var $63 = Data_Newtype.unwrap(Data_Newtype.newtypeConj);
- var $64 = ifoldMapOf(p)(function (i) {
- var $66 = f(i);
- return function ($67) {
- return Data_Monoid_Conj.Conj($66($67));
- };
- });
- return function ($65) {
- return $63($64($65));
- };
- };
- };
- };
- var folded = function folded(dictMonoid) {
- return function (dictFoldable) {
- return function (v) {
- return Data_Foldable.foldMap(dictFoldable)(dictMonoid)(v);
- };
- };
- };
- var foldMapOf = Data_Newtype.under(Data_Lens_Internal_Forget.newtypeForget)(Data_Lens_Internal_Forget.newtypeForget)(Data_Lens_Internal_Forget.Forget);
- var foldOf = function foldOf(p) {
- return foldMapOf(p)(Control_Category.identity(Control_Category.categoryFn));
- };
- var foldlOf = function foldlOf(p) {
- return function (f) {
- return function (r) {
- var $68 = Data_Function.flip(Data_Newtype.unwrap(Data_Newtype.newtypeEndo))(r);
- var $69 = Data_Newtype.unwrap(Data_Newtype.newtypeDual);
- var $70 = foldMapOf(p)(function () {
- var $72 = Data_Function.flip(f);
- return function ($73) {
- return Data_Monoid_Dual.Dual(Data_Monoid_Endo.Endo($72($73)));
- };
- }());
- return function ($71) {
- return $68($69($70($71)));
- };
- };
- };
- };
- var foldrOf = function foldrOf(p) {
- return function (f) {
- return function (r) {
- var $74 = Data_Function.flip(Data_Newtype.unwrap(Data_Newtype.newtypeEndo))(r);
- var $75 = foldMapOf(p)(function ($77) {
- return Data_Monoid_Endo.Endo(f($77));
- });
- return function ($76) {
- return $74($75($76));
- };
- };
- };
- };
- var maximumOf = function maximumOf(dictOrd) {
- return function (p) {
- var max = function max(a) {
- return function (b) {
- var $39 = Data_Ord.greaterThan(dictOrd)(a)(b);
- if ($39) {
- return a;
- }
- ;
- return b;
- };
- };
- return foldrOf(p)(function (a) {
- var $78 = Data_Maybe.maybe(a)(max(a));
- return function ($79) {
- return Data_Maybe.Just.create($78($79));
- };
- })(Data_Maybe.Nothing.value);
- };
- };
- var minimumOf = function minimumOf(dictOrd) {
- return function (p) {
- var min = function min(a) {
- return function (b) {
- var $40 = Data_Ord.lessThan(dictOrd)(a)(b);
- if ($40) {
- return a;
- }
- ;
- return b;
- };
- };
- return foldrOf(p)(function (a) {
- var $80 = Data_Maybe.maybe(a)(min(a));
- return function ($81) {
- return Data_Maybe.Just.create($80($81));
- };
- })(Data_Maybe.Nothing.value);
- };
- };
- var toListOf = function toListOf(p) {
- return foldrOf(p)(Data_List_Types.Cons.create)(Data_List_Types.Nil.value);
- };
- var toArrayOf = function toArrayOf(p) {
- var $82 = Data_Array.fromFoldable(Data_List_Types.foldableList);
- var $83 = toListOf(p);
- return function ($84) {
- return $82($83($84));
- };
- };
- var toArrayOfOn = function toArrayOfOn(s) {
- return function (p) {
- return toArrayOf(p)(s);
- };
- };
- var toListOfOn = function toListOfOn(s) {
- return function (p) {
- return toListOf(p)(s);
- };
- };
- var traverseOf_ = function traverseOf_(dictApplicative) {
- return function (p) {
- return function (f) {
- return foldrOf(p)(function (a) {
- return function (fu) {
- return Control_Apply.applySecond(dictApplicative.Apply0())(Data_Functor["void"](dictApplicative.Apply0().Functor0())(f(a)))(fu);
- };
- })(Control_Applicative.pure(dictApplicative)(Data_Unit.unit));
- };
- };
- };
- var has = function has(dictHeytingAlgebra) {
- return function (p) {
- var $85 = Data_Newtype.unwrap(Data_Newtype.newtypeDisj);
- var $86 = foldMapOf(p)(Data_Function["const"](Data_HeytingAlgebra.tt(dictHeytingAlgebra)));
- return function ($87) {
- return $85($86($87));
- };
- };
- };
- var hasn$primet = function hasn$primet(dictHeytingAlgebra) {
- return function (p) {
- var $88 = Data_Newtype.unwrap(Data_Newtype.newtypeConj);
- var $89 = foldMapOf(p)(Data_Function["const"](Data_HeytingAlgebra.ff(dictHeytingAlgebra)));
- return function ($90) {
- return $88($89($90));
- };
- };
- };
- var lastOf = function lastOf(p) {
- var $91 = Data_Newtype.unwrap(Data_Maybe_Last.newtypeLast);
- var $92 = foldMapOf(p)(function ($94) {
- return Data_Maybe_Last.Last(Data_Maybe.Just.create($94));
- });
- return function ($93) {
- return $91($92($93));
- };
- };
- var lengthOf = function lengthOf(p) {
- var $95 = Data_Newtype.unwrap(Data_Newtype.newtypeAdditive);
- var $96 = foldMapOf(p)(Data_Function["const"](1));
- return function ($97) {
- return $95($96($97));
- };
- };
- var preview = function preview(p) {
- var $98 = Data_Newtype.unwrap(Data_Maybe_First.newtypeFirst);
- var $99 = foldMapOf(p)(function ($101) {
- return Data_Maybe_First.First(Data_Maybe.Just.create($101));
- });
- return function ($100) {
- return $98($99($100));
- };
- };
- var previewOn = function previewOn(s) {
- return function (p) {
- return preview(p)(s);
- };
- };
- var productOf = function productOf(dictSemiring) {
- return function (p) {
- var $102 = Data_Newtype.unwrap(Data_Newtype.newtypeMultiplicative);
- var $103 = foldMapOf(p)(Data_Monoid_Multiplicative.Multiplicative);
- return function ($104) {
- return $102($103($104));
- };
- };
- };
- var sequenceOf_ = function sequenceOf_(dictApplicative) {
- return function (p) {
- var $105 = Data_Function.flip(Data_Newtype.unwrap(Data_Newtype.newtypeEndo))(Control_Applicative.pure(dictApplicative)(Data_Unit.unit));
- var $106 = foldMapOf(p)(function (f) {
- return function (v) {
- return Control_Apply.applySecond(dictApplicative.Apply0())(f)(v);
- };
- });
- return function ($107) {
- return $105($106($107));
- };
- };
- };
- var sumOf = function sumOf(dictSemiring) {
- return function (p) {
- var $108 = Data_Newtype.unwrap(Data_Newtype.newtypeAdditive);
- var $109 = foldMapOf(p)(Data_Monoid_Additive.Additive);
- return function ($110) {
- return $108($109($110));
- };
- };
- };
- var firstOf = function firstOf(p) {
- var $111 = Data_Newtype.unwrap(Data_Maybe_First.newtypeFirst);
- var $112 = foldMapOf(p)(function ($114) {
- return Data_Maybe_First.First(Data_Maybe.Just.create($114));
- });
- return function ($113) {
- return $111($112($113));
- };
- };
- var findOf = function findOf(p) {
- return function (f) {
- return foldrOf(p)(function (a) {
- return Data_Maybe.maybe(function () {
- var $41 = f(a);
- if ($41) {
- return new Data_Maybe.Just(a);
- }
- ;
- return Data_Maybe.Nothing.value;
- }())(Data_Maybe.Just.create);
- })(Data_Maybe.Nothing.value);
- };
- };
- var filtered = function filtered(dictChoice) {
- return function (f) {
- var $115 = Data_Profunctor.dimap(dictChoice.Profunctor0())(function (x) {
- var $42 = f(x);
- if ($42) {
- return new Data_Either.Right(x);
- }
- ;
- return new Data_Either.Left(x);
- })(Data_Either.either(Control_Category.identity(Control_Category.categoryFn))(Control_Category.identity(Control_Category.categoryFn)));
- var $116 = Data_Profunctor_Choice.right(dictChoice);
- return function ($117) {
- return $115($116($117));
- };
- };
- };
- var anyOf = function anyOf(dictHeytingAlgebra) {
- return function (p) {
- return function (f) {
- var $118 = Data_Newtype.unwrap(Data_Newtype.newtypeDisj);
- var $119 = foldMapOf(p)(function ($121) {
- return Data_Monoid_Disj.Disj(f($121));
- });
- return function ($120) {
- return $118($119($120));
- };
- };
- };
- };
- var elemOf = function elemOf(dictEq) {
- return function (p) {
- return function (a) {
- return anyOf(Data_HeytingAlgebra.heytingAlgebraBoolean)(p)(function (v) {
- return Data_Eq.eq(dictEq)(v)(a);
- });
- };
- };
- };
- var orOf = function orOf(dictHeytingAlgebra) {
- return function (p) {
- return anyOf(dictHeytingAlgebra)(p)(Control_Category.identity(Control_Category.categoryFn));
- };
- };
- var allOf = function allOf(dictHeytingAlgebra) {
- return function (p) {
- return function (f) {
- var $122 = Data_Newtype.unwrap(Data_Newtype.newtypeConj);
- var $123 = foldMapOf(p)(function ($125) {
- return Data_Monoid_Conj.Conj(f($125));
- });
- return function ($124) {
- return $122($123($124));
- };
- };
- };
- };
- var andOf = function andOf(dictHeytingAlgebra) {
- return function (p) {
- return allOf(dictHeytingAlgebra)(p)(Control_Category.identity(Control_Category.categoryFn));
- };
- };
- var notElemOf = function notElemOf(dictEq) {
- return function (p) {
- return function (a) {
- return allOf(Data_HeytingAlgebra.heytingAlgebraBoolean)(p)(function (v) {
- return Data_Eq.notEq(dictEq)(v)(a);
- });
- };
- };
- };
- module.exports = {
- previewOn: previewOn,
- toListOfOn: toListOfOn,
- preview: preview,
- foldOf: foldOf,
- foldMapOf: foldMapOf,
- foldrOf: foldrOf,
- foldlOf: foldlOf,
- toListOf: toListOf,
- firstOf: firstOf,
- lastOf: lastOf,
- maximumOf: maximumOf,
- minimumOf: minimumOf,
- allOf: allOf,
- anyOf: anyOf,
- andOf: andOf,
- orOf: orOf,
- elemOf: elemOf,
- notElemOf: notElemOf,
- sumOf: sumOf,
- productOf: productOf,
- lengthOf: lengthOf,
- findOf: findOf,
- sequenceOf_: sequenceOf_,
- traverseOf_: traverseOf_,
- has: has,
- "hasn't": hasn$primet,
- replicated: replicated,
- filtered: filtered,
- folded: folded,
- unfolded: unfolded,
- toArrayOf: toArrayOf,
- toArrayOfOn: toArrayOfOn,
- ifoldMapOf: ifoldMapOf,
- ifoldrOf: ifoldrOf,
- ifoldlOf: ifoldlOf,
- iallOf: iallOf,
- ianyOf: ianyOf,
- itoListOf: itoListOf,
- itraverseOf_: itraverseOf_
- };
- },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Array/index.js":"../output/Data.Array/index.js","../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.HeytingAlgebra/index.js":"../output/Data.HeytingAlgebra/index.js","../Data.Lens.Internal.Forget/index.js":"../output/Data.Lens.Internal.Forget/index.js","../Data.Lens.Internal.Indexed/index.js":"../output/Data.Lens.Internal.Indexed/index.js","../Data.List.Types/index.js":"../output/Data.List.Types/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Maybe.First/index.js":"../output/Data.Maybe.First/index.js","../Data.Maybe.Last/index.js":"../output/Data.Maybe.Last/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Monoid.Additive/index.js":"../output/Data.Monoid.Additive/index.js","../Data.Monoid.Conj/index.js":"../output/Data.Monoid.Conj/index.js","../Data.Monoid.Disj/index.js":"../output/Data.Monoid.Disj/index.js","../Data.Monoid.Dual/index.js":"../output/Data.Monoid.Dual/index.js","../Data.Monoid.Endo/index.js":"../output/Data.Monoid.Endo/index.js","../Data.Monoid.Multiplicative/index.js":"../output/Data.Monoid.Multiplicative/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Profunctor/index.js":"../output/Data.Profunctor/index.js","../Data.Profunctor.Choice/index.js":"../output/Data.Profunctor.Choice/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Data.Lens.Internal.Market/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Data_Bifunctor = require("../Data.Bifunctor/index.js");
- var Data_Either = require("../Data.Either/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Profunctor = require("../Data.Profunctor/index.js");
- var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js");
- var Market = function () {
- function Market(value0, value1) {
- this.value0 = value0;
- this.value1 = value1;
- }
- ;
- Market.create = function (value0) {
- return function (value1) {
- return new Market(value0, value1);
- };
- };
- return Market;
- }();
- var profunctorMarket = new Data_Profunctor.Profunctor(function (f) {
- return function (g) {
- return function (v) {
- return new Market(function ($19) {
- return g(v.value0($19));
- }, function () {
- var $20 = Data_Bifunctor.lmap(Data_Either.bifunctorEither)(g);
- return function ($21) {
- return $20(v.value1(f($21)));
- };
- }());
- };
- };
- });
- var functorMarket = new Data_Functor.Functor(function (f) {
- return function (v) {
- return new Market(function ($22) {
- return f(v.value0($22));
- }, function () {
- var $23 = Data_Bifunctor.lmap(Data_Either.bifunctorEither)(f);
- return function ($24) {
- return $23(v.value1($24));
- };
- }());
- };
- });
- var choiceMarket = new Data_Profunctor_Choice.Choice(function () {
- return profunctorMarket;
- }, function (v) {
- return new Market(function ($25) {
- return Data_Either.Left.create(v.value0($25));
- }, Data_Either.either(function () {
- var $26 = Data_Bifunctor.lmap(Data_Either.bifunctorEither)(Data_Either.Left.create);
- return function ($27) {
- return $26(v.value1($27));
- };
- }())(function ($28) {
- return Data_Either.Left.create(Data_Either.Right.create($28));
- }));
- }, function (v) {
- return new Market(function ($29) {
- return Data_Either.Right.create(v.value0($29));
- }, Data_Either.either(function ($30) {
- return Data_Either.Left.create(Data_Either.Left.create($30));
- })(function () {
- var $31 = Data_Bifunctor.lmap(Data_Either.bifunctorEither)(Data_Either.Right.create);
- return function ($32) {
- return $31(v.value1($32));
- };
- }()));
- });
- module.exports = {
- Market: Market,
- functorMarket: functorMarket,
- profunctorMarket: profunctorMarket,
- choiceMarket: choiceMarket
- };
- },{"../Data.Bifunctor/index.js":"../output/Data.Bifunctor/index.js","../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Profunctor/index.js":"../output/Data.Profunctor/index.js","../Data.Profunctor.Choice/index.js":"../output/Data.Profunctor.Choice/index.js"}],"../output/Data.Profunctor.Costrong/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Costrong = function Costrong(Profunctor0, unfirst, unsecond) {
- this.Profunctor0 = Profunctor0;
- this.unfirst = unfirst;
- this.unsecond = unsecond;
- };
- var unsecond = function unsecond(dict) {
- return dict.unsecond;
- };
- var unfirst = function unfirst(dict) {
- return dict.unfirst;
- };
- module.exports = {
- unfirst: unfirst,
- unsecond: unsecond,
- Costrong: Costrong
- };
- },{}],"../output/Data.Lens.Internal.Tagged/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Data_Either = require("../Data.Either/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Foldable = require("../Data.Foldable/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Ord = require("../Data.Ord/index.js");
- var Data_Profunctor = require("../Data.Profunctor/index.js");
- var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js");
- var Data_Profunctor_Closed = require("../Data.Profunctor.Closed/index.js");
- var Data_Profunctor_Costrong = require("../Data.Profunctor.Costrong/index.js");
- var Data_Traversable = require("../Data.Traversable/index.js");
- var Tagged = function Tagged(x) {
- return x;
- };
- var taggedProfunctor = new Data_Profunctor.Profunctor(function (v) {
- return function (g) {
- return function (v1) {
- return g(v1);
- };
- };
- });
- var taggedCostrong = new Data_Profunctor_Costrong.Costrong(function () {
- return taggedProfunctor;
- }, function (v) {
- return v.value0;
- }, function (v) {
- return v.value1;
- });
- var taggedClosed = new Data_Profunctor_Closed.Closed(function () {
- return taggedProfunctor;
- }, function (v) {
- return Data_Function["const"](v);
- });
- var taggedChoice = new Data_Profunctor_Choice.Choice(function () {
- return taggedProfunctor;
- }, function (v) {
- return new Data_Either.Left(v);
- }, function (v) {
- return new Data_Either.Right(v);
- });
- var newtypeTagged = new Data_Newtype.Newtype(function (n) {
- return n;
- }, Tagged);
- var functorTagged = new Data_Functor.Functor(function (f) {
- return function (m) {
- return f(m);
- };
- });
- var foldableTagged = new Data_Foldable.Foldable(function (dictMonoid) {
- return function (f) {
- return function (v) {
- return f(v);
- };
- };
- }, function (f) {
- return function (b) {
- return function (v) {
- return f(b)(v);
- };
- };
- }, function (f) {
- return function (b) {
- return function (v) {
- return f(v)(b);
- };
- };
- });
- var traversableTagged = new Data_Traversable.Traversable(function () {
- return foldableTagged;
- }, function () {
- return functorTagged;
- }, function (dictApplicative) {
- return function (v) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Tagged)(v);
- };
- }, function (dictApplicative) {
- return function (f) {
- return function (v) {
- return Data_Functor.map(dictApplicative.Apply0().Functor0())(Tagged)(f(v));
- };
- };
- });
- var eqTagged = function eqTagged(dictEq) {
- return new Data_Eq.Eq(function (x) {
- return function (y) {
- return Data_Eq.eq(dictEq)(x)(y);
- };
- });
- };
- var ordTagged = function ordTagged(dictOrd) {
- return new Data_Ord.Ord(function () {
- return eqTagged(dictOrd.Eq0());
- }, function (x) {
- return function (y) {
- return Data_Ord.compare(dictOrd)(x)(y);
- };
- });
- };
- var eq1Tagged = new Data_Eq.Eq1(function (dictEq) {
- return Data_Eq.eq(eqTagged(dictEq));
- });
- var ord1Tagged = new Data_Ord.Ord1(function () {
- return eq1Tagged;
- }, function (dictOrd) {
- return Data_Ord.compare(ordTagged(dictOrd));
- });
- module.exports = {
- Tagged: Tagged,
- newtypeTagged: newtypeTagged,
- eqTagged: eqTagged,
- eq1Tagged: eq1Tagged,
- ordTagged: ordTagged,
- ord1Tagged: ord1Tagged,
- functorTagged: functorTagged,
- taggedProfunctor: taggedProfunctor,
- taggedChoice: taggedChoice,
- taggedCostrong: taggedCostrong,
- taggedClosed: taggedClosed,
- foldableTagged: foldableTagged,
- traversableTagged: traversableTagged
- };
- },{"../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Ord/index.js":"../output/Data.Ord/index.js","../Data.Profunctor/index.js":"../output/Data.Profunctor/index.js","../Data.Profunctor.Choice/index.js":"../output/Data.Profunctor.Choice/index.js","../Data.Profunctor.Closed/index.js":"../output/Data.Profunctor.Closed/index.js","../Data.Profunctor.Costrong/index.js":"../output/Data.Profunctor.Costrong/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js"}],"../output/Data.Lens.Prism/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Category = require("../Control.Category/index.js");
- var Control_MonadZero = require("../Control.MonadZero/index.js");
- var Data_Either = require("../Data.Either/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
- var Data_Lens_Internal_Market = require("../Data.Lens.Internal.Market/index.js");
- var Data_Lens_Internal_Tagged = require("../Data.Lens.Internal.Tagged/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Profunctor = require("../Data.Profunctor/index.js");
- var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js");
- var withPrism = function withPrism(l) {
- return function (f) {
- var v = l(new Data_Lens_Internal_Market.Market(Control_Category.identity(Control_Category.categoryFn), Data_Either.Right.create));
- return f(v.value0)(v.value1);
- };
- };
- var review = Data_Newtype.under(Data_Lens_Internal_Tagged.newtypeTagged)(Data_Lens_Internal_Tagged.newtypeTagged)(Data_Lens_Internal_Tagged.Tagged);
- var prism = function prism(to) {
- return function (fro) {
- return function (dictChoice) {
- return function (pab) {
- return Data_Profunctor.dimap(dictChoice.Profunctor0())(fro)(Data_Either.either(Control_Category.identity(Control_Category.categoryFn))(Control_Category.identity(Control_Category.categoryFn)))(Data_Profunctor_Choice.right(dictChoice)(Data_Profunctor.rmap(dictChoice.Profunctor0())(to)(pab)));
- };
- };
- };
- };
- var prism$prime = function prism$prime(to) {
- return function (fro) {
- return function (dictChoice) {
- return prism(to)(function (s) {
- return Data_Maybe.maybe(new Data_Either.Left(s))(Data_Either.Right.create)(fro(s));
- })(dictChoice);
- };
- };
- };
- var nearly = function nearly(x) {
- return function (f) {
- return function (dictChoice) {
- return prism$prime(Data_Function["const"](x))(function () {
- var $14 = Control_MonadZero.guard(Data_Maybe.monadZeroMaybe);
- return function ($15) {
- return $14(f($15));
- };
- }())(dictChoice);
- };
- };
- };
- var only = function only(dictEq) {
- return function (x) {
- return function (dictChoice) {
- return nearly(x)(function (v) {
- return Data_Eq.eq(dictEq)(v)(x);
- })(dictChoice);
- };
- };
- };
- var matching = function matching(l) {
- return withPrism(l)(function (v) {
- return function (f) {
- return f;
- };
- });
- };
- var is = function is(dictHeytingAlgebra) {
- return function (l) {
- var $16 = Data_Either.either(Data_Function["const"](Data_HeytingAlgebra.ff(dictHeytingAlgebra)))(Data_Function["const"](Data_HeytingAlgebra.tt(dictHeytingAlgebra)));
- var $17 = matching(l);
- return function ($18) {
- return $16($17($18));
- };
- };
- };
- var isn$primet = function isn$primet(dictHeytingAlgebra) {
- return function (l) {
- var $19 = Data_HeytingAlgebra.not(dictHeytingAlgebra);
- var $20 = is(dictHeytingAlgebra)(l);
- return function ($21) {
- return $19($20($21));
- };
- };
- };
- var clonePrism = function clonePrism(l) {
- return function (dictChoice) {
- return withPrism(l)(function (x) {
- return function (y) {
- return function (p) {
- return prism(x)(y)(dictChoice)(p);
- };
- };
- });
- };
- };
- module.exports = {
- "prism'": prism$prime,
- prism: prism,
- only: only,
- nearly: nearly,
- review: review,
- is: is,
- "isn't": isn$primet,
- matching: matching,
- clonePrism: clonePrism,
- withPrism: withPrism
- };
- },{"../Control.Category/index.js":"../output/Control.Category/index.js","../Control.MonadZero/index.js":"../output/Control.MonadZero/index.js","../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.HeytingAlgebra/index.js":"../output/Data.HeytingAlgebra/index.js","../Data.Lens.Internal.Market/index.js":"../output/Data.Lens.Internal.Market/index.js","../Data.Lens.Internal.Tagged/index.js":"../output/Data.Lens.Internal.Tagged/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Profunctor/index.js":"../output/Data.Profunctor/index.js","../Data.Profunctor.Choice/index.js":"../output/Data.Profunctor.Choice/index.js"}],"../output/Data.Lens.Prism.Maybe/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Data_Either = require("../Data.Either/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Lens_Prism = require("../Data.Lens.Prism/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Unit = require("../Data.Unit/index.js");
- var _Nothing = function _Nothing(dictChoice) {
- return Data_Lens_Prism.prism(Data_Function["const"](Data_Maybe.Nothing.value))(Data_Maybe.maybe(new Data_Either.Right(Data_Unit.unit))(Data_Function["const"](new Data_Either.Left(Data_Maybe.Nothing.value))))(dictChoice);
- };
- var _Just = function _Just(dictChoice) {
- return Data_Lens_Prism.prism(Data_Maybe.Just.create)(Data_Maybe.maybe(new Data_Either.Left(Data_Maybe.Nothing.value))(Data_Either.Right.create))(dictChoice);
- };
- module.exports = {
- "_Nothing": _Nothing,
- "_Just": _Just
- };
- },{"../Data.Either/index.js":"../output/Data.Either/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Lens.Prism/index.js":"../output/Data.Lens.Prism/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Data.Lens.Setter/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Monad_State_Class = require("../Control.Monad.State.Class/index.js");
- var Data_EuclideanRing = require("../Data.EuclideanRing/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
- var Data_Lens_Internal_Indexed = require("../Data.Lens.Internal.Indexed/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Ring = require("../Data.Ring/index.js");
- var Data_Semigroup = require("../Data.Semigroup/index.js");
- var Data_Semiring = require("../Data.Semiring/index.js");
- var Data_Tuple = require("../Data.Tuple/index.js");
- var over = function over(l) {
- return l;
- };
- var set = function set(l) {
- return function (b) {
- return over(l)(Data_Function["const"](b));
- };
- };
- var setJust = function setJust(p) {
- var $24 = set(p);
- return function ($25) {
- return $24(Data_Maybe.Just.create($25));
- };
- };
- var subOver = function subOver(dictRing) {
- return function (p) {
- var $26 = over(p);
- var $27 = Data_Function.flip(Data_Ring.sub(dictRing));
- return function ($28) {
- return $26($27($28));
- };
- };
- };
- var mulOver = function mulOver(dictSemiring) {
- return function (p) {
- var $29 = over(p);
- var $30 = Data_Function.flip(Data_Semiring.mul(dictSemiring));
- return function ($31) {
- return $29($30($31));
- };
- };
- };
- var modifying = function modifying(dictMonadState) {
- return function (p) {
- return function (f) {
- return Data_Functor["void"](dictMonadState.Monad0().Bind1().Apply0().Functor0())(Control_Monad_State_Class.modify(dictMonadState)(over(p)(f)));
- };
- };
- };
- var mulModifying = function mulModifying(dictMonadState) {
- return function (dictSemiring) {
- return function (p) {
- var $32 = modifying(dictMonadState)(p);
- var $33 = Data_Function.flip(Data_Semiring.mul(dictSemiring));
- return function ($34) {
- return $32($33($34));
- };
- };
- };
- };
- var subModifying = function subModifying(dictMonadState) {
- return function (dictRing) {
- return function (p) {
- var $35 = modifying(dictMonadState)(p);
- var $36 = Data_Function.flip(Data_Ring.sub(dictRing));
- return function ($37) {
- return $35($36($37));
- };
- };
- };
- };
- var iover = function iover(l) {
- return function (f) {
- return l(Data_Lens_Internal_Indexed.Indexed(Data_Tuple.uncurry(f)));
- };
- };
- var divOver = function divOver(dictEuclideanRing) {
- return function (p) {
- var $38 = over(p);
- var $39 = Data_Function.flip(Data_EuclideanRing.div(dictEuclideanRing));
- return function ($40) {
- return $38($39($40));
- };
- };
- };
- var divModifying = function divModifying(dictMonadState) {
- return function (dictEuclideanRing) {
- return function (p) {
- var $41 = modifying(dictMonadState)(p);
- var $42 = Data_Function.flip(Data_EuclideanRing.div(dictEuclideanRing));
- return function ($43) {
- return $41($42($43));
- };
- };
- };
- };
- var disjOver = function disjOver(dictHeytingAlgebra) {
- return function (p) {
- var $44 = over(p);
- var $45 = Data_Function.flip(Data_HeytingAlgebra.disj(dictHeytingAlgebra));
- return function ($46) {
- return $44($45($46));
- };
- };
- };
- var disjModifying = function disjModifying(dictMonadState) {
- return function (dictHeytingAlgebra) {
- return function (p) {
- var $47 = modifying(dictMonadState)(p);
- var $48 = Data_Function.flip(Data_HeytingAlgebra.disj(dictHeytingAlgebra));
- return function ($49) {
- return $47($48($49));
- };
- };
- };
- };
- var conjOver = function conjOver(dictHeytingAlgebra) {
- return function (p) {
- var $50 = over(p);
- var $51 = Data_Function.flip(Data_HeytingAlgebra.conj(dictHeytingAlgebra));
- return function ($52) {
- return $50($51($52));
- };
- };
- };
- var conjModifying = function conjModifying(dictMonadState) {
- return function (dictHeytingAlgebra) {
- return function (p) {
- var $53 = modifying(dictMonadState)(p);
- var $54 = Data_Function.flip(Data_HeytingAlgebra.conj(dictHeytingAlgebra));
- return function ($55) {
- return $53($54($55));
- };
- };
- };
- };
- var assign = function assign(dictMonadState) {
- return function (p) {
- return function (b) {
- return Data_Functor["void"](dictMonadState.Monad0().Bind1().Apply0().Functor0())(Control_Monad_State_Class.modify(dictMonadState)(set(p)(b)));
- };
- };
- };
- var assignJust = function assignJust(dictMonadState) {
- return function (p) {
- var $56 = assign(dictMonadState)(p);
- return function ($57) {
- return $56(Data_Maybe.Just.create($57));
- };
- };
- };
- var appendOver = function appendOver(dictSemigroup) {
- return function (p) {
- var $58 = over(p);
- var $59 = Data_Function.flip(Data_Semigroup.append(dictSemigroup));
- return function ($60) {
- return $58($59($60));
- };
- };
- };
- var appendModifying = function appendModifying(dictMonadState) {
- return function (dictSemigroup) {
- return function (p) {
- var $61 = modifying(dictMonadState)(p);
- var $62 = Data_Function.flip(Data_Semigroup.append(dictSemigroup));
- return function ($63) {
- return $61($62($63));
- };
- };
- };
- };
- var addOver = function addOver(dictSemiring) {
- return function (p) {
- var $64 = over(p);
- var $65 = Data_Semiring.add(dictSemiring);
- return function ($66) {
- return $64($65($66));
- };
- };
- };
- var addModifying = function addModifying(dictMonadState) {
- return function (dictSemiring) {
- return function (p) {
- var $67 = modifying(dictMonadState)(p);
- var $68 = Data_Semiring.add(dictSemiring);
- return function ($69) {
- return $67($68($69));
- };
- };
- };
- };
- module.exports = {
- over: over,
- iover: iover,
- set: set,
- addOver: addOver,
- subOver: subOver,
- mulOver: mulOver,
- divOver: divOver,
- disjOver: disjOver,
- conjOver: conjOver,
- appendOver: appendOver,
- setJust: setJust,
- assign: assign,
- modifying: modifying,
- addModifying: addModifying,
- mulModifying: mulModifying,
- subModifying: subModifying,
- divModifying: divModifying,
- disjModifying: disjModifying,
- conjModifying: conjModifying,
- appendModifying: appendModifying,
- assignJust: assignJust
- };
- },{"../Control.Monad.State.Class/index.js":"../output/Control.Monad.State.Class/index.js","../Data.EuclideanRing/index.js":"../output/Data.EuclideanRing/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.HeytingAlgebra/index.js":"../output/Data.HeytingAlgebra/index.js","../Data.Lens.Internal.Indexed/index.js":"../output/Data.Lens.Internal.Indexed/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Ring/index.js":"../output/Data.Ring/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js","../Data.Semiring/index.js":"../output/Data.Semiring/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js"}],"../output/Data.Lens.Getter/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Category = require("../Control.Category/index.js");
- var Control_Monad_State_Class = require("../Control.Monad.State.Class/index.js");
- var Data_Lens_Internal_Forget = require("../Data.Lens.Internal.Forget/index.js");
- var Data_Lens_Internal_Indexed = require("../Data.Lens.Internal.Indexed/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Profunctor_Strong = require("../Data.Profunctor.Strong/index.js");
- var view = function view(l) {
- return Data_Newtype.unwrap(Data_Lens_Internal_Forget.newtypeForget)(l(Control_Category.identity(Control_Category.categoryFn)));
- };
- var viewOn = function viewOn(s) {
- return function (l) {
- return view(l)(s);
- };
- };
- var use = function use(dictMonadState) {
- return function (p) {
- return Control_Monad_State_Class.gets(dictMonadState)(function (v) {
- return viewOn(v)(p);
- });
- };
- };
- var to = function to(f) {
- return function (p) {
- var $3 = Data_Newtype.unwrap(Data_Lens_Internal_Forget.newtypeForget)(p);
- return function ($4) {
- return $3(f($4));
- };
- };
- };
- var takeBoth = function takeBoth(l) {
- return function (r) {
- return to(Data_Profunctor_Strong.fanout(Control_Category.categoryFn)(Data_Profunctor_Strong.strongFn)(view(l))(view(r)));
- };
- };
- var iview = function iview(l) {
- return Data_Newtype.unwrap(Data_Lens_Internal_Forget.newtypeForget)(l(Data_Lens_Internal_Indexed.Indexed(Control_Category.identity(Control_Category.categoryFn))));
- };
- var iuse = function iuse(dictMonadState) {
- return function (p) {
- return Control_Monad_State_Class.gets(dictMonadState)(iview(p));
- };
- };
- var cloneGetter = function cloneGetter(g) {
- return to(view(g));
- };
- module.exports = {
- viewOn: viewOn,
- view: view,
- to: to,
- takeBoth: takeBoth,
- use: use,
- iview: iview,
- iuse: iuse,
- cloneGetter: cloneGetter
- };
- },{"../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Monad.State.Class/index.js":"../output/Control.Monad.State.Class/index.js","../Data.Lens.Internal.Forget/index.js":"../output/Data.Lens.Internal.Forget/index.js","../Data.Lens.Internal.Indexed/index.js":"../output/Data.Lens.Internal.Indexed/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Profunctor.Strong/index.js":"../output/Data.Profunctor.Strong/index.js"}],"../output/Data.Lens.Internal.Exchange/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Profunctor = require("../Data.Profunctor/index.js");
- var Exchange = function () {
- function Exchange(value0, value1) {
- this.value0 = value0;
- this.value1 = value1;
- }
- ;
- Exchange.create = function (value0) {
- return function (value1) {
- return new Exchange(value0, value1);
- };
- };
- return Exchange;
- }();
- var profunctorExchange = new Data_Profunctor.Profunctor(function (f) {
- return function (g) {
- return function (v) {
- return new Exchange(function ($11) {
- return v.value0(f($11));
- }, function ($12) {
- return g(v.value1($12));
- });
- };
- };
- });
- var functorExchange = new Data_Functor.Functor(function (f) {
- return function (v) {
- return new Exchange(v.value0, function ($13) {
- return f(v.value1($13));
- });
- };
- });
- module.exports = {
- Exchange: Exchange,
- functorExchange: functorExchange,
- profunctorExchange: profunctorExchange
- };
- },{"../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Profunctor/index.js":"../output/Data.Profunctor/index.js"}],"../output/Data.Lens.Internal.Re/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Profunctor = require("../Data.Profunctor/index.js");
- var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js");
- var Data_Profunctor_Cochoice = require("../Data.Profunctor.Cochoice/index.js");
- var Data_Profunctor_Costrong = require("../Data.Profunctor.Costrong/index.js");
- var Data_Profunctor_Strong = require("../Data.Profunctor.Strong/index.js");
- var Re = function Re(x) {
- return x;
- };
- var profunctorRe = function profunctorRe(dictProfunctor) {
- return new Data_Profunctor.Profunctor(function (f) {
- return function (g) {
- return function (v) {
- var $28 = Data_Profunctor.dimap(dictProfunctor)(g)(f);
- return function ($29) {
- return v($28($29));
- };
- };
- };
- });
- };
- var strongRe = function strongRe(dictStrong) {
- return new Data_Profunctor_Costrong.Costrong(function () {
- return profunctorRe(dictStrong.Profunctor0());
- }, function (v) {
- var $30 = Data_Profunctor_Strong.first(dictStrong);
- return function ($31) {
- return v($30($31));
- };
- }, function (v) {
- var $32 = Data_Profunctor_Strong.second(dictStrong);
- return function ($33) {
- return v($32($33));
- };
- });
- };
- var newtypeRe = new Data_Newtype.Newtype(function (n) {
- return n;
- }, Re);
- var costrongRe = function costrongRe(dictCostrong) {
- return new Data_Profunctor_Strong.Strong(function () {
- return profunctorRe(dictCostrong.Profunctor0());
- }, function (v) {
- var $34 = Data_Profunctor_Costrong.unfirst(dictCostrong);
- return function ($35) {
- return v($34($35));
- };
- }, function (v) {
- var $36 = Data_Profunctor_Costrong.unsecond(dictCostrong);
- return function ($37) {
- return v($36($37));
- };
- });
- };
- var cochoiceRe = function cochoiceRe(dictCochoice) {
- return new Data_Profunctor_Choice.Choice(function () {
- return profunctorRe(dictCochoice.Profunctor0());
- }, function (v) {
- var $38 = Data_Profunctor_Cochoice.unleft(dictCochoice);
- return function ($39) {
- return v($38($39));
- };
- }, function (v) {
- var $40 = Data_Profunctor_Cochoice.unright(dictCochoice);
- return function ($41) {
- return v($40($41));
- };
- });
- };
- var choiceRe = function choiceRe(dictChoice) {
- return new Data_Profunctor_Cochoice.Cochoice(function () {
- return profunctorRe(dictChoice.Profunctor0());
- }, function (v) {
- var $42 = Data_Profunctor_Choice.left(dictChoice);
- return function ($43) {
- return v($42($43));
- };
- }, function (v) {
- var $44 = Data_Profunctor_Choice.right(dictChoice);
- return function ($45) {
- return v($44($45));
- };
- });
- };
- module.exports = {
- Re: Re,
- newtypeRe: newtypeRe,
- profunctorRe: profunctorRe,
- choiceRe: choiceRe,
- cochoiceRe: cochoiceRe,
- strongRe: strongRe,
- costrongRe: costrongRe
- };
- },{"../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Profunctor/index.js":"../output/Data.Profunctor/index.js","../Data.Profunctor.Choice/index.js":"../output/Data.Profunctor.Choice/index.js","../Data.Profunctor.Cochoice/index.js":"../output/Data.Profunctor.Cochoice/index.js","../Data.Profunctor.Costrong/index.js":"../output/Data.Profunctor.Costrong/index.js","../Data.Profunctor.Strong/index.js":"../output/Data.Profunctor.Strong/index.js"}],"../output/Data.Lens.Iso/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Control_Category = require("../Control.Category/index.js");
- var Data_Boolean = require("../Data.Boolean/index.js");
- var Data_Eq = require("../Data.Eq/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Lens_Internal_Exchange = require("../Data.Lens.Internal.Exchange/index.js");
- var Data_Lens_Internal_Re = require("../Data.Lens.Internal.Re/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Profunctor = require("../Data.Profunctor/index.js");
- var Data_Tuple = require("../Data.Tuple/index.js");
- var withIso = function withIso(l) {
- return function (f) {
- var v = l(new Data_Lens_Internal_Exchange.Exchange(Control_Category.identity(Control_Category.categoryFn), Control_Category.identity(Control_Category.categoryFn)));
- return f(v.value0)(v.value1);
- };
- };
- var under = function under(l) {
- return withIso(l)(function (sa) {
- return function (bt) {
- return function (ts) {
- return function ($19) {
- return sa(ts(bt($19)));
- };
- };
- };
- });
- };
- var re = function re(t) {
- return Data_Newtype.unwrap(Data_Lens_Internal_Re.newtypeRe)(t(Control_Category.identity(Control_Category.categoryFn)));
- };
- var iso = function iso(f) {
- return function (g) {
- return function (dictProfunctor) {
- return function (pab) {
- return Data_Profunctor.dimap(dictProfunctor)(f)(g)(pab);
- };
- };
- };
- };
- var mapping = function mapping(dictFunctor) {
- return function (dictFunctor1) {
- return function (l) {
- return function (dictProfunctor) {
- return withIso(l)(function (sa) {
- return function (bt) {
- return iso(Data_Functor.map(dictFunctor)(sa))(Data_Functor.map(dictFunctor1)(bt))(dictProfunctor);
- };
- });
- };
- };
- };
- };
- var non = function non(dictEq) {
- return function (def) {
- return function (dictProfunctor) {
- var g = function g(a) {
- if (Data_Eq.eq(dictEq)(a)(def)) {
- return Data_Maybe.Nothing.value;
- }
- ;
- if (Data_Boolean.otherwise) {
- return new Data_Maybe.Just(a);
- }
- ;
- throw new Error("Failed pattern match at Data.Lens.Iso (line 45, column 9 - line 46, column 33): " + [a.constructor.name]);
- };
- return iso(Data_Maybe.fromMaybe(def))(g)(dictProfunctor);
- };
- };
- };
- var uncurried = function uncurried(dictProfunctor) {
- return iso(Data_Tuple.uncurry)(Data_Tuple.curry)(dictProfunctor);
- };
- var flipped = function flipped(dictProfunctor) {
- return iso(Data_Function.flip)(Data_Function.flip)(dictProfunctor);
- };
- var dimapping = function dimapping(dictProfunctor) {
- return function (dictProfunctor1) {
- return function (f) {
- return function (g) {
- return function (dictProfunctor2) {
- return withIso(f)(function (sa) {
- return function (bt) {
- return withIso(g)(function (ssaa) {
- return function (bbtt) {
- return iso(Data_Profunctor.dimap(dictProfunctor)(sa)(ssaa))(Data_Profunctor.dimap(dictProfunctor1)(bt)(bbtt))(dictProfunctor2);
- };
- });
- };
- });
- };
- };
- };
- };
- };
- var curried = function curried(dictProfunctor) {
- return iso(Data_Tuple.curry)(Data_Tuple.uncurry)(dictProfunctor);
- };
- var cloneIso = function cloneIso(l) {
- return function (dictProfunctor) {
- return withIso(l)(function (x) {
- return function (y) {
- return function (p) {
- return iso(x)(y)(dictProfunctor)(p);
- };
- };
- });
- };
- };
- var auf = function auf(dictProfunctor) {
- return function (l) {
- return withIso(l)(function (sa) {
- return function (bt) {
- return function (f) {
- return function (g) {
- return function (e) {
- return bt(f(Data_Profunctor.rmap(dictProfunctor)(sa)(g))(e));
- };
- };
- };
- };
- });
- };
- };
- var au = function au(l) {
- return withIso(l)(function (sa) {
- return function (bt) {
- return function (f) {
- return function (e) {
- return sa(f(bt)(e));
- };
- };
- };
- });
- };
- module.exports = {
- iso: iso,
- withIso: withIso,
- cloneIso: cloneIso,
- re: re,
- au: au,
- auf: auf,
- under: under,
- non: non,
- curried: curried,
- uncurried: uncurried,
- flipped: flipped,
- mapping: mapping,
- dimapping: dimapping
- };
- },{"../Control.Category/index.js":"../output/Control.Category/index.js","../Data.Boolean/index.js":"../output/Data.Boolean/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Lens.Internal.Exchange/index.js":"../output/Data.Lens.Internal.Exchange/index.js","../Data.Lens.Internal.Re/index.js":"../output/Data.Lens.Internal.Re/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Profunctor/index.js":"../output/Data.Profunctor/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js"}],"../output/Data.Lens.Iso.Newtype/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Data_Lens_Iso = require("../Data.Lens.Iso/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var _Newtype = function _Newtype(dictNewtype) {
- return function (dictNewtype1) {
- return function (dictProfunctor) {
- return Data_Lens_Iso.iso(Data_Newtype.unwrap(dictNewtype))(Data_Newtype.wrap(dictNewtype1))(dictProfunctor);
- };
- };
- };
- module.exports = {
- "_Newtype": _Newtype
- };
- },{"../Data.Lens.Iso/index.js":"../output/Data.Lens.Iso/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js"}],"../output/Data.Lens.Record/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Data_Function = require("../Data.Function/index.js");
- var Data_Lens_Lens = require("../Data.Lens.Lens/index.js");
- var Record = require("../Record/index.js");
- var prop = function prop(dictIsSymbol) {
- return function (dictCons) {
- return function (dictCons1) {
- return function (l) {
- return function (dictStrong) {
- return Data_Lens_Lens.lens(Record.get(dictIsSymbol)()(l))(Data_Function.flip(Record.set(dictIsSymbol)()()(l)))(dictStrong);
- };
- };
- };
- };
- };
- module.exports = {
- prop: prop
- };
- },{"../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Lens.Lens/index.js":"../output/Data.Lens.Lens/index.js","../Record/index.js":"../output/Record/index.js"}],"../output/PureTabs.Model/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Browser_Tabs = require("../Browser.Tabs/index.js");
- var Data_Functor = require("../Data.Functor/index.js");
- var Data_Generic_Rep = require("../Data.Generic.Rep/index.js");
- var Data_Generic_Rep_Show = require("../Data.Generic.Rep.Show/index.js");
- var Data_Lens_At = require("../Data.Lens.At/index.js");
- var Data_Lens_Getter = require("../Data.Lens.Getter/index.js");
- var Data_Lens_Internal_Forget = require("../Data.Lens.Internal.Forget/index.js");
- var Data_Lens_Iso_Newtype = require("../Data.Lens.Iso.Newtype/index.js");
- var Data_Lens_Prism_Maybe = require("../Data.Lens.Prism.Maybe/index.js");
- var Data_Lens_Record = require("../Data.Lens.Record/index.js");
- var Data_List = require("../Data.List/index.js");
- var Data_List_Types = require("../Data.List.Types/index.js");
- var Data_Map_Internal = require("../Data.Map.Internal/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Data_Symbol = require("../Data.Symbol/index.js");
- var Data_Tuple = require("../Data.Tuple/index.js");
- var SbTabDeleted = function () {
- function SbTabDeleted(value0) {
- this.value0 = value0;
- }
- ;
- SbTabDeleted.create = function (value0) {
- return new SbTabDeleted(value0);
- };
- return SbTabDeleted;
- }();
- var SbTabCreated = function () {
- function SbTabCreated() {}
- ;
- SbTabCreated.value = new SbTabCreated();
- return SbTabCreated;
- }();
- var SbTabMoved = function () {
- function SbTabMoved() {}
- ;
- SbTabMoved.value = new SbTabMoved();
- return SbTabMoved;
- }();
- var SbTabDetached = function () {
- function SbTabDetached() {}
- ;
- SbTabDetached.value = new SbTabDetached();
- return SbTabDetached;
- }();
- var SbGroupCreated = function () {
- function SbGroupCreated() {}
- ;
- SbGroupCreated.value = new SbGroupCreated();
- return SbGroupCreated;
- }();
- var SbGroupDeleted = function () {
- function SbGroupDeleted() {}
- ;
- SbGroupDeleted.value = new SbGroupDeleted();
- return SbGroupDeleted;
- }();
- var SbGroupRenamed = function () {
- function SbGroupRenamed() {}
- ;
- SbGroupRenamed.value = new SbGroupRenamed();
- return SbGroupRenamed;
- }();
- var SbHasWindowId = function () {
- function SbHasWindowId(value0) {
- this.value0 = value0;
- }
- ;
- SbHasWindowId.create = function (value0) {
- return new SbHasWindowId(value0);
- };
- return SbHasWindowId;
- }();
- var BgInitialTabList = function () {
- function BgInitialTabList(value0) {
- this.value0 = value0;
- }
- ;
- BgInitialTabList.create = function (value0) {
- return new BgInitialTabList(value0);
- };
- return BgInitialTabList;
- }();
- var BgTabCreated = function () {
- function BgTabCreated(value0) {
- this.value0 = value0;
- }
- ;
- BgTabCreated.create = function (value0) {
- return new BgTabCreated(value0);
- };
- return BgTabCreated;
- }();
- var BgTabDeleted = function () {
- function BgTabDeleted(value0) {
- this.value0 = value0;
- }
- ;
- BgTabDeleted.create = function (value0) {
- return new BgTabDeleted(value0);
- };
- return BgTabDeleted;
- }();
- var BgTabMoved = function () {
- function BgTabMoved() {}
- ;
- BgTabMoved.value = new BgTabMoved();
- return BgTabMoved;
- }();
- var BgTabActived = function () {
- function BgTabActived(value0) {
- this.value0 = value0;
- }
- ;
- BgTabActived.create = function (value0) {
- return new BgTabActived(value0);
- };
- return BgTabActived;
- }();
- var BgTabAttached = function () {
- function BgTabAttached(value0) {
- this.value0 = value0;
- }
- ;
- BgTabAttached.create = function (value0) {
- return new BgTabAttached(value0);
- };
- return BgTabAttached;
- }();
- var BgTabDetached = function () {
- function BgTabDetached(value0) {
- this.value0 = value0;
- }
- ;
- BgTabDetached.create = function (value0) {
- return new BgTabDetached(value0);
- };
- return BgTabDetached;
- }();
- var BgTabHighlighted = function () {
- function BgTabHighlighted() {}
- ;
- BgTabHighlighted.value = new BgTabHighlighted();
- return BgTabHighlighted;
- }();
- var BgTabReplaced = function () {
- function BgTabReplaced() {}
- ;
- BgTabReplaced.value = new BgTabReplaced();
- return BgTabReplaced;
- }();
- var BgTabZoomChanged = function () {
- function BgTabZoomChanged() {}
- ;
- BgTabZoomChanged.value = new BgTabZoomChanged();
- return BgTabZoomChanged;
- }();
- var initialGlobalState = {
- windows: Data_Map_Internal.empty
- };
- var genSidebarEvent = new Data_Generic_Rep.Generic(function (x) {
- if (x instanceof SbTabDeleted) {
- return new Data_Generic_Rep.Inl(x.value0);
- }
- ;
- if (x instanceof SbTabCreated) {
- return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(Data_Generic_Rep.NoArguments.value));
- }
- ;
- if (x instanceof SbTabMoved) {
- return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(Data_Generic_Rep.NoArguments.value)));
- }
- ;
- if (x instanceof SbTabDetached) {
- return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(Data_Generic_Rep.NoArguments.value))));
- }
- ;
- if (x instanceof SbGroupCreated) {
- return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(Data_Generic_Rep.NoArguments.value)))));
- }
- ;
- if (x instanceof SbGroupDeleted) {
- return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(Data_Generic_Rep.NoArguments.value))))));
- }
- ;
- if (x instanceof SbGroupRenamed) {
- return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(Data_Generic_Rep.NoArguments.value)))))));
- }
- ;
- if (x instanceof SbHasWindowId) {
- return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(x.value0)))))));
- }
- ;
- throw new Error("Failed pattern match at PureTabs.Model (line 141, column 1 - line 141, column 58): " + [x.constructor.name]);
- }, function (x) {
- if (x instanceof Data_Generic_Rep.Inl) {
- return new SbTabDeleted(x.value0);
- }
- ;
- if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inl) {
- return SbTabCreated.value;
- }
- ;
- if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0 instanceof Data_Generic_Rep.Inl) {
- return SbTabMoved.value;
- }
- ;
- if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0 instanceof Data_Generic_Rep.Inl) {
- return SbTabDetached.value;
- }
- ;
- if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inl) {
- return SbGroupCreated.value;
- }
- ;
- if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inl) {
- return SbGroupDeleted.value;
- }
- ;
- if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inl) {
- return SbGroupRenamed.value;
- }
- ;
- if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr) {
- return new SbHasWindowId(x.value0.value0.value0.value0.value0.value0.value0);
- }
- ;
- throw new Error("Failed pattern match at PureTabs.Model (line 141, column 1 - line 141, column 58): " + [x.constructor.name]);
- });
- var showSidebarEvent = new Data_Show.Show(Data_Generic_Rep_Show.genericShow(genSidebarEvent)(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsArgument(Browser_Tabs.showTabId))(new Data_Symbol.IsSymbol(function () {
- return "SbTabDeleted";
- })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsNoArguments)(new Data_Symbol.IsSymbol(function () {
- return "SbTabCreated";
- })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsNoArguments)(new Data_Symbol.IsSymbol(function () {
- return "SbTabMoved";
- })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsNoArguments)(new Data_Symbol.IsSymbol(function () {
- return "SbTabDetached";
- })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsNoArguments)(new Data_Symbol.IsSymbol(function () {
- return "SbGroupCreated";
- })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsNoArguments)(new Data_Symbol.IsSymbol(function () {
- return "SbGroupDeleted";
- })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsNoArguments)(new Data_Symbol.IsSymbol(function () {
- return "SbGroupRenamed";
- })))(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsArgument(Browser_Tabs.showWindowId))(new Data_Symbol.IsSymbol(function () {
- return "SbHasWindowId";
- })))))))))));
- var genBackgroundEvent = new Data_Generic_Rep.Generic(function (x) {
- if (x instanceof BgInitialTabList) {
- return new Data_Generic_Rep.Inl(x.value0);
- }
- ;
- if (x instanceof BgTabCreated) {
- return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(x.value0));
- }
- ;
- if (x instanceof BgTabDeleted) {
- return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(x.value0)));
- }
- ;
- if (x instanceof BgTabMoved) {
- return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(Data_Generic_Rep.NoArguments.value))));
- }
- ;
- if (x instanceof BgTabActived) {
- return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(x.value0)))));
- }
- ;
- if (x instanceof BgTabAttached) {
- return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(x.value0))))));
- }
- ;
- if (x instanceof BgTabDetached) {
- return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(x.value0)))))));
- }
- ;
- if (x instanceof BgTabHighlighted) {
- return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(Data_Generic_Rep.NoArguments.value))))))));
- }
- ;
- if (x instanceof BgTabReplaced) {
- return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(Data_Generic_Rep.NoArguments.value)))))))));
- }
- ;
- if (x instanceof BgTabZoomChanged) {
- return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(Data_Generic_Rep.NoArguments.value)))))))));
- }
- ;
- throw new Error("Failed pattern match at PureTabs.Model (line 126, column 1 - line 126, column 64): " + [x.constructor.name]);
- }, function (x) {
- if (x instanceof Data_Generic_Rep.Inl) {
- return new BgInitialTabList(x.value0);
- }
- ;
- if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inl) {
- return new BgTabCreated(x.value0.value0);
- }
- ;
- if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0 instanceof Data_Generic_Rep.Inl) {
- return new BgTabDeleted(x.value0.value0.value0);
- }
- ;
- if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0 instanceof Data_Generic_Rep.Inl) {
- return BgTabMoved.value;
- }
- ;
- if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inl) {
- return new BgTabActived(x.value0.value0.value0.value0.value0);
- }
- ;
- if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inl) {
- return new BgTabAttached(x.value0.value0.value0.value0.value0.value0);
- }
- ;
- if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inl) {
- return new BgTabDetached(x.value0.value0.value0.value0.value0.value0.value0);
- }
- ;
- if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inl) {
- return BgTabHighlighted.value;
- }
- ;
- if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inl) {
- return BgTabReplaced.value;
- }
- ;
- if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0.value0.value0.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr) {
- return BgTabZoomChanged.value;
- }
- ;
- throw new Error("Failed pattern match at PureTabs.Model (line 126, column 1 - line 126, column 64): " + [x.constructor.name]);
- });
- var showBackgroundEvent = new Data_Show.Show(Data_Generic_Rep_Show.genericShow(genBackgroundEvent)(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsArgument(Data_Show.showArray(Browser_Tabs.showTab)))(new Data_Symbol.IsSymbol(function () {
- return "BgInitialTabList";
- })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsArgument(Browser_Tabs.showTab))(new Data_Symbol.IsSymbol(function () {
- return "BgTabCreated";
- })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsArgument(Browser_Tabs.showTabId))(new Data_Symbol.IsSymbol(function () {
- return "BgTabDeleted";
- })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsNoArguments)(new Data_Symbol.IsSymbol(function () {
- return "BgTabMoved";
- })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsArgument(Browser_Tabs.showTabId))(new Data_Symbol.IsSymbol(function () {
- return "BgTabActived";
- })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsArgument(Browser_Tabs.showTab))(new Data_Symbol.IsSymbol(function () {
- return "BgTabAttached";
- })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsArgument(Browser_Tabs.showTabId))(new Data_Symbol.IsSymbol(function () {
- return "BgTabDetached";
- })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsNoArguments)(new Data_Symbol.IsSymbol(function () {
- return "BgTabHighlighted";
- })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsNoArguments)(new Data_Symbol.IsSymbol(function () {
- return "BgTabReplaced";
- })))(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsNoArguments)(new Data_Symbol.IsSymbol(function () {
- return "BgTabZoomChanged";
- })))))))))))));
- var _windows = function _windows(dictStrong) {
- return Data_Lens_Record.prop(new Data_Symbol.IsSymbol(function () {
- return "windows";
- }))()()(Data_Symbol.SProxy.value)(dictStrong);
- };
- var _windowId = function _windowId(dictStrong) {
- return Data_Lens_Record.prop(new Data_Symbol.IsSymbol(function () {
- return "windowId";
- }))()()(Data_Symbol.SProxy.value)(dictStrong);
- };
- var _title = function _title(dictStrong) {
- return Data_Lens_Record.prop(new Data_Symbol.IsSymbol(function () {
- return "title";
- }))()()(Data_Symbol.SProxy.value)(dictStrong);
- };
- var _tabs = function _tabs(dictStrong) {
- return Data_Lens_Record.prop(new Data_Symbol.IsSymbol(function () {
- return "tabs";
- }))()()(Data_Symbol.SProxy.value)(dictStrong);
- };
- var _tabWindowId = function _tabWindowId(dictStrong) {
- var $122 = Data_Lens_Iso_Newtype["_Newtype"](Browser_Tabs.newtypeTab)(Browser_Tabs.newtypeTab)(dictStrong.Profunctor0());
- var $123 = _windowId(dictStrong);
- return function ($124) {
- return $122($123($124));
- };
- };
- var _tabTitle = function _tabTitle(dictStrong) {
- var $125 = Data_Lens_Iso_Newtype["_Newtype"](Browser_Tabs.newtypeTab)(Browser_Tabs.newtypeTab)(dictStrong.Profunctor0());
- var $126 = _title(dictStrong);
- return function ($127) {
- return $125($126($127));
- };
- };
- var _tabFromWindow = function _tabFromWindow(tab$prime) {
- return function (dictWander) {
- var tab = Data_Newtype.unwrap(Browser_Tabs.newtypeTab)(tab$prime);
- var $128 = _windows(dictWander.Strong0());
- var $129 = Data_Lens_At.at(Data_Lens_At.atMap(Browser_Tabs.ordWindowId))(tab.windowId)(dictWander.Strong0());
- var $130 = Data_Lens_Prism_Maybe["_Just"](dictWander.Choice1());
- var $131 = _tabs(dictWander.Strong0());
- var $132 = Data_Lens_At.at(Data_Lens_At.atMap(Browser_Tabs.ordTabId))(tab.id)(dictWander.Strong0());
- return function ($133) {
- return $128($129($130($131($132($133)))));
- };
- };
- };
- var _tabFromTabIdAndWindow = function _tabFromTabIdAndWindow(s) {
- return function (tabId) {
- var allWindows = Data_Map_Internal.values(s.windows);
- var allTabs = Data_Functor.map(Data_List_Types.functorList)(Data_Lens_Getter.view(_tabs(Data_Lens_Internal_Forget.strongForget)))(allWindows);
- var matchingTabId = Data_Functor.map(Data_List_Types.functorList)(Data_Map_Internal.lookup(Browser_Tabs.ordTabId)(tabId))(allTabs);
- return Data_List.catMaybes(matchingTabId);
- };
- };
- var _port = function _port(dictStrong) {
- return Data_Lens_Record.prop(new Data_Symbol.IsSymbol(function () {
- return "port";
- }))()()(Data_Symbol.SProxy.value)(dictStrong);
- };
- var _portFromWindow = function _portFromWindow(tab$prime) {
- return function (dictWander) {
- var tab = Data_Newtype.unwrap(Browser_Tabs.newtypeTab)(tab$prime);
- var $134 = _windows(dictWander.Strong0());
- var $135 = Data_Lens_At.at(Data_Lens_At.atMap(Browser_Tabs.ordWindowId))(tab.windowId)(dictWander.Strong0());
- var $136 = Data_Lens_Prism_Maybe["_Just"](dictWander.Choice1());
- var $137 = _port(dictWander.Strong0());
- var $138 = Data_Lens_Prism_Maybe["_Just"](dictWander.Choice1());
- return function ($139) {
- return $134($135($136($137($138($139)))));
- };
- };
- };
- var _id = function _id(dictStrong) {
- return Data_Lens_Record.prop(new Data_Symbol.IsSymbol(function () {
- return "id";
- }))()()(Data_Symbol.SProxy.value)(dictStrong);
- };
- var _tabId = function _tabId(dictStrong) {
- var $140 = Data_Lens_Iso_Newtype["_Newtype"](Browser_Tabs.newtypeTab)(Browser_Tabs.newtypeTab)(dictStrong.Profunctor0());
- var $141 = _id(dictStrong);
- return function ($142) {
- return $140($141($142));
- };
- };
- var tabsToGlobalState = function tabsToGlobalState(tabs) {
- var tabsToWindows = function tabsToWindows(tabs$prime) {
- return Data_Map_Internal.fromFoldableWith(Browser_Tabs.ordWindowId)(Data_List_Types.foldableList)(function (v1) {
- return function (v2) {
- return {
- tabs: Data_Map_Internal.union(Browser_Tabs.ordTabId)(v1.tabs)(v2.tabs),
- port: Data_Maybe.Nothing.value
- };
- };
- })(Data_Functor.map(Data_List_Types.functorList)(function (t) {
- return new Data_Tuple.Tuple(Data_Lens_Getter.view(_tabWindowId(Data_Lens_Internal_Forget.strongForget))(t), {
- tabs: Data_Map_Internal.singleton(Data_Lens_Getter.view(_tabId(Data_Lens_Internal_Forget.strongForget))(t))(t),
- port: Data_Maybe.Nothing.value
- });
- })(tabs$prime));
- };
- return {
- windows: tabsToWindows(tabs)
- };
- };
- module.exports = {
- "_tabs": _tabs,
- "_port": _port,
- "_windows": _windows,
- "_portFromWindow": _portFromWindow,
- "_tabFromWindow": _tabFromWindow,
- "_tabWindowId": _tabWindowId,
- "_tabId": _tabId,
- "_tabFromTabIdAndWindow": _tabFromTabIdAndWindow,
- initialGlobalState: initialGlobalState,
- tabsToGlobalState: tabsToGlobalState,
- BgInitialTabList: BgInitialTabList,
- BgTabCreated: BgTabCreated,
- BgTabDeleted: BgTabDeleted,
- BgTabMoved: BgTabMoved,
- BgTabActived: BgTabActived,
- BgTabAttached: BgTabAttached,
- BgTabDetached: BgTabDetached,
- BgTabHighlighted: BgTabHighlighted,
- BgTabReplaced: BgTabReplaced,
- BgTabZoomChanged: BgTabZoomChanged,
- SbTabDeleted: SbTabDeleted,
- SbTabCreated: SbTabCreated,
- SbTabMoved: SbTabMoved,
- SbTabDetached: SbTabDetached,
- SbGroupCreated: SbGroupCreated,
- SbGroupDeleted: SbGroupDeleted,
- SbGroupRenamed: SbGroupRenamed,
- SbHasWindowId: SbHasWindowId,
- genBackgroundEvent: genBackgroundEvent,
- showBackgroundEvent: showBackgroundEvent,
- genSidebarEvent: genSidebarEvent,
- showSidebarEvent: showSidebarEvent
- };
- },{"../Browser.Tabs/index.js":"../output/Browser.Tabs/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Generic.Rep/index.js":"../output/Data.Generic.Rep/index.js","../Data.Generic.Rep.Show/index.js":"../output/Data.Generic.Rep.Show/index.js","../Data.Lens.At/index.js":"../output/Data.Lens.At/index.js","../Data.Lens.Getter/index.js":"../output/Data.Lens.Getter/index.js","../Data.Lens.Internal.Forget/index.js":"../output/Data.Lens.Internal.Forget/index.js","../Data.Lens.Iso.Newtype/index.js":"../output/Data.Lens.Iso.Newtype/index.js","../Data.Lens.Prism.Maybe/index.js":"../output/Data.Lens.Prism.Maybe/index.js","../Data.Lens.Record/index.js":"../output/Data.Lens.Record/index.js","../Data.List/index.js":"../output/Data.List/index.js","../Data.List.Types/index.js":"../output/Data.List.Types/index.js","../Data.Map.Internal/index.js":"../output/Data.Map.Internal/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Symbol/index.js":"../output/Data.Symbol/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js"}],"../output/PureTabs.Background/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var Browser_Runtime = require("../Browser.Runtime/index.js");
- var Browser_Tabs = require("../Browser.Tabs/index.js");
- var Browser_Tabs_OnCreated = require("../Browser.Tabs.OnCreated/index.js");
- var Browser_Tabs_OnRemoved = require("../Browser.Tabs.OnRemoved/index.js");
- var Browser_Utils = require("../Browser.Utils/index.js");
- var Control_Applicative = require("../Control.Applicative/index.js");
- var Control_Apply = require("../Control.Apply/index.js");
- var Control_Bind = require("../Control.Bind/index.js");
- var Data_Array = require("../Data.Array/index.js");
- var Data_Foldable = require("../Data.Foldable/index.js");
- var Data_Function = require("../Data.Function/index.js");
- var Data_Lens_At = require("../Data.Lens.At/index.js");
- var Data_Lens_Fold = require("../Data.Lens.Fold/index.js");
- var Data_Lens_Internal_Forget = require("../Data.Lens.Internal.Forget/index.js");
- var Data_Lens_Internal_Wander = require("../Data.Lens.Internal.Wander/index.js");
- var Data_Lens_Prism_Maybe = require("../Data.Lens.Prism.Maybe/index.js");
- var Data_Lens_Setter = require("../Data.Lens.Setter/index.js");
- var Data_List_Types = require("../Data.List.Types/index.js");
- var Data_Map_Internal = require("../Data.Map.Internal/index.js");
- var Data_Maybe = require("../Data.Maybe/index.js");
- var Data_Maybe_First = require("../Data.Maybe.First/index.js");
- var Data_Monoid = require("../Data.Monoid/index.js");
- var Data_Newtype = require("../Data.Newtype/index.js");
- var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js");
- var Data_Profunctor_Strong = require("../Data.Profunctor.Strong/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Data_Symbol = require("../Data.Symbol/index.js");
- var Data_Unit = require("../Data.Unit/index.js");
- var Effect = require("../Effect/index.js");
- var Effect_Aff = require("../Effect.Aff/index.js");
- var Effect_Class = require("../Effect.Class/index.js");
- var Effect_Console = require("../Effect.Console/index.js");
- var Effect_Ref = require("../Effect.Ref/index.js");
- var Foreign_Generic_Class = require("../Foreign.Generic.Class/index.js");
- var PureTabs_Model = require("../PureTabs.Model/index.js");
- var onTabDeleted = function onTabDeleted(stateRef) {
- return function (tabId) {
- return function (info) {
- return function __do() {
- var state = Effect_Ref.read(stateRef)();
- var allTabs = PureTabs_Model["_tabFromTabIdAndWindow"](state)(tabId);
- var newState = Data_Foldable.foldr(Data_List_Types.foldableList)(function (t) {
- return Data_Lens_Setter.set(PureTabs_Model["_tabFromWindow"](t)(Data_Lens_Internal_Wander.wanderFunction))(Data_Maybe.Nothing.value);
- })(state)(allTabs);
- Effect_Ref.write(newState)(stateRef)();
- return Data_Foldable.for_(Effect.applicativeEffect)(Data_List_Types.foldableList)(allTabs)(function (t) {
- var port = Data_Lens_Fold.preview(PureTabs_Model["_portFromWindow"](t)(Data_Lens_Internal_Forget.wanderForget(Data_Maybe_First.monoidFirst)))(state);
- return Data_Maybe.maybe(Control_Applicative.pure(Effect.applicativeEffect)(Data_Unit.unit))(Data_Function.flip(Browser_Runtime.postMessageJson(PureTabs_Model.genBackgroundEvent)(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "BgInitialTabList";
- }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.arrayEncode(Browser_Tabs.encodeTab)))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "BgTabCreated";
- }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTab))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "BgTabDeleted";
- }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTabId))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "BgTabMoved";
- }))(Foreign_Generic_Class.genericEncodeArgsNoArguments))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "BgTabActived";
- }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTabId))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "BgTabAttached";
- }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTab))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "BgTabDetached";
- }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTabId))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "BgTabHighlighted";
- }))(Foreign_Generic_Class.genericEncodeArgsNoArguments))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "BgTabReplaced";
- }))(Foreign_Generic_Class.genericEncodeArgsNoArguments))(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "BgTabZoomChanged";
- }))(Foreign_Generic_Class.genericEncodeArgsNoArguments))))))))))))(new PureTabs_Model.BgTabDeleted(tabId)))(port);
- })();
- };
- };
- };
- };
- var onTabCreated = function onTabCreated(stateRef) {
- return function (tab$prime) {
- var tab = Data_Newtype.unwrap(Browser_Tabs.newtypeTab)(tab$prime);
- return function __do() {
- var state = Effect_Ref.modify(Data_Lens_Setter.set(PureTabs_Model["_tabFromWindow"](tab$prime)(Data_Lens_Internal_Wander.wanderFunction))(new Data_Maybe.Just(tab$prime)))(stateRef)();
- Effect_Console.log("tabId: " + (Data_Show.show(Browser_Tabs.showTabId)(tab.id) + (" windowId " + Data_Show.show(Browser_Tabs.showWindowId)(tab.windowId))))();
- var v = Data_Lens_Fold.preview(PureTabs_Model["_portFromWindow"](tab$prime)(Data_Lens_Internal_Forget.wanderForget(Data_Maybe_First.monoidFirst)))(state);
- if (v instanceof Data_Maybe.Nothing) {
- return Data_Unit.unit;
- }
- ;
- if (v instanceof Data_Maybe.Just) {
- Browser_Runtime.postMessageJson(PureTabs_Model.genBackgroundEvent)(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "BgInitialTabList";
- }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.arrayEncode(Browser_Tabs.encodeTab)))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "BgTabCreated";
- }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTab))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "BgTabDeleted";
- }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTabId))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "BgTabMoved";
- }))(Foreign_Generic_Class.genericEncodeArgsNoArguments))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "BgTabActived";
- }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTabId))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "BgTabAttached";
- }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTab))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "BgTabDetached";
- }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTabId))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "BgTabHighlighted";
- }))(Foreign_Generic_Class.genericEncodeArgsNoArguments))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "BgTabReplaced";
- }))(Foreign_Generic_Class.genericEncodeArgsNoArguments))(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "BgTabZoomChanged";
- }))(Foreign_Generic_Class.genericEncodeArgsNoArguments)))))))))))(v.value0)(new PureTabs_Model.BgTabCreated(tab$prime))();
- return Effect_Console.log("tab " + (Data_Show.show(Browser_Tabs.showTabId)(tab.id) + (" created: " + tab.title)))();
- }
- ;
- throw new Error("Failed pattern match at PureTabs.Background (line 63, column 3 - line 67, column 65): " + [v.constructor.name]);
- };
- };
- };
- var onDisconnect = function onDisconnect(stateRef) {
- return function (winId) {
- return function (listener) {
- return Effect_Ref.modify_(Data_Lens_Setter.set(function () {
- var $8 = PureTabs_Model["_windows"](Data_Profunctor_Strong.strongFn);
- var $9 = Data_Lens_At.at(Data_Lens_At.atMap(Browser_Tabs.ordWindowId))(winId)(Data_Profunctor_Strong.strongFn);
- var $10 = Data_Lens_Prism_Maybe["_Just"](Data_Profunctor_Choice.choiceFn);
- var $11 = PureTabs_Model["_port"](Data_Profunctor_Strong.strongFn);
- return function ($12) {
- return $8($9($10($11($12))));
- };
- }())(Data_Maybe.Nothing.value))(stateRef);
- };
- };
- };
- var manageSidebar = function manageSidebar(stateRef) {
- return function (port) {
- return function (msg) {
- return Control_Applicative.pure(Effect.applicativeEffect)(Data_Unit.unit);
- };
- };
- };
- var initWindowState = function initWindowState(port) {
- return function (ref) {
- return function (winId) {
- return Data_Function.flip(Effect_Ref.modify)(ref)(Data_Lens_Setter.over(function () {
- var $13 = PureTabs_Model["_windows"](Data_Profunctor_Strong.strongFn);
- var $14 = Data_Lens_At.at(Data_Lens_At.atMap(Browser_Tabs.ordWindowId))(winId)(Data_Profunctor_Strong.strongFn);
- return function ($15) {
- return $13($14($15));
- };
- }())(function (v) {
- if (v instanceof Data_Maybe.Nothing) {
- return Data_Maybe.Just.create({
- tabs: Data_Map_Internal.empty,
- port: new Data_Maybe.Just(port)
- });
- }
- ;
- if (v instanceof Data_Maybe.Just) {
- return Data_Maybe.Just.create(Data_Lens_Setter.set(PureTabs_Model["_port"](Data_Profunctor_Strong.strongFn))(new Data_Maybe.Just(port))(v.value0));
- }
- ;
- throw new Error("Failed pattern match at PureTabs.Background (line 131, column 11 - line 133, column 57): " + [v.constructor.name]);
- }));
- };
- };
- };
- var onNewWindowId = function onNewWindowId(port) {
- return function (stateRef) {
- return function (listenerRef) {
- return function (winId) {
- return function __do() {
- var r = initWindowState(port)(stateRef)(winId)();
- var ogListener = Effect_Ref.read(listenerRef)();
- Data_Foldable.foldMap(Data_Foldable.foldableMaybe)(Effect.monoidEffect(Data_Monoid.monoidUnit))(function (l) {
- return Browser_Runtime.onMessageRemoveListener(port)(l);
- })(ogListener)();
- Effect_Ref.write(Data_Maybe.Nothing.value)(listenerRef)();
- Data_Maybe.maybe(Control_Applicative.pure(Effect.applicativeEffect)(Data_Unit.unit))(function (w) {
- return Browser_Runtime.postMessageJson(PureTabs_Model.genBackgroundEvent)(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "BgInitialTabList";
- }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.arrayEncode(Browser_Tabs.encodeTab)))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "BgTabCreated";
- }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTab))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "BgTabDeleted";
- }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTabId))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "BgTabMoved";
- }))(Foreign_Generic_Class.genericEncodeArgsNoArguments))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "BgTabActived";
- }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTabId))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "BgTabAttached";
- }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTab))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "BgTabDetached";
- }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTabId))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "BgTabHighlighted";
- }))(Foreign_Generic_Class.genericEncodeArgsNoArguments))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "BgTabReplaced";
- }))(Foreign_Generic_Class.genericEncodeArgsNoArguments))(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "BgTabZoomChanged";
- }))(Foreign_Generic_Class.genericEncodeArgsNoArguments)))))))))))(port)(PureTabs_Model.BgInitialTabList.create(Data_Array.fromFoldable(Data_List_Types.foldableList)(Data_Map_Internal.values(w.tabs))));
- })(Data_Map_Internal.lookup(Browser_Tabs.ordWindowId)(winId)(r.windows))();
- var sidebarListener = Browser_Runtime.onMessageJsonAddListener(PureTabs_Model.genSidebarEvent)(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "SbTabDeleted";
- }))(Foreign_Generic_Class.genericDecodeArgsArgument(Foreign_Generic_Class.decodeWithOptionsOther(Browser_Tabs.decodeTabId)))(Foreign_Generic_Class.genericCountArgsArgument))(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "SbTabCreated";
- }))(Foreign_Generic_Class.genericDecodeArgsNoArguments)(Foreign_Generic_Class.genericCountArgsNoArguments))(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "SbTabMoved";
- }))(Foreign_Generic_Class.genericDecodeArgsNoArguments)(Foreign_Generic_Class.genericCountArgsNoArguments))(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "SbTabDetached";
- }))(Foreign_Generic_Class.genericDecodeArgsNoArguments)(Foreign_Generic_Class.genericCountArgsNoArguments))(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "SbGroupCreated";
- }))(Foreign_Generic_Class.genericDecodeArgsNoArguments)(Foreign_Generic_Class.genericCountArgsNoArguments))(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "SbGroupDeleted";
- }))(Foreign_Generic_Class.genericDecodeArgsNoArguments)(Foreign_Generic_Class.genericCountArgsNoArguments))(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "SbGroupRenamed";
- }))(Foreign_Generic_Class.genericDecodeArgsNoArguments)(Foreign_Generic_Class.genericCountArgsNoArguments))(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "SbHasWindowId";
- }))(Foreign_Generic_Class.genericDecodeArgsArgument(Foreign_Generic_Class.decodeWithOptionsOther(Browser_Tabs.decodeWindowId)))(Foreign_Generic_Class.genericCountArgsArgument)))))))))(port)(manageSidebar(stateRef)(port))();
- var onDisconnectListener = Browser_Utils.mkListenerUnit(onDisconnect(stateRef)(winId)(sidebarListener))();
- return Browser_Runtime.portOnDisconnect(port)(onDisconnectListener)();
- };
- };
- };
- };
- };
- var onConnect = function onConnect(stateRef$prime) {
- return function (port) {
- var windowListener = function windowListener(callback) {
- return function (msg) {
- if (msg instanceof PureTabs_Model.SbHasWindowId) {
- return Control_Apply.applySecond(Effect.applyEffect)(Effect_Console.log("bg: created winId " + Data_Show.show(Browser_Tabs.showWindowId)(msg.value0)))(callback(msg.value0));
- }
- ;
- return Control_Applicative.pure(Effect.applicativeEffect)(Data_Unit.unit);
- };
- };
- return function __do() {
- var listenerRef = Effect_Ref["new"](Data_Maybe.Nothing.value)();
- var initialListener = Browser_Runtime.onMessageJsonAddListener(PureTabs_Model.genSidebarEvent)(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "SbTabDeleted";
- }))(Foreign_Generic_Class.genericDecodeArgsArgument(Foreign_Generic_Class.decodeWithOptionsOther(Browser_Tabs.decodeTabId)))(Foreign_Generic_Class.genericCountArgsArgument))(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "SbTabCreated";
- }))(Foreign_Generic_Class.genericDecodeArgsNoArguments)(Foreign_Generic_Class.genericCountArgsNoArguments))(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "SbTabMoved";
- }))(Foreign_Generic_Class.genericDecodeArgsNoArguments)(Foreign_Generic_Class.genericCountArgsNoArguments))(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "SbTabDetached";
- }))(Foreign_Generic_Class.genericDecodeArgsNoArguments)(Foreign_Generic_Class.genericCountArgsNoArguments))(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "SbGroupCreated";
- }))(Foreign_Generic_Class.genericDecodeArgsNoArguments)(Foreign_Generic_Class.genericCountArgsNoArguments))(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "SbGroupDeleted";
- }))(Foreign_Generic_Class.genericDecodeArgsNoArguments)(Foreign_Generic_Class.genericCountArgsNoArguments))(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "SbGroupRenamed";
- }))(Foreign_Generic_Class.genericDecodeArgsNoArguments)(Foreign_Generic_Class.genericCountArgsNoArguments))(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
- return "SbHasWindowId";
- }))(Foreign_Generic_Class.genericDecodeArgsArgument(Foreign_Generic_Class.decodeWithOptionsOther(Browser_Tabs.decodeWindowId)))(Foreign_Generic_Class.genericCountArgsArgument)))))))))(port)(windowListener(onNewWindowId(port)(stateRef$prime)(listenerRef)))();
- return Effect_Ref.write(new Data_Maybe.Just(initialListener))(listenerRef)();
- };
- };
- };
- var initializeBackground = function initializeBackground(ref) {
- return function __do() {
- Browser_Tabs_OnCreated.addListener(onTabCreated(ref))();
- var tabDeletedListener = Browser_Utils.mkListenerTwo(onTabDeleted(ref))();
- Browser_Tabs_OnRemoved.addListener(tabDeletedListener)();
- var onConnectedListener = Browser_Utils.mkListenerOne(onConnect(ref))();
- Browser_Runtime.onConnectAddListener(onConnectedListener)();
- return Data_Unit.unit;
- };
- };
- var main = function () {
- var runMain = Control_Bind.bind(Effect_Aff.bindAff)(Browser_Tabs.query)(function (allTabs) {
- return Effect_Class.liftEffect(Effect_Aff.monadEffectAff)(function __do() {
- var state = Effect_Ref["new"](PureTabs_Model.tabsToGlobalState(allTabs))();
- initializeBackground(state)();
- return Effect_Console.log("all listener initialized")();
- });
- });
- return function __do() {
- Effect_Console.log("starting background")();
- return Effect_Aff.launchAff_(runMain)();
- };
- }();
- module.exports = {
- main: main,
- initializeBackground: initializeBackground,
- onTabCreated: onTabCreated,
- onTabDeleted: onTabDeleted,
- onConnect: onConnect,
- onNewWindowId: onNewWindowId,
- initWindowState: initWindowState,
- manageSidebar: manageSidebar,
- onDisconnect: onDisconnect
- };
- },{"../Browser.Runtime/index.js":"../output/Browser.Runtime/index.js","../Browser.Tabs/index.js":"../output/Browser.Tabs/index.js","../Browser.Tabs.OnCreated/index.js":"../output/Browser.Tabs.OnCreated/index.js","../Browser.Tabs.OnRemoved/index.js":"../output/Browser.Tabs.OnRemoved/index.js","../Browser.Utils/index.js":"../output/Browser.Utils/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Data.Array/index.js":"../output/Data.Array/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.Function/index.js":"../output/Data.Function/index.js","../Data.Lens.At/index.js":"../output/Data.Lens.At/index.js","../Data.Lens.Fold/index.js":"../output/Data.Lens.Fold/index.js","../Data.Lens.Internal.Forget/index.js":"../output/Data.Lens.Internal.Forget/index.js","../Data.Lens.Internal.Wander/index.js":"../output/Data.Lens.Internal.Wander/index.js","../Data.Lens.Prism.Maybe/index.js":"../output/Data.Lens.Prism.Maybe/index.js","../Data.Lens.Setter/index.js":"../output/Data.Lens.Setter/index.js","../Data.List.Types/index.js":"../output/Data.List.Types/index.js","../Data.Map.Internal/index.js":"../output/Data.Map.Internal/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Maybe.First/index.js":"../output/Data.Maybe.First/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Profunctor.Choice/index.js":"../output/Data.Profunctor.Choice/index.js","../Data.Profunctor.Strong/index.js":"../output/Data.Profunctor.Strong/index.js","../Data.Show/index.js":"../output/Data.Show/index.js","../Data.Symbol/index.js":"../output/Data.Symbol/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js","../Effect/index.js":"../output/Effect/index.js","../Effect.Aff/index.js":"../output/Effect.Aff/index.js","../Effect.Class/index.js":"../output/Effect.Class/index.js","../Effect.Console/index.js":"../output/Effect.Console/index.js","../Effect.Ref/index.js":"../output/Effect.Ref/index.js","../Foreign.Generic.Class/index.js":"../output/Foreign.Generic.Class/index.js","../PureTabs.Model/index.js":"../output/PureTabs.Model/index.js"}],"background.js":[function(require,module,exports) {
- var Background = require("../output/PureTabs.Background");
- function main() {
- Background.main();
- }
- main();
- },{"../output/PureTabs.Background":"../output/PureTabs.Background/index.js"}],"../node_modules/parcel/src/builtins/hmr-runtime.js":[function(require,module,exports) {
- var global = arguments[3];
- var OVERLAY_ID = '__parcel__error__overlay__';
- var OldModule = module.bundle.Module;
- function Module(moduleName) {
- OldModule.call(this, moduleName);
- this.hot = {
- data: module.bundle.hotData,
- _acceptCallbacks: [],
- _disposeCallbacks: [],
- accept: function (fn) {
- this._acceptCallbacks.push(fn || function () {});
- },
- dispose: function (fn) {
- this._disposeCallbacks.push(fn);
- }
- };
- module.bundle.hotData = null;
- }
- module.bundle.Module = Module;
- var checkedAssets, assetsToAccept;
- var parent = module.bundle.parent;
- if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
- var hostname = "" || location.hostname;
- var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
- var ws = new WebSocket(protocol + '://' + hostname + ':' + "33577" + '/');
- ws.onmessage = function (event) {
- checkedAssets = {};
- assetsToAccept = [];
- var data = JSON.parse(event.data);
- if (data.type === 'update') {
- var handled = false;
- data.assets.forEach(function (asset) {
- if (!asset.isNew) {
- var didAccept = hmrAcceptCheck(global.parcelRequire, asset.id);
- if (didAccept) {
- handled = true;
- }
- }
- }); // Enable HMR for CSS by default.
- handled = handled || data.assets.every(function (asset) {
- return asset.type === 'css' && asset.generated.js;
- });
- if (handled) {
- console.clear();
- data.assets.forEach(function (asset) {
- hmrApply(global.parcelRequire, asset);
- });
- assetsToAccept.forEach(function (v) {
- hmrAcceptRun(v[0], v[1]);
- });
- } else if (location.reload) {
- // `location` global exists in a web worker context but lacks `.reload()` function.
- location.reload();
- }
- }
- if (data.type === 'reload') {
- ws.close();
- ws.onclose = function () {
- location.reload();
- };
- }
- if (data.type === 'error-resolved') {
- console.log('[parcel] ✨ Error resolved');
- removeErrorOverlay();
- }
- if (data.type === 'error') {
- console.error('[parcel] 🚨 ' + data.error.message + '\n' + data.error.stack);
- removeErrorOverlay();
- var overlay = createErrorOverlay(data);
- document.body.appendChild(overlay);
- }
- };
- }
- function removeErrorOverlay() {
- var overlay = document.getElementById(OVERLAY_ID);
- if (overlay) {
- overlay.remove();
- }
- }
- function createErrorOverlay(data) {
- var overlay = document.createElement('div');
- overlay.id = OVERLAY_ID; // html encode message and stack trace
- var message = document.createElement('div');
- var stackTrace = document.createElement('pre');
- message.innerText = data.error.message;
- stackTrace.innerText = data.error.stack;
- overlay.innerHTML = '<div style="background: black; font-size: 16px; color: white; position: fixed; height: 100%; width: 100%; top: 0px; left: 0px; padding: 30px; opacity: 0.85; font-family: Menlo, Consolas, monospace; z-index: 9999;">' + '<span style="background: red; padding: 2px 4px; border-radius: 2px;">ERROR</span>' + '<span style="top: 2px; margin-left: 5px; position: relative;">🚨</span>' + '<div style="font-size: 18px; font-weight: bold; margin-top: 20px;">' + message.innerHTML + '</div>' + '<pre>' + stackTrace.innerHTML + '</pre>' + '</div>';
- return overlay;
- }
- function getParents(bundle, id) {
- var modules = bundle.modules;
- if (!modules) {
- return [];
- }
- var parents = [];
- var k, d, dep;
- for (k in modules) {
- for (d in modules[k][1]) {
- dep = modules[k][1][d];
- if (dep === id || Array.isArray(dep) && dep[dep.length - 1] === id) {
- parents.push(k);
- }
- }
- }
- if (bundle.parent) {
- parents = parents.concat(getParents(bundle.parent, id));
- }
- return parents;
- }
- function hmrApply(bundle, asset) {
- var modules = bundle.modules;
- if (!modules) {
- return;
- }
- if (modules[asset.id] || !bundle.parent) {
- var fn = new Function('require', 'module', 'exports', asset.generated.js);
- asset.isNew = !modules[asset.id];
- modules[asset.id] = [fn, asset.deps];
- } else if (bundle.parent) {
- hmrApply(bundle.parent, asset);
- }
- }
- function hmrAcceptCheck(bundle, id) {
- var modules = bundle.modules;
- if (!modules) {
- return;
- }
- if (!modules[id] && bundle.parent) {
- return hmrAcceptCheck(bundle.parent, id);
- }
- if (checkedAssets[id]) {
- return;
- }
- checkedAssets[id] = true;
- var cached = bundle.cache[id];
- assetsToAccept.push([bundle, id]);
- if (cached && cached.hot && cached.hot._acceptCallbacks.length) {
- return true;
- }
- return getParents(global.parcelRequire, id).some(function (id) {
- return hmrAcceptCheck(global.parcelRequire, id);
- });
- }
- function hmrAcceptRun(bundle, id) {
- var cached = bundle.cache[id];
- bundle.hotData = {};
- if (cached) {
- cached.hot.data = bundle.hotData;
- }
- if (cached && cached.hot && cached.hot._disposeCallbacks.length) {
- cached.hot._disposeCallbacks.forEach(function (cb) {
- cb(bundle.hotData);
- });
- }
- delete bundle.cache[id];
- bundle(id);
- cached = bundle.cache[id];
- if (cached && cached.hot && cached.hot._acceptCallbacks.length) {
- cached.hot._acceptCallbacks.forEach(function (cb) {
- cb();
- });
- return true;
- }
- }
- },{}]},{},["../node_modules/parcel/src/builtins/hmr-runtime.js","background.js"], null)
- //# sourceMappingURL=/background.js.map
|