| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267 |
- // 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/Browser.Utils/index.js":[function(require,module,exports) {
- // Generated by purs version 0.13.6
- "use strict";
- var $foreign = require("./foreign.js");
- var Listener2 = function Listener2(x) {
- return x;
- };
- var Listener = function Listener(x) {
- return x;
- };
- module.exports = {
- mkListenerUnit: $foreign.mkListenerUnit,
- mkListenerOne: $foreign.mkListenerOne,
- mkListenerTwo: $foreign.mkListenerTwo
- };
- },{"./foreign.js":"../output/Browser.Utils/foreign.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/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/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.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/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.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.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/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/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/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/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.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/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 Data_Eq = require("../Data.Eq/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_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 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 "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_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.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 "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 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.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 "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,
- 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
- };
- },{"../Data.Eq/index.js":"../output/Data.Eq/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.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","../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.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 "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.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_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_Newtype = require("../Data.Newtype/index.js");
- var Data_Show = require("../Data.Show/index.js");
- var Data_Symbol = require("../Data.Symbol/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 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 104, column 1 - line 104, 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 104, column 1 - line 104, 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 BgTabCreated) {
- return new Data_Generic_Rep.Inl(x.value0);
- }
- ;
- if (x instanceof BgTabDeleted) {
- return 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.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.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.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.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.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.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(Data_Generic_Rep.NoArguments.value))))))));
- }
- ;
- throw new Error("Failed pattern match at PureTabs.Model (line 89, column 1 - line 89, column 64): " + [x.constructor.name]);
- }, function (x) {
- if (x instanceof Data_Generic_Rep.Inl) {
- return new BgTabCreated(x.value0);
- }
- ;
- if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inl) {
- return new BgTabDeleted(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 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.Inl) {
- return new BgTabActived(x.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.Inl) {
- return new BgTabAttached(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 BgTabDetached(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 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.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) {
- return BgTabZoomChanged.value;
- }
- ;
- throw new Error("Failed pattern match at PureTabs.Model (line 89, column 1 - line 89, 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(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 _tabs = function _tabs(dictStrong) {
- return Data_Lens_Record.prop(new Data_Symbol.IsSymbol(function () {
- return "tabs";
- }))()()(Data_Symbol.SProxy.value)(dictStrong);
- };
- var _tabFromWindow = function _tabFromWindow(tab$prime) {
- return function (dictWander) {
- var tab = Data_Newtype.unwrap(Browser_Tabs.newtypeTab)(tab$prime);
- var $104 = _windows(dictWander.Strong0());
- var $105 = Data_Lens_At.at(Data_Lens_At.atMap(Browser_Tabs.ordWindowId))(tab.windowId)(dictWander.Strong0());
- var $106 = Data_Lens_Prism_Maybe["_Just"](dictWander.Choice1());
- var $107 = _tabs(dictWander.Strong0());
- var $108 = Data_Lens_At.at(Data_Lens_At.atMap(Browser_Tabs.ordTabId))(tab.id)(dictWander.Strong0());
- return function ($109) {
- return $104($105($106($107($108($109)))));
- };
- };
- };
- 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 $110 = _windows(dictWander.Strong0());
- var $111 = Data_Lens_At.at(Data_Lens_At.atMap(Browser_Tabs.ordWindowId))(tab.windowId)(dictWander.Strong0());
- var $112 = Data_Lens_Prism_Maybe["_Just"](dictWander.Choice1());
- var $113 = _port(dictWander.Strong0());
- var $114 = Data_Lens_Prism_Maybe["_Just"](dictWander.Choice1());
- return function ($115) {
- return $110($111($112($113($114($115)))));
- };
- };
- };
- module.exports = {
- "_tabs": _tabs,
- "_port": _port,
- "_windows": _windows,
- "_portFromWindow": _portFromWindow,
- "_tabFromWindow": _tabFromWindow,
- "_tabFromTabIdAndWindow": _tabFromTabIdAndWindow,
- initialGlobalState: initialGlobalState,
- 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.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.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"}],"../output/PureTabs.Background/index.js":[function(require,module,exports) {
- "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 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_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 "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);
- })();
- };
- };
- };
- }; // port on connect
- // created tab
- 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 "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 57, column 3 - line 61, 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);
- };
- };
- }; // TODO don't pass the full ref, but only a set of function to manipulate/access
- // the data required
- var manageSidebar = function manageSidebar(stateRef) {
- return function (port) {
- return function (msg) {
- return Control_Applicative.pure(Effect.applicativeEffect)(Data_Unit.unit);
- };
- };
- };
- var onConnect = function onConnect(stateRef) {
- 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);
- };
- };
- var onNewWindowId = function onNewWindowId(listenerRef) {
- return function (winId) {
- var winLens = 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));
- };
- }();
- return function __do() {
- Data_Function.flip(Effect_Ref.modify_)(stateRef)(Data_Lens_Setter.over(winLens)(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 100, column 17 - line 102, column 63): " + [v.constructor.name]);
- }))();
- var r = Effect_Ref.read(stateRef)();
- 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)();
- 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)();
- };
- };
- };
- 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(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 __do() {
- Effect_Console.log("starting background")();
- var state = Effect_Ref["new"](PureTabs_Model.initialGlobalState)();
- initializeBackground(state)();
- return Effect_Console.log("all listener initialized")();
- };
- module.exports = {
- main: main,
- initializeBackground: initializeBackground,
- onTabCreated: onTabCreated,
- onTabDeleted: onTabDeleted,
- onConnect: onConnect,
- 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","../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.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 + ':' + "40959" + '/');
- 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
|