commit7c5a624798cace554f98a027ea353ac76488aae9
authorMark <mark.eibes@gmail.com>
dateFri 1 May 2026, 09:40 (5 months ago)
11883 files changed+2095150
8883 more files changed are not listed.
.spago/BuildInfo.pursnew file+15
@@ -0,0 +1,15 @@
1+-- @inline export packages always
2+-- @inline export pursVersion always
3+-- @inline export spagoVersion always
4+module Spago.Generated.BuildInfo where
5+
6+packages :: { "yoga-r3f" :: String }
7+packages =
8+ { "yoga-r3f": "0.0.0"
9+ }
10+
11+pursVersion :: String
12+pursVersion = "0.15.16"
13+
14+spagoVersion :: String
15+spagoVersion = "1.0.3"
.spago/p/aff-8.0.0/LICENSEnew file+202
@@ -0,0 +1,202 @@
1+Apache License
2+ Version 2.0, January 2004
3+ http://www.apache.org/licenses/
4+
5+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6+
7+ 1. Definitions.
8+
9+ "License" shall mean the terms and conditions for use, reproduction,
10+ and distribution as defined by Sections 1 through 9 of this document.
11+
12+ "Licensor" shall mean the copyright owner or entity authorized by
13+ the copyright owner that is granting the License.
14+
15+ "Legal Entity" shall mean the union of the acting entity and all
16+ other entities that control, are controlled by, or are under common
17+ control with that entity. For the purposes of this definition,
18+ "control" means (i) the power, direct or indirect, to cause the
19+ direction or management of such entity, whether by contract or
20+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21+ outstanding shares, or (iii) beneficial ownership of such entity.
22+
23+ "You" (or "Your") shall mean an individual or Legal Entity
24+ exercising permissions granted by this License.
25+
26+ "Source" form shall mean the preferred form for making modifications,
27+ including but not limited to software source code, documentation
28+ source, and configuration files.
29+
30+ "Object" form shall mean any form resulting from mechanical
31+ transformation or translation of a Source form, including but
32+ not limited to compiled object code, generated documentation,
33+ and conversions to other media types.
34+
35+ "Work" shall mean the work of authorship, whether in Source or
36+ Object form, made available under the License, as indicated by a
37+ copyright notice that is included in or attached to the work
38+ (an example is provided in the Appendix below).
39+
40+ "Derivative Works" shall mean any work, whether in Source or Object
41+ form, that is based on (or derived from) the Work and for which the
42+ editorial revisions, annotations, elaborations, or other modifications
43+ represent, as a whole, an original work of authorship. For the purposes
44+ of this License, Derivative Works shall not include works that remain
45+ separable from, or merely link (or bind by name) to the interfaces of,
46+ the Work and Derivative Works thereof.
47+
48+ "Contribution" shall mean any work of authorship, including
49+ the original version of the Work and any modifications or additions
50+ to that Work or Derivative Works thereof, that is intentionally
51+ submitted to Licensor for inclusion in the Work by the copyright owner
52+ or by an individual or Legal Entity authorized to submit on behalf of
53+ the copyright owner. For the purposes of this definition, "submitted"
54+ means any form of electronic, verbal, or written communication sent
55+ to the Licensor or its representatives, including but not limited to
56+ communication on electronic mailing lists, source code control systems,
57+ and issue tracking systems that are managed by, or on behalf of, the
58+ Licensor for the purpose of discussing and improving the Work, but
59+ excluding communication that is conspicuously marked or otherwise
60+ designated in writing by the copyright owner as "Not a Contribution."
61+
62+ "Contributor" shall mean Licensor and any individual or Legal Entity
63+ on behalf of whom a Contribution has been received by Licensor and
64+ subsequently incorporated within the Work.
65+
66+ 2. Grant of Copyright License. Subject to the terms and conditions of
67+ this License, each Contributor hereby grants to You a perpetual,
68+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69+ copyright license to reproduce, prepare Derivative Works of,
70+ publicly display, publicly perform, sublicense, and distribute the
71+ Work and such Derivative Works in Source or Object form.
72+
73+ 3. Grant of Patent License. Subject to the terms and conditions of
74+ this License, each Contributor hereby grants to You a perpetual,
75+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76+ (except as stated in this section) patent license to make, have made,
77+ use, offer to sell, sell, import, and otherwise transfer the Work,
78+ where such license applies only to those patent claims licensable
79+ by such Contributor that are necessarily infringed by their
80+ Contribution(s) alone or by combination of their Contribution(s)
81+ with the Work to which such Contribution(s) was submitted. If You
82+ institute patent litigation against any entity (including a
83+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84+ or a Contribution incorporated within the Work constitutes direct
85+ or contributory patent infringement, then any patent licenses
86+ granted to You under this License for that Work shall terminate
87+ as of the date such litigation is filed.
88+
89+ 4. Redistribution. You may reproduce and distribute copies of the
90+ Work or Derivative Works thereof in any medium, with or without
91+ modifications, and in Source or Object form, provided that You
92+ meet the following conditions:
93+
94+ (a) You must give any other recipients of the Work or
95+ Derivative Works a copy of this License; and
96+
97+ (b) You must cause any modified files to carry prominent notices
98+ stating that You changed the files; and
99+
100+ (c) You must retain, in the Source form of any Derivative Works
101+ that You distribute, all copyright, patent, trademark, and
102+ attribution notices from the Source form of the Work,
103+ excluding those notices that do not pertain to any part of
104+ the Derivative Works; and
105+
106+ (d) If the Work includes a "NOTICE" text file as part of its
107+ distribution, then any Derivative Works that You distribute must
108+ include a readable copy of the attribution notices contained
109+ within such NOTICE file, excluding those notices that do not
110+ pertain to any part of the Derivative Works, in at least one
111+ of the following places: within a NOTICE text file distributed
112+ as part of the Derivative Works; within the Source form or
113+ documentation, if provided along with the Derivative Works; or,
114+ within a display generated by the Derivative Works, if and
115+ wherever such third-party notices normally appear. The contents
116+ of the NOTICE file are for informational purposes only and
117+ do not modify the License. You may add Your own attribution
118+ notices within Derivative Works that You distribute, alongside
119+ or as an addendum to the NOTICE text from the Work, provided
120+ that such additional attribution notices cannot be construed
121+ as modifying the License.
122+
123+ You may add Your own copyright statement to Your modifications and
124+ may provide additional or different license terms and conditions
125+ for use, reproduction, or distribution of Your modifications, or
126+ for any such Derivative Works as a whole, provided Your use,
127+ reproduction, and distribution of the Work otherwise complies with
128+ the conditions stated in this License.
129+
130+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131+ any Contribution intentionally submitted for inclusion in the Work
132+ by You to the Licensor shall be under the terms and conditions of
133+ this License, without any additional terms or conditions.
134+ Notwithstanding the above, nothing herein shall supersede or modify
135+ the terms of any separate license agreement you may have executed
136+ with Licensor regarding such Contributions.
137+
138+ 6. Trademarks. This License does not grant permission to use the trade
139+ names, trademarks, service marks, or product names of the Licensor,
140+ except as required for reasonable and customary use in describing the
141+ origin of the Work and reproducing the content of the NOTICE file.
142+
143+ 7. Disclaimer of Warranty. Unless required by applicable law or
144+ agreed to in writing, Licensor provides the Work (and each
145+ Contributor provides its Contributions) on an "AS IS" BASIS,
146+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147+ implied, including, without limitation, any warranties or conditions
148+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149+ PARTICULAR PURPOSE. You are solely responsible for determining the
150+ appropriateness of using or redistributing the Work and assume any
151+ risks associated with Your exercise of permissions under this License.
152+
153+ 8. Limitation of Liability. In no event and under no legal theory,
154+ whether in tort (including negligence), contract, or otherwise,
155+ unless required by applicable law (such as deliberate and grossly
156+ negligent acts) or agreed to in writing, shall any Contributor be
157+ liable to You for damages, including any direct, indirect, special,
158+ incidental, or consequential damages of any character arising as a
159+ result of this License or out of the use or inability to use the
160+ Work (including but not limited to damages for loss of goodwill,
161+ work stoppage, computer failure or malfunction, or any and all
162+ other commercial damages or losses), even if such Contributor
163+ has been advised of the possibility of such damages.
164+
165+ 9. Accepting Warranty or Additional Liability. While redistributing
166+ the Work or Derivative Works thereof, You may choose to offer,
167+ and charge a fee for, acceptance of support, warranty, indemnity,
168+ or other liability obligations and/or rights consistent with this
169+ License. However, in accepting such obligations, You may act only
170+ on Your own behalf and on Your sole responsibility, not on behalf
171+ of any other Contributor, and only if You agree to indemnify,
172+ defend, and hold each Contributor harmless for any liability
173+ incurred by, or claims asserted against, such Contributor by reason
174+ of your accepting any such warranty or additional liability.
175+
176+ END OF TERMS AND CONDITIONS
177+
178+ APPENDIX: How to apply the Apache License to your work.
179+
180+ To apply the Apache License to your work, attach the following
181+ boilerplate notice, with the fields enclosed by brackets "{}"
182+ replaced with your own identifying information. (Don't include
183+ the brackets!) The text should be enclosed in the appropriate
184+ comment syntax for the file format. We also recommend that a
185+ file or class name and description of purpose be included on the
186+ same "printed page" as the copyright notice for easier
187+ identification within third-party archives.
188+
189+ Copyright {yyyy} {name of copyright owner}
190+
191+ Licensed under the Apache License, Version 2.0 (the "License");
192+ you may not use this file except in compliance with the License.
193+ You may obtain a copy of the License at
194+
195+ http://www.apache.org/licenses/LICENSE-2.0
196+
197+ Unless required by applicable law or agreed to in writing, software
198+ distributed under the License is distributed on an "AS IS" BASIS,
199+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200+ See the License for the specific language governing permissions and
201+ limitations under the License.
202+
.spago/p/aff-8.0.0/README.mdnew file+50
@@ -0,0 +1,50 @@
1+# Aff
2+
3+[](https://github.com/purescript-contrib/purescript-aff/actions?query=workflow%3ACI+branch%3Amain)
4+[](https://github.com/purescript-contrib/purescript-aff/releases)
5+[](https://pursuit.purescript.org/packages/purescript-aff)
6+[](https://github.com/natefaubion)
7+
8+An asynchronous effect monad and threading model for PureScript.
9+
10+## Installation
11+
12+Install `aff` with [Spago](https://github.com/purescript/spago):
13+
14+```sh
15+spago install aff
16+```
17+
18+## Quick start
19+
20+This quick start covers common, minimal use cases for the library. Longer examples and tutorials can be found in the [docs directory](./docs).
21+
22+```purescript
23+main :: Effect Unit
24+main = launchAff_ do
25+ response <- Ajax.get "http://foo.bar"
26+ log response.body
27+```
28+
29+## Documentation
30+
31+`aff` documentation is stored in a few places:
32+
33+1. Module documentation is [published on Pursuit](https://pursuit.purescript.org/packages/purescript-aff).
34+2. Written documentation is kept in the [docs directory](./docs).
35+3. Usage examples can be found in [the test suite](./test).
36+
37+If you get stuck, there are several ways to get help:
38+
39+- [Open an issue](https://github.com/purescript-contrib/purescript-aff/issues) if you have encountered a bug or problem.
40+- Ask general questions on the [PureScript Discourse](https://discourse.purescript.org) forum or the [PureScript Discord](https://purescript.org/chat) chat.
41+
42+## Contributing
43+
44+You can contribute to `aff` in several ways:
45+
46+1. If you encounter a problem or have a question, please [open an issue](https://github.com/purescript-contrib/purescript-aff/issues). We'll do our best to work with you to resolve or answer it.
47+
48+2. If you would like to contribute code, tests, or documentation, please [read the contributor guide](./CONTRIBUTING.md). It's a short, helpful introduction to contributing to this library, including development instructions.
49+
50+3. If you have written a library, tutorial, guide, or other resource based on this package, please share it on the [PureScript Discourse](https://discourse.purescript.org)! Writing libraries and learning resources are a great way to help this library succeed.
.spago/p/aff-8.0.0/bower.jsonnew file+42
@@ -0,0 +1,42 @@
1+{
2+ "name": "purescript-aff",
3+ "homepage": "https://github.com/slamdata/purescript-aff",
4+ "description": "Asynchronous effect monad",
5+ "repository": {
6+ "type": "git",
7+ "url": "https://github.com/purescript-contrib/purescript-aff.git"
8+ },
9+ "license": "Apache-2.0",
10+ "ignore": [
11+ "**/.*",
12+ "bower_components",
13+ "node_modules",
14+ "output",
15+ "test",
16+ "bower.json",
17+ "package.json"
18+ ],
19+ "dependencies": {
20+ "purescript-arrays": "^7.0.0",
21+ "purescript-bifunctors": "^6.0.0",
22+ "purescript-control": "^6.0.0",
23+ "purescript-datetime": "^6.0.0",
24+ "purescript-effect": "^4.0.0",
25+ "purescript-either": "^6.0.0",
26+ "purescript-exceptions": "^6.0.0",
27+ "purescript-foldable-traversable": "^6.0.0",
28+ "purescript-functions": "^6.0.0",
29+ "purescript-maybe": "^6.0.0",
30+ "purescript-newtype": "^5.0.0",
31+ "purescript-parallel": "^7.0.0",
32+ "purescript-prelude": "^6.0.0",
33+ "purescript-refs": "^6.0.0",
34+ "purescript-tailrec": "^6.0.0",
35+ "purescript-transformers": "^6.0.0",
36+ "purescript-unsafe-coerce": "^6.0.0"
37+ },
38+ "devDependencies": {
39+ "purescript-minibench": "^4.0.0",
40+ "purescript-assert": "^6.0.0"
41+ }
42+}
.spago/p/aff-8.0.0/package.jsonnew file+11
@@ -0,0 +1,11 @@
1+{
2+ "private": true,
3+ "scripts": {
4+ "build": "eslint src && spago build --purs-args '--censor-lib --strict'",
5+ "test": "spago test --no-install"
6+ },
7+ "devDependencies": {
8+ "eslint": "^7.10.0",
9+ "purescript-psa": "^0.8.2"
10+ }
11+}
.spago/p/aff-8.0.0/packages.dhallnew file+5
@@ -0,0 +1,5 @@
1+let upstream =
2+ https://github.com/purescript/package-sets/releases/download/psc-0.15.4-20220725/packages.dhall
3+ sha256:e56fbdf33a5afd2a610c81f8b940b413a638931edb41532164e641bb2a9ec29c
4+
5+in upstream
.spago/p/aff-8.0.0/purs.jsonnew file+27
@@ -0,0 +1,27 @@
1+{
2+ "name": "aff",
3+ "version": "8.0.0",
4+ "license": "Apache-2.0",
5+ "description": "Asynchronous effect monad",
6+ "location": {
7+ "githubOwner": "purescript-contrib",
8+ "githubRepo": "purescript-aff"
9+ },
10+ "ref": "v8.0.0",
11+ "dependencies": {
12+ "control": ">=6.0.0 <7.0.0",
13+ "datetime": ">=6.0.0 <7.0.0",
14+ "effect": ">=4.0.0 <5.0.0",
15+ "either": ">=6.0.0 <7.0.0",
16+ "exceptions": ">=6.0.0 <7.0.0",
17+ "functions": ">=6.0.0 <7.0.0",
18+ "newtype": ">=5.0.0 <6.0.0",
19+ "parallel": ">=6.0.0 <8.0.0",
20+ "partial": ">=4.0.0 <5.0.0",
21+ "prelude": ">=6.0.0 <7.0.0",
22+ "st": ">=6.0.0 <7.0.0",
23+ "tailrec": ">=6.0.0 <7.0.0",
24+ "transformers": ">=6.0.0 <7.0.0",
25+ "unsafe-coerce": ">=6.0.0 <7.0.0"
26+ }
27+}
.spago/p/aff-8.0.0/spago.dhallnew file+28
@@ -0,0 +1,28 @@
1+{ name = "aff"
2+, dependencies =
3+ [ "arrays"
4+ , "assert"
5+ , "bifunctors"
6+ , "console"
7+ , "control"
8+ , "datetime"
9+ , "effect"
10+ , "either"
11+ , "exceptions"
12+ , "foldable-traversable"
13+ , "functions"
14+ , "maybe"
15+ , "minibench"
16+ , "newtype"
17+ , "parallel"
18+ , "partial"
19+ , "prelude"
20+ , "refs"
21+ , "st"
22+ , "tailrec"
23+ , "transformers"
24+ , "unsafe-coerce"
25+ ]
26+, packages = ./packages.dhall
27+, sources = [ "src/**/*.purs", "test/**/*.purs" ]
28+}
.spago/p/aff-8.0.0/src/Effect/Aff.jsnew file+1154
@@ -0,0 +1,1154 @@
1+/* globals setImmediate, clearImmediate, setTimeout, clearTimeout */
2+/* eslint-disable no-unused-vars, no-prototype-builtins, no-use-before-define, no-unused-labels, no-param-reassign */
3+var Aff = function () {
4+ // A unique value for empty.
5+ var EMPTY = {};
6+
7+ /*
8+
9+ An awkward approximation. We elide evidence we would otherwise need in PS for
10+ efficiency sake.
11+
12+ data Aff eff a
13+ = Pure a
14+ | Throw Error
15+ | Catch (Aff eff a) (Error -> Aff eff a)
16+ | Sync (Eff eff a)
17+ | Async ((Either Error a -> Eff eff Unit) -> Eff eff (Canceler eff))
18+ | forall b. Bind (Aff eff b) (b -> Aff eff a)
19+ | forall b. Bracket (Aff eff b) (BracketConditions eff b) (b -> Aff eff a)
20+ | forall b. Fork Boolean (Aff eff b) ?(Fiber eff b -> a)
21+ | Sequential (ParAff aff a)
22+
23+ */
24+ var PURE = "Pure";
25+ var THROW = "Throw";
26+ var CATCH = "Catch";
27+ var SYNC = "Sync";
28+ var ASYNC = "Async";
29+ var BIND = "Bind";
30+ var BRACKET = "Bracket";
31+ var FORK = "Fork";
32+ var SEQ = "Sequential";
33+
34+ /*
35+
36+ data ParAff eff a
37+ = forall b. Map (b -> a) (ParAff eff b)
38+ | forall b. Apply (ParAff eff (b -> a)) (ParAff eff b)
39+ | Alt (ParAff eff a) (ParAff eff a)
40+ | ?Par (Aff eff a)
41+
42+ */
43+ var MAP = "Map";
44+ var APPLY = "Apply";
45+ var ALT = "Alt";
46+
47+ // Various constructors used in interpretation
48+ var CONS = "Cons"; // Cons-list, for stacks
49+ var RESUME = "Resume"; // Continue indiscriminately
50+ var RELEASE = "Release"; // Continue with bracket finalizers
51+ var FINALIZER = "Finalizer"; // A non-interruptible effect
52+ var FINALIZED = "Finalized"; // Marker for finalization
53+ var FORKED = "Forked"; // Reference to a forked fiber, with resumption stack
54+ var FIBER = "Fiber"; // Actual fiber reference
55+ var THUNK = "Thunk"; // Primed effect, ready to invoke
56+
57+ function Aff(tag, _1, _2, _3) {
58+ this.tag = tag;
59+ this._1 = _1;
60+ this._2 = _2;
61+ this._3 = _3;
62+ }
63+
64+ function AffCtr(tag) {
65+ var fn = function (_1, _2, _3) {
66+ return new Aff(tag, _1, _2, _3);
67+ };
68+ fn.tag = tag;
69+ return fn;
70+ }
71+
72+ function nonCanceler(error) {
73+ return new Aff(PURE, void 0);
74+ }
75+
76+ function runEff(eff) {
77+ try {
78+ eff();
79+ } catch (error) {
80+ setTimeout(function () {
81+ throw error;
82+ }, 0);
83+ }
84+ }
85+
86+ function runSync(left, right, eff) {
87+ try {
88+ return right(eff());
89+ } catch (error) {
90+ return left(error);
91+ }
92+ }
93+
94+ function runAsync(left, eff, k) {
95+ try {
96+ return eff(k)();
97+ } catch (error) {
98+ k(left(error))();
99+ return nonCanceler;
100+ }
101+ }
102+
103+ var Scheduler = function () {
104+ var limit = 1024;
105+ var size = 0;
106+ var ix = 0;
107+ var queue = new Array(limit);
108+ var draining = false;
109+
110+ function drain() {
111+ var thunk;
112+ draining = true;
113+ while (size !== 0) {
114+ size--;
115+ thunk = queue[ix];
116+ queue[ix] = void 0;
117+ ix = (ix + 1) % limit;
118+ thunk();
119+ }
120+ draining = false;
121+ }
122+
123+ return {
124+ isDraining: function () {
125+ return draining;
126+ },
127+ enqueue: function (cb) {
128+ var i, tmp;
129+ if (size === limit) {
130+ tmp = draining;
131+ drain();
132+ draining = tmp;
133+ }
134+
135+ queue[(ix + size) % limit] = cb;
136+ size++;
137+
138+ if (!draining) {
139+ drain();
140+ }
141+ }
142+ };
143+ }();
144+
145+ function Supervisor(util) {
146+ var fibers = {};
147+ var fiberId = 0;
148+ var count = 0;
149+
150+ return {
151+ register: function (fiber) {
152+ var fid = fiberId++;
153+ fiber.onComplete({
154+ rethrow: true,
155+ handler: function (result) {
156+ return function () {
157+ count--;
158+ delete fibers[fid];
159+ };
160+ }
161+ })();
162+ fibers[fid] = fiber;
163+ count++;
164+ },
165+ isEmpty: function () {
166+ return count === 0;
167+ },
168+ killAll: function (killError, cb) {
169+ return function () {
170+ if (count === 0) {
171+ return cb();
172+ }
173+
174+ var killCount = 0;
175+ var kills = {};
176+
177+ function kill(fid) {
178+ kills[fid] = fibers[fid].kill(killError, function (result) {
179+ return function () {
180+ delete kills[fid];
181+ killCount--;
182+ if (util.isLeft(result) && util.fromLeft(result)) {
183+ setTimeout(function () {
184+ throw util.fromLeft(result);
185+ }, 0);
186+ }
187+ if (killCount === 0) {
188+ cb();
189+ }
190+ };
191+ })();
192+ }
193+
194+ for (var k in fibers) {
195+ if (fibers.hasOwnProperty(k)) {
196+ killCount++;
197+ kill(k);
198+ }
199+ }
200+
201+ fibers = {};
202+ fiberId = 0;
203+ count = 0;
204+
205+ return function (error) {
206+ return new Aff(SYNC, function () {
207+ for (var k in kills) {
208+ if (kills.hasOwnProperty(k)) {
209+ kills[k]();
210+ }
211+ }
212+ });
213+ };
214+ };
215+ }
216+ };
217+ }
218+
219+ // Fiber state machine
220+ var SUSPENDED = 0; // Suspended, pending a join.
221+ var CONTINUE = 1; // Interpret the next instruction.
222+ var STEP_BIND = 2; // Apply the next bind.
223+ var STEP_RESULT = 3; // Handle potential failure from a result.
224+ var PENDING = 4; // An async effect is running.
225+ var RETURN = 5; // The current stack has returned.
226+ var COMPLETED = 6; // The entire fiber has completed.
227+
228+ function Fiber(util, supervisor, aff) {
229+ // Monotonically increasing tick, increased on each asynchronous turn.
230+ var runTick = 0;
231+
232+ // The current branch of the state machine.
233+ var status = SUSPENDED;
234+
235+ // The current point of interest for the state machine branch.
236+ var step = aff; // Successful step
237+ var fail = null; // Failure step
238+ var interrupt = null; // Asynchronous interrupt
239+
240+ // Stack of continuations for the current fiber.
241+ var bhead = null;
242+ var btail = null;
243+
244+ // Stack of attempts and finalizers for error recovery. Every `Cons` is also
245+ // tagged with current `interrupt` state. We use this to track which items
246+ // should be ignored or evaluated as a result of a kill.
247+ var attempts = null;
248+
249+ // A special state is needed for Bracket, because it cannot be killed. When
250+ // we enter a bracket acquisition or finalizer, we increment the counter,
251+ // and then decrement once complete.
252+ var bracketCount = 0;
253+
254+ // Each join gets a new id so they can be revoked.
255+ var joinId = 0;
256+ var joins = null;
257+ var rethrow = true;
258+
259+ // Each invocation of `run` requires a tick. When an asynchronous effect is
260+ // resolved, we must check that the local tick coincides with the fiber
261+ // tick before resuming. This prevents multiple async continuations from
262+ // accidentally resuming the same fiber. A common example may be invoking
263+ // the provided callback in `makeAff` more than once, but it may also be an
264+ // async effect resuming after the fiber was already cancelled.
265+ function run(localRunTick) {
266+ var tmp, result, attempt;
267+ while (true) {
268+ tmp = null;
269+ result = null;
270+ attempt = null;
271+
272+ switch (status) {
273+ case STEP_BIND:
274+ status = CONTINUE;
275+ try {
276+ step = bhead(step);
277+ if (btail === null) {
278+ bhead = null;
279+ } else {
280+ bhead = btail._1;
281+ btail = btail._2;
282+ }
283+ } catch (e) {
284+ status = RETURN;
285+ fail = util.left(e);
286+ step = null;
287+ }
288+ break;
289+
290+ case STEP_RESULT:
291+ if (util.isLeft(step)) {
292+ status = RETURN;
293+ fail = step;
294+ step = null;
295+ } else if (bhead === null) {
296+ status = RETURN;
297+ } else {
298+ status = STEP_BIND;
299+ step = util.fromRight(step);
300+ }
301+ break;
302+
303+ case CONTINUE:
304+ switch (step.tag) {
305+ case BIND:
306+ if (bhead) {
307+ btail = new Aff(CONS, bhead, btail);
308+ }
309+ bhead = step._2;
310+ status = CONTINUE;
311+ step = step._1;
312+ break;
313+
314+ case PURE:
315+ if (bhead === null) {
316+ status = RETURN;
317+ step = util.right(step._1);
318+ } else {
319+ status = STEP_BIND;
320+ step = step._1;
321+ }
322+ break;
323+
324+ case SYNC:
325+ status = STEP_RESULT;
326+ step = runSync(util.left, util.right, step._1);
327+ break;
328+
329+ case ASYNC:
330+ status = PENDING;
331+ step = runAsync(util.left, step._1, function (result) {
332+ return function () {
333+ if (runTick !== localRunTick) {
334+ return;
335+ }
336+ runTick++;
337+ Scheduler.enqueue(function () {
338+ // It's possible to interrupt the fiber between enqueuing and
339+ // resuming, so we need to check that the runTick is still
340+ // valid.
341+ if (runTick !== localRunTick + 1) {
342+ return;
343+ }
344+ status = STEP_RESULT;
345+ step = result;
346+ run(runTick);
347+ });
348+ };
349+ });
350+ return;
351+
352+ case THROW:
353+ status = RETURN;
354+ fail = util.left(step._1);
355+ step = null;
356+ break;
357+
358+ // Enqueue the Catch so that we can call the error handler later on
359+ // in case of an exception.
360+ case CATCH:
361+ if (bhead === null) {
362+ attempts = new Aff(CONS, step, attempts, interrupt);
363+ } else {
364+ attempts = new Aff(CONS, step, new Aff(CONS, new Aff(RESUME, bhead, btail), attempts, interrupt), interrupt);
365+ }
366+ bhead = null;
367+ btail = null;
368+ status = CONTINUE;
369+ step = step._1;
370+ break;
371+
372+ // Enqueue the Bracket so that we can call the appropriate handlers
373+ // after resource acquisition.
374+ case BRACKET:
375+ bracketCount++;
376+ if (bhead === null) {
377+ attempts = new Aff(CONS, step, attempts, interrupt);
378+ } else {
379+ attempts = new Aff(CONS, step, new Aff(CONS, new Aff(RESUME, bhead, btail), attempts, interrupt), interrupt);
380+ }
381+ bhead = null;
382+ btail = null;
383+ status = CONTINUE;
384+ step = step._1;
385+ break;
386+
387+ case FORK:
388+ status = STEP_RESULT;
389+ tmp = Fiber(util, supervisor, step._2);
390+ if (supervisor) {
391+ supervisor.register(tmp);
392+ }
393+ if (step._1) {
394+ tmp.run();
395+ }
396+ step = util.right(tmp);
397+ break;
398+
399+ case SEQ:
400+ status = CONTINUE;
401+ step = sequential(util, supervisor, step._1);
402+ break;
403+ }
404+ break;
405+
406+ case RETURN:
407+ bhead = null;
408+ btail = null;
409+ // If the current stack has returned, and we have no other stacks to
410+ // resume or finalizers to run, the fiber has halted and we can
411+ // invoke all join callbacks. Otherwise we need to resume.
412+ if (attempts === null) {
413+ status = COMPLETED;
414+ step = interrupt || fail || step;
415+ } else {
416+ // The interrupt status for the enqueued item.
417+ tmp = attempts._3;
418+ attempt = attempts._1;
419+ attempts = attempts._2;
420+
421+ switch (attempt.tag) {
422+ // We cannot recover from an unmasked interrupt. Otherwise we should
423+ // continue stepping, or run the exception handler if an exception
424+ // was raised.
425+ case CATCH:
426+ // We should compare the interrupt status as well because we
427+ // only want it to apply if there has been an interrupt since
428+ // enqueuing the catch.
429+ if (interrupt && interrupt !== tmp && bracketCount === 0) {
430+ status = RETURN;
431+ } else if (fail) {
432+ status = CONTINUE;
433+ step = attempt._2(util.fromLeft(fail));
434+ fail = null;
435+ }
436+ break;
437+
438+ // We cannot resume from an unmasked interrupt or exception.
439+ case RESUME:
440+ // As with Catch, we only want to ignore in the case of an
441+ // interrupt since enqueing the item.
442+ if (interrupt && interrupt !== tmp && bracketCount === 0 || fail) {
443+ status = RETURN;
444+ } else {
445+ bhead = attempt._1;
446+ btail = attempt._2;
447+ status = STEP_BIND;
448+ step = util.fromRight(step);
449+ }
450+ break;
451+
452+ // If we have a bracket, we should enqueue the handlers,
453+ // and continue with the success branch only if the fiber has
454+ // not been interrupted. If the bracket acquisition failed, we
455+ // should not run either.
456+ case BRACKET:
457+ bracketCount--;
458+ if (fail === null) {
459+ result = util.fromRight(step);
460+ // We need to enqueue the Release with the same interrupt
461+ // status as the Bracket that is initiating it.
462+ attempts = new Aff(CONS, new Aff(RELEASE, attempt._2, result), attempts, tmp);
463+ // We should only coninue as long as the interrupt status has not changed or
464+ // we are currently within a non-interruptable finalizer.
465+ if (interrupt === tmp || bracketCount > 0) {
466+ status = CONTINUE;
467+ step = attempt._3(result);
468+ }
469+ }
470+ break;
471+
472+ // Enqueue the appropriate handler. We increase the bracket count
473+ // because it should not be cancelled.
474+ case RELEASE:
475+ attempts = new Aff(CONS, new Aff(FINALIZED, step, fail), attempts, interrupt);
476+ status = CONTINUE;
477+ // It has only been killed if the interrupt status has changed
478+ // since we enqueued the item, and the bracket count is 0. If the
479+ // bracket count is non-zero then we are in a masked state so it's
480+ // impossible to be killed.
481+ if (interrupt && interrupt !== tmp && bracketCount === 0) {
482+ step = attempt._1.killed(util.fromLeft(interrupt))(attempt._2);
483+ } else if (fail) {
484+ step = attempt._1.failed(util.fromLeft(fail))(attempt._2);
485+ } else {
486+ step = attempt._1.completed(util.fromRight(step))(attempt._2);
487+ }
488+ fail = null;
489+ bracketCount++;
490+ break;
491+
492+ case FINALIZER:
493+ bracketCount++;
494+ attempts = new Aff(CONS, new Aff(FINALIZED, step, fail), attempts, interrupt);
495+ status = CONTINUE;
496+ step = attempt._1;
497+ break;
498+
499+ case FINALIZED:
500+ bracketCount--;
501+ status = RETURN;
502+ step = attempt._1;
503+ fail = attempt._2;
504+ break;
505+ }
506+ }
507+ break;
508+
509+ case COMPLETED:
510+ for (var k in joins) {
511+ if (joins.hasOwnProperty(k)) {
512+ rethrow = rethrow && joins[k].rethrow;
513+ runEff(joins[k].handler(step));
514+ }
515+ }
516+ joins = null;
517+ // If we have an interrupt and a fail, then the thread threw while
518+ // running finalizers. This should always rethrow in a fresh stack.
519+ if (interrupt && fail) {
520+ setTimeout(function () {
521+ throw util.fromLeft(fail);
522+ }, 0);
523+ // If we have an unhandled exception, and no other fiber has joined
524+ // then we need to throw the exception in a fresh stack.
525+ } else if (util.isLeft(step) && rethrow) {
526+ setTimeout(function () {
527+ // Guard on reathrow because a completely synchronous fiber can
528+ // still have an observer which was added after-the-fact.
529+ if (rethrow) {
530+ throw util.fromLeft(step);
531+ }
532+ }, 0);
533+ }
534+ return;
535+ case SUSPENDED:
536+ status = CONTINUE;
537+ break;
538+ case PENDING: return;
539+ }
540+ }
541+ }
542+
543+ function onComplete(join) {
544+ return function () {
545+ if (status === COMPLETED) {
546+ rethrow = rethrow && join.rethrow;
547+ join.handler(step)();
548+ return function () {};
549+ }
550+
551+ var jid = joinId++;
552+ joins = joins || {};
553+ joins[jid] = join;
554+
555+ return function() {
556+ if (joins !== null) {
557+ delete joins[jid];
558+ }
559+ };
560+ };
561+ }
562+
563+ function kill(error, cb) {
564+ return function () {
565+ if (status === COMPLETED) {
566+ cb(util.right(void 0))();
567+ return function () {};
568+ }
569+
570+ var canceler = onComplete({
571+ rethrow: false,
572+ handler: function (/* unused */) {
573+ return cb(util.right(void 0));
574+ }
575+ })();
576+
577+ switch (status) {
578+ case SUSPENDED:
579+ interrupt = util.left(error);
580+ status = COMPLETED;
581+ step = interrupt;
582+ run(runTick);
583+ break;
584+ case PENDING:
585+ if (interrupt === null) {
586+ interrupt = util.left(error);
587+ }
588+ if (bracketCount === 0) {
589+ if (status === PENDING) {
590+ attempts = new Aff(CONS, new Aff(FINALIZER, step(error)), attempts, interrupt);
591+ }
592+ status = RETURN;
593+ step = null;
594+ fail = null;
595+ run(++runTick);
596+ }
597+ break;
598+ default:
599+ if (interrupt === null) {
600+ interrupt = util.left(error);
601+ }
602+ if (bracketCount === 0) {
603+ status = RETURN;
604+ step = null;
605+ fail = null;
606+ }
607+ }
608+
609+ return canceler;
610+ };
611+ }
612+
613+ function join(cb) {
614+ return function () {
615+ var canceler = onComplete({
616+ rethrow: false,
617+ handler: cb
618+ })();
619+ if (status === SUSPENDED) {
620+ run(runTick);
621+ }
622+ return canceler;
623+ };
624+ }
625+
626+ return {
627+ kill: kill,
628+ join: join,
629+ onComplete: onComplete,
630+ isSuspended: function () {
631+ return status === SUSPENDED;
632+ },
633+ run: function () {
634+ if (status === SUSPENDED) {
635+ if (!Scheduler.isDraining()) {
636+ Scheduler.enqueue(function () {
637+ run(runTick);
638+ });
639+ } else {
640+ run(runTick);
641+ }
642+ }
643+ }
644+ };
645+ }
646+
647+ function runPar(util, supervisor, par, cb) {
648+ // Table of all forked fibers.
649+ var fiberId = 0;
650+ var fibers = {};
651+
652+ // Table of currently running cancelers, as a product of `Alt` behavior.
653+ var killId = 0;
654+ var kills = {};
655+
656+ // Error used for early cancelation on Alt branches.
657+ var early = new Error("[ParAff] Early exit");
658+
659+ // Error used to kill the entire tree.
660+ var interrupt = null;
661+
662+ // The root pointer of the tree.
663+ var root = EMPTY;
664+
665+ // Walks a tree, invoking all the cancelers. Returns the table of pending
666+ // cancellation fibers.
667+ function kill(error, par, cb) {
668+ var step = par;
669+ var head = null;
670+ var tail = null;
671+ var count = 0;
672+ var kills = {};
673+ var tmp, kid;
674+
675+ loop: while (true) {
676+ tmp = null;
677+
678+ switch (step.tag) {
679+ case FORKED:
680+ if (step._3 === EMPTY) {
681+ tmp = fibers[step._1];
682+ kills[count++] = tmp.kill(error, function (result) {
683+ return function () {
684+ count--;
685+ if (count === 0) {
686+ cb(result)();
687+ }
688+ };
689+ });
690+ }
691+ // Terminal case.
692+ if (head === null) {
693+ break loop;
694+ }
695+ // Go down the right side of the tree.
696+ step = head._2;
697+ if (tail === null) {
698+ head = null;
699+ } else {
700+ head = tail._1;
701+ tail = tail._2;
702+ }
703+ break;
704+ case MAP:
705+ step = step._2;
706+ break;
707+ case APPLY:
708+ case ALT:
709+ if (head) {
710+ tail = new Aff(CONS, head, tail);
711+ }
712+ head = step;
713+ step = step._1;
714+ break;
715+ }
716+ }
717+
718+ if (count === 0) {
719+ cb(util.right(void 0))();
720+ } else {
721+ // Run the cancelation effects. We alias `count` because it's mutable.
722+ kid = 0;
723+ tmp = count;
724+ for (; kid < tmp; kid++) {
725+ kills[kid] = kills[kid]();
726+ }
727+ }
728+
729+ return kills;
730+ }
731+
732+ // When a fiber resolves, we need to bubble back up the tree with the
733+ // result, computing the applicative nodes.
734+ function join(result, head, tail) {
735+ var fail, step, lhs, rhs, tmp, kid;
736+
737+ if (util.isLeft(result)) {
738+ fail = result;
739+ step = null;
740+ } else {
741+ step = result;
742+ fail = null;
743+ }
744+
745+ loop: while (true) {
746+ lhs = null;
747+ rhs = null;
748+ tmp = null;
749+ kid = null;
750+
751+ // We should never continue if the entire tree has been interrupted.
752+ if (interrupt !== null) {
753+ return;
754+ }
755+
756+ // We've made it all the way to the root of the tree, which means
757+ // the tree has fully evaluated.
758+ if (head === null) {
759+ cb(fail || step)();
760+ return;
761+ }
762+
763+ // The tree has already been computed, so we shouldn't try to do it
764+ // again. This should never happen.
765+ // TODO: Remove this?
766+ if (head._3 !== EMPTY) {
767+ return;
768+ }
769+
770+ switch (head.tag) {
771+ case MAP:
772+ if (fail === null) {
773+ head._3 = util.right(head._1(util.fromRight(step)));
774+ step = head._3;
775+ } else {
776+ head._3 = fail;
777+ }
778+ break;
779+ case APPLY:
780+ lhs = head._1._3;
781+ rhs = head._2._3;
782+ // If we have a failure we should kill the other side because we
783+ // can't possible yield a result anymore.
784+ if (fail) {
785+ head._3 = fail;
786+ tmp = true;
787+ kid = killId++;
788+
789+ kills[kid] = kill(early, fail === lhs ? head._2 : head._1, function (/* unused */) {
790+ return function () {
791+ delete kills[kid];
792+ if (tmp) {
793+ tmp = false;
794+ } else if (tail === null) {
795+ join(fail, null, null);
796+ } else {
797+ join(fail, tail._1, tail._2);
798+ }
799+ };
800+ });
801+
802+ if (tmp) {
803+ tmp = false;
804+ return;
805+ }
806+ } else if (lhs === EMPTY || rhs === EMPTY) {
807+ // We can only proceed if both sides have resolved.
808+ return;
809+ } else {
810+ step = util.right(util.fromRight(lhs)(util.fromRight(rhs)));
811+ head._3 = step;
812+ }
813+ break;
814+ case ALT:
815+ lhs = head._1._3;
816+ rhs = head._2._3;
817+ // We can only proceed if both have resolved or we have a success
818+ if (lhs === EMPTY && util.isLeft(rhs) || rhs === EMPTY && util.isLeft(lhs)) {
819+ return;
820+ }
821+ // If both sides resolve with an error, we should continue with the
822+ // first error
823+ if (lhs !== EMPTY && util.isLeft(lhs) && rhs !== EMPTY && util.isLeft(rhs)) {
824+ fail = step === lhs ? rhs : lhs;
825+ step = null;
826+ head._3 = fail;
827+ } else {
828+ head._3 = step;
829+ tmp = true;
830+ kid = killId++;
831+ // Once a side has resolved, we need to cancel the side that is still
832+ // pending before we can continue.
833+ kills[kid] = kill(early, step === lhs ? head._2 : head._1, function (/* unused */) {
834+ return function () {
835+ delete kills[kid];
836+ if (tmp) {
837+ tmp = false;
838+ } else if (tail === null) {
839+ join(step, null, null);
840+ } else {
841+ join(step, tail._1, tail._2);
842+ }
843+ };
844+ });
845+
846+ if (tmp) {
847+ tmp = false;
848+ return;
849+ }
850+ }
851+ break;
852+ }
853+
854+ if (tail === null) {
855+ head = null;
856+ } else {
857+ head = tail._1;
858+ tail = tail._2;
859+ }
860+ }
861+ }
862+
863+ function resolve(fiber) {
864+ return function (result) {
865+ return function () {
866+ delete fibers[fiber._1];
867+ fiber._3 = result;
868+ join(result, fiber._2._1, fiber._2._2);
869+ };
870+ };
871+ }
872+
873+ // Walks the applicative tree, substituting non-applicative nodes with
874+ // `FORKED` nodes. In this tree, all applicative nodes use the `_3` slot
875+ // as a mutable slot for memoization. In an unresolved state, the `_3`
876+ // slot is `EMPTY`. In the cases of `ALT` and `APPLY`, we always walk
877+ // the left side first, because both operations are left-associative. As
878+ // we `RETURN` from those branches, we then walk the right side.
879+ function run() {
880+ var status = CONTINUE;
881+ var step = par;
882+ var head = null;
883+ var tail = null;
884+ var tmp, fid;
885+
886+ loop: while (true) {
887+ tmp = null;
888+ fid = null;
889+
890+ switch (status) {
891+ case CONTINUE:
892+ switch (step.tag) {
893+ case MAP:
894+ if (head) {
895+ tail = new Aff(CONS, head, tail);
896+ }
897+ head = new Aff(MAP, step._1, EMPTY, EMPTY);
898+ step = step._2;
899+ break;
900+ case APPLY:
901+ if (head) {
902+ tail = new Aff(CONS, head, tail);
903+ }
904+ head = new Aff(APPLY, EMPTY, step._2, EMPTY);
905+ step = step._1;
906+ break;
907+ case ALT:
908+ if (head) {
909+ tail = new Aff(CONS, head, tail);
910+ }
911+ head = new Aff(ALT, EMPTY, step._2, EMPTY);
912+ step = step._1;
913+ break;
914+ default:
915+ // When we hit a leaf value, we suspend the stack in the `FORKED`.
916+ // When the fiber resolves, it can bubble back up the tree.
917+ fid = fiberId++;
918+ status = RETURN;
919+ tmp = step;
920+ step = new Aff(FORKED, fid, new Aff(CONS, head, tail), EMPTY);
921+ tmp = Fiber(util, supervisor, tmp);
922+ tmp.onComplete({
923+ rethrow: false,
924+ handler: resolve(step)
925+ })();
926+ fibers[fid] = tmp;
927+ if (supervisor) {
928+ supervisor.register(tmp);
929+ }
930+ }
931+ break;
932+ case RETURN:
933+ // Terminal case, we are back at the root.
934+ if (head === null) {
935+ break loop;
936+ }
937+ // If we are done with the right side, we need to continue down the
938+ // left. Otherwise we should continue up the stack.
939+ if (head._1 === EMPTY) {
940+ head._1 = step;
941+ status = CONTINUE;
942+ step = head._2;
943+ head._2 = EMPTY;
944+ } else {
945+ head._2 = step;
946+ step = head;
947+ if (tail === null) {
948+ head = null;
949+ } else {
950+ head = tail._1;
951+ tail = tail._2;
952+ }
953+ }
954+ }
955+ }
956+
957+ // Keep a reference to the tree root so it can be cancelled.
958+ root = step;
959+
960+ for (fid = 0; fid < fiberId; fid++) {
961+ fibers[fid].run();
962+ }
963+ }
964+
965+ // Cancels the entire tree. If there are already subtrees being canceled,
966+ // we need to first cancel those joins. We will then add fresh joins for
967+ // all pending branches including those that were in the process of being
968+ // canceled.
969+ function cancel(error, cb) {
970+ interrupt = util.left(error);
971+ var innerKills;
972+ for (var kid in kills) {
973+ if (kills.hasOwnProperty(kid)) {
974+ innerKills = kills[kid];
975+ for (kid in innerKills) {
976+ if (innerKills.hasOwnProperty(kid)) {
977+ innerKills[kid]();
978+ }
979+ }
980+ }
981+ }
982+
983+ kills = null;
984+ var newKills = kill(error, root, cb);
985+
986+ return function (killError) {
987+ return new Aff(ASYNC, function (killCb) {
988+ return function () {
989+ for (var kid in newKills) {
990+ if (newKills.hasOwnProperty(kid)) {
991+ newKills[kid]();
992+ }
993+ }
994+ return nonCanceler;
995+ };
996+ });
997+ };
998+ }
999+
1000+ run();
1001+
1002+ return function (killError) {
1003+ return new Aff(ASYNC, function (killCb) {
1004+ return function () {
1005+ return cancel(killError, killCb);
1006+ };
1007+ });
1008+ };
1009+ }
1010+
1011+ function sequential(util, supervisor, par) {
1012+ return new Aff(ASYNC, function (cb) {
1013+ return function () {
1014+ return runPar(util, supervisor, par, cb);
1015+ };
1016+ });
1017+ }
1018+
1019+ Aff.EMPTY = EMPTY;
1020+ Aff.Pure = AffCtr(PURE);
1021+ Aff.Throw = AffCtr(THROW);
1022+ Aff.Catch = AffCtr(CATCH);
1023+ Aff.Sync = AffCtr(SYNC);
1024+ Aff.Async = AffCtr(ASYNC);
1025+ Aff.Bind = AffCtr(BIND);
1026+ Aff.Bracket = AffCtr(BRACKET);
1027+ Aff.Fork = AffCtr(FORK);
1028+ Aff.Seq = AffCtr(SEQ);
1029+ Aff.ParMap = AffCtr(MAP);
1030+ Aff.ParApply = AffCtr(APPLY);
1031+ Aff.ParAlt = AffCtr(ALT);
1032+ Aff.Fiber = Fiber;
1033+ Aff.Supervisor = Supervisor;
1034+ Aff.Scheduler = Scheduler;
1035+ Aff.nonCanceler = nonCanceler;
1036+
1037+ return Aff;
1038+}();
1039+
1040+export const _pure = Aff.Pure;
1041+export const _throwError = Aff.Throw;
1042+
1043+export function _catchError(aff) {
1044+ return function (k) {
1045+ return Aff.Catch(aff, k);
1046+ };
1047+}
1048+
1049+export function _map(f) {
1050+ return function (aff) {
1051+ if (aff.tag === Aff.Pure.tag) {
1052+ return Aff.Pure(f(aff._1));
1053+ } else {
1054+ return Aff.Bind(aff, function (value) {
1055+ return Aff.Pure(f(value));
1056+ });
1057+ }
1058+ };
1059+}
1060+
1061+export function _bind(aff) {
1062+ return function (k) {
1063+ return Aff.Bind(aff, k);
1064+ };
1065+}
1066+
1067+export function _fork(immediate) {
1068+ return function (aff) {
1069+ return Aff.Fork(immediate, aff);
1070+ };
1071+}
1072+
1073+export const _liftEffect = Aff.Sync;
1074+
1075+export function _parAffMap(f) {
1076+ return function (aff) {
1077+ return Aff.ParMap(f, aff);
1078+ };
1079+}
1080+
1081+export function _parAffApply(aff1) {
1082+ return function (aff2) {
1083+ return Aff.ParApply(aff1, aff2);
1084+ };
1085+}
1086+
1087+export function _parAffAlt(aff1) {
1088+ return function (aff2) {
1089+ return Aff.ParAlt(aff1, aff2);
1090+ };
1091+}
1092+
1093+export const makeAff = Aff.Async;
1094+
1095+export function generalBracket(acquire) {
1096+ return function (options) {
1097+ return function (k) {
1098+ return Aff.Bracket(acquire, options, k);
1099+ };
1100+ };
1101+}
1102+
1103+export function _makeFiber(util, aff) {
1104+ return function () {
1105+ return Aff.Fiber(util, null, aff);
1106+ };
1107+}
1108+
1109+export function _makeSupervisedFiber(util, aff) {
1110+ return function () {
1111+ var supervisor = Aff.Supervisor(util);
1112+ return {
1113+ fiber: Aff.Fiber(util, supervisor, aff),
1114+ supervisor: supervisor
1115+ };
1116+ };
1117+}
1118+
1119+export function _killAll(error, supervisor, cb) {
1120+ return supervisor.killAll(error, cb);
1121+}
1122+
1123+export const _delay = function () {
1124+ function setDelay(n, k) {
1125+ if (n === 0 && typeof setImmediate !== "undefined") {
1126+ return setImmediate(k);
1127+ } else {
1128+ return setTimeout(k, n);
1129+ }
1130+ }
1131+
1132+ function clearDelay(n, t) {
1133+ if (n === 0 && typeof clearImmediate !== "undefined") {
1134+ return clearImmediate(t);
1135+ } else {
1136+ return clearTimeout(t);
1137+ }
1138+ }
1139+
1140+ return function (right, ms) {
1141+ return Aff.Async(function (cb) {
1142+ return function () {
1143+ var timer = setDelay(ms, cb(right()));
1144+ return function () {
1145+ return Aff.Sync(function () {
1146+ return right(clearDelay(ms, timer));
1147+ });
1148+ };
1149+ };
1150+ });
1151+ };
1152+}();
1153+
1154+export const _sequential = Aff.Seq;
.spago/p/aff-8.0.0/src/Effect/Aff.pursnew file+414
@@ -0,0 +1,414 @@
1+module Effect.Aff
2+ ( Aff
3+ , Fiber
4+ , ParAff(..)
5+ , Canceler(..)
6+ , makeAff
7+ , launchAff
8+ , launchAff_
9+ , launchSuspendedAff
10+ , runAff
11+ , runAff_
12+ , runSuspendedAff
13+ , forkAff
14+ , suspendAff
15+ , supervise
16+ , attempt
17+ , apathize
18+ , delay
19+ , never
20+ , finally
21+ , invincible
22+ , killFiber
23+ , joinFiber
24+ , cancelWith
25+ , bracket
26+ , BracketConditions
27+ , generalBracket
28+ , nonCanceler
29+ , effectCanceler
30+ , fiberCanceler
31+ , module Exports
32+ ) where
33+
34+import Prelude
35+
36+import Control.Alt (class Alt)
37+import Control.Alternative (class Alternative)
38+import Control.Apply (lift2)
39+import Control.Lazy (class Lazy)
40+import Control.Monad.Error.Class (class MonadError, class MonadThrow, throwError, catchError, try)
41+import Control.Monad.Error.Class (try, throwError, catchError) as Exports
42+import Control.Monad.Rec.Class (class MonadRec, Step(..))
43+import Control.Monad.ST.Class (class MonadST, liftST)
44+import Control.Monad.ST.Global (Global)
45+import Control.Parallel (parSequence_, parallel)
46+import Control.Parallel.Class (class Parallel)
47+import Control.Parallel.Class (sequential, parallel) as Exports
48+import Control.Plus (class Plus, empty)
49+import Data.Either (Either(..))
50+import Data.Function.Uncurried as Fn
51+import Data.Newtype (class Newtype)
52+import Data.Time.Duration (Milliseconds(..))
53+import Data.Time.Duration (Milliseconds(..)) as Exports
54+import Effect (Effect)
55+import Effect.Class (class MonadEffect, liftEffect)
56+import Effect.Exception (Error, error)
57+import Effect.Exception (Error, error, message) as Exports
58+import Effect.Unsafe (unsafePerformEffect)
59+import Partial.Unsafe (unsafeCrashWith)
60+import Unsafe.Coerce (unsafeCoerce)
61+
62+-- | An `Aff a` is an asynchronous computation with effects. The
63+-- | computation may either error with an exception, or produce a result of
64+-- | type `a`. `Aff` effects are assembled from primitive `Effect` effects using
65+-- | `makeAff` or `liftEffect`.
66+foreign import data Aff :: Type -> Type
67+
68+type role Aff representational
69+
70+instance functorAff :: Functor Aff where
71+ map = _map
72+
73+instance applyAff :: Apply Aff where
74+ apply = ap
75+
76+instance applicativeAff :: Applicative Aff where
77+ pure = _pure
78+
79+instance bindAff :: Bind Aff where
80+ bind = _bind
81+
82+instance monadAff :: Monad Aff
83+
84+instance semigroupAff :: Semigroup a => Semigroup (Aff a) where
85+ append = lift2 append
86+
87+instance monoidAff :: Monoid a => Monoid (Aff a) where
88+ mempty = pure mempty
89+
90+instance altAff :: Alt Aff where
91+ alt a1 a2 = catchError a1 (const a2)
92+
93+instance plusAff :: Plus Aff where
94+ empty = throwError (error "Always fails")
95+
96+-- | This instance is provided for compatibility. `Aff` is always stack-safe
97+-- | within a given fiber. This instance will just result in unnecessary
98+-- | bind overhead.
99+instance monadRecAff :: MonadRec Aff where
100+ tailRecM k = go
101+ where
102+ go a = do
103+ res <- k a
104+ case res of
105+ Done r -> pure r
106+ Loop b -> go b
107+
108+instance monadThrowAff :: MonadThrow Error Aff where
109+ throwError = _throwError
110+
111+instance monadErrorAff :: MonadError Error Aff where
112+ catchError = _catchError
113+
114+instance monadEffectAff :: MonadEffect Aff where
115+ liftEffect = _liftEffect
116+
117+instance lazyAff :: Lazy (Aff a) where
118+ defer f = pure unit >>= f
119+
120+instance monadSTAff :: MonadST Global Aff where
121+ liftST = liftST >>> liftEffect
122+
123+-- | Applicative for running parallel effects. Any `Aff` can be coerced to a
124+-- | `ParAff` and back using the `Parallel` class.
125+foreign import data ParAff :: Type -> Type
126+
127+type role ParAff representational
128+
129+instance functorParAff :: Functor ParAff where
130+ map = _parAffMap
131+
132+-- | Runs effects in parallel, combining their results.
133+instance applyParAff :: Apply ParAff where
134+ apply = _parAffApply
135+
136+instance applicativeParAff :: Applicative ParAff where
137+ pure = parallel <<< pure
138+
139+instance semigroupParAff :: Semigroup a => Semigroup (ParAff a) where
140+ append = lift2 append
141+
142+instance monoidParAff :: Monoid a => Monoid (ParAff a) where
143+ mempty = pure mempty
144+
145+-- | Races effects in parallel. Returns the first successful result or the
146+-- | first error if all fail with an exception. Losing branches will be
147+-- | cancelled.
148+instance altParAff :: Alt ParAff where
149+ alt = _parAffAlt
150+
151+instance plusParAff :: Plus ParAff where
152+ empty = parallel empty
153+
154+instance alternativeParAff :: Alternative ParAff
155+
156+instance parallelAff :: Parallel ParAff Aff where
157+ parallel = (unsafeCoerce :: forall a. Aff a -> ParAff a)
158+ sequential = _sequential
159+
160+type OnComplete a =
161+ { rethrow :: Boolean
162+ , handler :: (Either Error a -> Effect Unit) -> Effect Unit
163+ }
164+
165+-- | Represents a forked computation by way of `forkAff`. `Fiber`s are
166+-- | memoized, so their results are only computed once.
167+newtype Fiber a = Fiber
168+ { run :: Effect Unit
169+ , kill :: Fn.Fn2 Error (Either Error Unit -> Effect Unit) (Effect (Effect Unit))
170+ , join :: (Either Error a -> Effect Unit) -> Effect (Effect Unit)
171+ , onComplete :: OnComplete a -> Effect (Effect Unit)
172+ , isSuspended :: Effect Boolean
173+ }
174+
175+instance functorFiber :: Functor Fiber where
176+ map f t = unsafePerformEffect (makeFiber (f <$> joinFiber t))
177+
178+instance applyFiber :: Apply Fiber where
179+ apply t1 t2 = unsafePerformEffect (makeFiber (joinFiber t1 <*> joinFiber t2))
180+
181+instance applicativeFiber :: Applicative Fiber where
182+ pure a = unsafePerformEffect (makeFiber (pure a))
183+
184+-- | Invokes pending cancelers in a fiber and runs cleanup effects. Blocks
185+-- | until the fiber has fully exited.
186+killFiber :: forall a. Error -> Fiber a -> Aff Unit
187+killFiber e (Fiber t) = do
188+ suspended <- liftEffect t.isSuspended
189+ if suspended then
190+ liftEffect $ void $ Fn.runFn2 t.kill e (const (pure unit))
191+ else
192+ makeAff \k -> effectCanceler <$> Fn.runFn2 t.kill e k
193+
194+-- | Blocks until the fiber completes, yielding the result. If the fiber
195+-- | throws an exception, it is rethrown in the current fiber.
196+joinFiber :: Fiber ~> Aff
197+joinFiber (Fiber t) = makeAff \k -> effectCanceler <$> t.join k
198+
199+-- | A cancellation effect for actions run via `makeAff`. If a `Fiber` is
200+-- | killed, and an async action is pending, the canceler will be called to
201+-- | clean it up.
202+newtype Canceler = Canceler (Error -> Aff Unit)
203+
204+derive instance newtypeCanceler :: Newtype Canceler _
205+
206+instance semigroupCanceler :: Semigroup Canceler where
207+ append (Canceler c1) (Canceler c2) =
208+ Canceler \err -> parSequence_ [ c1 err, c2 err ]
209+
210+-- | A no-op `Canceler` can be constructed with `mempty`.
211+instance monoidCanceler :: Monoid Canceler where
212+ mempty = nonCanceler
213+
214+-- | A canceler which does not cancel anything.
215+nonCanceler :: Canceler
216+nonCanceler = Canceler (const (pure unit))
217+
218+-- | A canceler from an Effect action.
219+effectCanceler :: Effect Unit -> Canceler
220+effectCanceler = Canceler <<< const <<< liftEffect
221+
222+-- | A canceler from a Fiber.
223+fiberCanceler :: forall a. Fiber a -> Canceler
224+fiberCanceler = Canceler <<< flip killFiber
225+
226+-- | Forks an `Aff` from an `Effect` context, returning the `Fiber`.
227+launchAff :: forall a. Aff a -> Effect (Fiber a)
228+launchAff aff = do
229+ fiber <- makeFiber aff
230+ case fiber of Fiber f -> f.run
231+ pure fiber
232+
233+-- | Forks an `Aff` from an `Effect` context, discarding the `Fiber`.
234+launchAff_ :: Aff Unit -> Effect Unit
235+launchAff_ = void <<< launchAff
236+
237+-- | Suspends an `Aff` from an `Effect` context, returning the `Fiber`.
238+launchSuspendedAff :: forall a. Aff a -> Effect (Fiber a)
239+launchSuspendedAff = makeFiber
240+
241+-- | Forks an `Aff` from an `Effect` context and also takes a callback to run when
242+-- | it completes. Returns the pending `Fiber`.
243+runAff :: forall a. (Either Error a -> Effect Unit) -> Aff a -> Effect (Fiber Unit)
244+runAff k aff = launchAff $ liftEffect <<< k =<< try aff
245+
246+-- | Forks an `Aff` from an `Effect` context and also takes a callback to run when
247+-- | it completes, discarding the `Fiber`.
248+runAff_ :: forall a. (Either Error a -> Effect Unit) -> Aff a -> Effect Unit
249+runAff_ k aff = void $ runAff k aff
250+
251+-- | Suspends an `Aff` from an `Effect` context and also takes a callback to run
252+-- | when it completes. Returns the suspended `Fiber`.
253+runSuspendedAff :: forall a. (Either Error a -> Effect Unit) -> Aff a -> Effect (Fiber Unit)
254+runSuspendedAff k aff = launchSuspendedAff $ liftEffect <<< k =<< try aff
255+
256+-- | Forks an `Aff` from within a parent `Aff` context, returning the `Fiber`.
257+forkAff :: forall a. Aff a -> Aff (Fiber a)
258+forkAff = _fork true
259+
260+-- | Suspends an `Aff` from within a parent `Aff` context, returning the `Fiber`.
261+-- | A suspended `Aff` is not executed until a consumer observes the result
262+-- | with `joinFiber`.
263+suspendAff :: forall a. Aff a -> Aff (Fiber a)
264+suspendAff = _fork false
265+
266+-- | Pauses the running fiber.
267+delay :: Milliseconds -> Aff Unit
268+delay (Milliseconds n) = Fn.runFn2 _delay Right n
269+
270+-- | An async computation which does not resolve.
271+never :: forall a. Aff a
272+never = makeAff \_ -> pure mempty
273+
274+-- | A monomorphic version of `try`. Catches thrown errors and lifts them
275+-- | into an `Either`.
276+attempt :: forall a. Aff a -> Aff (Either Error a)
277+attempt = try
278+
279+-- | Ignores any errors.
280+apathize :: forall a. Aff a -> Aff Unit
281+apathize = attempt >>> map (const unit)
282+
283+-- | Runs the first effect after the second, regardless of whether it completed
284+-- | successfully or the fiber was cancelled.
285+finally :: forall a. Aff Unit -> Aff a -> Aff a
286+finally fin a = bracket (pure unit) (const fin) (const a)
287+
288+-- | Runs an effect such that it cannot be killed.
289+invincible :: forall a. Aff a -> Aff a
290+invincible a = bracket a (const (pure unit)) pure
291+
292+-- | Attaches a custom `Canceler` to an action. If the computation is canceled,
293+-- | then the custom `Canceler` will be run afterwards.
294+cancelWith :: forall a. Aff a -> Canceler -> Aff a
295+cancelWith aff (Canceler cancel) =
296+ generalBracket (pure unit)
297+ { killed: \e _ -> cancel e
298+ , failed: const pure
299+ , completed: const pure
300+ }
301+ (const aff)
302+
303+-- | Guarantees resource acquisition and cleanup. The first effect may acquire
304+-- | some resource, while the second will dispose of it. The third effect makes
305+-- | use of the resource. Disposal is always run last, regardless. Neither
306+-- | acquisition nor disposal may be cancelled and are guaranteed to run until
307+-- | they complete.
308+bracket :: forall a b. Aff a -> (a -> Aff Unit) -> (a -> Aff b) -> Aff b
309+bracket acquire completed =
310+ generalBracket acquire
311+ { killed: const completed
312+ , failed: const completed
313+ , completed: const completed
314+ }
315+
316+type Supervised a =
317+ { fiber :: Fiber a
318+ , supervisor :: Supervisor
319+ }
320+
321+-- | Creates a new supervision context for some `Aff`, guaranteeing fiber
322+-- | cleanup when the parent completes. Any pending fibers forked within
323+-- | the context will be killed and have their cancelers run.
324+supervise :: forall a. Aff a -> Aff a
325+supervise aff =
326+ generalBracket (liftEffect acquire)
327+ { killed: \err sup -> parSequence_ [ killFiber err sup.fiber, killAll err sup ]
328+ , failed: const (killAll killError)
329+ , completed: const (killAll killError)
330+ }
331+ (joinFiber <<< _.fiber)
332+ where
333+ killError :: Error
334+ killError =
335+ error "[Aff] Child fiber outlived parent"
336+
337+ killAll :: Error -> Supervised a -> Aff Unit
338+ killAll err sup = makeAff \k ->
339+ Fn.runFn3 _killAll err sup.supervisor (k (pure unit))
340+
341+ acquire :: Effect (Supervised a)
342+ acquire = do
343+ sup <- Fn.runFn2 _makeSupervisedFiber ffiUtil aff
344+ case sup.fiber of Fiber f -> f.run
345+ pure sup
346+
347+foreign import data Supervisor :: Type
348+foreign import _pure :: forall a. a -> Aff a
349+foreign import _throwError :: forall a. Error -> Aff a
350+foreign import _catchError :: forall a. Aff a -> (Error -> Aff a) -> Aff a
351+foreign import _fork :: forall a. Boolean -> Aff a -> Aff (Fiber a)
352+foreign import _map :: forall a b. (a -> b) -> Aff a -> Aff b
353+foreign import _bind :: forall a b. Aff a -> (a -> Aff b) -> Aff b
354+foreign import _delay :: forall a. Fn.Fn2 (Unit -> Either a Unit) Number (Aff Unit)
355+foreign import _liftEffect :: forall a. Effect a -> Aff a
356+foreign import _parAffMap :: forall a b. (a -> b) -> ParAff a -> ParAff b
357+foreign import _parAffApply :: forall a b. ParAff (a -> b) -> ParAff a -> ParAff b
358+foreign import _parAffAlt :: forall a. ParAff a -> ParAff a -> ParAff a
359+foreign import _makeFiber :: forall a. Fn.Fn2 FFIUtil (Aff a) (Effect (Fiber a))
360+foreign import _makeSupervisedFiber :: forall a. Fn.Fn2 FFIUtil (Aff a) (Effect (Supervised a))
361+foreign import _killAll :: Fn.Fn3 Error Supervisor (Effect Unit) (Effect Canceler)
362+foreign import _sequential :: ParAff ~> Aff
363+
364+type BracketConditions a b =
365+ { killed :: Error -> a -> Aff Unit
366+ , failed :: Error -> a -> Aff Unit
367+ , completed :: b -> a -> Aff Unit
368+ }
369+
370+-- | A general purpose bracket which lets you observe the status of the
371+-- | bracketed action. The bracketed action may have been killed with an
372+-- | exception, thrown an exception, or completed successfully.
373+foreign import generalBracket :: forall a b. Aff a -> BracketConditions a b -> (a -> Aff b) -> Aff b
374+
375+-- | Constructs an `Aff` from low-level `Effect` effects using a callback. A
376+-- | `Canceler` effect should be returned to cancel the pending action. The
377+-- | supplied callback may be invoked only once. Subsequent invocation are
378+-- | ignored.
379+foreign import makeAff :: forall a. ((Either Error a -> Effect Unit) -> Effect Canceler) -> Aff a
380+
381+makeFiber :: forall a. Aff a -> Effect (Fiber a)
382+makeFiber aff = Fn.runFn2 _makeFiber ffiUtil aff
383+
384+newtype FFIUtil = FFIUtil
385+ { isLeft :: forall a b. Either a b -> Boolean
386+ , fromLeft :: forall a b. Either a b -> a
387+ , fromRight :: forall a b. Either a b -> b
388+ , left :: forall a b. a -> Either a b
389+ , right :: forall a b. b -> Either a b
390+ }
391+
392+ffiUtil :: FFIUtil
393+ffiUtil = FFIUtil
394+ { isLeft
395+ , fromLeft: unsafeFromLeft
396+ , fromRight: unsafeFromRight
397+ , left: Left
398+ , right: Right
399+ }
400+ where
401+ isLeft :: forall a b. Either a b -> Boolean
402+ isLeft = case _ of
403+ Left _ -> true
404+ Right _ -> false
405+
406+ unsafeFromLeft :: forall a b. Either a b -> a
407+ unsafeFromLeft = case _ of
408+ Left a -> a
409+ Right _ -> unsafeCrashWith "unsafeFromLeft: Right"
410+
411+ unsafeFromRight :: forall a b. Either a b -> b
412+ unsafeFromRight = case _ of
413+ Right a -> a
414+ Left _ -> unsafeCrashWith "unsafeFromRight: Left"
.spago/p/aff-8.0.0/src/Effect/Aff/Class.pursnew file+44
@@ -0,0 +1,44 @@
1+module Effect.Aff.Class where
2+
3+import Prelude
4+import Control.Monad.Cont.Trans (ContT)
5+import Control.Monad.Except.Trans (ExceptT)
6+import Control.Monad.List.Trans (ListT)
7+import Control.Monad.Maybe.Trans (MaybeT)
8+import Control.Monad.Reader.Trans (ReaderT)
9+import Control.Monad.RWS.Trans (RWST)
10+import Control.Monad.State.Trans (StateT)
11+import Control.Monad.Trans.Class (lift)
12+import Control.Monad.Writer.Trans (WriterT)
13+import Effect.Aff (Aff)
14+import Effect.Class (class MonadEffect)
15+
16+class MonadEffect m <= MonadAff m where
17+ liftAff :: Aff ~> m
18+
19+instance monadAffAff :: MonadAff Aff where
20+ liftAff = identity
21+
22+instance monadAffContT :: MonadAff m => MonadAff (ContT r m) where
23+ liftAff = lift <<< liftAff
24+
25+instance monadAffExceptT :: MonadAff m => MonadAff (ExceptT e m) where
26+ liftAff = lift <<< liftAff
27+
28+instance monadAffListT :: MonadAff m => MonadAff (ListT m) where
29+ liftAff = lift <<< liftAff
30+
31+instance monadAffMaybe :: MonadAff m => MonadAff (MaybeT m) where
32+ liftAff = lift <<< liftAff
33+
34+instance monadAffReader :: MonadAff m => MonadAff (ReaderT r m) where
35+ liftAff = lift <<< liftAff
36+
37+instance monadAffRWS :: (MonadAff m, Monoid w) => MonadAff (RWST r w s m) where
38+ liftAff = lift <<< liftAff
39+
40+instance monadAffState :: MonadAff m => MonadAff (StateT s m) where
41+ liftAff = lift <<< liftAff
42+
43+instance monadAffWriter :: (MonadAff m, Monoid w) => MonadAff (WriterT w m) where
44+ liftAff = lift <<< liftAff
.spago/p/aff-8.0.0/src/Effect/Aff/Compat.pursnew file+53
@@ -0,0 +1,53 @@
1+-- | This module provides compatability functions for constructing `Aff`s which
2+-- | are defined via the FFI.
3+module Effect.Aff.Compat
4+ ( EffectFnAff(..)
5+ , EffectFnCanceler(..)
6+ , EffectFnCb
7+ , fromEffectFnAff
8+ , module Effect.Uncurried
9+ ) where
10+
11+import Prelude
12+import Data.Either (Either(..))
13+import Effect.Aff (Aff, Canceler(..), makeAff, nonCanceler)
14+import Effect.Exception (Error)
15+import Effect.Uncurried (EffectFn1, EffectFn2, EffectFn3, mkEffectFn1, mkEffectFn2, mkEffectFn3, runEffectFn1, runEffectFn2, runEffectFn3)
16+
17+type EffectFnCb a = EffectFn1 a Unit
18+
19+newtype EffectFnAff a = EffectFnAff (EffectFn2 (EffectFnCb Error) (EffectFnCb a) EffectFnCanceler)
20+
21+newtype EffectFnCanceler = EffectFnCanceler (EffectFn3 Error (EffectFnCb Error) (EffectFnCb Unit) Unit)
22+
23+-- | Lift a FFI definition into an `Aff`. `EffectFnAff` makes use of `EffectFn` so
24+-- | `Effect` thunks are unnecessary. A definition might follow this example:
25+-- |
26+-- | ```javascript
27+-- | exports._myAff = function (onError, onSuccess) {
28+-- | var cancel = doSomethingAsync(function (err, res) {
29+-- | if (err) {
30+-- | onError(err);
31+-- | } else {
32+-- | onSuccess(res);
33+-- | }
34+-- | });
35+-- | return function (cancelError, onCancelerError, onCancelerSuccess) {
36+-- | cancel();
37+-- | onCancelerSuccess();
38+-- | };
39+-- | };
40+-- | ```
41+-- |
42+-- | ```purescript
43+-- | foreign import _myAff :: EffectFnAff String
44+-- |
45+-- | myAff :: Aff String
46+-- | myAff = fromEffectFnAff _myAff
47+-- | ````
48+fromEffectFnAff :: EffectFnAff ~> Aff
49+fromEffectFnAff (EffectFnAff eff) = makeAff \k -> do
50+ EffectFnCanceler canceler <- runEffectFn2 eff (mkEffectFn1 (k <<< Left)) (mkEffectFn1 (k <<< Right))
51+ pure $ Canceler \e -> makeAff \k2 -> do
52+ runEffectFn3 canceler e (mkEffectFn1 (k2 <<< Left)) (mkEffectFn1 (k2 <<< Right))
53+ pure nonCanceler
.spago/p/aff-promise-4.0.0/LICENSEnew file+21
@@ -0,0 +1,21 @@
1+MIT License
2+
3+Copyright (c) 2016 Nicholas Wolverson
4+
5+Permission is hereby granted, free of charge, to any person obtaining a copy
6+of this software and associated documentation files (the "Software"), to deal
7+in the Software without restriction, including without limitation the rights
8+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+copies of the Software, and to permit persons to whom the Software is
10+furnished to do so, subject to the following conditions:
11+
12+The above copyright notice and this permission notice shall be included in all
13+copies or substantial portions of the Software.
14+
15+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+SOFTWARE.
.spago/p/aff-promise-4.0.0/README.mdnew file+70
@@ -0,0 +1,70 @@
1+# purescript-aff-promise
2+
3+Simple library for interop between Aff and JavaScript promises.
4+
5+No typeclass instances etc are provided to use Promises directly - the intention is that your PureScript code uses Aff
6+internally, and is only wrapped as a Promise to present an API for consumption in JavaScript code (and vice versa).
7+
8+## Exposing promises: Aff to Promise
9+
10+The origin of this library was to solve the following problem: I want to write asynchronous code in `Aff`, but I need
11+to expose this as an API to JavaScript in the form of a `Promise`.
12+
13+Therefore the majority of code can be written to return an `Aff`, in this example using `readTextFile` from
14+[purescript-node-fs-aff](https://pursuit.purescript.org/packages/purescript-node-fs-aff):
15+
16+```purescript
17+getLinesAff :: Aff (Array String)
18+getLinesAff = do
19+ text <- readTextFile Encoding.UTF8 "data.txt"
20+ pure $ split (Pattern "\n") text
21+```
22+
23+and this can be exposed as a function returning a promise:
24+
25+```purescript
26+import Control.Promise as Promise
27+
28+getLines :: Effect (Promise (Array String))
29+getLines = Promise.fromAff getLinesAff
30+```
31+
32+This function returns an `Effect` beause a promise is "already running". A JavaScript function consuming this API
33+would just call `getLines().then(...)`.
34+
35+## Consuming promises: Promise to Aff
36+
37+The reverse problem occurs when wrapping a JS library that uses promises for asynchronous behaviour (`Aff` comes
38+with a perfectly good function to deal with consuming libraries that use callbacks).
39+
40+Consider the case of consuming the `fetch` API.
41+
42+```javascript
43+exports.fetchImpl = function (url) {
44+ return function() {
45+ return fetch(url);
46+ };
47+}
48+```
49+
50+```purescript
51+foreign import data Response :: Type
52+foreign import fetchImpl :: String -> Effect (Promise Response)
53+```
54+
55+Notice that the `fetch(url)` call is wrapped in a thunk and imported as an `Effect`, because otherwise the `fetch`
56+operation would be initiated as a side-effect of a pure function - while `fetch` returns a promise, at the point
57+the function returns the network request has already been initated.
58+
59+The response can then be converted to an `Aff` and consumed easily:
60+
61+```purescript
62+import Control.Promise as Promise
63+
64+fetch :: String -> Aff String
65+fetch = fetchImpl >>> Promise.toAffE
66+```
67+
68+# Documentation
69+
70+API documentation is available [on Pursuit](https://pursuit.purescript.org/packages/purescript-aff-promise).
.spago/p/aff-promise-4.0.0/bower.jsonnew file+25
@@ -0,0 +1,25 @@
1+{
2+ "name": "purescript-aff-promise",
3+ "moduleType": [
4+ "node"
5+ ],
6+ "license": "MIT",
7+ "repository": {
8+ "type": "git",
9+ "url": "https://github.com/nwolverson/purescript-aff-promise.git"
10+ },
11+ "ignore": [
12+ "**/.*",
13+ "node_modules",
14+ "bower_components",
15+ "output"
16+ ],
17+ "dependencies": {
18+ "purescript-aff": "^7.0.0",
19+ "purescript-foreign": "^7.0.0"
20+ },
21+ "devDependencies": {
22+ "purescript-assert": "^6.0.0",
23+ "purescript-datetime": "^6.0.0"
24+ }
25+}
.spago/p/aff-promise-4.0.0/package.jsonnew file+23
@@ -0,0 +1,23 @@
1+{
2+ "name": "purescript-aff-promise",
3+ "private": true,
4+ "description": "Simple library for interop between Aff and JavaScript promises.",
5+ "scripts": {
6+ "build": "pulp build -- --censor-lib --strict",
7+ "test": "pulp test"
8+ },
9+ "repository": {
10+ "type": "git",
11+ "url": "git+https://github.com/nwolverson/purescript-aff-promise.git"
12+ },
13+ "author": "Nicholas Wolverson",
14+ "license": "MIT",
15+ "bugs": {
16+ "url": "https://github.com/nwolverson/purescript-aff-promise/issues"
17+ },
18+ "homepage": "https://github.com/nwolverson/purescript-aff-promise#readme",
19+ "devDependencies": {
20+ "pulp": "^16.0.0-0",
21+ "purescript-psa": "^0.8.2"
22+ }
23+}
.spago/p/aff-promise-4.0.0/packages.dhallnew file+107
@@ -0,0 +1,107 @@
1+{-
2+Welcome to your new Dhall package-set!
3+
4+Below are instructions for how to edit this file for most use
5+cases, so that you don't need to know Dhall to use it.
6+
7+## Use Cases
8+
9+Most will want to do one or both of these options:
10+1. Override/Patch a package's dependency
11+2. Add a package not already in the default package set
12+
13+This file will continue to work whether you use one or both options.
14+Instructions for each option are explained below.
15+
16+### Overriding/Patching a package
17+
18+Purpose:
19+- Change a package's dependency to a newer/older release than the
20+ default package set's release
21+- Use your own modified version of some dependency that may
22+ include new API, changed API, removed API by
23+ using your custom git repo of the library rather than
24+ the package set's repo
25+
26+Syntax:
27+where `entityName` is one of the following:
28+- dependencies
29+- repo
30+- version
31+-------------------------------
32+let upstream = --
33+in upstream
34+ with packageName.entityName = "new value"
35+-------------------------------
36+
37+Example:
38+-------------------------------
39+let upstream = --
40+in upstream
41+ with halogen.version = "master"
42+ with halogen.repo = "https://example.com/path/to/git/repo.git"
43+
44+ with halogen-vdom.version = "v4.0.0"
45+ with halogen-vdom.dependencies = [ "extra-dependency" ] # halogen-vdom.dependencies
46+-------------------------------
47+
48+### Additions
49+
50+Purpose:
51+- Add packages that aren't already included in the default package set
52+
53+Syntax:
54+where `<version>` is:
55+- a tag (i.e. "v4.0.0")
56+- a branch (i.e. "master")
57+- commit hash (i.e. "701f3e44aafb1a6459281714858fadf2c4c2a977")
58+-------------------------------
59+let upstream = --
60+in upstream
61+ with new-package-name =
62+ { dependencies =
63+ [ "dependency1"
64+ , "dependency2"
65+ ]
66+ , repo =
67+ "https://example.com/path/to/git/repo.git"
68+ , version =
69+ "<version>"
70+ }
71+-------------------------------
72+
73+Example:
74+-------------------------------
75+let upstream = --
76+in upstream
77+ with benchotron =
78+ { dependencies =
79+ [ "arrays"
80+ , "exists"
81+ , "profunctor"
82+ , "strings"
83+ , "quickcheck"
84+ , "lcg"
85+ , "transformers"
86+ , "foldable-traversable"
87+ , "exceptions"
88+ , "node-fs"
89+ , "node-buffer"
90+ , "node-readline"
91+ , "datetime"
92+ , "now"
93+ ]
94+ , repo =
95+ "https://github.com/hdgarrood/purescript-benchotron.git"
96+ , version =
97+ "v7.0.0"
98+ }
99+-------------------------------
100+-}
101+let upstream =
102+ https://github.com/working-group-purescript-es/package-sets/releases/download/0.1.0/package-set.dhall
103+ sha256:642a07499270b2a0425accb35a043b72297bcd957965c2b50f0b34b558c59bc4
104+
105+in upstream
106+ with `assert`.repo = "https://github.com/megamaddu/purescript-assert"
107+ with `assert`.version = "purs-0.15-updates"
.spago/p/aff-promise-4.0.0/purs.jsonnew file+20
@@ -0,0 +1,20 @@
1+{
2+ "name": "aff-promise",
3+ "version": "4.0.0",
4+ "license": "MIT",
5+ "location": {
6+ "githubOwner": "nwolverson",
7+ "githubRepo": "purescript-aff-promise"
8+ },
9+ "ref": "v4.0.0",
10+ "dependencies": {
11+ "aff": ">=7.0.0 <9.0.0",
12+ "control": ">=6.0.0 <7.0.0",
13+ "effect": ">=4.0.0 <5.0.0",
14+ "either": ">=6.0.0 <7.0.0",
15+ "exceptions": ">=6.0.0 <7.0.0",
16+ "foreign": ">=7.0.0 <8.0.0",
17+ "prelude": ">=6.0.0 <7.0.0",
18+ "transformers": ">=6.0.0 <7.0.0"
19+ }
20+}
.spago/p/aff-promise-4.0.0/spago.dhallnew file+30
@@ -0,0 +1,30 @@
1+{-
2+Welcome to a Spago project!
3+You can edit this file as you like.
4+
5+Need help? See the following resources:
6+- Spago documentation: https://github.com/purescript/spago
7+- Dhall language tour: https://docs.dhall-lang.org/tutorials/Language-Tour.html
8+
9+When creating a new Spago project, you can use
10+`spago init --no-comments` or `spago init -C`
11+to generate this file without the comments in this block.
12+-}
13+{ name = "aff-promise"
14+, dependencies =
15+ [ "aff"
16+ , "assert"
17+ , "console"
18+ , "control"
19+ , "datetime"
20+ , "effect"
21+ , "either"
22+ , "exceptions"
23+ , "foreign"
24+ , "integers"
25+ , "prelude"
26+ , "transformers"
27+ ]
28+, packages = ./packages.dhall
29+, sources = [ "src/**/*.purs", "test/**/*.purs" ]
30+}
.spago/p/aff-promise-4.0.0/src/Control/Promise.jsnew file+24
@@ -0,0 +1,24 @@
1+export function promise(f) {
2+ return function () {
3+ return new Promise(function (success, error) {
4+ var succF = function (s) { return function() { return success(s); } };
5+ var failF = function (s) { return function() { return error(s); } };
6+
7+ // This indicates the aff was wrong?
8+ try { f(succF)(failF)(); }
9+ catch (e) {
10+ error(e);
11+ }
12+ });
13+ };
14+}
15+
16+export function thenImpl(promise) {
17+ return function(errCB) {
18+ return function(succCB) {
19+ return function() {
20+ promise.then(succCB, errCB);
21+ };
22+ };
23+ };
24+}
.spago/p/aff-promise-4.0.0/src/Control/Promise.pursnew file+56
@@ -0,0 +1,56 @@
1+module Control.Promise (fromAff, toAff, toAff', toAffE, Promise()) where
2+
3+import Prelude
4+
5+import Control.Alt ((<|>))
6+import Control.Monad.Except (runExcept)
7+import Data.Either (Either(..), either)
8+import Effect (Effect)
9+import Effect.Aff (Aff, makeAff, runAff_)
10+import Effect.Class (liftEffect)
11+import Effect.Exception (Error, error)
12+import Effect.Uncurried (EffectFn1, mkEffectFn1)
13+import Foreign (Foreign, readString, unsafeReadTagged)
14+
15+-- | Type of JavaScript Promises (with particular return type)
16+-- | Effects are not traced in the Promise type, as they form part of the Effect that
17+-- | results in the promise.
18+foreign import data Promise :: Type -> Type
19+
20+type role Promise representational
21+
22+foreign import promise :: forall a b.
23+ ((a -> Effect Unit) -> (b -> Effect Unit) -> Effect Unit) -> Effect (Promise a)
24+foreign import thenImpl :: forall a b.
25+ Promise a -> (EffectFn1 Foreign b) -> (EffectFn1 a b) -> Effect Unit
26+
27+-- | Convert an Aff into a Promise.
28+fromAff :: forall a. Aff a -> Effect (Promise a)
29+fromAff aff = promise (\succ err -> runAff_ (either err succ) aff)
30+
31+coerce :: Foreign -> Error
32+coerce fn =
33+ either (\_ -> error "Promise failed, couldn't extract JS Error or String")
34+ identity
35+ (runExcept ((unsafeReadTagged "Error" fn) <|> (error <$> readString fn)))
36+
37+-- | Convert a Promise into an Aff.
38+-- | When the promise rejects, we attempt to
39+-- | coerce the error value into an actual JavaScript Error object. We can do this
40+-- | with Error objects or Strings. Anything else gets a "dummy" Error object.
41+toAff :: forall a. Promise a -> Aff a
42+toAff = toAff' coerce
43+
44+-- | Convert a Promise into an Aff with custom Error coercion.
45+-- | When the promise rejects, we attempt to coerce the error value into an
46+-- | actual JavaScript Error object using the provided function.
47+toAff' :: forall a. (Foreign -> Error) -> Promise a -> Aff a
48+toAff' customCoerce p = makeAff
49+ (\cb -> mempty <$ thenImpl
50+ p
51+ (mkEffectFn1 $ cb <<< Left <<< customCoerce)
52+ (mkEffectFn1 $ cb <<< Right))
53+
54+-- | Utility to convert an Effect returning a Promise into an Aff (i.e. the inverse of fromAff)
55+toAffE :: forall a. Effect (Promise a) -> Aff a
56+toAffE f = liftEffect f >>= toAff
.spago/p/arraybuffer-types-3.0.2/LICENSEnew file+20
@@ -0,0 +1,20 @@
1+The MIT License (MIT)
2+
3+Copyright (c) 2014 PureScript
4+
5+Permission is hereby granted, free of charge, to any person obtaining a copy of
6+this software and associated documentation files (the "Software"), to deal in
7+the Software without restriction, including without limitation the rights to
8+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+the Software, and to permit persons to whom the Software is furnished to do so,
10+subject to the following conditions:
11+
12+The above copyright notice and this permission notice shall be included in all
13+copies or substantial portions of the Software.
14+
15+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
.spago/p/arraybuffer-types-3.0.2/README.mdnew file+39
@@ -0,0 +1,39 @@
1+# ArrayBuffer Types
2+
3+[](https://github.com/purescript-contrib/purescript-arraybuffer-types/actions?query=workflow%3ACI+branch%3Amain)
4+[](https://github.com/purescript-contrib/purescript-arraybuffer-types/releases)
5+[](https://pursuit.purescript.org/packages/purescript-arraybuffer-types)
6+[](https://github.com/garyb)
7+
8+Type definitions for JavaScript `ArrayBuffer`s.
9+
10+## Installation
11+
12+Install `arraybuffer-types` with [Spago](https://github.com/purescript/spago):
13+
14+```sh
15+spago install arraybuffer-types
16+```
17+
18+## Quick start
19+
20+The quick start hasn't been written yet (contributions are welcome!). The quick start covers a common, minimal use case for the library.
21+
22+## Documentation
23+
24+`arraybuffer-types` documentation is [published on Pursuit](https://pursuit.purescript.org/packages/purescript-arraybuffer-types).
25+
26+If you get stuck, there are several ways to get help:
27+
28+- [Open an issue](https://github.com/purescript-contrib/purescript-arraybuffer-types/issues) if you have encountered a bug or problem.
29+- Ask general questions on the [PureScript Discourse](https://discourse.purescript.org) forum or the [PureScript Discord](https://purescript.org/chat) chat.
30+
31+## Contributing
32+
33+You can contribute to `arraybuffer-types` in several ways:
34+
35+1. If you encounter a problem or have a question, please [open an issue](https://github.com/purescript-contrib/purescript-arraybuffer-types/issues). We'll do our best to work with you to resolve or answer it.
36+
37+2. If you would like to contribute code, tests, or documentation, please [read the contributor guide](./CONTRIBUTING.md). It's a short, helpful introduction to contributing to this library, including development instructions.
38+
39+3. If you have written a library, tutorial, guide, or other resource based on this package, please share it on the [PureScript Discourse](https://discourse.purescript.org)! Writing libraries and learning resources are a great way to help this library succeed.
.spago/p/arraybuffer-types-3.0.2/bower.jsonnew file+19
@@ -0,0 +1,19 @@
1+{
2+ "name": "purescript-arraybuffer-types",
3+ "license": [
4+ "MIT"
5+ ],
6+ "repository": {
7+ "type": "git",
8+ "url": "https://github.com/purescript-contrib/purescript-arraybuffer-types"
9+ },
10+ "ignore": [
11+ "**/.*",
12+ "node_modules",
13+ "bower_components",
14+ "output"
15+ ],
16+ "devDependencies": {
17+ "purescript-psci-support": "^6.0.0"
18+ }
19+}
.spago/p/arraybuffer-types-3.0.2/packages.dhallnew file+4
@@ -0,0 +1,4 @@
1+let upstream =
2+ https://raw.githubusercontent.com/purescript/package-sets/prepare-0.15/src/packages.dhall
3+
4+in upstream
.spago/p/arraybuffer-types-3.0.2/purs.jsonnew file+11
@@ -0,0 +1,11 @@
1+{
2+ "name": "arraybuffer-types",
3+ "version": "3.0.2",
4+ "license": "MIT",
5+ "location": {
6+ "githubOwner": "purescript-contrib",
7+ "githubRepo": "purescript-arraybuffer-types"
8+ },
9+ "ref": "v3.0.2",
10+ "dependencies": {}
11+}
.spago/p/arraybuffer-types-3.0.2/spago.dhallnew file+7
@@ -0,0 +1,7 @@
1+{ name = "arraybuffer-types"
2+, dependencies = [ ] : List Text
3+, packages = ./packages.dhall
4+, sources = [ "src/**/*.purs" ]
5+, license = "MIT"
6+, repository = "https://github.com/purescript-contrib/purescript-arraybuffer-types"
7+}
.spago/p/arraybuffer-types-3.0.2/src/Data/ArrayBuffer/Types.pursnew file+38
@@ -0,0 +1,38 @@
1+module Data.ArrayBuffer.Types where
2+
3+-- | Represents a JS ArrayBuffer object
4+foreign import data ArrayBuffer :: Type
5+
6+-- | Represents a JS DataView on an ArrayBuffer (a slice into the ArrayBuffer)
7+foreign import data DataView :: Type
8+
9+-- | The unifying representation for the different typed arrays
10+foreign import data ArrayView :: ArrayViewType -> Type
11+
12+-- | Offset in bytes into a DataView or ArrayBufer
13+type ByteOffset = Int
14+
15+-- | Length in bytes of a DataView or ArrayBuffer
16+type ByteLength = Int
17+
18+data ArrayViewType
19+
20+foreign import data Int8 :: ArrayViewType
21+foreign import data Int16 :: ArrayViewType
22+foreign import data Int32 :: ArrayViewType
23+foreign import data Uint8 :: ArrayViewType
24+foreign import data Uint16 :: ArrayViewType
25+foreign import data Uint32 :: ArrayViewType
26+foreign import data Uint8Clamped :: ArrayViewType
27+foreign import data Float32 :: ArrayViewType
28+foreign import data Float64 :: ArrayViewType
29+
30+type Int8Array = ArrayView Int8
31+type Int16Array = ArrayView Int16
32+type Int32Array = ArrayView Int32
33+type Uint8Array = ArrayView Uint8
34+type Uint16Array = ArrayView Uint16
35+type Uint32Array = ArrayView Uint32
36+type Uint8ClampedArray = ArrayView Uint8Clamped
37+type Float32Array = ArrayView Float32
38+type Float64Array = ArrayView Float64
.spago/p/arrays-7.3.0/LICENSEnew file+26
@@ -0,0 +1,26 @@
1+Copyright 2018 PureScript
2+
3+Redistribution and use in source and binary forms, with or without modification,
4+are permitted provided that the following conditions are met:
5+
6+1. Redistributions of source code must retain the above copyright notice, this
7+list of conditions and the following disclaimer.
8+
9+2. Redistributions in binary form must reproduce the above copyright notice,
10+this list of conditions and the following disclaimer in the documentation and/or
11+other materials provided with the distribution.
12+
13+3. Neither the name of the copyright holder nor the names of its contributors
14+may be used to endorse or promote products derived from this software without
15+specific prior written permission.
16+
17+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
21+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.spago/p/arrays-7.3.0/README.mdnew file+17
@@ -0,0 +1,17 @@
1+# purescript-arrays
2+
3+[](https://github.com/purescript/purescript-arrays/releases)
4+[](https://github.com/purescript/purescript-arrays/actions?query=workflow%3ACI+branch%3Amaster)
5+[](https://pursuit.purescript.org/packages/purescript-arrays)
6+
7+Utility functions for the `Array` type - JavaScript's native arrays.
8+
9+## Installation
10+
11+```
12+spago install arrays
13+```
14+
15+## Documentation
16+
17+Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-arrays).
.spago/p/arrays-7.3.0/bower.jsonnew file+39
@@ -0,0 +1,39 @@
1+{
2+ "name": "purescript-arrays",
3+ "homepage": "https://github.com/purescript/purescript-arrays",
4+ "license": "BSD-3-Clause",
5+ "repository": {
6+ "type": "git",
7+ "url": "https://github.com/purescript/purescript-arrays.git"
8+ },
9+ "ignore": [
10+ "**/.*",
11+ "bower_components",
12+ "node_modules",
13+ "output",
14+ "bower.json",
15+ "package.json"
16+ ],
17+ "dependencies": {
18+ "purescript-bifunctors": "^6.0.0",
19+ "purescript-control": "^6.0.0",
20+ "purescript-foldable-traversable": "^6.0.0",
21+ "purescript-functions": "^6.0.0",
22+ "purescript-maybe": "^6.0.0",
23+ "purescript-nonempty": "^7.0.0",
24+ "purescript-partial": "^4.0.0",
25+ "purescript-prelude": "^6.0.0",
26+ "purescript-safe-coerce": "^2.0.0",
27+ "purescript-st": "^6.2.0",
28+ "purescript-tailrec": "^6.0.0",
29+ "purescript-tuples": "^7.0.0",
30+ "purescript-unfoldable": "^6.0.0",
31+ "purescript-unsafe-coerce": "^6.0.0"
32+ },
33+ "devDependencies": {
34+ "purescript-assert": "^6.0.0",
35+ "purescript-console": "^6.0.0",
36+ "purescript-const": "^6.0.0",
37+ "purescript-minibench": "^4.0.0"
38+ }
39+}
.spago/p/arrays-7.3.0/package.jsonnew file+17
@@ -0,0 +1,17 @@
1+{
2+ "private": true,
3+ "scripts": {
4+ "clean": "rimraf output && rimraf .pulp-cache",
5+ "build": "eslint src && pulp build -- --censor-lib --strict",
6+ "test": "pulp test",
7+ "bench:build": "pulp build --include bench -- --censor-lib --strict",
8+ "bench:run": "node --expose-gc -e \"require('./output/Bench.Main/index.js').main()\"",
9+ "bench": "npm run bench:build && npm run bench:run"
10+ },
11+ "devDependencies": {
12+ "eslint": "^7.15.0",
13+ "pulp": "16.0.0-0",
14+ "purescript-psa": "^0.8.2",
15+ "rimraf": "^3.0.2"
16+ }
17+}
.spago/p/arrays-7.3.0/purs.jsonnew file+26
@@ -0,0 +1,26 @@
1+{
2+ "name": "arrays",
3+ "version": "7.3.0",
4+ "license": "BSD-3-Clause",
5+ "location": {
6+ "githubOwner": "purescript",
7+ "githubRepo": "purescript-arrays"
8+ },
9+ "ref": "v7.3.0",
10+ "dependencies": {
11+ "bifunctors": ">=6.0.0 <7.0.0",
12+ "control": ">=6.0.0 <7.0.0",
13+ "foldable-traversable": ">=6.0.0 <7.0.0",
14+ "functions": ">=6.0.0 <7.0.0",
15+ "maybe": ">=6.0.0 <7.0.0",
16+ "nonempty": ">=7.0.0 <8.0.0",
17+ "partial": ">=4.0.0 <5.0.0",
18+ "prelude": ">=6.0.0 <7.0.0",
19+ "safe-coerce": ">=2.0.0 <3.0.0",
20+ "st": ">=6.2.0 <7.0.0",
21+ "tailrec": ">=6.0.0 <7.0.0",
22+ "tuples": ">=7.0.0 <8.0.0",
23+ "unfoldable": ">=6.0.0 <7.0.0",
24+ "unsafe-coerce": ">=6.0.0 <7.0.0"
25+ }
26+}
.spago/p/arrays-7.3.0/src/Data/Array.jsnew file+298
@@ -0,0 +1,298 @@
1+//------------------------------------------------------------------------------
2+// Array creation --------------------------------------------------------------
3+//------------------------------------------------------------------------------
4+
5+export const rangeImpl = function (start, end) {
6+ var step = start > end ? -1 : 1;
7+ var result = new Array(step * (end - start) + 1);
8+ var i = start, n = 0;
9+ while (i !== end) {
10+ result[n++] = i;
11+ i += step;
12+ }
13+ result[n] = i;
14+ return result;
15+};
16+
17+var replicateFill = function (count, value) {
18+ if (count < 1) {
19+ return [];
20+ }
21+ var result = new Array(count);
22+ return result.fill(value);
23+};
24+
25+var replicatePolyfill = function (count, value) {
26+ var result = [];
27+ var n = 0;
28+ for (var i = 0; i < count; i++) {
29+ result[n++] = value;
30+ }
31+ return result;
32+};
33+
34+// In browsers that have Array.prototype.fill we use it, as it's faster.
35+export const replicateImpl = typeof Array.prototype.fill === "function" ? replicateFill : replicatePolyfill;
36+
37+export const fromFoldableImpl = (function () {
38+ function Cons(head, tail) {
39+ this.head = head;
40+ this.tail = tail;
41+ }
42+ var emptyList = {};
43+
44+ function curryCons(head) {
45+ return function (tail) {
46+ return new Cons(head, tail);
47+ };
48+ }
49+
50+ function listToArray(list) {
51+ var result = [];
52+ var count = 0;
53+ var xs = list;
54+ while (xs !== emptyList) {
55+ result[count++] = xs.head;
56+ xs = xs.tail;
57+ }
58+ return result;
59+ }
60+
61+ return function (foldr, xs) {
62+ return listToArray(foldr(curryCons)(emptyList)(xs));
63+ };
64+})();
65+
66+//------------------------------------------------------------------------------
67+// Array size ------------------------------------------------------------------
68+//------------------------------------------------------------------------------
69+
70+export const length = function (xs) {
71+ return xs.length;
72+};
73+
74+//------------------------------------------------------------------------------
75+// Non-indexed reads -----------------------------------------------------------
76+//------------------------------------------------------------------------------
77+
78+export const unconsImpl = function (empty, next, xs) {
79+ return xs.length === 0 ? empty({}) : next(xs[0])(xs.slice(1));
80+};
81+
82+//------------------------------------------------------------------------------
83+// Indexed operations ----------------------------------------------------------
84+//------------------------------------------------------------------------------
85+
86+export const indexImpl = function (just, nothing, xs, i) {
87+ return i < 0 || i >= xs.length ? nothing : just(xs[i]);
88+};
89+
90+export const findMapImpl = function (nothing, isJust, f, xs) {
91+ for (var i = 0; i < xs.length; i++) {
92+ var result = f(xs[i]);
93+ if (isJust(result)) return result;
94+ }
95+ return nothing;
96+};
97+
98+export const findIndexImpl = function (just, nothing, f, xs) {
99+ for (var i = 0, l = xs.length; i < l; i++) {
100+ if (f(xs[i])) return just(i);
101+ }
102+ return nothing;
103+};
104+
105+export const findLastIndexImpl = function (just, nothing, f, xs) {
106+ for (var i = xs.length - 1; i >= 0; i--) {
107+ if (f(xs[i])) return just(i);
108+ }
109+ return nothing;
110+};
111+
112+export const _insertAt = function (just, nothing, i, a, l) {
113+ if (i < 0 || i > l.length) return nothing;
114+ var l1 = l.slice();
115+ l1.splice(i, 0, a);
116+ return just(l1);
117+};
118+
119+export const _deleteAt = function (just, nothing, i, l) {
120+ if (i < 0 || i >= l.length) return nothing;
121+ var l1 = l.slice();
122+ l1.splice(i, 1);
123+ return just(l1);
124+};
125+
126+export const _updateAt = function (just, nothing, i, a, l) {
127+ if (i < 0 || i >= l.length) return nothing;
128+ var l1 = l.slice();
129+ l1[i] = a;
130+ return just(l1);
131+};
132+
133+//------------------------------------------------------------------------------
134+// Transformations -------------------------------------------------------------
135+//------------------------------------------------------------------------------
136+
137+export const reverse = function (l) {
138+ return l.slice().reverse();
139+};
140+
141+export const concat = function (xss) {
142+ if (xss.length <= 10000) {
143+ // This method is faster, but it crashes on big arrays.
144+ // So we use it when can and fallback to simple variant otherwise.
145+ return Array.prototype.concat.apply([], xss);
146+ }
147+
148+ var result = [];
149+ for (var i = 0, l = xss.length; i < l; i++) {
150+ var xs = xss[i];
151+ for (var j = 0, m = xs.length; j < m; j++) {
152+ result.push(xs[j]);
153+ }
154+ }
155+ return result;
156+};
157+
158+export const filterImpl = function (f, xs) {
159+ return xs.filter(f);
160+};
161+
162+export const partitionImpl = function (f, xs) {
163+ var yes = [];
164+ var no = [];
165+ for (var i = 0; i < xs.length; i++) {
166+ var x = xs[i];
167+ if (f(x))
168+ yes.push(x);
169+ else
170+ no.push(x);
171+ }
172+ return { yes: yes, no: no };
173+};
174+
175+export const scanlImpl = function (f, b, xs) {
176+ var len = xs.length;
177+ var acc = b;
178+ var out = new Array(len);
179+ for (var i = 0; i < len; i++) {
180+ acc = f(acc)(xs[i]);
181+ out[i] = acc;
182+ }
183+ return out;
184+};
185+
186+export const scanrImpl = function (f, b, xs) {
187+ var len = xs.length;
188+ var acc = b;
189+ var out = new Array(len);
190+ for (var i = len - 1; i >= 0; i--) {
191+ acc = f(xs[i])(acc);
192+ out[i] = acc;
193+ }
194+ return out;
195+};
196+
197+//------------------------------------------------------------------------------
198+// Sorting ---------------------------------------------------------------------
199+//------------------------------------------------------------------------------
200+
201+export const sortByImpl = (function () {
202+ function mergeFromTo(compare, fromOrdering, xs1, xs2, from, to) {
203+ var mid;
204+ var i;
205+ var j;
206+ var k;
207+ var x;
208+ var y;
209+ var c;
210+
211+ mid = from + ((to - from) >> 1);
212+ if (mid - from > 1) mergeFromTo(compare, fromOrdering, xs2, xs1, from, mid);
213+ if (to - mid > 1) mergeFromTo(compare, fromOrdering, xs2, xs1, mid, to);
214+
215+ i = from;
216+ j = mid;
217+ k = from;
218+ while (i < mid && j < to) {
219+ x = xs2[i];
220+ y = xs2[j];
221+ c = fromOrdering(compare(x)(y));
222+ if (c > 0) {
223+ xs1[k++] = y;
224+ ++j;
225+ }
226+ else {
227+ xs1[k++] = x;
228+ ++i;
229+ }
230+ }
231+ while (i < mid) {
232+ xs1[k++] = xs2[i++];
233+ }
234+ while (j < to) {
235+ xs1[k++] = xs2[j++];
236+ }
237+ }
238+
239+ return function (compare, fromOrdering, xs) {
240+ var out;
241+
242+ if (xs.length < 2) return xs;
243+
244+ out = xs.slice(0);
245+ mergeFromTo(compare, fromOrdering, out, xs.slice(0), 0, xs.length);
246+
247+ return out;
248+ };
249+})();
250+
251+//------------------------------------------------------------------------------
252+// Subarrays -------------------------------------------------------------------
253+//------------------------------------------------------------------------------
254+
255+export const sliceImpl = function (s, e, l) {
256+ return l.slice(s, e);
257+};
258+
259+//------------------------------------------------------------------------------
260+// Zipping ---------------------------------------------------------------------
261+//------------------------------------------------------------------------------
262+
263+export const zipWithImpl = function (f, xs, ys) {
264+ var l = xs.length < ys.length ? xs.length : ys.length;
265+ var result = new Array(l);
266+ for (var i = 0; i < l; i++) {
267+ result[i] = f(xs[i])(ys[i]);
268+ }
269+ return result;
270+};
271+
272+//------------------------------------------------------------------------------
273+// Folding ---------------------------------------------------------------------
274+//------------------------------------------------------------------------------
275+
276+export const anyImpl = function (p, xs) {
277+ var len = xs.length;
278+ for (var i = 0; i < len; i++) {
279+ if (p(xs[i])) return true;
280+ }
281+ return false;
282+};
283+
284+export const allImpl = function (p, xs) {
285+ var len = xs.length;
286+ for (var i = 0; i < len; i++) {
287+ if (!p(xs[i])) return false;
288+ }
289+ return true;
290+};
291+
292+//------------------------------------------------------------------------------
293+// Partial ---------------------------------------------------------------------
294+//------------------------------------------------------------------------------
295+
296+export const unsafeIndexImpl = function (xs, n) {
297+ return xs[n];
298+};
.spago/p/arrays-7.3.0/src/Data/Array.pursnew file+1371
@@ -0,0 +1,1371 @@
1+-- | Helper functions for working with immutable Javascript arrays.
2+-- |
3+-- | _Note_: Depending on your use-case, you may prefer to use `Data.List` or
4+-- | `Data.Sequence` instead, which might give better performance for certain
5+-- | use cases. This module is useful when integrating with JavaScript libraries
6+-- | which use arrays, but immutable arrays are not a practical data structure
7+-- | for many use cases due to their poor asymptotics.
8+-- |
9+-- | In addition to the functions in this module, Arrays have a number of
10+-- | useful instances:
11+-- |
12+-- | * `Functor`, which provides `map :: forall a b. (a -> b) -> Array a ->
13+-- | Array b`
14+-- | * `Apply`, which provides `(<*>) :: forall a b. Array (a -> b) -> Array a
15+-- | -> Array b`. This function works a bit like a Cartesian product; the
16+-- | result array is constructed by applying each function in the first
17+-- | array to each value in the second, so that the result array ends up with
18+-- | a length equal to the product of the two arguments' lengths.
19+-- | * `Bind`, which provides `(>>=) :: forall a b. (a -> Array b) -> Array a
20+-- | -> Array b` (this is the same as `concatMap`).
21+-- | * `Semigroup`, which provides `(<>) :: forall a. Array a -> Array a ->
22+-- | Array a`, for concatenating arrays.
23+-- | * `Foldable`, which provides a slew of functions for *folding* (also known
24+-- | as *reducing*) arrays down to one value. For example,
25+-- | `Data.Foldable.or` tests whether an array of `Boolean` values contains
26+-- | at least one `true` value.
27+-- | * `Traversable`, which provides the PureScript version of a for-loop,
28+-- | allowing you to STAI.iterate over an array and accumulate effects.
29+-- |
30+module Data.Array
31+ ( fromFoldable
32+ , toUnfoldable
33+ , singleton
34+ , (..)
35+ , range
36+ , replicate
37+ , some
38+ , many
39+
40+ , null
41+ , length
42+
43+ , (:)
44+ , cons
45+ , snoc
46+ , insert
47+ , insertBy
48+
49+ , head
50+ , last
51+ , tail
52+ , init
53+ , uncons
54+ , unsnoc
55+
56+ , (!!)
57+ , index
58+ , elem
59+ , notElem
60+ , elemIndex
61+ , elemLastIndex
62+ , find
63+ , findMap
64+ , findIndex
65+ , findLastIndex
66+ , insertAt
67+ , deleteAt
68+ , updateAt
69+ , updateAtIndices
70+ , modifyAt
71+ , modifyAtIndices
72+ , alterAt
73+
74+ , intersperse
75+ , reverse
76+ , concat
77+ , concatMap
78+ , filter
79+ , partition
80+ , splitAt
81+ , filterA
82+ , mapMaybe
83+ , catMaybes
84+ , mapWithIndex
85+ , foldl
86+ , foldr
87+ , foldMap
88+ , fold
89+ , intercalate
90+ , transpose
91+ , scanl
92+ , scanr
93+
94+ , sort
95+ , sortBy
96+ , sortWith
97+ , slice
98+ , take
99+ , takeEnd
100+ , takeWhile
101+ , drop
102+ , dropEnd
103+ , dropWhile
104+ , span
105+ , group
106+ , groupAll
107+ , groupBy
108+ , groupAllBy
109+
110+ , nub
111+ , nubEq
112+ , nubBy
113+ , nubByEq
114+ , union
115+ , unionBy
116+ , delete
117+ , deleteBy
118+
119+ , (\\)
120+ , difference
121+ , intersect
122+ , intersectBy
123+
124+ , zipWith
125+ , zipWithA
126+ , zip
127+ , unzip
128+
129+ , any
130+ , all
131+
132+ , foldM
133+ , foldRecM
134+
135+ , unsafeIndex
136+ ) where
137+
138+import Prelude
139+
140+import Control.Alt ((<|>))
141+import Control.Alternative (class Alternative)
142+import Control.Lazy (class Lazy, defer)
143+import Control.Monad.Rec.Class (class MonadRec, Step(..), tailRecM2)
144+import Control.Monad.ST as ST
145+import Data.Array.NonEmpty.Internal (NonEmptyArray(..))
146+import Data.Array.ST as STA
147+import Data.Array.ST.Iterator as STAI
148+import Data.Foldable (class Foldable, traverse_)
149+import Data.Foldable as F
150+import Data.Function.Uncurried (Fn2, Fn3, Fn4, Fn5, runFn2, runFn3, runFn4, runFn5)
151+import Data.FunctorWithIndex as FWI
152+import Data.Maybe (Maybe(..), maybe, isJust, fromJust, isNothing)
153+import Data.Traversable (sequence, traverse)
154+import Data.Tuple (Tuple(..), fst, snd)
155+import Data.Unfoldable (class Unfoldable, unfoldr)
156+import Partial.Unsafe (unsafePartial)
157+
158+-- | Convert an `Array` into an `Unfoldable` structure.
159+toUnfoldable :: forall f. Unfoldable f => Array ~> f
160+toUnfoldable xs = unfoldr f 0
161+ where
162+ len = length xs
163+ f i
164+ | i < len = Just (Tuple (unsafePartial (unsafeIndex xs i)) (i + 1))
165+ | otherwise = Nothing
166+
167+-- | Convert a `Foldable` structure into an `Array`.
168+-- |
169+-- | ```purescript
170+-- | fromFoldable (Just 1) = [1]
171+-- | fromFoldable (Nothing) = []
172+-- | ```
173+-- |
174+fromFoldable :: forall f. Foldable f => f ~> Array
175+fromFoldable = runFn2 fromFoldableImpl F.foldr
176+
177+foreign import fromFoldableImpl
178+ :: forall f a
179+ . Fn2 (forall b. (a -> b -> b) -> b -> f a -> b) (f a) (Array a)
180+
181+-- | Create an array of one element
182+-- | ```purescript
183+-- | singleton 2 = [2]
184+-- | ```
185+singleton :: forall a. a -> Array a
186+singleton a = [ a ]
187+
188+-- | Create an array containing a range of integers, including both endpoints.
189+-- | ```purescript
190+-- | range 2 5 = [2, 3, 4, 5]
191+-- | ```
192+range :: Int -> Int -> Array Int
193+range = runFn2 rangeImpl
194+
195+foreign import rangeImpl :: Fn2 Int Int (Array Int)
196+
197+-- | Create an array containing a value repeated the specified number of times.
198+-- | ```purescript
199+-- | replicate 2 "Hi" = ["Hi", "Hi"]
200+-- | ```
201+replicate :: forall a. Int -> a -> Array a
202+replicate = runFn2 replicateImpl
203+
204+foreign import replicateImpl :: forall a. Fn2 Int a (Array a)
205+
206+-- | An infix synonym for `range`.
207+-- | ```purescript
208+-- | 2 .. 5 = [2, 3, 4, 5]
209+-- | ```
210+infix 8 range as ..
211+
212+-- | Attempt a computation multiple times, requiring at least one success.
213+-- |
214+-- | The `Lazy` constraint is used to generate the result lazily, to ensure
215+-- | termination.
216+some :: forall f a. Alternative f => Lazy (f (Array a)) => f a -> f (Array a)
217+some v = (:) <$> v <*> defer (\_ -> many v)
218+
219+-- | Attempt a computation multiple times, returning as many successful results
220+-- | as possible (possibly zero).
221+-- |
222+-- | The `Lazy` constraint is used to generate the result lazily, to ensure
223+-- | termination.
224+many :: forall f a. Alternative f => Lazy (f (Array a)) => f a -> f (Array a)
225+many v = some v <|> pure []
226+
227+--------------------------------------------------------------------------------
228+-- Array size ------------------------------------------------------------------
229+--------------------------------------------------------------------------------
230+
231+-- | Test whether an array is empty.
232+-- | ```purescript
233+-- | null [] = true
234+-- | null [1, 2] = false
235+-- | ```
236+null :: forall a. Array a -> Boolean
237+null xs = length xs == 0
238+
239+-- | Get the number of elements in an array.
240+-- | ```purescript
241+-- | length ["Hello", "World"] = 2
242+-- | ```
243+foreign import length :: forall a. Array a -> Int
244+
245+--------------------------------------------------------------------------------
246+-- Extending arrays ------------------------------------------------------------
247+--------------------------------------------------------------------------------
248+
249+-- | Attaches an element to the front of an array, creating a new array.
250+-- |
251+-- | ```purescript
252+-- | cons 1 [2, 3, 4] = [1, 2, 3, 4]
253+-- | ```
254+-- |
255+-- | Note, the running time of this function is `O(n)`.
256+cons :: forall a. a -> Array a -> Array a
257+cons x xs = [ x ] <> xs
258+
259+-- | An infix alias for `cons`.
260+-- |
261+-- | ```purescript
262+-- | 1 : [2, 3, 4] = [1, 2, 3, 4]
263+-- | ```
264+-- |
265+-- | Note, the running time of this function is `O(n)`.
266+infixr 6 cons as :
267+
268+-- | Append an element to the end of an array, creating a new array.
269+-- |
270+-- | ```purescript
271+-- | snoc [1, 2, 3] 4 = [1, 2, 3, 4]
272+-- | ```
273+-- |
274+snoc :: forall a. Array a -> a -> Array a
275+snoc xs x = ST.run (STA.withArray (STA.push x) xs)
276+
277+-- | Insert an element into a sorted array.
278+-- |
279+-- | ```purescript
280+-- | insert 10 [1, 2, 20, 21] = [1, 2, 10, 20, 21]
281+-- | ```
282+-- |
283+insert :: forall a. Ord a => a -> Array a -> Array a
284+insert = insertBy compare
285+
286+-- | Insert an element into a sorted array, using the specified function to
287+-- | determine the ordering of elements.
288+-- |
289+-- | ```purescript
290+-- | invertCompare a b = invert $ compare a b
291+-- |
292+-- | insertBy invertCompare 10 [21, 20, 2, 1] = [21, 20, 10, 2, 1]
293+-- | ```
294+-- |
295+insertBy :: forall a. (a -> a -> Ordering) -> a -> Array a -> Array a
296+insertBy cmp x ys =
297+ let
298+ i = maybe 0 (_ + 1) (findLastIndex (\y -> cmp x y == GT) ys)
299+ in
300+ unsafePartial (fromJust (insertAt i x ys))
301+
302+--------------------------------------------------------------------------------
303+-- Non-indexed reads -----------------------------------------------------------
304+--------------------------------------------------------------------------------
305+
306+-- | Get the first element in an array, or `Nothing` if the array is empty
307+-- |
308+-- | Running time: `O(1)`.
309+-- |
310+-- | ```purescript
311+-- | head [1, 2] = Just 1
312+-- | head [] = Nothing
313+-- | ```
314+-- |
315+head :: forall a. Array a -> Maybe a
316+head xs = xs !! 0
317+
318+-- | Get the last element in an array, or `Nothing` if the array is empty
319+-- |
320+-- | Running time: `O(1)`.
321+-- |
322+-- | ```purescript
323+-- | last [1, 2] = Just 2
324+-- | last [] = Nothing
325+-- | ```
326+-- |
327+last :: forall a. Array a -> Maybe a
328+last xs = xs !! (length xs - 1)
329+
330+-- | Get all but the first element of an array, creating a new array, or
331+-- | `Nothing` if the array is empty
332+-- |
333+-- | ```purescript
334+-- | tail [1, 2, 3, 4] = Just [2, 3, 4]
335+-- | tail [] = Nothing
336+-- | ```
337+-- |
338+-- | Running time: `O(n)` where `n` is the length of the array
339+tail :: forall a. Array a -> Maybe (Array a)
340+tail = runFn3 unconsImpl (const Nothing) (\_ xs -> Just xs)
341+
342+-- | Get all but the last element of an array, creating a new array, or
343+-- | `Nothing` if the array is empty.
344+-- |
345+-- | ```purescript
346+-- | init [1, 2, 3, 4] = Just [1, 2, 3]
347+-- | init [] = Nothing
348+-- | ```
349+-- |
350+-- | Running time: `O(n)` where `n` is the length of the array
351+init :: forall a. Array a -> Maybe (Array a)
352+init xs
353+ | null xs = Nothing
354+ | otherwise = Just (slice zero (length xs - one) xs)
355+
356+-- | Break an array into its first element and remaining elements.
357+-- |
358+-- | Using `uncons` provides a way of writing code that would use cons patterns
359+-- | in Haskell or pre-PureScript 0.7:
360+-- | ``` purescript
361+-- | f (x : xs) = something
362+-- | f [] = somethingElse
363+-- | ```
364+-- | Becomes:
365+-- | ``` purescript
366+-- | f arr = case uncons arr of
367+-- | Just { head: x, tail: xs } -> something
368+-- | Nothing -> somethingElse
369+-- | ```
370+uncons :: forall a. Array a -> Maybe { head :: a, tail :: Array a }
371+uncons = runFn3 unconsImpl (const Nothing) \x xs -> Just { head: x, tail: xs }
372+
373+foreign import unconsImpl
374+ :: forall a b
375+ . Fn3 (Unit -> b) (a -> Array a -> b) (Array a) b
376+
377+-- | Break an array into its last element and all preceding elements.
378+-- |
379+-- | ```purescript
380+-- | unsnoc [1, 2, 3] = Just {init: [1, 2], last: 3}
381+-- | unsnoc [] = Nothing
382+-- | ```
383+-- |
384+-- | Running time: `O(n)` where `n` is the length of the array
385+unsnoc :: forall a. Array a -> Maybe { init :: Array a, last :: a }
386+unsnoc xs = { init: _, last: _ } <$> init xs <*> last xs
387+
388+--------------------------------------------------------------------------------
389+-- Indexed operations ----------------------------------------------------------
390+--------------------------------------------------------------------------------
391+
392+-- | This function provides a safe way to read a value at a particular index
393+-- | from an array.
394+-- |
395+-- | ```purescript
396+-- | sentence = ["Hello", "World", "!"]
397+-- |
398+-- | index sentence 0 = Just "Hello"
399+-- | index sentence 7 = Nothing
400+-- | ```
401+-- |
402+index :: forall a. Array a -> Int -> Maybe a
403+index = runFn4 indexImpl Just Nothing
404+
405+foreign import indexImpl
406+ :: forall a
407+ . Fn4 (forall r. r -> Maybe r) (forall r. Maybe r) (Array a) Int (Maybe a)
408+
409+-- | An infix version of `index`.
410+-- |
411+-- | ```purescript
412+-- | sentence = ["Hello", "World", "!"]
413+-- |
414+-- | sentence !! 0 = Just "Hello"
415+-- | sentence !! 7 = Nothing
416+-- | ```
417+-- |
418+infixl 8 index as !!
419+
420+-- | Returns true if the array has the given element.
421+elem :: forall a. Eq a => a -> Array a -> Boolean
422+elem a arr = isJust $ elemIndex a arr
423+
424+-- | Returns true if the array does not have the given element.
425+notElem :: forall a. Eq a => a -> Array a -> Boolean
426+notElem a arr = isNothing $ elemIndex a arr
427+
428+-- | Find the index of the first element equal to the specified element.
429+-- |
430+-- | ```purescript
431+-- | elemIndex "a" ["a", "b", "a", "c"] = Just 0
432+-- | elemIndex "Earth" ["Hello", "World", "!"] = Nothing
433+-- | ```
434+-- |
435+elemIndex :: forall a. Eq a => a -> Array a -> Maybe Int
436+elemIndex x = findIndex (_ == x)
437+
438+-- | Find the index of the last element equal to the specified element.
439+-- |
440+-- | ```purescript
441+-- | elemLastIndex "a" ["a", "b", "a", "c"] = Just 2
442+-- | elemLastIndex "Earth" ["Hello", "World", "!"] = Nothing
443+-- | ```
444+-- |
445+elemLastIndex :: forall a. Eq a => a -> Array a -> Maybe Int
446+elemLastIndex x = findLastIndex (_ == x)
447+
448+-- | Find the first element for which a predicate holds.
449+-- |
450+-- | ```purescript
451+-- | find (contains $ Pattern "b") ["a", "bb", "b", "d"] = Just "bb"
452+-- | find (contains $ Pattern "x") ["a", "bb", "b", "d"] = Nothing
453+-- | ```
454+find :: forall a. (a -> Boolean) -> Array a -> Maybe a
455+find f xs = unsafePartial (unsafeIndex xs) <$> findIndex f xs
456+
457+-- | Find the first element in a data structure which satisfies
458+-- | a predicate mapping.
459+findMap :: forall a b. (a -> Maybe b) -> Array a -> Maybe b
460+findMap = runFn4 findMapImpl Nothing isJust
461+
462+foreign import findMapImpl
463+ :: forall a b
464+ . Fn4
465+ (forall c. Maybe c)
466+ (forall c. Maybe c -> Boolean)
467+ (a -> Maybe b)
468+ (Array a)
469+ (Maybe b)
470+
471+-- | Find the first index for which a predicate holds.
472+-- |
473+-- | ```purescript
474+-- | findIndex (contains $ Pattern "b") ["a", "bb", "b", "d"] = Just 1
475+-- | findIndex (contains $ Pattern "x") ["a", "bb", "b", "d"] = Nothing
476+-- | ```
477+-- |
478+findIndex :: forall a. (a -> Boolean) -> Array a -> Maybe Int
479+findIndex = runFn4 findIndexImpl Just Nothing
480+
481+foreign import findIndexImpl
482+ :: forall a
483+ . Fn4
484+ (forall b. b -> Maybe b)
485+ (forall b. Maybe b)
486+ (a -> Boolean)
487+ (Array a)
488+ (Maybe Int)
489+
490+-- | Find the last index for which a predicate holds.
491+-- |
492+-- | ```purescript
493+-- | findLastIndex (contains $ Pattern "b") ["a", "bb", "b", "d"] = Just 2
494+-- | findLastIndex (contains $ Pattern "x") ["a", "bb", "b", "d"] = Nothing
495+-- | ```
496+-- |
497+findLastIndex :: forall a. (a -> Boolean) -> Array a -> Maybe Int
498+findLastIndex = runFn4 findLastIndexImpl Just Nothing
499+
500+foreign import findLastIndexImpl
501+ :: forall a
502+ . Fn4
503+ (forall b. b -> Maybe b)
504+ (forall b. Maybe b)
505+ (a -> Boolean)
506+ (Array a)
507+ (Maybe Int)
508+
509+-- | Insert an element at the specified index, creating a new array, or
510+-- | returning `Nothing` if the index is out of bounds.
511+-- |
512+-- | ```purescript
513+-- | insertAt 2 "!" ["Hello", "World"] = Just ["Hello", "World", "!"]
514+-- | insertAt 10 "!" ["Hello"] = Nothing
515+-- | ```
516+-- |
517+insertAt :: forall a. Int -> a -> Array a -> Maybe (Array a)
518+insertAt = runFn5 _insertAt Just Nothing
519+
520+foreign import _insertAt
521+ :: forall a
522+ . Fn5
523+ (forall b. b -> Maybe b)
524+ (forall b. Maybe b)
525+ Int
526+ a
527+ (Array a)
528+ (Maybe (Array a))
529+
530+-- | Delete the element at the specified index, creating a new array, or
531+-- | returning `Nothing` if the index is out of bounds.
532+-- |
533+-- | ```purescript
534+-- | deleteAt 0 ["Hello", "World"] = Just ["World"]
535+-- | deleteAt 10 ["Hello", "World"] = Nothing
536+-- | ```
537+-- |
538+deleteAt :: forall a. Int -> Array a -> Maybe (Array a)
539+deleteAt = runFn4 _deleteAt Just Nothing
540+
541+foreign import _deleteAt
542+ :: forall a
543+ . Fn4
544+ (forall b. b -> Maybe b)
545+ (forall b. Maybe b)
546+ Int
547+ (Array a)
548+ (Maybe (Array a))
549+
550+-- | Change the element at the specified index, creating a new array, or
551+-- | returning `Nothing` if the index is out of bounds.
552+-- |
553+-- | ```purescript
554+-- | updateAt 1 "World" ["Hello", "Earth"] = Just ["Hello", "World"]
555+-- | updateAt 10 "World" ["Hello", "Earth"] = Nothing
556+-- | ```
557+-- |
558+updateAt :: forall a. Int -> a -> Array a -> Maybe (Array a)
559+updateAt = runFn5 _updateAt Just Nothing
560+
561+foreign import _updateAt
562+ :: forall a
563+ . Fn5
564+ (forall b. b -> Maybe b)
565+ (forall b. Maybe b)
566+ Int
567+ a
568+ (Array a)
569+ (Maybe (Array a))
570+
571+-- | Apply a function to the element at the specified index, creating a new
572+-- | array, or returning `Nothing` if the index is out of bounds.
573+-- |
574+-- | ```purescript
575+-- | modifyAt 1 toUpper ["Hello", "World"] = Just ["Hello", "WORLD"]
576+-- | modifyAt 10 toUpper ["Hello", "World"] = Nothing
577+-- | ```
578+-- |
579+modifyAt :: forall a. Int -> (a -> a) -> Array a -> Maybe (Array a)
580+modifyAt i f xs = maybe Nothing go (xs !! i)
581+ where
582+ go x = updateAt i (f x) xs
583+
584+-- | Update or delete the element at the specified index by applying a
585+-- | function to the current value, returning a new array or `Nothing` if the
586+-- | index is out-of-bounds.
587+-- |
588+-- | ```purescript
589+-- | alterAt 1 (stripSuffix $ Pattern "!") ["Hello", "World!"]
590+-- | = Just ["Hello", "World"]
591+-- |
592+-- | alterAt 1 (stripSuffix $ Pattern "!!!!!") ["Hello", "World!"]
593+-- | = Just ["Hello"]
594+-- |
595+-- | alterAt 10 (stripSuffix $ Pattern "!") ["Hello", "World!"] = Nothing
596+-- | ```
597+-- |
598+alterAt :: forall a. Int -> (a -> Maybe a) -> Array a -> Maybe (Array a)
599+alterAt i f xs = maybe Nothing go (xs !! i)
600+ where
601+ go x = case f x of
602+ Nothing -> deleteAt i xs
603+ Just x' -> updateAt i x' xs
604+
605+--------------------------------------------------------------------------------
606+-- Transformations -------------------------------------------------------------
607+--------------------------------------------------------------------------------
608+
609+-- | Inserts the given element in between each element in the array. The array
610+-- | must have two or more elements for this operation to take effect.
611+-- |
612+-- | ```purescript
613+-- | intersperse " " [ "a", "b" ] == [ "a", " ", "b" ]
614+-- | intersperse 0 [ 1, 2, 3, 4, 5 ] == [ 1, 0, 2, 0, 3, 0, 4, 0, 5 ]
615+-- | ```
616+-- |
617+-- | If the array has less than two elements, the input array is returned.
618+-- | ```purescript
619+-- | intersperse " " [] == []
620+-- | intersperse " " ["a"] == ["a"]
621+-- | ```
622+intersperse :: forall a. a -> Array a -> Array a
623+intersperse a arr = case length arr of
624+ len
625+ | len < 2 -> arr
626+ | otherwise -> STA.run do
627+ let unsafeGetElem idx = unsafePartial (unsafeIndex arr idx)
628+ out <- STA.new
629+ _ <- STA.push (unsafeGetElem 0) out
630+ ST.for 1 len \idx -> do
631+ _ <- STA.push a out
632+ void (STA.push (unsafeGetElem idx) out)
633+ pure out
634+
635+-- | Reverse an array, creating a new array.
636+-- |
637+-- | ```purescript
638+-- | reverse [] = []
639+-- | reverse [1, 2, 3] = [3, 2, 1]
640+-- | ```
641+-- |
642+foreign import reverse :: forall a. Array a -> Array a
643+
644+-- | Flatten an array of arrays, creating a new array.
645+-- |
646+-- | ```purescript
647+-- | concat [[1, 2, 3], [], [4, 5, 6]] = [1, 2, 3, 4, 5, 6]
648+-- | ```
649+-- |
650+foreign import concat :: forall a. Array (Array a) -> Array a
651+
652+-- | Apply a function to each element in an array, and flatten the results
653+-- | into a single, new array.
654+-- |
655+-- | ```purescript
656+-- | concatMap (split $ Pattern " ") ["Hello World", "other thing"]
657+-- | = ["Hello", "World", "other", "thing"]
658+-- | ```
659+-- |
660+concatMap :: forall a b. (a -> Array b) -> Array a -> Array b
661+concatMap = flip bind
662+
663+-- | Filter an array, keeping the elements which satisfy a predicate function,
664+-- | creating a new array.
665+-- |
666+-- | ```purescript
667+-- | filter (_ > 0) [-1, 4, -5, 7] = [4, 7]
668+-- | ```
669+-- |
670+filter :: forall a. (a -> Boolean) -> Array a -> Array a
671+filter = runFn2 filterImpl
672+
673+foreign import filterImpl
674+ :: forall a
675+ . Fn2 (a -> Boolean) (Array a) (Array a)
676+
677+-- | Partition an array using a predicate function, creating a set of
678+-- | new arrays. One for the values satisfying the predicate function
679+-- | and one for values that don't.
680+-- |
681+-- | ```purescript
682+-- | partition (_ > 0) [-1, 4, -5, 7] = { yes: [4, 7], no: [-1, -5] }
683+-- | ```
684+-- |
685+partition
686+ :: forall a
687+ . (a -> Boolean)
688+ -> Array a
689+ -> { yes :: Array a, no :: Array a }
690+partition = runFn2 partitionImpl
691+
692+foreign import partitionImpl
693+ :: forall a
694+ . Fn2 (a -> Boolean) (Array a) { yes :: Array a, no :: Array a }
695+
696+-- | Splits an array into two subarrays, where `before` contains the elements
697+-- | up to (but not including) the given index, and `after` contains the rest
698+-- | of the elements, from that index on.
699+-- |
700+-- | ```purescript
701+-- | >>> splitAt 3 [1, 2, 3, 4, 5]
702+-- | { before: [1, 2, 3], after: [4, 5] }
703+-- | ```
704+-- |
705+-- | Thus, the length of `(splitAt i arr).before` will equal either `i` or
706+-- | `length arr`, if that is shorter. (Or if `i` is negative the length will
707+-- | be 0.)
708+-- |
709+-- | ```purescript
710+-- | splitAt 2 ([] :: Array Int) == { before: [], after: [] }
711+-- | splitAt 3 [1, 2, 3, 4, 5] == { before: [1, 2, 3], after: [4, 5] }
712+-- | ```
713+splitAt :: forall a. Int -> Array a -> { before :: Array a, after :: Array a }
714+splitAt i xs | i <= 0 = { before: [], after: xs }
715+splitAt i xs = { before: slice 0 i xs, after: slice i (length xs) xs }
716+
717+-- | Filter where the predicate returns a `Boolean` in some `Applicative`.
718+-- |
719+-- | ```purescript
720+-- | powerSet :: forall a. Array a -> Array (Array a)
721+-- | powerSet = filterA (const [true, false])
722+-- | ```
723+filterA :: forall a f. Applicative f => (a -> f Boolean) -> Array a -> f (Array a)
724+filterA p =
725+ traverse (\x -> Tuple x <$> p x)
726+ >>> map (mapMaybe (\(Tuple x b) -> if b then Just x else Nothing))
727+
728+-- | Apply a function to each element in an array, keeping only the results
729+-- | which contain a value, creating a new array.
730+-- |
731+-- | ```purescript
732+-- | parseEmail :: String -> Maybe Email
733+-- | parseEmail = ...
734+-- |
735+-- | mapMaybe parseEmail ["a.com", "hello@example.com", "--"]
736+-- | = [Email {user: "hello", domain: "example.com"}]
737+-- | ```
738+-- |
739+mapMaybe :: forall a b. (a -> Maybe b) -> Array a -> Array b
740+mapMaybe f = concatMap (maybe [] singleton <<< f)
741+
742+-- | Filter an array of optional values, keeping only the elements which contain
743+-- | a value, creating a new array.
744+-- |
745+-- | ```purescript
746+-- | catMaybes [Nothing, Just 2, Nothing, Just 4] = [2, 4]
747+-- | ```
748+-- |
749+catMaybes :: forall a. Array (Maybe a) -> Array a
750+catMaybes = mapMaybe identity
751+
752+-- | Apply a function to each element in an array, supplying a generated
753+-- | zero-based index integer along with the element, creating an array
754+-- | with the new elements.
755+-- |
756+-- | ```purescript
757+-- | prefixIndex index element = show index <> element
758+-- |
759+-- | mapWithIndex prefixIndex ["Hello", "World"] = ["0Hello", "1World"]
760+-- | ```
761+-- |
762+mapWithIndex :: forall a b. (Int -> a -> b) -> Array a -> Array b
763+mapWithIndex = FWI.mapWithIndex
764+
765+-- | Change the elements at the specified indices in index/value pairs.
766+-- | Out-of-bounds indices will have no effect.
767+-- |
768+-- | ```purescript
769+-- | updates = [Tuple 0 "Hi", Tuple 2 "." , Tuple 10 "foobar"]
770+-- |
771+-- | updateAtIndices updates ["Hello", "World", "!"] = ["Hi", "World", "."]
772+-- | ```
773+-- |
774+updateAtIndices :: forall t a. Foldable t => t (Tuple Int a) -> Array a -> Array a
775+updateAtIndices us xs =
776+ ST.run (STA.withArray (\res -> traverse_ (\(Tuple i a) -> STA.poke i a res) us) xs)
777+
778+-- | Apply a function to the element at the specified indices,
779+-- | creating a new array. Out-of-bounds indices will have no effect.
780+-- |
781+-- | ```purescript
782+-- | indices = [1, 3]
783+-- | modifyAtIndices indices toUpper ["Hello", "World", "and", "others"]
784+-- | = ["Hello", "WORLD", "and", "OTHERS"]
785+-- | ```
786+-- |
787+modifyAtIndices :: forall t a. Foldable t => t Int -> (a -> a) -> Array a -> Array a
788+modifyAtIndices is f xs =
789+ ST.run (STA.withArray (\res -> traverse_ (\i -> STA.modify i f res) is) xs)
790+
791+foldl :: forall a b. (b -> a -> b) -> b -> Array a -> b
792+foldl = F.foldl
793+
794+foldr :: forall a b. (a -> b -> b) -> b -> Array a -> b
795+foldr = F.foldr
796+
797+foldMap :: forall a m. Monoid m => (a -> m) -> Array a -> m
798+foldMap = F.foldMap
799+
800+fold :: forall m. Monoid m => Array m -> m
801+fold = F.fold
802+
803+intercalate :: forall a. Monoid a => a -> Array a -> a
804+intercalate = F.intercalate
805+
806+-- | The 'transpose' function transposes the rows and columns of its argument.
807+-- | For example,
808+-- |
809+-- | ```purescript
810+-- | transpose
811+-- | [ [1, 2, 3]
812+-- | , [4, 5, 6]
813+-- | ] ==
814+-- | [ [1, 4]
815+-- | , [2, 5]
816+-- | , [3, 6]
817+-- | ]
818+-- | ```
819+-- |
820+-- | If some of the rows are shorter than the following rows, their elements are skipped:
821+-- |
822+-- | ```purescript
823+-- | transpose
824+-- | [ [10, 11]
825+-- | , [20]
826+-- | , [30, 31, 32]
827+-- | ] ==
828+-- | [ [10, 20, 30]
829+-- | , [11, 31]
830+-- | , [32]
831+-- | ]
832+-- | ```
833+transpose :: forall a. Array (Array a) -> Array (Array a)
834+transpose xs = go 0 []
835+ where
836+ go :: Int -> Array (Array a) -> Array (Array a)
837+ go idx allArrays = case buildNext idx of
838+ Nothing -> allArrays
839+ Just next -> go (idx + 1) (snoc allArrays next)
840+
841+ buildNext :: Int -> Maybe (Array a)
842+ buildNext idx = do
843+ xs # flip foldl Nothing \acc nextArr -> do
844+ maybe acc (\el -> Just $ maybe [ el ] (flip snoc el) acc) $ index nextArr idx
845+
846+-- | Fold a data structure from the left, keeping all intermediate results
847+-- | instead of only the final result. Note that the initial value does not
848+-- | appear in the result (unlike Haskell's `Prelude.scanl`).
849+-- |
850+-- | ```
851+-- | scanl (+) 0 [1,2,3] = [1,3,6]
852+-- | scanl (-) 10 [1,2,3] = [9,7,4]
853+-- | ```
854+scanl :: forall a b. (b -> a -> b) -> b -> Array a -> Array b
855+scanl = runFn3 scanlImpl
856+
857+foreign import scanlImpl :: forall a b. Fn3 (b -> a -> b) b (Array a) (Array b)
858+
859+-- | Fold a data structure from the right, keeping all intermediate results
860+-- | instead of only the final result. Note that the initial value does not
861+-- | appear in the result (unlike Haskell's `Prelude.scanr`).
862+-- |
863+-- | ```
864+-- | scanr (+) 0 [1,2,3] = [6,5,3]
865+-- | scanr (flip (-)) 10 [1,2,3] = [4,5,7]
866+-- | ```
867+scanr :: forall a b. (a -> b -> b) -> b -> Array a -> Array b
868+scanr = runFn3 scanrImpl
869+
870+foreign import scanrImpl :: forall a b. Fn3 (a -> b -> b) b (Array a) (Array b)
871+
872+--------------------------------------------------------------------------------
873+-- Sorting ---------------------------------------------------------------------
874+--------------------------------------------------------------------------------
875+
876+-- | Sort the elements of an array in increasing order, creating a new array.
877+-- | Sorting is stable: the order of equal elements is preserved.
878+-- |
879+-- | ```purescript
880+-- | sort [2, -3, 1] = [-3, 1, 2]
881+-- | ```
882+-- |
883+sort :: forall a. Ord a => Array a -> Array a
884+sort xs = sortBy compare xs
885+
886+-- | Sort the elements of an array in increasing order, where elements are
887+-- | compared using the specified partial ordering, creating a new array.
888+-- | Sorting is stable: the order of elements is preserved if they are equal
889+-- | according to the specified partial ordering.
890+-- |
891+-- | ```purescript
892+-- | compareLength a b = compare (length a) (length b)
893+-- | sortBy compareLength [[1, 2, 3], [7, 9], [-2]] = [[-2],[7,9],[1,2,3]]
894+-- | ```
895+-- |
896+sortBy :: forall a. (a -> a -> Ordering) -> Array a -> Array a
897+sortBy comp = runFn3 sortByImpl comp case _ of
898+ GT -> 1
899+ EQ -> 0
900+ LT -> -1
901+
902+-- | Sort the elements of an array in increasing order, where elements are
903+-- | sorted based on a projection. Sorting is stable: the order of elements is
904+-- | preserved if they are equal according to the projection.
905+-- |
906+-- | ```purescript
907+-- | sortWith (_.age) [{name: "Alice", age: 42}, {name: "Bob", age: 21}]
908+-- | = [{name: "Bob", age: 21}, {name: "Alice", age: 42}]
909+-- | ```
910+-- |
911+sortWith :: forall a b. Ord b => (a -> b) -> Array a -> Array a
912+sortWith f = sortBy (comparing f)
913+
914+foreign import sortByImpl :: forall a. Fn3 (a -> a -> Ordering) (Ordering -> Int) (Array a) (Array a)
915+
916+--------------------------------------------------------------------------------
917+-- Subarrays -------------------------------------------------------------------
918+--------------------------------------------------------------------------------
919+
920+-- | Extract a subarray by a start and end index.
921+-- |
922+-- | ```purescript
923+-- | letters = ["a", "b", "c"]
924+-- | slice 1 3 letters = ["b", "c"]
925+-- | slice 5 7 letters = []
926+-- | slice 4 1 letters = []
927+-- | ```
928+-- |
929+slice :: forall a. Int -> Int -> Array a -> Array a
930+slice = runFn3 sliceImpl
931+
932+foreign import sliceImpl :: forall a. Fn3 Int Int (Array a) (Array a)
933+
934+-- | Keep only a number of elements from the start of an array, creating a new
935+-- | array.
936+-- |
937+-- | ```purescript
938+-- | letters = ["a", "b", "c"]
939+-- |
940+-- | take 2 letters = ["a", "b"]
941+-- | take 100 letters = ["a", "b", "c"]
942+-- | ```
943+-- |
944+take :: forall a. Int -> Array a -> Array a
945+take n xs = if n < 1 then [] else slice 0 n xs
946+
947+-- | Keep only a number of elements from the end of an array, creating a new
948+-- | array.
949+-- |
950+-- | ```purescript
951+-- | letters = ["a", "b", "c"]
952+-- |
953+-- | takeEnd 2 letters = ["b", "c"]
954+-- | takeEnd 100 letters = ["a", "b", "c"]
955+-- | ```
956+-- |
957+takeEnd :: forall a. Int -> Array a -> Array a
958+takeEnd n xs = drop (length xs - n) xs
959+
960+-- | Calculate the longest initial subarray for which all element satisfy the
961+-- | specified predicate, creating a new array.
962+-- |
963+-- | ```purescript
964+-- | takeWhile (_ > 0) [4, 1, 0, -4, 5] = [4, 1]
965+-- | takeWhile (_ > 0) [-1, 4] = []
966+-- | ```
967+-- |
968+takeWhile :: forall a. (a -> Boolean) -> Array a -> Array a
969+takeWhile p xs = (span p xs).init
970+
971+-- | Drop a number of elements from the start of an array, creating a new array.
972+-- |
973+-- | ```purescript
974+-- | letters = ["a", "b", "c", "d"]
975+-- |
976+-- | drop 2 letters = ["c", "d"]
977+-- | drop 10 letters = []
978+-- | ```
979+-- |
980+drop :: forall a. Int -> Array a -> Array a
981+drop n xs = if n < 1 then xs else slice n (length xs) xs
982+
983+-- | Drop a number of elements from the end of an array, creating a new array.
984+-- |
985+-- | ```purescript
986+-- | letters = ["a", "b", "c", "d"]
987+-- |
988+-- | dropEnd 2 letters = ["a", "b"]
989+-- | dropEnd 10 letters = []
990+-- | ```
991+-- |
992+dropEnd :: forall a. Int -> Array a -> Array a
993+dropEnd n xs = take (length xs - n) xs
994+
995+-- | Remove the longest initial subarray for which all element satisfy the
996+-- | specified predicate, creating a new array.
997+-- |
998+-- | ```purescript
999+-- | dropWhile (_ < 0) [-3, -1, 0, 4, -6] = [0, 4, -6]
1000+-- | ```
1001+-- |
1002+dropWhile :: forall a. (a -> Boolean) -> Array a -> Array a
1003+dropWhile p xs = (span p xs).rest
1004+
1005+-- | Split an array into two parts:
1006+-- |
1007+-- | 1. the longest initial subarray for which all elements satisfy the
1008+-- | specified predicate
1009+-- | 2. the remaining elements
1010+-- |
1011+-- | ```purescript
1012+-- | span (\n -> n % 2 == 1) [1,3,2,4,5] == { init: [1,3], rest: [2,4,5] }
1013+-- | ```
1014+-- |
1015+-- | Running time: `O(n)`.
1016+span
1017+ :: forall a
1018+ . (a -> Boolean)
1019+ -> Array a
1020+ -> { init :: Array a, rest :: Array a }
1021+span p arr =
1022+ case breakIndex of
1023+ Just 0 ->
1024+ { init: [], rest: arr }
1025+ Just i ->
1026+ { init: slice 0 i arr, rest: slice i (length arr) arr }
1027+ Nothing ->
1028+ { init: arr, rest: [] }
1029+ where
1030+ breakIndex = go 0
1031+ go i =
1032+ -- This looks like a good opportunity to use the Monad Maybe instance,
1033+ -- but it's important to write out an explicit case expression here in
1034+ -- order to ensure that TCO is triggered.
1035+ case index arr i of
1036+ Just x -> if p x then go (i + 1) else Just i
1037+ Nothing -> Nothing
1038+
1039+-- | Group equal, consecutive elements of an array into arrays.
1040+-- |
1041+-- | ```purescript
1042+-- | group [1, 1, 2, 2, 1] == [NonEmptyArray [1, 1], NonEmptyArray [2, 2], NonEmptyArray [1]]
1043+-- | ```
1044+group :: forall a. Eq a => Array a -> Array (NonEmptyArray a)
1045+group xs = groupBy eq xs
1046+
1047+-- | Group equal elements of an array into arrays.
1048+-- |
1049+-- | ```purescript
1050+-- | groupAll [1, 1, 2, 2, 1] == [NonEmptyArray [1, 1, 1], NonEmptyArray [2, 2]]
1051+-- | ```
1052+groupAll :: forall a. Ord a => Array a -> Array (NonEmptyArray a)
1053+groupAll = groupAllBy compare
1054+
1055+-- | Group equal, consecutive elements of an array into arrays, using the
1056+-- | specified equivalence relation to determine equality.
1057+-- |
1058+-- | ```purescript
1059+-- | groupBy (\a b -> odd a && odd b) [1, 3, 2, 4, 3, 3]
1060+-- | = [NonEmptyArray [1, 3], NonEmptyArray [2], NonEmptyArray [4], NonEmptyArray [3, 3]]
1061+-- | ```
1062+-- |
1063+groupBy :: forall a. (a -> a -> Boolean) -> Array a -> Array (NonEmptyArray a)
1064+groupBy op xs =
1065+ ST.run do
1066+ result <- STA.new
1067+ iter <- STAI.iterator (xs !! _)
1068+ STAI.iterate iter \x -> void do
1069+ sub <- STA.new
1070+ _ <- STA.push x sub
1071+ STAI.pushWhile (op x) iter sub
1072+ grp <- STA.unsafeFreeze sub
1073+ STA.push (NonEmptyArray grp) result
1074+ STA.unsafeFreeze result
1075+
1076+-- | Group equal elements of an array into arrays, using the specified
1077+-- | comparison function to determine equality.
1078+-- |
1079+-- | ```purescript
1080+-- | groupAllBy (comparing Down) [1, 3, 2, 4, 3, 3]
1081+-- | = [NonEmptyArray [4], NonEmptyArray [3, 3, 3], NonEmptyArray [2], NonEmptyArray [1]]
1082+-- | ```
1083+-- |
1084+groupAllBy :: forall a. (a -> a -> Ordering) -> Array a -> Array (NonEmptyArray a)
1085+groupAllBy cmp = groupBy (\x y -> cmp x y == EQ) <<< sortBy cmp
1086+
1087+-- | Remove the duplicates from an array, creating a new array.
1088+-- |
1089+-- | ```purescript
1090+-- | nub [1, 2, 1, 3, 3] = [1, 2, 3]
1091+-- | ```
1092+-- |
1093+nub :: forall a. Ord a => Array a -> Array a
1094+nub = nubBy compare
1095+
1096+-- | Remove the duplicates from an array, creating a new array.
1097+-- |
1098+-- | This less efficient version of `nub` only requires an `Eq` instance.
1099+-- |
1100+-- | ```purescript
1101+-- | nubEq [1, 2, 1, 3, 3] = [1, 2, 3]
1102+-- | ```
1103+-- |
1104+nubEq :: forall a. Eq a => Array a -> Array a
1105+nubEq = nubByEq eq
1106+
1107+-- | Remove the duplicates from an array, where element equality is determined
1108+-- | by the specified ordering, creating a new array.
1109+-- |
1110+-- | ```purescript
1111+-- | nubBy compare [1, 3, 4, 2, 2, 1] == [1, 3, 4, 2]
1112+-- | ```
1113+-- |
1114+nubBy :: forall a. (a -> a -> Ordering) -> Array a -> Array a
1115+nubBy comp xs = case head indexedAndSorted of
1116+ Nothing -> []
1117+ Just x -> map snd $ sortWith fst $ ST.run do
1118+ -- TODO: use NonEmptyArrays here to avoid partial functions
1119+ result <- STA.unsafeThaw $ singleton x
1120+ ST.foreach indexedAndSorted \pair@(Tuple _ x') -> do
1121+ lst <- snd <<< unsafePartial (fromJust <<< last) <$> STA.unsafeFreeze result
1122+ when (comp lst x' /= EQ) $ void $ STA.push pair result
1123+ STA.unsafeFreeze result
1124+ where
1125+ indexedAndSorted :: Array (Tuple Int a)
1126+ indexedAndSorted = sortBy (\x y -> comp (snd x) (snd y))
1127+ (mapWithIndex Tuple xs)
1128+
1129+-- | Remove the duplicates from an array, where element equality is determined
1130+-- | by the specified equivalence relation, creating a new array.
1131+-- |
1132+-- | This less efficient version of `nubBy` only requires an equivalence
1133+-- | relation.
1134+-- |
1135+-- | ```purescript
1136+-- | mod3eq a b = a `mod` 3 == b `mod` 3
1137+-- | nubByEq mod3eq [1, 3, 4, 5, 6] = [1, 3, 5]
1138+-- | ```
1139+-- |
1140+nubByEq :: forall a. (a -> a -> Boolean) -> Array a -> Array a
1141+nubByEq eq xs = ST.run do
1142+ arr <- STA.new
1143+ ST.foreach xs \x -> do
1144+ e <- not <<< any (_ `eq` x) <$> (STA.unsafeFreeze arr)
1145+ when e $ void $ STA.push x arr
1146+ STA.unsafeFreeze arr
1147+
1148+-- | Calculate the union of two arrays. Note that duplicates in the first array
1149+-- | are preserved while duplicates in the second array are removed.
1150+-- |
1151+-- | Running time: `O(n^2)`
1152+-- |
1153+-- | ```purescript
1154+-- | union [1, 2, 1, 1] [3, 3, 3, 4] = [1, 2, 1, 1, 3, 4]
1155+-- | ```
1156+-- |
1157+union :: forall a. Eq a => Array a -> Array a -> Array a
1158+union = unionBy (==)
1159+
1160+-- | Calculate the union of two arrays, using the specified function to
1161+-- | determine equality of elements. Note that duplicates in the first array
1162+-- | are preserved while duplicates in the second array are removed.
1163+-- |
1164+-- | ```purescript
1165+-- | mod3eq a b = a `mod` 3 == b `mod` 3
1166+-- | unionBy mod3eq [1, 5, 1, 2] [3, 4, 3, 3] = [1, 5, 1, 2, 3]
1167+-- | ```
1168+-- |
1169+unionBy :: forall a. (a -> a -> Boolean) -> Array a -> Array a -> Array a
1170+unionBy eq xs ys = xs <> foldl (flip (deleteBy eq)) (nubByEq eq ys) xs
1171+
1172+-- | Delete the first element of an array which is equal to the specified value,
1173+-- | creating a new array.
1174+-- |
1175+-- | ```purescript
1176+-- | delete 7 [1, 7, 3, 7] = [1, 3, 7]
1177+-- | delete 7 [1, 2, 3] = [1, 2, 3]
1178+-- | ```
1179+-- |
1180+-- | Running time: `O(n)`
1181+delete :: forall a. Eq a => a -> Array a -> Array a
1182+delete = deleteBy eq
1183+
1184+-- | Delete the first element of an array which matches the specified value,
1185+-- | under the equivalence relation provided in the first argument, creating a
1186+-- | new array.
1187+-- |
1188+-- | ```purescript
1189+-- | mod3eq a b = a `mod` 3 == b `mod` 3
1190+-- | deleteBy mod3eq 6 [1, 3, 4, 3] = [1, 4, 3]
1191+-- | ```
1192+-- |
1193+deleteBy :: forall a. (a -> a -> Boolean) -> a -> Array a -> Array a
1194+deleteBy _ _ [] = []
1195+deleteBy eq x ys = maybe ys (\i -> unsafePartial $ fromJust (deleteAt i ys)) (findIndex (eq x) ys)
1196+
1197+-- | Delete the first occurrence of each element in the second array from the
1198+-- | first array, creating a new array.
1199+-- |
1200+-- | ```purescript
1201+-- | difference [2, 1] [2, 3] = [1]
1202+-- | ```
1203+-- |
1204+-- | Running time: `O(n*m)`, where n is the length of the first array, and m is
1205+-- | the length of the second.
1206+difference :: forall a. Eq a => Array a -> Array a -> Array a
1207+difference = foldr delete
1208+
1209+infix 5 difference as \\
1210+
1211+-- | Calculate the intersection of two arrays, creating a new array. Note that
1212+-- | duplicates in the first array are preserved while duplicates in the second
1213+-- | array are removed.
1214+-- |
1215+-- | ```purescript
1216+-- | intersect [1, 1, 2] [2, 2, 1] = [1, 1, 2]
1217+-- | ```
1218+-- |
1219+intersect :: forall a. Eq a => Array a -> Array a -> Array a
1220+intersect = intersectBy eq
1221+
1222+-- | Calculate the intersection of two arrays, using the specified equivalence
1223+-- | relation to compare elements, creating a new array. Note that duplicates
1224+-- | in the first array are preserved while duplicates in the second array are
1225+-- | removed.
1226+-- |
1227+-- | ```purescript
1228+-- | mod3eq a b = a `mod` 3 == b `mod` 3
1229+-- | intersectBy mod3eq [1, 2, 3] [4, 6, 7] = [1, 3]
1230+-- | ```
1231+-- |
1232+intersectBy :: forall a. (a -> a -> Boolean) -> Array a -> Array a -> Array a
1233+intersectBy eq xs ys = filter (\x -> isJust (findIndex (eq x) ys)) xs
1234+
1235+-- | Apply a function to pairs of elements at the same index in two arrays,
1236+-- | collecting the results in a new array.
1237+-- |
1238+-- | If one array is longer, elements will be discarded from the longer array.
1239+-- |
1240+-- | For example
1241+-- |
1242+-- | ```purescript
1243+-- | zipWith (*) [1, 2, 3] [4, 5, 6, 7] == [4, 10, 18]
1244+-- | ```
1245+zipWith
1246+ :: forall a b c
1247+ . (a -> b -> c)
1248+ -> Array a
1249+ -> Array b
1250+ -> Array c
1251+zipWith = runFn3 zipWithImpl
1252+
1253+foreign import zipWithImpl
1254+ :: forall a b c
1255+ . Fn3
1256+ (a -> b -> c)
1257+ (Array a)
1258+ (Array b)
1259+ (Array c)
1260+
1261+-- | A generalization of `zipWith` which accumulates results in some
1262+-- | `Applicative` functor.
1263+-- |
1264+-- | ```purescript
1265+-- | sndChars = zipWithA (\a b -> charAt 2 (a <> b))
1266+-- | sndChars ["a", "b"] ["A", "B"] = Nothing -- since "aA" has no 3rd char
1267+-- | sndChars ["aa", "b"] ["AA", "BBB"] = Just ['A', 'B']
1268+-- | ```
1269+-- |
1270+zipWithA
1271+ :: forall m a b c
1272+ . Applicative m
1273+ => (a -> b -> m c)
1274+ -> Array a
1275+ -> Array b
1276+ -> m (Array c)
1277+zipWithA f xs ys = sequence (zipWith f xs ys)
1278+
1279+-- | Takes two arrays and returns an array of corresponding pairs.
1280+-- | If one input array is short, excess elements of the longer array are
1281+-- | discarded.
1282+-- |
1283+-- | ```purescript
1284+-- | zip [1, 2, 3] ["a", "b"] = [Tuple 1 "a", Tuple 2 "b"]
1285+-- | ```
1286+-- |
1287+zip :: forall a b. Array a -> Array b -> Array (Tuple a b)
1288+zip = zipWith Tuple
1289+
1290+-- | Transforms an array of pairs into an array of first components and an
1291+-- | array of second components.
1292+-- |
1293+-- | ```purescript
1294+-- | unzip [Tuple 1 "a", Tuple 2 "b"] = Tuple [1, 2] ["a", "b"]
1295+-- | ```
1296+-- |
1297+unzip :: forall a b. Array (Tuple a b) -> Tuple (Array a) (Array b)
1298+unzip xs =
1299+ ST.run do
1300+ fsts <- STA.new
1301+ snds <- STA.new
1302+ iter <- STAI.iterator (xs !! _)
1303+ STAI.iterate iter \(Tuple fst snd) -> do
1304+ void $ STA.push fst fsts
1305+ void $ STA.push snd snds
1306+ fsts' <- STA.unsafeFreeze fsts
1307+ snds' <- STA.unsafeFreeze snds
1308+ pure $ Tuple fsts' snds'
1309+
1310+-- | Returns true if at least one array element satisfies the given predicate,
1311+-- | iterating the array only as necessary and stopping as soon as the predicate
1312+-- | yields true.
1313+-- |
1314+-- | ```purescript
1315+-- | any (_ > 0) [] = False
1316+-- | any (_ > 0) [-1, 0, 1] = True
1317+-- | any (_ > 0) [-1, -2, -3] = False
1318+-- | ```
1319+any :: forall a. (a -> Boolean) -> Array a -> Boolean
1320+any = runFn2 anyImpl
1321+
1322+foreign import anyImpl :: forall a. Fn2 (a -> Boolean) (Array a) Boolean
1323+
1324+-- | Returns true if all the array elements satisfy the given predicate.
1325+-- | iterating the array only as necessary and stopping as soon as the predicate
1326+-- | yields false.
1327+-- |
1328+-- | ```purescript
1329+-- | all (_ > 0) [] = True
1330+-- | all (_ > 0) [1, 2, 3] = True
1331+-- | all (_ > 0) [-1, -2, -3] = False
1332+-- | ```
1333+all :: forall a. (a -> Boolean) -> Array a -> Boolean
1334+all = runFn2 allImpl
1335+
1336+foreign import allImpl :: forall a. Fn2 (a -> Boolean) (Array a) Boolean
1337+
1338+-- | Perform a fold using a monadic step function.
1339+-- |
1340+-- | ```purescript
1341+-- | foldM (\x y -> Just (x + y)) 0 [1, 4] = Just 5
1342+-- | ```
1343+foldM :: forall m a b. Monad m => (b -> a -> m b) -> b -> Array a -> m b
1344+foldM f b = runFn3 unconsImpl (\_ -> pure b) (\a as -> f b a >>= \b' -> foldM f b' as)
1345+
1346+foldRecM :: forall m a b. MonadRec m => (b -> a -> m b) -> b -> Array a -> m b
1347+foldRecM f b array = tailRecM2 go b 0
1348+ where
1349+ go res i
1350+ | i >= length array = pure (Done res)
1351+ | otherwise = do
1352+ res' <- f res (unsafePartial (unsafeIndex array i))
1353+ pure (Loop { a: res', b: i + 1 })
1354+
1355+-- | Find the element of an array at the specified index.
1356+-- |
1357+-- | ```purescript
1358+-- | unsafePartial $ unsafeIndex ["a", "b", "c"] 1 = "b"
1359+-- | ```
1360+-- |
1361+-- | Using `unsafeIndex` with an out-of-range index will not immediately raise a runtime error.
1362+-- | Instead, the result will be undefined. Most attempts to subsequently use the result will
1363+-- | cause a runtime error, of course, but this is not guaranteed, and is dependent on the backend;
1364+-- | some programs will continue to run as if nothing is wrong. For example, in the JavaScript backend,
1365+-- | the expression `unsafePartial (unsafeIndex [true] 1)` has type `Boolean`;
1366+-- | since this expression evaluates to `undefined`, attempting to use it in an `if` statement will cause
1367+-- | the else branch to be taken.
1368+unsafeIndex :: forall a. Partial => Array a -> Int -> a
1369+unsafeIndex = runFn2 unsafeIndexImpl
1370+
1371+foreign import unsafeIndexImpl :: forall a. Fn2 (Array a) Int a
.spago/p/arrays-7.3.0/src/Data/Array/NonEmpty.pursnew file+598
@@ -0,0 +1,598 @@
1+module Data.Array.NonEmpty
2+ ( module Internal
3+ , fromArray
4+ , fromNonEmpty
5+ , toArray
6+ , toNonEmpty
7+
8+ , fromFoldable
9+ , fromFoldable1
10+ , toUnfoldable
11+ , toUnfoldable1
12+ , singleton
13+ , (..), range
14+ , replicate
15+ , some
16+
17+ , length
18+
19+ , (:), cons
20+ , cons'
21+ , snoc
22+ , snoc'
23+ , appendArray
24+ , prependArray
25+ , insert
26+ , insertBy
27+
28+ , head
29+ , last
30+ , tail
31+ , init
32+ , uncons
33+ , unsnoc
34+
35+ , (!!), index
36+ , elem
37+ , notElem
38+ , elemIndex
39+ , elemLastIndex
40+ , find
41+ , findMap
42+ , findIndex
43+ , findLastIndex
44+ , insertAt
45+ , deleteAt
46+ , updateAt
47+ , updateAtIndices
48+ , modifyAt
49+ , modifyAtIndices
50+ , alterAt
51+
52+ , intersperse
53+ , reverse
54+ , concat
55+ , concatMap
56+ , filter
57+ , partition
58+ , splitAt
59+ , filterA
60+ , mapMaybe
61+ , catMaybes
62+ , mapWithIndex
63+ , foldl1
64+ , foldr1
65+ , foldMap1
66+ , fold1
67+ , intercalate
68+ , transpose
69+ , transpose'
70+ , scanl
71+ , scanr
72+
73+ , sort
74+ , sortBy
75+ , sortWith
76+ , slice
77+ , take
78+ , takeEnd
79+ , takeWhile
80+ , drop
81+ , dropEnd
82+ , dropWhile
83+ , span
84+ , group
85+ , groupAll
86+ , groupBy
87+ , groupAllBy
88+
89+ , nub
90+ , nubBy
91+ , nubEq
92+ , nubByEq
93+ , union
94+ , union'
95+ , unionBy
96+ , unionBy'
97+ , delete
98+ , deleteBy
99+
100+ , (\\), difference
101+ , difference'
102+ , intersect
103+ , intersect'
104+ , intersectBy
105+ , intersectBy'
106+
107+ , zipWith
108+ , zipWithA
109+ , zip
110+ , unzip
111+
112+ , any
113+ , all
114+
115+ , foldM
116+ , foldRecM
117+
118+ , unsafeIndex
119+ ) where
120+
121+import Prelude
122+
123+import Control.Alternative (class Alternative)
124+import Control.Lazy (class Lazy)
125+import Control.Monad.Rec.Class (class MonadRec)
126+import Data.Array as A
127+import Data.Array.NonEmpty.Internal (NonEmptyArray(..))
128+import Data.Array.NonEmpty.Internal (NonEmptyArray) as Internal
129+import Data.Bifunctor (bimap)
130+import Data.Foldable (class Foldable)
131+import Data.Maybe (Maybe(..), fromJust)
132+import Data.NonEmpty (NonEmpty, (:|))
133+import Data.Semigroup.Foldable (class Foldable1)
134+import Data.Semigroup.Foldable as F
135+import Data.Tuple (Tuple(..))
136+import Data.Unfoldable (class Unfoldable)
137+import Data.Unfoldable1 (class Unfoldable1, unfoldr1)
138+import Partial.Unsafe (unsafePartial)
139+import Safe.Coerce (coerce)
140+import Unsafe.Coerce (unsafeCoerce)
141+
142+-- | Internal - adapt an Array transform to NonEmptyArray
143+--
144+-- Note that this is unsafe: if the transform returns an empty array, this can
145+-- explode at runtime.
146+unsafeAdapt :: forall a b. (Array a -> Array b) -> NonEmptyArray a -> NonEmptyArray b
147+unsafeAdapt f = unsafeFromArray <<< adaptAny f
148+
149+-- | Internal - adapt an Array transform to NonEmptyArray,
150+-- with polymorphic result.
151+--
152+-- Note that this is unsafe: if the transform returns an empty array, this can
153+-- explode at runtime.
154+adaptAny :: forall a b. (Array a -> b) -> NonEmptyArray a -> b
155+adaptAny f = f <<< toArray
156+
157+-- | Internal - adapt Array functions returning Maybes to NonEmptyArray
158+adaptMaybe :: forall a b. (Array a -> Maybe b) -> NonEmptyArray a -> b
159+adaptMaybe f = unsafePartial $ fromJust <<< f <<< toArray
160+
161+fromArray :: forall a. Array a -> Maybe (NonEmptyArray a)
162+fromArray xs
163+ | A.length xs > 0 = Just (unsafeFromArray xs)
164+ | otherwise = Nothing
165+
166+-- | INTERNAL
167+unsafeFromArray :: forall a. Array a -> NonEmptyArray a
168+unsafeFromArray = NonEmptyArray
169+
170+unsafeFromArrayF :: forall f a. f (Array a) -> f (NonEmptyArray a)
171+unsafeFromArrayF = unsafeCoerce
172+
173+fromNonEmpty :: forall a. NonEmpty Array a -> NonEmptyArray a
174+fromNonEmpty (x :| xs) = cons' x xs
175+
176+toArray :: forall a. NonEmptyArray a -> Array a
177+toArray (NonEmptyArray xs) = xs
178+
179+toNonEmpty :: forall a. NonEmptyArray a -> NonEmpty Array a
180+toNonEmpty = uncons >>> \{head: x, tail: xs} -> x :| xs
181+
182+fromFoldable :: forall f a. Foldable f => f a -> Maybe (NonEmptyArray a)
183+fromFoldable = fromArray <<< A.fromFoldable
184+
185+fromFoldable1 :: forall f a. Foldable1 f => f a -> NonEmptyArray a
186+fromFoldable1 = unsafeFromArray <<< A.fromFoldable
187+
188+toUnfoldable :: forall f a. Unfoldable f => NonEmptyArray a -> f a
189+toUnfoldable = adaptAny A.toUnfoldable
190+
191+toUnfoldable1 :: forall f a. Unfoldable1 f => NonEmptyArray a -> f a
192+toUnfoldable1 xs = unfoldr1 f 0
193+ where
194+ len = length xs
195+ f i = Tuple (unsafePartial unsafeIndex xs i) $
196+ if i < (len - 1) then Just (i + 1) else Nothing
197+
198+singleton :: forall a. a -> NonEmptyArray a
199+singleton = unsafeFromArray <<< A.singleton
200+
201+range :: Int -> Int -> NonEmptyArray Int
202+range x y = unsafeFromArray $ A.range x y
203+
204+infix 8 range as ..
205+
206+-- | Replicate an item at least once
207+replicate :: forall a. Int -> a -> NonEmptyArray a
208+replicate i x = unsafeFromArray $ A.replicate (max 1 i) x
209+
210+some
211+ :: forall f a
212+ . Alternative f
213+ => Lazy (f (Array a))
214+ => f a -> f (NonEmptyArray a)
215+some = unsafeFromArrayF <<< A.some
216+
217+length :: forall a. NonEmptyArray a -> Int
218+length = adaptAny A.length
219+
220+cons :: forall a. a -> NonEmptyArray a -> NonEmptyArray a
221+cons x = unsafeAdapt $ A.cons x
222+
223+infixr 6 cons as :
224+
225+cons' :: forall a. a -> Array a -> NonEmptyArray a
226+cons' x xs = unsafeFromArray $ A.cons x xs
227+
228+snoc :: forall a. NonEmptyArray a -> a -> NonEmptyArray a
229+snoc xs x = unsafeFromArray $ A.snoc (toArray xs) x
230+
231+snoc' :: forall a. Array a -> a -> NonEmptyArray a
232+snoc' xs x = unsafeFromArray $ A.snoc xs x
233+
234+appendArray :: forall a. NonEmptyArray a -> Array a -> NonEmptyArray a
235+appendArray xs ys = unsafeFromArray $ toArray xs <> ys
236+
237+prependArray :: forall a. Array a -> NonEmptyArray a -> NonEmptyArray a
238+prependArray xs ys = unsafeFromArray $ xs <> toArray ys
239+
240+insert :: forall a. Ord a => a -> NonEmptyArray a -> NonEmptyArray a
241+insert x = unsafeAdapt $ A.insert x
242+
243+insertBy :: forall a. (a -> a -> Ordering) -> a -> NonEmptyArray a -> NonEmptyArray a
244+insertBy f x = unsafeAdapt $ A.insertBy f x
245+
246+head :: forall a. NonEmptyArray a -> a
247+head = adaptMaybe A.head
248+
249+last :: forall a. NonEmptyArray a -> a
250+last = adaptMaybe A.last
251+
252+tail :: forall a. NonEmptyArray a -> Array a
253+tail = adaptMaybe A.tail
254+
255+init :: forall a. NonEmptyArray a -> Array a
256+init = adaptMaybe A.init
257+
258+uncons :: forall a. NonEmptyArray a -> { head :: a, tail :: Array a }
259+uncons = adaptMaybe A.uncons
260+
261+unsnoc :: forall a. NonEmptyArray a -> { init :: Array a, last :: a }
262+unsnoc = adaptMaybe A.unsnoc
263+
264+index :: forall a. NonEmptyArray a -> Int -> Maybe a
265+index = adaptAny A.index
266+
267+infixl 8 index as !!
268+
269+elem :: forall a. Eq a => a -> NonEmptyArray a -> Boolean
270+elem x = adaptAny $ A.elem x
271+
272+notElem :: forall a. Eq a => a -> NonEmptyArray a -> Boolean
273+notElem x = adaptAny $ A.notElem x
274+
275+elemIndex :: forall a. Eq a => a -> NonEmptyArray a -> Maybe Int
276+elemIndex x = adaptAny $ A.elemIndex x
277+
278+elemLastIndex :: forall a. Eq a => a -> NonEmptyArray a -> Maybe Int
279+elemLastIndex x = adaptAny $ A.elemLastIndex x
280+
281+find :: forall a. (a -> Boolean) -> NonEmptyArray a -> Maybe a
282+find p = adaptAny $ A.find p
283+
284+findMap :: forall a b. (a -> Maybe b) -> NonEmptyArray a -> Maybe b
285+findMap p = adaptAny $ A.findMap p
286+
287+findIndex :: forall a. (a -> Boolean) -> NonEmptyArray a -> Maybe Int
288+findIndex p = adaptAny $ A.findIndex p
289+
290+findLastIndex :: forall a. (a -> Boolean) -> NonEmptyArray a -> Maybe Int
291+findLastIndex x = adaptAny $ A.findLastIndex x
292+
293+insertAt :: forall a. Int -> a -> NonEmptyArray a -> Maybe (NonEmptyArray a)
294+insertAt i x = unsafeFromArrayF <<< A.insertAt i x <<< toArray
295+
296+deleteAt :: forall a. Int -> NonEmptyArray a -> Maybe (Array a)
297+deleteAt i = adaptAny $ A.deleteAt i
298+
299+updateAt :: forall a. Int -> a -> NonEmptyArray a -> Maybe (NonEmptyArray a)
300+updateAt i x = unsafeFromArrayF <<< A.updateAt i x <<< toArray
301+
302+updateAtIndices :: forall t a. Foldable t => t (Tuple Int a) -> NonEmptyArray a -> NonEmptyArray a
303+updateAtIndices pairs = unsafeAdapt $ A.updateAtIndices pairs
304+
305+modifyAt :: forall a. Int -> (a -> a) -> NonEmptyArray a -> Maybe (NonEmptyArray a)
306+modifyAt i f = unsafeFromArrayF <<< A.modifyAt i f <<< toArray
307+
308+modifyAtIndices :: forall t a. Foldable t => t Int -> (a -> a) -> NonEmptyArray a -> NonEmptyArray a
309+modifyAtIndices is f = unsafeAdapt $ A.modifyAtIndices is f
310+
311+alterAt :: forall a. Int -> (a -> Maybe a) -> NonEmptyArray a -> Maybe (Array a)
312+alterAt i f = A.alterAt i f <<< toArray
313+
314+intersperse :: forall a. a -> NonEmptyArray a -> NonEmptyArray a
315+intersperse x = unsafeAdapt $ A.intersperse x
316+
317+reverse :: forall a. NonEmptyArray a -> NonEmptyArray a
318+reverse = unsafeAdapt A.reverse
319+
320+concat :: forall a. NonEmptyArray (NonEmptyArray a) -> NonEmptyArray a
321+concat = unsafeFromArray <<< A.concat <<< toArray <<< map toArray
322+
323+concatMap :: forall a b. (a -> NonEmptyArray b) -> NonEmptyArray a -> NonEmptyArray b
324+concatMap = flip bind
325+
326+filter :: forall a. (a -> Boolean) -> NonEmptyArray a -> Array a
327+filter f = adaptAny $ A.filter f
328+
329+partition
330+ :: forall a
331+ . (a -> Boolean)
332+ -> NonEmptyArray a
333+ -> { yes :: Array a, no :: Array a}
334+partition f = adaptAny $ A.partition f
335+
336+filterA
337+ :: forall a f
338+ . Applicative f
339+ => (a -> f Boolean)
340+ -> NonEmptyArray a
341+ -> f (Array a)
342+filterA f = adaptAny $ A.filterA f
343+
344+splitAt :: forall a. Int -> NonEmptyArray a -> { before :: Array a, after :: Array a }
345+splitAt i xs = A.splitAt i $ toArray xs
346+
347+mapMaybe :: forall a b. (a -> Maybe b) -> NonEmptyArray a -> Array b
348+mapMaybe f = adaptAny $ A.mapMaybe f
349+
350+catMaybes :: forall a. NonEmptyArray (Maybe a) -> Array a
351+catMaybes = adaptAny A.catMaybes
352+
353+mapWithIndex :: forall a b. (Int -> a -> b) -> NonEmptyArray a -> NonEmptyArray b
354+mapWithIndex f = unsafeAdapt $ A.mapWithIndex f
355+
356+foldl1 :: forall a. (a -> a -> a) -> NonEmptyArray a -> a
357+foldl1 = F.foldl1
358+
359+foldr1 :: forall a. (a -> a -> a) -> NonEmptyArray a -> a
360+foldr1 = F.foldr1
361+
362+foldMap1 :: forall a m. Semigroup m => (a -> m) -> NonEmptyArray a -> m
363+foldMap1 = F.foldMap1
364+
365+fold1 :: forall m. Semigroup m => NonEmptyArray m -> m
366+fold1 = F.fold1
367+
368+intercalate :: forall a. Semigroup a => a -> NonEmptyArray a -> a
369+intercalate = F.intercalate
370+
371+-- | The 'transpose' function transposes the rows and columns of its argument.
372+-- | For example,
373+-- |
374+-- | ```purescript
375+-- | transpose
376+-- | (NonEmptyArray [ NonEmptyArray [1, 2, 3]
377+-- | , NonEmptyArray [4, 5, 6]
378+-- | ]) ==
379+-- | (NonEmptyArray [ NonEmptyArray [1, 4]
380+-- | , NonEmptyArray [2, 5]
381+-- | , NonEmptyArray [3, 6]
382+-- | ])
383+-- | ```
384+-- |
385+-- | If some of the rows are shorter than the following rows, their elements are skipped:
386+-- |
387+-- | ```purescript
388+-- | transpose
389+-- | (NonEmptyArray [ NonEmptyArray [10, 11]
390+-- | , NonEmptyArray [20]
391+-- | , NonEmptyArray [30, 31, 32]
392+-- | ]) ==
393+-- | (NomEmptyArray [ NonEmptyArray [10, 20, 30]
394+-- | , NonEmptyArray [11, 31]
395+-- | , NonEmptyArray [32]
396+-- | ])
397+-- | ```
398+transpose :: forall a. NonEmptyArray (NonEmptyArray a) -> NonEmptyArray (NonEmptyArray a)
399+transpose =
400+ (coerce :: (Array (Array a)) -> (NonEmptyArray (NonEmptyArray a)))
401+ <<< A.transpose <<< coerce
402+
403+-- | `transpose`' is identical to `transpose` other than that the inner arrays are each
404+-- | a standard `Array` and not a `NonEmptyArray`. However, the result is wrapped in a
405+-- | `Maybe` to cater for the case where the inner `Array` is empty and must return `Nothing`.
406+transpose' :: forall a. NonEmptyArray (Array a) -> Maybe (NonEmptyArray (Array a))
407+transpose' = fromArray <<< A.transpose <<< coerce
408+
409+scanl :: forall a b. (b -> a -> b) -> b -> NonEmptyArray a -> NonEmptyArray b
410+scanl f x = unsafeAdapt $ A.scanl f x
411+
412+scanr :: forall a b. (a -> b -> b) -> b -> NonEmptyArray a -> NonEmptyArray b
413+scanr f x = unsafeAdapt $ A.scanr f x
414+
415+sort :: forall a. Ord a => NonEmptyArray a -> NonEmptyArray a
416+sort = unsafeAdapt A.sort
417+
418+sortBy :: forall a. (a -> a -> Ordering) -> NonEmptyArray a -> NonEmptyArray a
419+sortBy f = unsafeAdapt $ A.sortBy f
420+
421+sortWith :: forall a b. Ord b => (a -> b) -> NonEmptyArray a -> NonEmptyArray a
422+sortWith f = unsafeAdapt $ A.sortWith f
423+
424+slice :: forall a. Int -> Int -> NonEmptyArray a -> Array a
425+slice start end = adaptAny $ A.slice start end
426+
427+take :: forall a. Int -> NonEmptyArray a -> Array a
428+take i = adaptAny $ A.take i
429+
430+takeEnd :: forall a. Int -> NonEmptyArray a -> Array a
431+takeEnd i = adaptAny $ A.takeEnd i
432+
433+takeWhile :: forall a. (a -> Boolean) -> NonEmptyArray a -> Array a
434+takeWhile f = adaptAny $ A.takeWhile f
435+
436+drop :: forall a. Int -> NonEmptyArray a -> Array a
437+drop i = adaptAny $ A.drop i
438+
439+dropEnd :: forall a. Int -> NonEmptyArray a -> Array a
440+dropEnd i = adaptAny $ A.dropEnd i
441+
442+dropWhile :: forall a. (a -> Boolean) -> NonEmptyArray a -> Array a
443+dropWhile f = adaptAny $ A.dropWhile f
444+
445+span
446+ :: forall a
447+ . (a -> Boolean)
448+ -> NonEmptyArray a
449+ -> { init :: Array a, rest :: Array a }
450+span f = adaptAny $ A.span f
451+
452+-- | Group equal, consecutive elements of an array into arrays.
453+-- |
454+-- | ```purescript
455+-- | group (NonEmptyArray [1, 1, 2, 2, 1]) ==
456+-- | NonEmptyArray [NonEmptyArray [1, 1], NonEmptyArray [2, 2], NonEmptyArray [1]]
457+-- | ```
458+group :: forall a. Eq a => NonEmptyArray a -> NonEmptyArray (NonEmptyArray a)
459+group = unsafeAdapt $ A.group
460+
461+-- | Group equal elements of an array into arrays.
462+-- |
463+-- | ```purescript
464+-- | groupAll (NonEmptyArray [1, 1, 2, 2, 1]) ==
465+-- | NonEmptyArray [NonEmptyArray [1, 1, 1], NonEmptyArray [2, 2]]
466+-- | `
467+groupAll :: forall a. Ord a => NonEmptyArray a -> NonEmptyArray (NonEmptyArray a)
468+groupAll = groupAllBy compare
469+
470+-- | Group equal, consecutive elements of an array into arrays, using the
471+-- | specified equivalence relation to determine equality.
472+-- |
473+-- | ```purescript
474+-- | groupBy (\a b -> odd a && odd b) (NonEmptyArray [1, 3, 2, 4, 3, 3])
475+-- | = NonEmptyArray [NonEmptyArray [1, 3], NonEmptyArray [2], NonEmptyArray [4], NonEmptyArray [3, 3]]
476+-- | ```
477+-- |
478+groupBy :: forall a. (a -> a -> Boolean) -> NonEmptyArray a -> NonEmptyArray (NonEmptyArray a)
479+groupBy op = unsafeAdapt $ A.groupBy op
480+
481+-- | Group equal elements of an array into arrays, using the specified
482+-- | comparison function to determine equality.
483+-- |
484+-- | ```purescript
485+-- | groupAllBy (comparing Down) (NonEmptyArray [1, 3, 2, 4, 3, 3])
486+-- | = NonEmptyArray [NonEmptyArray [4], NonEmptyArray [3, 3, 3], NonEmptyArray [2], NonEmptyArray [1]]
487+-- | ```
488+groupAllBy :: forall a. (a -> a -> Ordering) -> NonEmptyArray a -> NonEmptyArray (NonEmptyArray a)
489+groupAllBy op = unsafeAdapt $ A.groupAllBy op
490+
491+nub :: forall a. Ord a => NonEmptyArray a -> NonEmptyArray a
492+nub = unsafeAdapt A.nub
493+
494+nubEq :: forall a. Eq a => NonEmptyArray a -> NonEmptyArray a
495+nubEq = unsafeAdapt A.nubEq
496+
497+nubBy :: forall a. (a -> a -> Ordering) -> NonEmptyArray a -> NonEmptyArray a
498+nubBy f = unsafeAdapt $ A.nubBy f
499+
500+nubByEq :: forall a. (a -> a -> Boolean) -> NonEmptyArray a -> NonEmptyArray a
501+nubByEq f = unsafeAdapt $ A.nubByEq f
502+
503+union :: forall a. Eq a => NonEmptyArray a -> NonEmptyArray a -> NonEmptyArray a
504+union = unionBy (==)
505+
506+union' :: forall a. Eq a => NonEmptyArray a -> Array a -> NonEmptyArray a
507+union' = unionBy' (==)
508+
509+unionBy
510+ :: forall a
511+ . (a -> a -> Boolean)
512+ -> NonEmptyArray a
513+ -> NonEmptyArray a
514+ -> NonEmptyArray a
515+unionBy eq xs = unionBy' eq xs <<< toArray
516+
517+unionBy'
518+ :: forall a
519+ . (a -> a -> Boolean)
520+ -> NonEmptyArray a
521+ -> Array a
522+ -> NonEmptyArray a
523+unionBy' eq xs = unsafeFromArray <<< A.unionBy eq (toArray xs)
524+
525+delete :: forall a. Eq a => a -> NonEmptyArray a -> Array a
526+delete x = adaptAny $ A.delete x
527+
528+deleteBy :: forall a. (a -> a -> Boolean) -> a -> NonEmptyArray a -> Array a
529+deleteBy f x = adaptAny $ A.deleteBy f x
530+
531+difference :: forall a. Eq a => NonEmptyArray a -> NonEmptyArray a -> Array a
532+difference xs = adaptAny $ difference' xs
533+
534+difference' :: forall a. Eq a => NonEmptyArray a -> Array a -> Array a
535+difference' xs = A.difference $ toArray xs
536+
537+intersect :: forall a . Eq a => NonEmptyArray a -> NonEmptyArray a -> Array a
538+intersect = intersectBy eq
539+
540+intersect' :: forall a . Eq a => NonEmptyArray a -> Array a -> Array a
541+intersect' = intersectBy' eq
542+
543+intersectBy
544+ :: forall a
545+ . (a -> a -> Boolean)
546+ -> NonEmptyArray a
547+ -> NonEmptyArray a
548+ -> Array a
549+intersectBy eq xs = intersectBy' eq xs <<< toArray
550+
551+intersectBy'
552+ :: forall a
553+ . (a -> a -> Boolean)
554+ -> NonEmptyArray a
555+ -> Array a
556+ -> Array a
557+intersectBy' eq xs = A.intersectBy eq (toArray xs)
558+
559+infix 5 difference as \\
560+
561+zipWith
562+ :: forall a b c
563+ . (a -> b -> c)
564+ -> NonEmptyArray a
565+ -> NonEmptyArray b
566+ -> NonEmptyArray c
567+zipWith f xs ys = unsafeFromArray $ A.zipWith f (toArray xs) (toArray ys)
568+
569+
570+zipWithA
571+ :: forall m a b c
572+ . Applicative m
573+ => (a -> b -> m c)
574+ -> NonEmptyArray a
575+ -> NonEmptyArray b
576+ -> m (NonEmptyArray c)
577+zipWithA f xs ys = unsafeFromArrayF $ A.zipWithA f (toArray xs) (toArray ys)
578+
579+zip :: forall a b. NonEmptyArray a -> NonEmptyArray b -> NonEmptyArray (Tuple a b)
580+zip xs ys = unsafeFromArray $ toArray xs `A.zip` toArray ys
581+
582+unzip :: forall a b. NonEmptyArray (Tuple a b) -> Tuple (NonEmptyArray a) (NonEmptyArray b)
583+unzip = bimap unsafeFromArray unsafeFromArray <<< A.unzip <<< toArray
584+
585+any :: forall a. (a -> Boolean) -> NonEmptyArray a -> Boolean
586+any p = adaptAny $ A.any p
587+
588+all :: forall a. (a -> Boolean) -> NonEmptyArray a -> Boolean
589+all p = adaptAny $ A.all p
590+
591+foldM :: forall m a b. Monad m => (b -> a -> m b) -> b -> NonEmptyArray a -> m b
592+foldM f acc = adaptAny $ A.foldM f acc
593+
594+foldRecM :: forall m a b. MonadRec m => (b -> a -> m b) -> b -> NonEmptyArray a -> m b
595+foldRecM f acc = adaptAny $ A.foldRecM f acc
596+
597+unsafeIndex :: forall a. Partial => NonEmptyArray a -> Int -> a
598+unsafeIndex = adaptAny A.unsafeIndex
.spago/p/arrays-7.3.0/src/Data/Array/NonEmpty/Internal.jsnew file+77
@@ -0,0 +1,77 @@
1+export const foldr1Impl = function (f, xs) {
2+ var acc = xs[xs.length - 1];
3+ for (var i = xs.length - 2; i >= 0; i--) {
4+ acc = f(xs[i])(acc);
5+ }
6+ return acc;
7+};
8+
9+export const foldl1Impl = function (f, xs) {
10+ var acc = xs[0];
11+ var len = xs.length;
12+ for (var i = 1; i < len; i++) {
13+ acc = f(acc)(xs[i]);
14+ }
15+ return acc;
16+};
17+
18+export const traverse1Impl = function () {
19+ function Cont(fn) {
20+ this.fn = fn;
21+ }
22+
23+ var emptyList = {};
24+
25+ var ConsCell = function (head, tail) {
26+ this.head = head;
27+ this.tail = tail;
28+ };
29+
30+ function finalCell(head) {
31+ return new ConsCell(head, emptyList);
32+ }
33+
34+ function consList(x) {
35+ return function (xs) {
36+ return new ConsCell(x, xs);
37+ };
38+ }
39+
40+ function listToArray(list) {
41+ var arr = [];
42+ var xs = list;
43+ while (xs !== emptyList) {
44+ arr.push(xs.head);
45+ xs = xs.tail;
46+ }
47+ return arr;
48+ }
49+
50+ return function (apply, map, f) {
51+ var buildFrom = function (x, ys) {
52+ return apply(map(consList)(f(x)))(ys);
53+ };
54+
55+ var go = function (acc, currentLen, xs) {
56+ if (currentLen === 0) {
57+ return acc;
58+ } else {
59+ var last = xs[currentLen - 1];
60+ return new Cont(function () {
61+ var built = go(buildFrom(last, acc), currentLen - 1, xs);
62+ return built;
63+ });
64+ }
65+ };
66+
67+ return function (array) {
68+ var acc = map(finalCell)(f(array[array.length - 1]));
69+ var result = go(acc, array.length - 1, array);
70+ while (result instanceof Cont) {
71+ result = result.fn();
72+ }
73+
74+ return map(listToArray)(result);
75+ };
76+ };
77+}();
.spago/p/arrays-7.3.0/src/Data/Array/NonEmpty/Internal.pursnew file+84
@@ -0,0 +1,84 @@
1+-- | This module exports the `NonEmptyArray` constructor.
2+-- |
3+-- | It is **NOT** intended for public use and is **NOT** versioned.
4+-- |
5+-- | Its content may change **in any way**, **at any time** and
6+-- | **without notice**.
7+
8+module Data.Array.NonEmpty.Internal (NonEmptyArray(..)) where
9+
10+import Prelude
11+
12+import Control.Alt (class Alt)
13+import Data.Eq (class Eq1)
14+import Data.Foldable (class Foldable)
15+import Data.FoldableWithIndex (class FoldableWithIndex)
16+import Data.Function.Uncurried (Fn2, Fn3, runFn2, runFn3)
17+import Data.FunctorWithIndex (class FunctorWithIndex)
18+import Data.Ord (class Ord1)
19+import Data.Semigroup.Foldable (class Foldable1, foldMap1DefaultL)
20+import Data.Semigroup.Traversable (class Traversable1, sequence1Default)
21+import Data.Traversable (class Traversable)
22+import Data.TraversableWithIndex (class TraversableWithIndex)
23+import Data.Unfoldable1 (class Unfoldable1)
24+
25+-- | An array that is known not to be empty.
26+-- |
27+-- | You can use the constructor to create a `NonEmptyArray` that isn't
28+-- | non-empty, breaking the guarantee behind this newtype. It is
29+-- | provided as an escape hatch mainly for the `Data.Array.NonEmpty`
30+-- | and `Data.Array` modules. Use this at your own risk when you know
31+-- | what you are doing.
32+newtype NonEmptyArray a = NonEmptyArray (Array a)
33+
34+instance showNonEmptyArray :: Show a => Show (NonEmptyArray a) where
35+ show (NonEmptyArray xs) = "(NonEmptyArray " <> show xs <> ")"
36+
37+derive newtype instance eqNonEmptyArray :: Eq a => Eq (NonEmptyArray a)
38+derive newtype instance eq1NonEmptyArray :: Eq1 NonEmptyArray
39+
40+derive newtype instance ordNonEmptyArray :: Ord a => Ord (NonEmptyArray a)
41+derive newtype instance ord1NonEmptyArray :: Ord1 NonEmptyArray
42+
43+derive newtype instance semigroupNonEmptyArray :: Semigroup (NonEmptyArray a)
44+
45+derive newtype instance functorNonEmptyArray :: Functor NonEmptyArray
46+derive newtype instance functorWithIndexNonEmptyArray :: FunctorWithIndex Int NonEmptyArray
47+
48+derive newtype instance foldableNonEmptyArray :: Foldable NonEmptyArray
49+derive newtype instance foldableWithIndexNonEmptyArray :: FoldableWithIndex Int NonEmptyArray
50+
51+instance foldable1NonEmptyArray :: Foldable1 NonEmptyArray where
52+ foldMap1 = foldMap1DefaultL
53+ foldr1 = runFn2 foldr1Impl
54+ foldl1 = runFn2 foldl1Impl
55+
56+derive newtype instance unfoldable1NonEmptyArray :: Unfoldable1 NonEmptyArray
57+derive newtype instance traversableNonEmptyArray :: Traversable NonEmptyArray
58+derive newtype instance traversableWithIndexNonEmptyArray :: TraversableWithIndex Int NonEmptyArray
59+
60+instance traversable1NonEmptyArray :: Traversable1 NonEmptyArray where
61+ traverse1 f = runFn3 traverse1Impl apply map f
62+ sequence1 = sequence1Default
63+
64+derive newtype instance applyNonEmptyArray :: Apply NonEmptyArray
65+
66+derive newtype instance applicativeNonEmptyArray :: Applicative NonEmptyArray
67+
68+derive newtype instance bindNonEmptyArray :: Bind NonEmptyArray
69+
70+derive newtype instance monadNonEmptyArray :: Monad NonEmptyArray
71+
72+derive newtype instance altNonEmptyArray :: Alt NonEmptyArray
73+
74+-- we use FFI here to avoid the unncessary copy created by `tail`
75+foreign import foldr1Impl :: forall a. Fn2 (a -> a -> a) (NonEmptyArray a) a
76+foreign import foldl1Impl :: forall a. Fn2 (a -> a -> a) (NonEmptyArray a) a
77+
78+foreign import traverse1Impl
79+ :: forall m a b
80+ . Fn3
81+ (forall a' b'. (m (a' -> b') -> m a' -> m b'))
82+ (forall a' b'. (a' -> b') -> m a' -> m b')
83+ (a -> m b)
84+ (NonEmptyArray a -> m (NonEmptyArray b))
.spago/p/arrays-7.3.0/src/Data/Array/Partial.pursnew file+35
@@ -0,0 +1,35 @@
1+-- | Partial helper functions for working with immutable arrays.
2+module Data.Array.Partial
3+ ( head
4+ , tail
5+ , last
6+ , init
7+ ) where
8+
9+import Prelude
10+
11+import Data.Array (length, slice, unsafeIndex)
12+
13+-- | Get the first element of a non-empty array.
14+-- |
15+-- | Running time: `O(1)`.
16+head :: forall a. Partial => Array a -> a
17+head xs = unsafeIndex xs 0
18+
19+-- | Get all but the first element of a non-empty array.
20+-- |
21+-- | Running time: `O(n)`, where `n` is the length of the array.
22+tail :: forall a. Partial => Array a -> Array a
23+tail xs = slice 1 (length xs) xs
24+
25+-- | Get the last element of a non-empty array.
26+-- |
27+-- | Running time: `O(1)`.
28+last :: forall a. Partial => Array a -> a
29+last xs = unsafeIndex xs (length xs - 1)
30+
31+-- | Get all but the last element of a non-empty array.
32+-- |
33+-- | Running time: `O(n)`, where `n` is the length of the array.
34+init :: forall a. Partial => Array a -> Array a
35+init xs = slice 0 (length xs - 1) xs
.spago/p/arrays-7.3.0/src/Data/Array/ST.jsnew file+113
@@ -0,0 +1,113 @@
1+function newSTArray() {
2+ return [];
3+}
4+export { newSTArray as new };
5+
6+export const peekImpl = function (just, nothing, i, xs) {
7+ return i >= 0 && i < xs.length ? just(xs[i]) : nothing;
8+};
9+
10+export const pokeImpl = function (i, a, xs) {
11+ var ret = i >= 0 && i < xs.length;
12+ if (ret) xs[i] = a;
13+ return ret;
14+};
15+
16+export const lengthImpl = function (xs) {
17+ return xs.length;
18+};
19+
20+export const popImpl = function (just, nothing, xs) {
21+ return xs.length > 0 ? just(xs.pop()) : nothing;
22+};
23+
24+export const pushAllImpl = function (as, xs) {
25+ return xs.push.apply(xs, as);
26+};
27+
28+export const shiftImpl = function (just, nothing, xs) {
29+ return xs.length > 0 ? just(xs.shift()) : nothing;
30+};
31+
32+export const unshiftAllImpl = function (as, xs) {
33+ return xs.unshift.apply(xs, as);
34+};
35+
36+export const spliceImpl = function (i, howMany, bs, xs) {
37+ return xs.splice.apply(xs, [i, howMany].concat(bs));
38+};
39+
40+function unsafeFreezeThawImpl(xs) {
41+ return xs;
42+}
43+
44+export const unsafeFreezeImpl = unsafeFreezeThawImpl;
45+
46+export const unsafeThawImpl = unsafeFreezeThawImpl;
47+
48+function copyImpl(xs) {
49+ return xs.slice();
50+}
51+
52+export const freezeImpl = copyImpl;
53+
54+export const thawImpl = copyImpl;
55+
56+export const cloneImpl = copyImpl;
57+
58+export const sortByImpl = (function () {
59+ function mergeFromTo(compare, fromOrdering, xs1, xs2, from, to) {
60+ var mid;
61+ var i;
62+ var j;
63+ var k;
64+ var x;
65+ var y;
66+ var c;
67+
68+ mid = from + ((to - from) >> 1);
69+ if (mid - from > 1) mergeFromTo(compare, fromOrdering, xs2, xs1, from, mid);
70+ if (to - mid > 1) mergeFromTo(compare, fromOrdering, xs2, xs1, mid, to);
71+
72+ i = from;
73+ j = mid;
74+ k = from;
75+ while (i < mid && j < to) {
76+ x = xs2[i];
77+ y = xs2[j];
78+ c = fromOrdering(compare(x)(y));
79+ if (c > 0) {
80+ xs1[k++] = y;
81+ ++j;
82+ } else {
83+ xs1[k++] = x;
84+ ++i;
85+ }
86+ }
87+ while (i < mid) {
88+ xs1[k++] = xs2[i++];
89+ }
90+ while (j < to) {
91+ xs1[k++] = xs2[j++];
92+ }
93+ }
94+
95+ return function (compare, fromOrdering, xs) {
96+ if (xs.length < 2) return xs;
97+
98+ mergeFromTo(compare, fromOrdering, xs, xs.slice(0), 0, xs.length);
99+
100+ return xs;
101+ };
102+})();
103+
104+export const toAssocArrayImpl = function (xs) {
105+ var n = xs.length;
106+ var as = new Array(n);
107+ for (var i = 0; i < n; i++) as[i] = { value: xs[i], index: i };
108+ return as;
109+};
110+
111+export const pushImpl = function (a, xs) {
112+ return xs.push(a);
113+};
.spago/p/arrays-7.3.0/src/Data/Array/ST.pursnew file+262
@@ -0,0 +1,262 @@
1+-- | Helper functions for working with mutable arrays using the `ST` effect.
2+-- |
3+-- | This module can be used when performance is important and mutation is a local effect.
4+
5+module Data.Array.ST
6+ ( STArray(..)
7+ , Assoc
8+ , run
9+ , withArray
10+ , new
11+ , peek
12+ , poke
13+ , modify
14+ , length
15+ , pop
16+ , push
17+ , pushAll
18+ , shift
19+ , unshift
20+ , unshiftAll
21+ , splice
22+ , sort
23+ , sortBy
24+ , sortWith
25+ , freeze
26+ , thaw
27+ , clone
28+ , unsafeFreeze
29+ , unsafeThaw
30+ , toAssocArray
31+ ) where
32+
33+import Prelude
34+
35+import Control.Monad.ST (ST, Region)
36+import Control.Monad.ST as ST
37+import Control.Monad.ST.Uncurried (STFn1, STFn2, STFn3, STFn4, runSTFn1, runSTFn2, runSTFn3, runSTFn4)
38+import Data.Maybe (Maybe(..))
39+
40+-- | A reference to a mutable array.
41+-- |
42+-- | The first type parameter represents the memory region which the array belongs to.
43+-- | The second type parameter defines the type of elements of the mutable array.
44+-- |
45+-- | The runtime representation of a value of type `STArray h a` is the same as that of `Array a`,
46+-- | except that mutation is allowed.
47+foreign import data STArray :: Region -> Type -> Type
48+
49+type role STArray nominal representational
50+
51+-- | An element and its index.
52+type Assoc a = { value :: a, index :: Int }
53+
54+-- | A safe way to create and work with a mutable array before returning an
55+-- | immutable array for later perusal. This function avoids copying the array
56+-- | before returning it - it uses unsafeFreeze internally, but this wrapper is
57+-- | a safe interface to that function.
58+run :: forall a. (forall h. ST h (STArray h a)) -> Array a
59+run st = ST.run (st >>= unsafeFreeze)
60+
61+-- | Perform an effect requiring a mutable array on a copy of an immutable array,
62+-- | safely returning the result as an immutable array.
63+withArray
64+ :: forall h a b
65+ . (STArray h a -> ST h b)
66+ -> Array a
67+ -> ST h (Array a)
68+withArray f xs = do
69+ result <- thaw xs
70+ _ <- f result
71+ unsafeFreeze result
72+
73+-- | O(1). Convert a mutable array to an immutable array, without copying. The mutable
74+-- | array must not be mutated afterwards.
75+unsafeFreeze :: forall h a. STArray h a -> ST h (Array a)
76+unsafeFreeze = runSTFn1 unsafeFreezeImpl
77+
78+foreign import unsafeFreezeImpl :: forall h a. STFn1 (STArray h a) h (Array a)
79+
80+-- | O(1) Convert an immutable array to a mutable array, without copying. The input
81+-- | array must not be used afterward.
82+unsafeThaw :: forall h a. Array a -> ST h (STArray h a)
83+unsafeThaw = runSTFn1 unsafeThawImpl
84+
85+foreign import unsafeThawImpl :: forall h a. STFn1 (Array a) h (STArray h a)
86+
87+-- | Create a new, empty mutable array.
88+foreign import new :: forall h a. ST h (STArray h a)
89+
90+thaw
91+ :: forall h a
92+ . Array a
93+ -> ST h (STArray h a)
94+thaw = runSTFn1 thawImpl
95+
96+-- | Create a mutable copy of an immutable array.
97+foreign import thawImpl :: forall h a. STFn1 (Array a) h (STArray h a)
98+
99+-- | Make a mutable copy of a mutable array.
100+clone
101+ :: forall h a
102+ . STArray h a
103+ -> ST h (STArray h a)
104+clone = runSTFn1 cloneImpl
105+
106+foreign import cloneImpl :: forall h a. STFn1 (STArray h a) h (STArray h a)
107+
108+-- | Sort a mutable array in place. Sorting is stable: the order of equal
109+-- | elements is preserved.
110+sort :: forall a h. Ord a => STArray h a -> ST h (STArray h a)
111+sort = sortBy compare
112+
113+-- | Remove the first element from an array and return that element.
114+shift :: forall h a. STArray h a -> ST h (Maybe a)
115+shift = runSTFn3 shiftImpl Just Nothing
116+
117+foreign import shiftImpl
118+ :: forall h a
119+ . STFn3 (forall b. b -> Maybe b) (forall b. Maybe b) (STArray h a) h (Maybe a)
120+
121+-- | Sort a mutable array in place using a comparison function. Sorting is
122+-- | stable: the order of elements is preserved if they are equal according to
123+-- | the comparison function.
124+sortBy
125+ :: forall a h
126+ . (a -> a -> Ordering)
127+ -> STArray h a
128+ -> ST h (STArray h a)
129+sortBy comp = runSTFn3 sortByImpl comp case _ of
130+ GT -> 1
131+ EQ -> 0
132+ LT -> -1
133+
134+foreign import sortByImpl
135+ :: forall a h
136+ . STFn3 (a -> a -> Ordering) (Ordering -> Int) (STArray h a) h (STArray h a)
137+
138+-- | Sort a mutable array in place based on a projection. Sorting is stable: the
139+-- | order of elements is preserved if they are equal according to the projection.
140+sortWith
141+ :: forall a b h
142+ . Ord b
143+ => (a -> b)
144+ -> STArray h a
145+ -> ST h (STArray h a)
146+sortWith f = sortBy (comparing f)
147+
148+-- | Create an immutable copy of a mutable array.
149+freeze
150+ :: forall h a
151+ . STArray h a
152+ -> ST h (Array a)
153+freeze = runSTFn1 freezeImpl
154+
155+foreign import freezeImpl :: forall h a. STFn1 (STArray h a) h (Array a)
156+
157+-- | Read the value at the specified index in a mutable array.
158+peek
159+ :: forall h a
160+ . Int
161+ -> STArray h a
162+ -> ST h (Maybe a)
163+peek = runSTFn4 peekImpl Just Nothing
164+
165+foreign import peekImpl :: forall h a r. STFn4 (a -> r) r Int (STArray h a) h r
166+
167+poke
168+ :: forall h a
169+ . Int
170+ -> a
171+ -> STArray h a
172+ -> ST h Boolean
173+poke = runSTFn3 pokeImpl
174+
175+-- | Change the value at the specified index in a mutable array.
176+foreign import pokeImpl :: forall h a. STFn3 Int a (STArray h a) h Boolean
177+
178+foreign import lengthImpl :: forall h a. STFn1 (STArray h a) h Int
179+
180+-- | Get the number of elements in a mutable array.
181+length :: forall h a. STArray h a -> ST h Int
182+length = runSTFn1 lengthImpl
183+
184+-- | Remove the last element from an array and return that element.
185+pop :: forall h a. STArray h a -> ST h (Maybe a)
186+pop = runSTFn3 popImpl Just Nothing
187+
188+foreign import popImpl
189+ :: forall h a
190+ . STFn3 (forall b. b -> Maybe b) (forall b. Maybe b) (STArray h a) h (Maybe a)
191+
192+-- | Append an element to the end of a mutable array. Returns the new length of
193+-- | the array.
194+push :: forall h a. a -> (STArray h a) -> ST h Int
195+push = runSTFn2 pushImpl
196+
197+foreign import pushImpl :: forall h a. STFn2 a (STArray h a) h Int
198+
199+-- | Append the values in an immutable array to the end of a mutable array.
200+-- | Returns the new length of the mutable array.
201+pushAll
202+ :: forall h a
203+ . Array a
204+ -> STArray h a
205+ -> ST h Int
206+pushAll = runSTFn2 pushAllImpl
207+
208+foreign import pushAllImpl
209+ :: forall h a
210+ . STFn2 (Array a) (STArray h a) h Int
211+
212+-- | Append an element to the front of a mutable array. Returns the new length of
213+-- | the array.
214+unshift :: forall h a. a -> STArray h a -> ST h Int
215+unshift a = runSTFn2 unshiftAllImpl [ a ]
216+
217+-- | Append the values in an immutable array to the front of a mutable array.
218+-- | Returns the new length of the mutable array.
219+unshiftAll
220+ :: forall h a
221+ . Array a
222+ -> STArray h a
223+ -> ST h Int
224+unshiftAll = runSTFn2 unshiftAllImpl
225+
226+foreign import unshiftAllImpl
227+ :: forall h a
228+ . STFn2 (Array a) (STArray h a) h Int
229+
230+-- | Mutate the element at the specified index using the supplied function.
231+modify :: forall h a. Int -> (a -> a) -> STArray h a -> ST h Boolean
232+modify i f xs = do
233+ entry <- peek i xs
234+ case entry of
235+ Just x -> poke i (f x) xs
236+ Nothing -> pure false
237+
238+-- | Remove and/or insert elements from/into a mutable array at the specified index.
239+splice
240+ :: forall h a
241+ . Int
242+ -> Int
243+ -> Array a
244+ -> STArray h a
245+ -> ST h (Array a)
246+splice = runSTFn4 spliceImpl
247+
248+foreign import spliceImpl
249+ :: forall h a
250+ . STFn4 Int Int (Array a) (STArray h a) h (Array a)
251+
252+-- | Create an immutable copy of a mutable array, where each element
253+-- | is labelled with its index in the original array.
254+toAssocArray
255+ :: forall h a
256+ . STArray h a
257+ -> ST h (Array (Assoc a))
258+toAssocArray = runSTFn1 toAssocArrayImpl
259+
260+foreign import toAssocArrayImpl
261+ :: forall h a
262+ . STFn1 (STArray h a) h (Array (Assoc a))
.spago/p/arrays-7.3.0/src/Data/Array/ST/Iterator.pursnew file+80
@@ -0,0 +1,80 @@
1+module Data.Array.ST.Iterator
2+ ( Iterator
3+ , iterator
4+ , iterate
5+ , next
6+ , peek
7+ , exhausted
8+ , pushWhile
9+ , pushAll
10+ ) where
11+
12+import Prelude
13+import Control.Monad.ST (ST)
14+import Control.Monad.ST as ST
15+import Control.Monad.ST.Ref (STRef)
16+import Control.Monad.ST.Ref as STRef
17+import Data.Array.ST (STArray)
18+import Data.Array.ST as STA
19+
20+import Data.Maybe (Maybe(..), isNothing)
21+
22+-- | This type provides a slightly easier way of iterating over an array's
23+-- | elements in an STArray computation, without having to keep track of
24+-- | indices.
25+data Iterator r a = Iterator (Int -> Maybe a) (STRef r Int)
26+
27+-- | Make an Iterator given an indexing function into an array (or anything
28+-- | else). If `xs :: Array a`, the standard way to create an iterator over
29+-- | `xs` is to use `iterator (xs !! _)`, where `(!!)` comes from `Data.Array`.
30+iterator :: forall r a. (Int -> Maybe a) -> ST r (Iterator r a)
31+iterator f =
32+ Iterator f <$> STRef.new 0
33+
34+-- | Perform an action once for each item left in an iterator. If the action
35+-- | itself also advances the same iterator, `iterate` will miss those items
36+-- | out.
37+iterate :: forall r a. Iterator r a -> (a -> ST r Unit) -> ST r Unit
38+iterate iter f = do
39+ break <- STRef.new false
40+ ST.while (not <$> STRef.read break) do
41+ mx <- next iter
42+ case mx of
43+ Just x -> f x
44+ Nothing -> void $ STRef.write true break
45+
46+-- | Get the next item out of an iterator, advancing it. Returns Nothing if the
47+-- | Iterator is exhausted.
48+next :: forall r a. Iterator r a -> ST r (Maybe a)
49+next (Iterator f currentIndex) = do
50+ i <- STRef.read currentIndex
51+ _ <- STRef.modify (_ + 1) currentIndex
52+ pure (f i)
53+
54+-- | Get the next item out of an iterator without advancing it.
55+peek :: forall r a. Iterator r a -> ST r (Maybe a)
56+peek (Iterator f currentIndex) = do
57+ i <- STRef.read currentIndex
58+ pure (f i)
59+
60+-- | Check whether an iterator has been exhausted.
61+exhausted :: forall r a. Iterator r a -> ST r Boolean
62+exhausted = map isNothing <<< peek
63+
64+-- | Extract elements from an iterator and push them on to an STArray for as
65+-- | long as those elements satisfy a given predicate.
66+pushWhile :: forall r a. (a -> Boolean) -> Iterator r a -> STArray r a -> ST r Unit
67+pushWhile p iter array = do
68+ break <- STRef.new false
69+ ST.while (not <$> STRef.read break) do
70+ mx <- peek iter
71+ case mx of
72+ Just x | p x -> do
73+ _ <- STA.push x array
74+ void $ next iter
75+ _ ->
76+ void $ STRef.write true break
77+
78+-- | Push the entire remaining contents of an iterator onto an STArray.
79+pushAll :: forall r a. Iterator r a -> STArray r a -> ST r Unit
80+pushAll = pushWhile (const true)
.spago/p/arrays-7.3.0/src/Data/Array/ST/Partial.jsnew file+7
@@ -0,0 +1,7 @@
1+export const peekImpl = function (i, xs) {
2+ return xs[i];
3+};
4+
5+export const pokeImpl = function (i, a, xs) {
6+ xs[i] = a;
7+};
.spago/p/arrays-7.3.0/src/Data/Array/ST/Partial.pursnew file+36
@@ -0,0 +1,36 @@
1+-- | Partial functions for working with mutable arrays using the `ST` effect.
2+-- |
3+-- | This module is particularly helpful when performance is very important.
4+
5+module Data.Array.ST.Partial
6+ ( peek
7+ , poke
8+ ) where
9+
10+import Control.Monad.ST (ST)
11+import Control.Monad.ST.Uncurried (STFn2, STFn3, runSTFn2, runSTFn3)
12+import Data.Array.ST (STArray)
13+import Data.Unit (Unit)
14+
15+-- | Read the value at the specified index in a mutable array.
16+peek
17+ :: forall h a
18+ . Partial
19+ => Int
20+ -> STArray h a
21+ -> ST h a
22+peek = runSTFn2 peekImpl
23+
24+foreign import peekImpl :: forall h a. STFn2 Int (STArray h a) h a
25+
26+-- | Change the value at the specified index in a mutable array.
27+poke
28+ :: forall h a
29+ . Partial
30+ => Int
31+ -> a
32+ -> STArray h a
33+ -> ST h Unit
34+poke = runSTFn3 pokeImpl
35+
36+foreign import pokeImpl :: forall h a. STFn3 Int a (STArray h a) h Unit
.spago/p/bifunctors-6.1.0/LICENSEnew file+26
@@ -0,0 +1,26 @@
1+Copyright 2018 PureScript
2+
3+Redistribution and use in source and binary forms, with or without modification,
4+are permitted provided that the following conditions are met:
5+
6+1. Redistributions of source code must retain the above copyright notice, this
7+list of conditions and the following disclaimer.
8+
9+2. Redistributions in binary form must reproduce the above copyright notice,
10+this list of conditions and the following disclaimer in the documentation and/or
11+other materials provided with the distribution.
12+
13+3. Neither the name of the copyright holder nor the names of its contributors
14+may be used to endorse or promote products derived from this software without
15+specific prior written permission.
16+
17+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
21+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.spago/p/bifunctors-6.1.0/README.mdnew file+17
@@ -0,0 +1,17 @@
1+# purescript-bifunctors
2+
3+[](https://github.com/purescript/purescript-bifunctors/releases)
4+[](https://github.com/purescript/purescript-bifunctors/actions?query=workflow%3ACI+branch%3Amaster)
5+[](https://pursuit.purescript.org/packages/purescript-bifunctors)
6+
7+Bifunctors and biapplicatives.
8+
9+## Installation
10+
11+```
12+spago install bifunctors
13+```
14+
15+## Documentation
16+
17+Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-bifunctors).
.spago/p/bifunctors-6.1.0/bower.jsonnew file+26
@@ -0,0 +1,26 @@
1+{
2+ "name": "purescript-bifunctors",
3+ "homepage": "https://github.com/purescript/purescript-bifunctors",
4+ "description": "Bifunctors and biapplicatives",
5+ "license": "BSD-3-Clause",
6+ "repository": {
7+ "type": "git",
8+ "url": "https://github.com/purescript/purescript-bifunctors.git"
9+ },
10+ "ignore": [
11+ "**/.*",
12+ "bower_components",
13+ "node_modules",
14+ "output",
15+ "test",
16+ "bower.json",
17+ "package.json"
18+ ],
19+ "dependencies": {
20+ "purescript-const": "^6.0.0",
21+ "purescript-either": "^6.0.0",
22+ "purescript-newtype": "^5.0.0",
23+ "purescript-prelude": "^6.0.0",
24+ "purescript-tuples": "^7.0.0"
25+ }
26+}
.spago/p/bifunctors-6.1.0/package.jsonnew file+12
@@ -0,0 +1,12 @@
1+{
2+ "private": true,
3+ "scripts": {
4+ "clean": "rimraf output && rimraf .pulp-cache",
5+ "build": "pulp build -- --censor-lib --strict"
6+ },
7+ "devDependencies": {
8+ "pulp": "16.0.0-0",
9+ "purescript-psa": "^0.8.2",
10+ "rimraf": "^3.0.2"
11+ }
12+}
.spago/p/bifunctors-6.1.0/purs.jsonnew file+18
@@ -0,0 +1,18 @@
1+{
2+ "name": "bifunctors",
3+ "version": "6.1.0",
4+ "license": "BSD-3-Clause",
5+ "description": "Bifunctors and biapplicatives",
6+ "location": {
7+ "githubOwner": "purescript",
8+ "githubRepo": "purescript-bifunctors"
9+ },
10+ "ref": "v6.1.0",
11+ "dependencies": {
12+ "const": ">=6.0.0 <7.0.0",
13+ "either": ">=6.0.0 <7.0.0",
14+ "newtype": ">=5.0.0 <6.0.0",
15+ "prelude": ">=6.0.0 <7.0.0",
16+ "tuples": ">=7.0.0 <8.0.0"
17+ }
18+}
.spago/p/bifunctors-6.1.0/src/Control/Biapplicative.pursnew file+12
@@ -0,0 +1,12 @@
1+module Control.Biapplicative where
2+
3+import Control.Biapply (class Biapply)
4+import Data.Tuple (Tuple(..))
5+
6+-- | `Biapplicative` captures type constructors of two arguments which support lifting of
7+-- | functions of zero or more arguments, in the sense of `Applicative`.
8+class Biapply w <= Biapplicative w where
9+ bipure :: forall a b. a -> b -> w a b
10+
11+instance biapplicativeTuple :: Biapplicative Tuple where
12+ bipure = Tuple
.spago/p/bifunctors-6.1.0/src/Control/Biapply.pursnew file+59
@@ -0,0 +1,59 @@
1+module Control.Biapply where
2+
3+import Data.Function (const, identity)
4+
5+import Data.Bifunctor (class Bifunctor, bimap)
6+import Data.Tuple (Tuple(..))
7+
8+-- | A convenience operator which can be used to apply the result of `bipure` in
9+-- | the style of `Applicative`:
10+-- |
11+-- | ```purescript
12+-- | bipure f g <<$>> x <<*>> y
13+-- | ```
14+infixl 4 identity as <<$>>
15+
16+-- | `Biapply` captures type constructors of two arguments which support lifting of
17+-- | functions of one or more arguments, in the sense of `Apply`.
18+class Bifunctor w <= Biapply w where
19+ biapply :: forall a b c d. w (a -> b) (c -> d) -> w a c -> w b d
20+
21+infixl 4 biapply as <<*>>
22+
23+-- | Keep the results of the second computation.
24+biapplyFirst :: forall w a b c d. Biapply w => w a b -> w c d -> w c d
25+biapplyFirst a b = bimap (const identity) (const identity) <<$>> a <<*>> b
26+
27+infixl 4 biapplyFirst as *>>
28+
29+-- | Keep the results of the first computation.
30+biapplySecond :: forall w a b c d. Biapply w => w a b -> w c d -> w a b
31+biapplySecond a b = bimap const const <<$>> a <<*>> b
32+
33+infixl 4 biapplySecond as <<*
34+
35+-- | Lift a function of two arguments.
36+bilift2
37+ :: forall w a b c d e f
38+ . Biapply w
39+ => (a -> b -> c)
40+ -> (d -> e -> f)
41+ -> w a d
42+ -> w b e
43+ -> w c f
44+bilift2 f g a b = bimap f g <<$>> a <<*>> b
45+
46+-- | Lift a function of three arguments.
47+bilift3
48+ :: forall w a b c d e f g h
49+ . Biapply w
50+ => (a -> b -> c -> d)
51+ -> (e -> f -> g -> h)
52+ -> w a e
53+ -> w b f
54+ -> w c g
55+ -> w d h
56+bilift3 f g a b c = bimap f g <<$>> a <<*>> b <<*>> c
57+
58+instance biapplyTuple :: Biapply Tuple where
59+ biapply (Tuple f g) (Tuple a b) = Tuple (f a) (g b)
.spago/p/bifunctors-6.1.0/src/Data/Bifunctor.pursnew file+46
@@ -0,0 +1,46 @@
1+module Data.Bifunctor where
2+
3+import Control.Category (identity)
4+import Data.Const (Const(..))
5+import Data.Either (Either(..))
6+import Data.Tuple (Tuple(..))
7+import Data.Unit (Unit, unit)
8+import Data.Function (const)
9+
10+-- | A `Bifunctor` is a `Functor` from the pair category `(Type, Type)` to `Type`.
11+-- |
12+-- | A type constructor with two type arguments can be made into a `Bifunctor` if
13+-- | both of its type arguments are covariant.
14+-- |
15+-- | The `bimap` function maps a pair of functions over the two type arguments
16+-- | of the bifunctor.
17+-- |
18+-- | Laws:
19+-- |
20+-- | - Identity: `bimap identity identity == identity`
21+-- | - Composition: `bimap f1 g1 <<< bimap f2 g2 == bimap (f1 <<< f2) (g1 <<< g2)`
22+-- |
23+class Bifunctor f where
24+ bimap :: forall a b c d. (a -> b) -> (c -> d) -> f a c -> f b d
25+
26+-- | Map a function over the first type argument of a `Bifunctor`.
27+lmap :: forall f a b c. Bifunctor f => (a -> b) -> f a c -> f b c
28+lmap f = bimap f identity
29+
30+-- | Map a function over the second type arguments of a `Bifunctor`.
31+rmap :: forall f a b c. Bifunctor f => (b -> c) -> f a b -> f a c
32+rmap = bimap identity
33+
34+-- | The bivoid function is used to ignore the types wrapped by a Bifunctor.
35+bivoid :: forall f a b. Bifunctor f => f a b -> f Unit Unit
36+bivoid = bimap (const unit) (const unit)
37+
38+instance bifunctorEither :: Bifunctor Either where
39+ bimap f _ (Left l) = Left (f l)
40+ bimap _ g (Right r) = Right (g r)
41+
42+instance bifunctorTuple :: Bifunctor Tuple where
43+ bimap f g (Tuple x y) = Tuple (f x) (g y)
44+
45+instance bifunctorConst :: Bifunctor Const where
46+ bimap f _ (Const a) = Const (f a)
.spago/p/bifunctors-6.1.0/src/Data/Bifunctor/Join.pursnew file+31
@@ -0,0 +1,31 @@
1+module Data.Bifunctor.Join where
2+
3+import Prelude
4+
5+import Control.Biapplicative (class Biapplicative, bipure)
6+import Control.Biapply (class Biapply, (<<*>>))
7+
8+import Data.Bifunctor (class Bifunctor, bimap)
9+import Data.Newtype (class Newtype)
10+
11+-- | Turns a `Bifunctor` into a `Functor` by equating the two type arguments.
12+newtype Join :: forall k. (k -> k -> Type) -> k -> Type
13+newtype Join p a = Join (p a a)
14+
15+derive instance newtypeJoin :: Newtype (Join p a) _
16+
17+derive newtype instance eqJoin :: Eq (p a a) => Eq (Join p a)
18+
19+derive newtype instance ordJoin :: Ord (p a a) => Ord (Join p a)
20+
21+instance showJoin :: Show (p a a) => Show (Join p a) where
22+ show (Join x) = "(Join " <> show x <> ")"
23+
24+instance bifunctorJoin :: Bifunctor p => Functor (Join p) where
25+ map f (Join a) = Join (bimap f f a)
26+
27+instance biapplyJoin :: Biapply p => Apply (Join p) where
28+ apply (Join f) (Join a) = Join (f <<*>> a)
29+
30+instance biapplicativeJoin :: Biapplicative p => Applicative (Join p) where
31+ pure a = Join (bipure a a)
.spago/p/console-6.1.0/LICENSEnew file+26
@@ -0,0 +1,26 @@
1+Copyright 2018 PureScript
2+
3+Redistribution and use in source and binary forms, with or without modification,
4+are permitted provided that the following conditions are met:
5+
6+1. Redistributions of source code must retain the above copyright notice, this
7+list of conditions and the following disclaimer.
8+
9+2. Redistributions in binary form must reproduce the above copyright notice,
10+this list of conditions and the following disclaimer in the documentation and/or
11+other materials provided with the distribution.
12+
13+3. Neither the name of the copyright holder nor the names of its contributors
14+may be used to endorse or promote products derived from this software without
15+specific prior written permission.
16+
17+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
21+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.spago/p/console-6.1.0/README.mdnew file+17
@@ -0,0 +1,17 @@
1+# purescript-console
2+
3+[](https://github.com/purescript/purescript-console/releases)
4+[](https://github.com/purescript/purescript-console/actions?query=workflow%3ACI+branch%3Amaster)
5+[](https://pursuit.purescript.org/packages/purescript-console)
6+
7+Console-related functions and effect type.
8+
9+## Installation
10+
11+```
12+spago install console
13+```
14+
15+## Documentation
16+
17+Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-console).
.spago/p/console-6.1.0/bower.jsonnew file+22
@@ -0,0 +1,22 @@
1+{
2+ "name": "purescript-console",
3+ "homepage": "https://github.com/purescript/purescript-console",
4+ "license": "BSD-3-Clause",
5+ "repository": {
6+ "type": "git",
7+ "url": "https://github.com/purescript/purescript-console.git"
8+ },
9+ "ignore": [
10+ "**/.*",
11+ "bower_components",
12+ "node_modules",
13+ "output",
14+ "test",
15+ "bower.json",
16+ "package.json"
17+ ],
18+ "dependencies": {
19+ "purescript-effect": "^4.0.0",
20+ "purescript-prelude": "^6.0.0"
21+ }
22+}
.spago/p/console-6.1.0/package.jsonnew file+14
@@ -0,0 +1,14 @@
1+{
2+ "private": true,
3+ "scripts": {
4+ "clean": "rimraf output && rimraf .pulp-cache",
5+ "build": "eslint src && pulp build -- --censor-lib --strict",
6+ "test": "npm run build && ./scripts/test"
7+ },
8+ "devDependencies": {
9+ "eslint": "^7.15.0",
10+ "pulp": "16.0.0-0",
11+ "purescript-psa": "^0.8.2",
12+ "rimraf": "^3.0.2"
13+ }
14+}
.spago/p/console-6.1.0/purs.jsonnew file+14
@@ -0,0 +1,14 @@
1+{
2+ "name": "console",
3+ "version": "6.1.0",
4+ "license": "BSD-3-Clause",
5+ "location": {
6+ "githubOwner": "purescript",
7+ "githubRepo": "purescript-console"
8+ },
9+ "ref": "v6.1.0",
10+ "dependencies": {
11+ "effect": ">=4.0.0 <5.0.0",
12+ "prelude": ">=6.0.0 <7.0.0"
13+ }
14+}
.spago/p/console-6.1.0/src/Effect/Class/Console.pursnew file+66
@@ -0,0 +1,66 @@
1+module Effect.Class.Console where
2+
3+import Control.Bind (discard, bind, pure)
4+import Data.Function ((<<<))
5+import Data.Show (class Show)
6+import Data.Unit (Unit)
7+import Effect.Class (class MonadEffect, liftEffect)
8+import Effect.Console as EffConsole
9+
10+log :: forall m. MonadEffect m => String -> m Unit
11+log = liftEffect <<< EffConsole.log
12+
13+logShow :: forall m a. MonadEffect m => Show a => a -> m Unit
14+logShow = liftEffect <<< EffConsole.logShow
15+
16+warn :: forall m. MonadEffect m => String -> m Unit
17+warn = liftEffect <<< EffConsole.warn
18+
19+warnShow :: forall m a. MonadEffect m => Show a => a -> m Unit
20+warnShow = liftEffect <<< EffConsole.warnShow
21+
22+error :: forall m. MonadEffect m => String -> m Unit
23+error = liftEffect <<< EffConsole.error
24+
25+errorShow :: forall m a. MonadEffect m => Show a => a -> m Unit
26+errorShow = liftEffect <<< EffConsole.errorShow
27+
28+info :: forall m. MonadEffect m => String -> m Unit
29+info = liftEffect <<< EffConsole.info
30+
31+infoShow :: forall m a. MonadEffect m => Show a => a -> m Unit
32+infoShow = liftEffect <<< EffConsole.infoShow
33+
34+debug :: forall m. MonadEffect m => String -> m Unit
35+debug = liftEffect <<< EffConsole.debug
36+
37+debugShow :: forall m a. MonadEffect m => Show a => a -> m Unit
38+debugShow = liftEffect <<< EffConsole.debugShow
39+
40+time :: forall m. MonadEffect m => String -> m Unit
41+time = liftEffect <<< EffConsole.time
42+
43+timeLog :: forall m. MonadEffect m => String -> m Unit
44+timeLog = liftEffect <<< EffConsole.timeLog
45+
46+timeEnd :: forall m. MonadEffect m => String -> m Unit
47+timeEnd = liftEffect <<< EffConsole.timeEnd
48+
49+clear :: forall m. MonadEffect m => m Unit
50+clear = liftEffect EffConsole.clear
51+
52+group :: forall m. MonadEffect m => String -> m Unit
53+group = liftEffect <<< EffConsole.group
54+
55+groupCollapsed :: forall m. MonadEffect m => String -> m Unit
56+groupCollapsed = liftEffect <<< EffConsole.groupCollapsed
57+
58+groupEnd :: forall m. MonadEffect m => m Unit
59+groupEnd = liftEffect EffConsole.groupEnd
60+
61+grouped :: forall m a. MonadEffect m => String -> m a -> m a
62+grouped name inner = do
63+ group name
64+ result <- inner
65+ groupEnd
66+ pure result
.spago/p/console-6.1.0/src/Effect/Console.jsnew file+67
@@ -0,0 +1,67 @@
1+export const log = function (s) {
2+ return function () {
3+ console.log(s);
4+ };
5+};
6+
7+export const warn = function (s) {
8+ return function () {
9+ console.warn(s);
10+ };
11+};
12+
13+export const error = function (s) {
14+ return function () {
15+ console.error(s);
16+ };
17+};
18+
19+export const info = function (s) {
20+ return function () {
21+ console.info(s);
22+ };
23+};
24+
25+export const debug = function (s) {
26+ return function () {
27+ console.debug(s);
28+ };
29+};
30+
31+export const time = function (s) {
32+ return function () {
33+ console.time(s);
34+ };
35+};
36+
37+export const timeLog = function (s) {
38+ return function () {
39+ console.timeLog(s);
40+ };
41+};
42+
43+export const timeEnd = function (s) {
44+ return function () {
45+ console.timeEnd(s);
46+ };
47+};
48+
49+export const clear = function () {
50+ console.clear();
51+};
52+
53+export const group = function (s) {
54+ return function () {
55+ console.group(s);
56+ };
57+};
58+
59+export const groupCollapsed = function (s) {
60+ return function () {
61+ console.groupCollapsed(s);
62+ };
63+};
64+
65+export const groupEnd = function () {
66+ console.groupEnd();
67+};
.spago/p/console-6.1.0/src/Effect/Console.pursnew file+88
@@ -0,0 +1,88 @@
1+module Effect.Console where
2+
3+import Control.Bind (discard, bind, pure)
4+import Effect (Effect)
5+
6+import Data.Show (class Show, show)
7+import Data.Unit (Unit)
8+
9+-- | Write a message to the console.
10+foreign import log
11+ :: String
12+ -> Effect Unit
13+
14+-- | Write a value to the console, using its `Show` instance to produce a
15+-- | `String`.
16+logShow :: forall a. Show a => a -> Effect Unit
17+logShow a = log (show a)
18+
19+-- | Write an warning to the console.
20+foreign import warn
21+ :: String
22+ -> Effect Unit
23+
24+-- | Write an warning value to the console, using its `Show` instance to produce
25+-- | a `String`.
26+warnShow :: forall a. Show a => a -> Effect Unit
27+warnShow a = warn (show a)
28+
29+-- | Write an error to the console.
30+foreign import error
31+ :: String
32+ -> Effect Unit
33+
34+-- | Write an error value to the console, using its `Show` instance to produce a
35+-- | `String`.
36+errorShow :: forall a. Show a => a -> Effect Unit
37+errorShow a = error (show a)
38+
39+-- | Write an info message to the console.
40+foreign import info
41+ :: String
42+ -> Effect Unit
43+
44+-- | Write an info value to the console, using its `Show` instance to produce a
45+-- | `String`.
46+infoShow :: forall a. Show a => a -> Effect Unit
47+infoShow a = info (show a)
48+
49+-- | Write an debug message to the console.
50+foreign import debug
51+ :: String
52+ -> Effect Unit
53+
54+-- | Write an debug value to the console, using its `Show` instance to produce a
55+-- | `String`.
56+debugShow :: forall a. Show a => a -> Effect Unit
57+debugShow a = debug (show a)
58+
59+-- | Start a named timer.
60+foreign import time :: String -> Effect Unit
61+
62+-- | Print the time since a named timer started in milliseconds.
63+foreign import timeLog :: String -> Effect Unit
64+
65+-- | Stop a named timer and print time since it started in milliseconds.
66+foreign import timeEnd :: String -> Effect Unit
67+
68+-- | Clears the console
69+foreign import clear :: Effect Unit
70+
71+-- | Creates a new inline group in the console. This indents following console
72+-- | messages by an additional level, until `groupEnd` is called.
73+foreign import group :: String -> Effect Unit
74+
75+-- | Same as `group`, but groups are collapsed by default.
76+foreign import groupCollapsed :: String -> Effect Unit
77+
78+-- | Exits the current inline group in the console.
79+foreign import groupEnd :: Effect Unit
80+
81+-- | Perform an effect within the context of an inline group in the console.
82+-- | Calls `group` and `groupEnd` before and after the effect, respectively.
83+grouped :: forall a. String -> Effect a -> Effect a
84+grouped name inner = do
85+ group name
86+ result <- inner
87+ groupEnd
88+ pure result
.spago/p/const-6.0.0/LICENSEnew file+26
@@ -0,0 +1,26 @@
1+Copyright 2018 PureScript
2+
3+Redistribution and use in source and binary forms, with or without modification,
4+are permitted provided that the following conditions are met:
5+
6+1. Redistributions of source code must retain the above copyright notice, this
7+list of conditions and the following disclaimer.
8+
9+2. Redistributions in binary form must reproduce the above copyright notice,
10+this list of conditions and the following disclaimer in the documentation and/or
11+other materials provided with the distribution.
12+
13+3. Neither the name of the copyright holder nor the names of its contributors
14+may be used to endorse or promote products derived from this software without
15+specific prior written permission.
16+
17+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
21+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.spago/p/const-6.0.0/README.mdnew file+17
@@ -0,0 +1,17 @@
1+# purescript-const
2+
3+[](https://github.com/purescript/purescript-const/releases)
4+[](https://github.com/purescript/purescript-const/actions?query=workflow%3ACI+branch%3Amaster)
5+[](https://pursuit.purescript.org/packages/purescript-const)
6+
7+Constant data type.
8+
9+## Installation
10+
11+```
12+spago install const
13+```
14+
15+## Documentation
16+
17+Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-const).
.spago/p/const-6.0.0/bower.jsonnew file+28
@@ -0,0 +1,28 @@
1+{
2+ "name": "purescript-const",
3+ "homepage": "https://github.com/purescript/purescript-const",
4+ "authors": [
5+ "Hardy Jones <jones3.hardy@gmail.com>",
6+ "Gary Burgess <gary.burgess@gmail.com>",
7+ "Sean Chalmers <sclhiannan@gmail.com>"
8+ ],
9+ "license": "BSD-3-Clause",
10+ "repository": {
11+ "type": "git",
12+ "url": "https://github.com/purescript/purescript-const.git"
13+ },
14+ "ignore": [
15+ "**/.*",
16+ "bower_components",
17+ "node_modules",
18+ "output",
19+ "test",
20+ "bower.json",
21+ "package.json"
22+ ],
23+ "dependencies": {
24+ "purescript-invariant": "^6.0.0",
25+ "purescript-newtype": "^5.0.0",
26+ "purescript-prelude": "^6.0.0"
27+ }
28+}
.spago/p/const-6.0.0/package.jsonnew file+12
@@ -0,0 +1,12 @@
1+{
2+ "private": true,
3+ "scripts": {
4+ "clean": "rimraf output && rimraf .pulp-cache",
5+ "build": "pulp build -- --censor-lib --strict"
6+ },
7+ "devDependencies": {
8+ "pulp": "16.0.0-0",
9+ "purescript-psa": "^0.8.2",
10+ "rimraf": "^3.0.2"
11+ }
12+}
.spago/p/const-6.0.0/purs.jsonnew file+15
@@ -0,0 +1,15 @@
1+{
2+ "name": "const",
3+ "version": "6.0.0",
4+ "license": "BSD-3-Clause",
5+ "location": {
6+ "githubOwner": "purescript",
7+ "githubRepo": "purescript-const"
8+ },
9+ "ref": "v6.0.0",
10+ "dependencies": {
11+ "invariant": ">=6.0.0 <7.0.0",
12+ "newtype": ">=5.0.0 <6.0.0",
13+ "prelude": ">=6.0.0 <7.0.0"
14+ }
15+}
.spago/p/const-6.0.0/src/Data/Const.pursnew file+63
@@ -0,0 +1,63 @@
1+module Data.Const where
2+
3+import Prelude
4+
5+import Data.Eq (class Eq1)
6+import Data.Functor.Invariant (class Invariant, imapF)
7+import Data.Newtype (class Newtype)
8+import Data.Ord (class Ord1)
9+
10+-- | The `Const` type constructor, which wraps its first type argument
11+-- | and ignores its second. That is, `Const a b` is isomorphic to `a`
12+-- | for any `b`.
13+-- |
14+-- | `Const` has some useful instances. For example, the `Applicative`
15+-- | instance allows us to collect results using a `Monoid` while
16+-- | ignoring return values.
17+newtype Const :: forall k. Type -> k -> Type
18+newtype Const a b = Const a
19+
20+derive instance newtypeConst :: Newtype (Const a b) _
21+
22+derive newtype instance eqConst :: Eq a => Eq (Const a b)
23+
24+derive instance eq1Const :: Eq a => Eq1 (Const a)
25+
26+derive newtype instance ordConst :: Ord a => Ord (Const a b)
27+
28+derive instance ord1Const :: Ord a => Ord1 (Const a)
29+
30+derive newtype instance boundedConst :: Bounded a => Bounded (Const a b)
31+
32+instance showConst :: Show a => Show (Const a b) where
33+ show (Const x) = "(Const " <> show x <> ")"
34+
35+instance semigroupoidConst :: Semigroupoid Const where
36+ compose _ (Const x) = Const x
37+
38+derive newtype instance semigroupConst :: Semigroup a => Semigroup (Const a b)
39+
40+derive newtype instance monoidConst :: Monoid a => Monoid (Const a b)
41+
42+derive newtype instance semiringConst :: Semiring a => Semiring (Const a b)
43+
44+derive newtype instance ringConst :: Ring a => Ring (Const a b)
45+
46+derive newtype instance euclideanRingConst :: EuclideanRing a => EuclideanRing (Const a b)
47+
48+derive newtype instance commutativeRingConst :: CommutativeRing a => CommutativeRing (Const a b)
49+
50+derive newtype instance heytingAlgebraConst :: HeytingAlgebra a => HeytingAlgebra (Const a b)
51+
52+derive newtype instance booleanAlgebraConst :: BooleanAlgebra a => BooleanAlgebra (Const a b)
53+
54+derive instance functorConst :: Functor (Const a)
55+
56+instance invariantConst :: Invariant (Const a) where
57+ imap = imapF
58+
59+instance applyConst :: Semigroup a => Apply (Const a) where
60+ apply (Const x) (Const y) = Const (x <> y)
61+
62+instance applicativeConst :: Monoid a => Applicative (Const a) where
63+ pure _ = Const mempty
.spago/p/contravariant-6.0.0/LICENSEnew file+26
@@ -0,0 +1,26 @@
1+Copyright 2018 PureScript
2+
3+Redistribution and use in source and binary forms, with or without modification,
4+are permitted provided that the following conditions are met:
5+
6+1. Redistributions of source code must retain the above copyright notice, this
7+list of conditions and the following disclaimer.
8+
9+2. Redistributions in binary form must reproduce the above copyright notice,
10+this list of conditions and the following disclaimer in the documentation and/or
11+other materials provided with the distribution.
12+
13+3. Neither the name of the copyright holder nor the names of its contributors
14+may be used to endorse or promote products derived from this software without
15+specific prior written permission.
16+
17+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
21+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.spago/p/contravariant-6.0.0/README.mdnew file+17
@@ -0,0 +1,17 @@
1+# purescript-contravariant
2+
3+[](https://github.com/purescript/purescript-contravariant/releases)
4+[](https://github.com/purescript/purescript-contravariant/actions?query=workflow%3ACI+branch%3Amaster)
5+[](https://pursuit.purescript.org/packages/purescript-contravariant)
6+
7+Contravariant functors.
8+
9+## Installation
10+
11+```
12+spago install contravariant
13+```
14+
15+## Documentation
16+
17+Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-contravariant).
.spago/p/contravariant-6.0.0/bower.jsonnew file+25
@@ -0,0 +1,25 @@
1+{
2+ "name": "purescript-contravariant",
3+ "homepage": "https://github.com/purescript/purescript-contravariant",
4+ "license": "BSD-3-Clause",
5+ "repository": {
6+ "type": "git",
7+ "url": "https://github.com/purescript/purescript-contravariant.git"
8+ },
9+ "ignore": [
10+ "**/.*",
11+ "bower_components",
12+ "node_modules",
13+ "output",
14+ "test",
15+ "bower.json",
16+ "package.json"
17+ ],
18+ "dependencies": {
19+ "purescript-const": "^6.0.0",
20+ "purescript-either": "^6.0.0",
21+ "purescript-newtype": "^5.0.0",
22+ "purescript-prelude": "^6.0.0",
23+ "purescript-tuples": "^7.0.0"
24+ }
25+}
.spago/p/contravariant-6.0.0/package.jsonnew file+12
@@ -0,0 +1,12 @@
1+{
2+ "private": true,
3+ "scripts": {
4+ "clean": "rimraf output && rimraf .pulp-cache",
5+ "build": "pulp build -- --censor-lib --strict"
6+ },
7+ "devDependencies": {
8+ "pulp": "16.0.0-0",
9+ "purescript-psa": "^0.8.2",
10+ "rimraf": "^3.0.2"
11+ }
12+}
.spago/p/contravariant-6.0.0/purs.jsonnew file+17
@@ -0,0 +1,17 @@
1+{
2+ "name": "contravariant",
3+ "version": "6.0.0",
4+ "license": "BSD-3-Clause",
5+ "location": {
6+ "githubOwner": "purescript",
7+ "githubRepo": "purescript-contravariant"
8+ },
9+ "ref": "v6.0.0",
10+ "dependencies": {
11+ "const": ">=6.0.0 <7.0.0",
12+ "either": ">=6.0.0 <7.0.0",
13+ "newtype": ">=5.0.0 <6.0.0",
14+ "prelude": ">=6.0.0 <7.0.0",
15+ "tuples": ">=7.0.0 <8.0.0"
16+ }
17+}
.spago/p/contravariant-6.0.0/src/Data/Comparison.pursnew file+25
@@ -0,0 +1,25 @@
1+module Data.Comparison where
2+
3+import Prelude
4+
5+import Data.Function (on)
6+import Data.Functor.Contravariant (class Contravariant)
7+import Data.Newtype (class Newtype)
8+
9+-- | An adaptor allowing `>$<` to map over the inputs of a comparison function.
10+newtype Comparison a = Comparison (a -> a -> Ordering)
11+
12+derive instance newtypeComparison :: Newtype (Comparison a) _
13+
14+instance contravariantComparison :: Contravariant Comparison where
15+ cmap f (Comparison g) = Comparison (g `on` f)
16+
17+instance semigroupComparison :: Semigroup (Comparison a) where
18+ append (Comparison p) (Comparison q) = Comparison (p <> q)
19+
20+instance monoidComparison :: Monoid (Comparison a) where
21+ mempty = Comparison (\_ _ -> EQ)
22+
23+-- | The default comparison for any values with an `Ord` instance.
24+defaultComparison :: forall a. Ord a => Comparison a
25+defaultComparison = Comparison compare
.spago/p/contravariant-6.0.0/src/Data/Decidable.pursnew file+29
@@ -0,0 +1,29 @@
1+module Data.Decidable where
2+
3+import Prelude
4+
5+import Data.Comparison (Comparison(..))
6+import Data.Decide (class Decide)
7+import Data.Divisible (class Divisible)
8+import Data.Equivalence (Equivalence(..))
9+import Data.Op (Op(..))
10+import Data.Predicate (Predicate(..))
11+
12+-- | `Decidable` is the contravariant analogue of `Alternative`.
13+class (Decide f, Divisible f) <= Decidable f where
14+ lose :: forall a. (a -> Void) -> f a
15+
16+instance decidableComparison :: Decidable Comparison where
17+ lose f = Comparison \a _ -> absurd (f a)
18+
19+instance decidableEquivalence :: Decidable Equivalence where
20+ lose f = Equivalence \a -> absurd (f a)
21+
22+instance decidablePredicate :: Decidable Predicate where
23+ lose f = Predicate \a -> absurd (f a)
24+
25+instance decidableOp :: Monoid r => Decidable (Op r) where
26+ lose f = Op \a -> absurd (f a)
27+
28+lost :: forall f. Decidable f => f Void
29+lost = lose identity
.spago/p/contravariant-6.0.0/src/Data/Decide.pursnew file+42
@@ -0,0 +1,42 @@
1+module Data.Decide where
2+
3+import Prelude
4+
5+import Data.Comparison (Comparison(..))
6+import Data.Divide (class Divide)
7+import Data.Either (Either(..), either)
8+import Data.Equivalence (Equivalence(..))
9+import Data.Op (Op(..))
10+import Data.Predicate (Predicate(..))
11+
12+-- | `Decide` is the contravariant analogue of `Alt`.
13+class Divide f <= Decide f where
14+ choose :: forall a b c. (a -> Either b c) -> f b -> f c -> f a
15+
16+instance chooseComparison :: Decide Comparison where
17+ choose f (Comparison g) (Comparison h) = Comparison \a b -> case f a of
18+ Left c -> case f b of
19+ Left d -> g c d
20+ Right _ -> LT
21+ Right c -> case f b of
22+ Left _ -> GT
23+ Right d -> h c d
24+
25+instance chooseEquivalence :: Decide Equivalence where
26+ choose f (Equivalence g) (Equivalence h) = Equivalence \a b -> case f a of
27+ Left c -> case f b of
28+ Left d -> g c d
29+ Right _ -> false
30+ Right c -> case f b of
31+ Left _ -> false
32+ Right d -> h c d
33+
34+instance choosePredicate :: Decide Predicate where
35+ choose f (Predicate g) (Predicate h) = Predicate (either g h <<< f)
36+
37+instance chooseOp :: Semigroup r => Decide (Op r) where
38+ choose f (Op g) (Op h) = Op (either g h <<< f)
39+
40+-- | `chosen = choose id`
41+chosen :: forall f a b. Decide f => f a -> f b -> f (Either a b)
42+chosen = choose identity
.spago/p/contravariant-6.0.0/src/Data/Divide.pursnew file+46
@@ -0,0 +1,46 @@
1+module Data.Divide where
2+
3+import Prelude
4+
5+import Data.Comparison (Comparison(..))
6+import Data.Equivalence (Equivalence(..))
7+import Data.Functor.Contravariant (class Contravariant)
8+import Data.Op (Op(..))
9+import Data.Predicate (Predicate(..))
10+import Data.Tuple (Tuple(..))
11+
12+-- | `Divide` is the contravariant analogue of `Apply`.
13+-- |
14+-- | For example, to test equality of `Point`s, we can use the `Divide` instance
15+-- | for `Equivalence`:
16+-- |
17+-- | ```purescript
18+-- | type Point = Tuple Int Int
19+-- |
20+-- | pointEquiv :: Equivalence Point
21+-- | pointEquiv = divided defaultEquivalence defaultEquivalence
22+-- | ```
23+class Contravariant f <= Divide f where
24+ divide :: forall a b c. (a -> Tuple b c) -> f b -> f c -> f a
25+
26+instance divideComparison :: Divide Comparison where
27+ divide f (Comparison g) (Comparison h) = Comparison \a b -> case f a of
28+ Tuple a' a'' -> case f b of
29+ Tuple b' b'' -> g a' b' <> h a'' b''
30+
31+instance divideEquivalence :: Divide Equivalence where
32+ divide f (Equivalence g) (Equivalence h) = Equivalence \a b -> case f a of
33+ Tuple a' a'' -> case f b of
34+ Tuple b' b'' -> g a' b' && h a'' b''
35+
36+instance dividePredicate :: Divide Predicate where
37+ divide f (Predicate g) (Predicate h) = Predicate \a -> case f a of
38+ Tuple b c -> g b && h c
39+
40+instance divideOp :: Semigroup r => Divide (Op r) where
41+ divide f (Op g) (Op h) = Op \a -> case f a of
42+ Tuple b c -> g b <> h c
43+
44+-- | `divided = divide id`
45+divided :: forall f a b. Divide f => f a -> f b -> f (Tuple a b)
46+divided = divide identity
.spago/p/contravariant-6.0.0/src/Data/Divisible.pursnew file+25
@@ -0,0 +1,25 @@
1+module Data.Divisible where
2+
3+import Prelude
4+
5+import Data.Comparison (Comparison(..))
6+import Data.Divide (class Divide)
7+import Data.Equivalence (Equivalence(..))
8+import Data.Op (Op(..))
9+import Data.Predicate (Predicate(..))
10+
11+-- | `Divisible` is the contravariant analogue of `Applicative`.
12+class Divide f <= Divisible f where
13+ conquer :: forall a. f a
14+
15+instance divisibleComparison :: Divisible Comparison where
16+ conquer = Comparison $ \_ _ -> EQ
17+
18+instance divisibleEquivalence :: Divisible Equivalence where
19+ conquer = Equivalence $ \_ _ -> true
20+
21+instance divisiblePredicate :: Divisible Predicate where
22+ conquer = Predicate (const true)
23+
24+instance divisibleOp :: (Monoid r) => Divisible (Op r) where
25+ conquer = Op $ const mempty
.spago/p/contravariant-6.0.0/src/Data/Equivalence.pursnew file+31
@@ -0,0 +1,31 @@
1+module Data.Equivalence where
2+
3+import Prelude
4+
5+import Data.Comparison (Comparison(..))
6+import Data.Function (on)
7+import Data.Functor.Contravariant (class Contravariant)
8+import Data.Newtype (class Newtype)
9+
10+-- | An adaptor allowing `>$<` to map over the inputs of an equivalence
11+-- | relation.
12+newtype Equivalence a = Equivalence (a -> a -> Boolean)
13+
14+derive instance newtypeEquivalence :: Newtype (Equivalence a) _
15+
16+instance contravariantEquivalence :: Contravariant Equivalence where
17+ cmap f (Equivalence g) = Equivalence (g `on` f)
18+
19+instance semigroupEquivalence :: Semigroup (Equivalence a) where
20+ append (Equivalence p) (Equivalence q) = Equivalence (\a b -> p a b && q a b)
21+
22+instance monoidEquivalence :: Monoid (Equivalence a) where
23+ mempty = Equivalence (\_ _ -> true)
24+
25+-- | The default equivalence relation for any values with an `Eq` instance.
26+defaultEquivalence :: forall a. Eq a => Equivalence a
27+defaultEquivalence = Equivalence eq
28+
29+-- | An equivalence relation for any `Comparison`.
30+comparisonEquivalence :: forall a. Comparison a -> Equivalence a
31+comparisonEquivalence (Comparison p) = Equivalence (\a b -> p a b == EQ)
.spago/p/contravariant-6.0.0/src/Data/Functor/Contravariant.pursnew file+35
@@ -0,0 +1,35 @@
1+module Data.Functor.Contravariant where
2+
3+import Prelude
4+
5+import Data.Const (Const(..))
6+
7+-- | A `Contravariant` functor can be seen as a way of changing the input type
8+-- | of a consumer of input, in contrast to the standard covariant `Functor`
9+-- | that can be seen as a way of changing the output type of a producer of
10+-- | output.
11+-- |
12+-- | `Contravariant` instances should satisfy the following laws:
13+-- |
14+-- | - Identity `cmap id = id`
15+-- | - Composition `cmap f <<< cmap g = cmap (g <<< f)`
16+class Contravariant f where
17+ cmap :: forall a b. (b -> a) -> f a -> f b
18+
19+infixl 4 cmap as >$<
20+
21+-- | `cmapFlipped` is `cmap` with its arguments reversed.
22+cmapFlipped :: forall a b f. Contravariant f => f a -> (b -> a) -> f b
23+cmapFlipped x f = f >$< x
24+
25+infixl 4 cmapFlipped as >#<
26+
27+coerce :: forall f a b. Contravariant f => Functor f => f a -> f b
28+coerce a = absurd <$> (absurd >$< a)
29+
30+-- | As all `Contravariant` functors are also trivially `Invariant`, this function can be used as the `imap` implementation for any types that have an existing `Contravariant` instance.
31+imapC :: forall f a b. Contravariant f => (a -> b) -> (b -> a) -> f a -> f b
32+imapC _ f = cmap f
33+
34+instance contravariantConst :: Contravariant (Const a) where
35+ cmap _ (Const x) = Const x
.spago/p/contravariant-6.0.0/src/Data/Op.pursnew file+22
@@ -0,0 +1,22 @@
1+module Data.Op where
2+
3+import Prelude
4+
5+import Data.Functor.Contravariant (class Contravariant)
6+import Data.Newtype (class Newtype)
7+
8+-- | The opposite of the function category.
9+newtype Op a b = Op (b -> a)
10+
11+derive instance newtypeOp :: Newtype (Op a b) _
12+derive newtype instance semigroupOp :: Semigroup a ⇒ Semigroup (Op a b)
13+derive newtype instance monoidOp :: Monoid a => Monoid (Op a b)
14+
15+instance semigroupoidOp :: Semigroupoid Op where
16+ compose (Op f) (Op g) = Op (compose g f)
17+
18+instance categoryOp :: Category Op where
19+ identity = Op identity
20+
21+instance contravariantOp :: Contravariant (Op a) where
22+ cmap f (Op g) = Op (g <<< f)
.spago/p/contravariant-6.0.0/src/Data/Predicate.pursnew file+18
@@ -0,0 +1,18 @@
1+module Data.Predicate where
2+
3+import Prelude
4+
5+import Data.Functor.Contravariant (class Contravariant)
6+import Data.Newtype (class Newtype)
7+
8+-- | An adaptor allowing `>$<` to map over the inputs of a predicate.
9+newtype Predicate a = Predicate (a -> Boolean)
10+
11+derive instance newtypePredicate :: Newtype (Predicate a) _
12+
13+derive newtype instance heytingAlgebraPredicate :: HeytingAlgebra (Predicate a)
14+
15+derive newtype instance booleanAlgebraPredicate :: BooleanAlgebra (Predicate a)
16+
17+instance contravariantPredicate :: Contravariant Predicate where
18+ cmap f (Predicate g) = Predicate (g <<< f)
.spago/p/control-6.0.0/LICENSEnew file+26
@@ -0,0 +1,26 @@
1+Copyright 2018 PureScript
2+
3+Redistribution and use in source and binary forms, with or without modification,
4+are permitted provided that the following conditions are met:
5+
6+1. Redistributions of source code must retain the above copyright notice, this
7+list of conditions and the following disclaimer.
8+
9+2. Redistributions in binary form must reproduce the above copyright notice,
10+this list of conditions and the following disclaimer in the documentation and/or
11+other materials provided with the distribution.
12+
13+3. Neither the name of the copyright holder nor the names of its contributors
14+may be used to endorse or promote products derived from this software without
15+specific prior written permission.
16+
17+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
21+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.spago/p/control-6.0.0/README.mdnew file+21
@@ -0,0 +1,21 @@
1+# purescript-control
2+
3+[](https://github.com/purescript/purescript-control/releases)
4+[](https://github.com/purescript/purescript-control/actions?query=workflow%3ACI+branch%3Amaster)
5+[](https://pursuit.purescript.org/packages/purescript-control)
6+
7+This library provides a range of utility functions for the classes in the `Functor`, `Applicative`, `Monad` hierarchy, along with additional classes such as `Alternative`, `MonadPlus`, `Comonad` and `Lazy`.
8+
9+## Installation
10+
11+```sh
12+spago install control
13+```
14+
15+## Class hierarchy
16+
17+
18+
19+## Documentation
20+
21+Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-control).
.spago/p/control-6.0.0/bower.jsonnew file+25
@@ -0,0 +1,25 @@
1+{
2+ "name": "purescript-control",
3+ "homepage": "https://github.com/purescript/purescript-control",
4+ "license": "BSD-3-Clause",
5+ "repository": {
6+ "type": "git",
7+ "url": "https://github.com/purescript/purescript-control.git"
8+ },
9+ "ignore": [
10+ "**/.*",
11+ "bower_components",
12+ "node_modules",
13+ "output",
14+ "test",
15+ "bower.json",
16+ "package.json"
17+ ],
18+ "dependencies": {
19+ "purescript-newtype": "^5.0.0",
20+ "purescript-prelude": "^6.0.0"
21+ },
22+ "devDependencies": {
23+ "purescript-effect": "^4.0.0"
24+ }
25+}
.spago/p/control-6.0.0/package.jsonnew file+13
@@ -0,0 +1,13 @@
1+{
2+ "private": true,
3+ "scripts": {
4+ "clean": "rimraf output && rimraf .pulp-cache",
5+ "build": "pulp build -- --censor-lib --strict",
6+ "test": "pulp test"
7+ },
8+ "devDependencies": {
9+ "pulp": "16.0.0-0",
10+ "purescript-psa": "^0.8.2",
11+ "rimraf": "^3.0.2"
12+ }
13+}
.spago/p/control-6.0.0/purs.jsonnew file+14
@@ -0,0 +1,14 @@
1+{
2+ "name": "control",
3+ "version": "6.0.0",
4+ "license": "BSD-3-Clause",
5+ "location": {
6+ "githubOwner": "purescript",
7+ "githubRepo": "purescript-control"
8+ },
9+ "ref": "v6.0.0",
10+ "dependencies": {
11+ "newtype": ">=5.0.0 <6.0.0",
12+ "prelude": ">=6.0.0 <7.0.0"
13+ }
14+}
.spago/p/control-6.0.0/src/Control/Alt.pursnew file+42
@@ -0,0 +1,42 @@
1+module Control.Alt
2+ ( class Alt, alt, (<|>)
3+ , module Data.Functor
4+ ) where
5+
6+import Data.Functor (class Functor, map, void, ($>), (<#>), (<$), (<$>))
7+import Data.Semigroup (append)
8+
9+-- | The `Alt` type class identifies an associative operation on a type
10+-- | constructor. It is similar to `Semigroup`, except that it applies to
11+-- | types of kind `* -> *`, like `Array` or `List`, rather than concrete types
12+-- | `String` or `Number`.
13+-- |
14+-- | `Alt` instances are required to satisfy the following laws:
15+-- |
16+-- | - Associativity: `(x <|> y) <|> z == x <|> (y <|> z)`
17+-- | - Distributivity: `f <$> (x <|> y) == (f <$> x) <|> (f <$> y)`
18+-- |
19+-- | For example, the `Array` (`[]`) type is an instance of `Alt`, where
20+-- | `(<|>)` is defined to be concatenation.
21+-- |
22+-- | A common use case is to select the first "valid" item, or, if all items
23+-- | are "invalid", the last "invalid" item.
24+-- |
25+-- | For example:
26+-- |
27+-- | ```purescript
28+-- | import Control.Alt ((<|>))
29+-- | import Data.Maybe (Maybe(..)
30+-- | import Data.Either (Either(..))
31+-- |
32+-- | Nothing <|> Just 1 <|> Just 2 == Just 1
33+-- | Left "err" <|> Right 1 <|> Right 2 == Right 1
34+-- | Left "err 1" <|> Left "err 2" <|> Left "err 3" == Left "err 3"
35+-- | ```
36+class Functor f <= Alt f where
37+ alt :: forall a. f a -> f a -> f a
38+
39+infixr 3 alt as <|>
40+
41+instance altArray :: Alt Array where
42+ alt = append
.spago/p/control-6.0.0/src/Control/Alternative.pursnew file+50
@@ -0,0 +1,50 @@
1+module Control.Alternative
2+ ( class Alternative
3+ , guard
4+ , module Control.Alt
5+ , module Control.Applicative
6+ , module Control.Apply
7+ , module Control.Plus
8+ , module Data.Functor
9+ ) where
10+
11+import Control.Alt (class Alt, alt, (<|>))
12+import Control.Applicative (class Applicative, pure, liftA1, unless, when)
13+import Control.Apply (class Apply, apply, (*>), (<*), (<*>))
14+import Control.Plus (class Plus, empty)
15+
16+import Data.Unit (Unit, unit)
17+import Data.Functor (class Functor, map, void, ($>), (<#>), (<$), (<$>))
18+
19+-- | The `Alternative` type class has no members of its own; it just specifies
20+-- | that the type constructor has both `Applicative` and `Plus` instances.
21+-- |
22+-- | Types which have `Alternative` instances should also satisfy the following
23+-- | laws:
24+-- |
25+-- | - Distributivity: `(f <|> g) <*> x == (f <*> x) <|> (g <*> x)`
26+-- | - Annihilation: `empty <*> f = empty`
27+class (Applicative f, Plus f) <= Alternative f
28+
29+instance alternativeArray :: Alternative Array
30+
31+-- | Fail using `Plus` if a condition does not hold, or
32+-- | succeed using `Applicative` if it does.
33+-- |
34+-- | For example:
35+-- |
36+-- | ```purescript
37+-- | import Prelude
38+-- | import Control.Alternative (guard)
39+-- | import Data.Array ((..))
40+-- |
41+-- | factors :: Int -> Array Int
42+-- | factors n = do
43+-- | a <- 1..n
44+-- | b <- 1..n
45+-- | guard $ a * b == n
46+-- | pure a
47+-- | ```
48+guard :: forall m. Alternative m => Boolean -> m Unit
49+guard true = pure unit
50+guard false = empty
.spago/p/control-6.0.0/src/Control/Comonad.pursnew file+21
@@ -0,0 +1,21 @@
1+module Control.Comonad
2+ ( class Comonad, extract
3+ , module Control.Extend
4+ , module Data.Functor
5+ ) where
6+
7+import Control.Extend (class Extend, duplicate, extend, (<<=), (=<=), (=>=), (=>>))
8+
9+import Data.Functor (class Functor, map, void, ($>), (<#>), (<$), (<$>))
10+
11+-- | `Comonad` extends the `Extend` class with the `extract` function
12+-- | which extracts a value, discarding the comonadic context.
13+-- |
14+-- | `Comonad` is the dual of `Monad`, and `extract` is the dual of `pure`.
15+-- |
16+-- | Laws:
17+-- |
18+-- | - Left Identity: `extract <<= xs = xs`
19+-- | - Right Identity: `extract (f <<= xs) = f xs`
20+class Extend w <= Comonad w where
21+ extract :: forall a. w a -> a
.spago/p/control-6.0.0/src/Control/Extend.jsnew file+7
@@ -0,0 +1,7 @@
1+export const arrayExtend = function(f) {
2+ return function(xs) {
3+ return xs.map(function (_, i, xs) {
4+ return f(xs.slice(i));
5+ });
6+ };
7+};
.spago/p/control-6.0.0/src/Control/Extend.pursnew file+59
@@ -0,0 +1,59 @@
1+module Control.Extend
2+ ( class Extend, extend, (<<=), extendFlipped, (=>>)
3+ , composeCoKleisli, (=>=)
4+ , composeCoKleisliFlipped, (=<=)
5+ , duplicate
6+ , module Data.Functor
7+ ) where
8+
9+import Control.Category (identity)
10+
11+import Data.Functor (class Functor, map, void, ($>), (<#>), (<$), (<$>))
12+import Data.Semigroup (class Semigroup, (<>))
13+
14+-- | The `Extend` class defines the extension operator `(<<=)`
15+-- | which extends a local context-dependent computation to
16+-- | a global computation.
17+-- |
18+-- | `Extend` is the dual of `Bind`, and `(<<=)` is the dual of
19+-- | `(>>=)`.
20+-- |
21+-- | Laws:
22+-- |
23+-- | - Associativity: `extend f <<< extend g = extend (f <<< extend g)`
24+class Functor w <= Extend w where
25+ extend :: forall b a. (w a -> b) -> w a -> w b
26+
27+instance extendFn :: Semigroup w => Extend ((->) w) where
28+ extend f g w = f \w' -> g (w <> w')
29+
30+foreign import arrayExtend :: forall a b. (Array a -> b) -> Array a -> Array b
31+
32+instance extendArray :: Extend Array where
33+ extend = arrayExtend
34+
35+infixr 1 extend as <<=
36+
37+-- | A version of `extend` with its arguments flipped.
38+extendFlipped :: forall b a w. Extend w => w a -> (w a -> b) -> w b
39+extendFlipped w f = f <<= w
40+
41+infixl 1 extendFlipped as =>>
42+
43+-- | Forwards co-Kleisli composition.
44+composeCoKleisli :: forall b a w c. Extend w => (w a -> b) -> (w b -> c) -> w a -> c
45+composeCoKleisli f g w = g (f <<= w)
46+
47+infixr 1 composeCoKleisli as =>=
48+
49+-- | Backwards co-Kleisli composition.
50+composeCoKleisliFlipped :: forall b a w c. Extend w => (w b -> c) -> (w a -> b) -> w a -> c
51+composeCoKleisliFlipped f g w = f (g <<= w)
52+
53+infixr 1 composeCoKleisliFlipped as =<=
54+
55+-- | Duplicate a comonadic context.
56+-- |
57+-- | `duplicate` is dual to `Control.Bind.join`.
58+duplicate :: forall a w. Extend w => w a -> w (w a)
59+duplicate = extend identity
.spago/p/control-6.0.0/src/Control/Lazy.pursnew file+25
@@ -0,0 +1,25 @@
1+module Control.Lazy where
2+
3+import Data.Unit (Unit, unit)
4+
5+-- | The `Lazy` class represents types which allow evaluation of values
6+-- | to be _deferred_.
7+-- |
8+-- | Usually, this means that a type contains a function arrow which can
9+-- | be used to delay evaluation.
10+class Lazy l where
11+ defer :: (Unit -> l) -> l
12+
13+instance lazyFn :: Lazy (a -> b) where
14+ defer f = \x -> f unit x
15+
16+instance lazyUnit :: Lazy Unit where
17+ defer _ = unit
18+
19+-- | `fix` defines a value as the fixed point of a function.
20+-- |
21+-- | The `Lazy` instance allows us to generate the result lazily.
22+fix :: forall l. Lazy l => (l -> l) -> l
23+fix f = go
24+ where
25+ go = defer \_ -> f go
.spago/p/control-6.0.0/src/Control/MonadPlus.pursnew file+32
@@ -0,0 +1,32 @@
1+module Control.MonadPlus
2+ ( class MonadPlus
3+ , module Control.Alt
4+ , module Control.Alternative
5+ , module Control.Applicative
6+ , module Control.Apply
7+ , module Control.Bind
8+ , module Control.Monad
9+ , module Control.Plus
10+ , module Data.Functor
11+ ) where
12+
13+import Control.Alt (class Alt, alt, (<|>))
14+import Control.Alternative (class Alternative, guard)
15+import Control.Applicative (class Applicative, pure, liftA1, unless, when)
16+import Control.Apply (class Apply, apply, (*>), (<*), (<*>))
17+import Control.Bind (class Bind, bind, ifM, join, (<=<), (=<<), (>=>), (>>=))
18+import Control.Monad (class Monad, ap, liftM1)
19+import Control.Plus (class Plus, empty)
20+
21+import Data.Functor (class Functor, map, void, ($>), (<#>), (<$), (<$>))
22+
23+-- | The `MonadPlus` type class has no members of its own; it just specifies
24+-- | that the type has both `Monad` and `Alternative` instances.
25+-- |
26+-- | Types which have `MonadPlus` instances should also satisfy the following
27+-- | law:
28+-- |
29+-- | - Distributivity: `(x <|> y) >>= f == (x >>= f) <|> (y >>= f)`
30+class (Monad m, Alternative m) <= MonadPlus m
31+
32+instance monadPlusArray :: MonadPlus Array
.spago/p/control-6.0.0/src/Control/Plus.pursnew file+27
@@ -0,0 +1,27 @@
1+module Control.Plus
2+ ( class Plus, empty
3+ , module Control.Alt
4+ , module Data.Functor
5+ ) where
6+
7+import Control.Alt (class Alt, alt, (<|>))
8+
9+import Data.Functor (class Functor, map, void, ($>), (<#>), (<$), (<$>))
10+
11+-- | The `Plus` type class extends the `Alt` type class with a value that
12+-- | should be the left and right identity for `(<|>)`.
13+-- |
14+-- | It is similar to `Monoid`, except that it applies to types of
15+-- | kind `* -> *`, like `Array` or `List`, rather than concrete types like
16+-- | `String` or `Number`.
17+-- |
18+-- | `Plus` instances should satisfy the following laws:
19+-- |
20+-- | - Left identity: `empty <|> x == x`
21+-- | - Right identity: `x <|> empty == x`
22+-- | - Annihilation: `f <$> empty == empty`
23+class Alt f <= Plus f where
24+ empty :: forall a. f a
25+
26+instance plusArray :: Plus Array where
27+ empty = []
.spago/p/control-6.0.0/src/Data/Monoid/Alternate.pursnew file+60
@@ -0,0 +1,60 @@
1+module Data.Monoid.Alternate where
2+
3+import Prelude
4+
5+import Control.Alternative (class Alt, class Plus, class Alternative, empty, (<|>))
6+import Control.Comonad (class Comonad, class Extend)
7+import Data.Eq (class Eq1)
8+import Data.Newtype (class Newtype)
9+import Data.Ord (class Ord1)
10+
11+-- | Monoid and semigroup instances corresponding to `Plus` and `Alt` instances
12+-- | for `f`
13+-- |
14+-- | ``` purescript
15+-- | Alternate fx <> Alternate fy == Alternate (fx <|> fy)
16+-- | mempty :: Alternate _ == Alternate empty
17+-- | ```
18+newtype Alternate :: forall k. (k -> Type) -> k -> Type
19+newtype Alternate f a = Alternate (f a)
20+
21+derive instance newtypeAlternate :: Newtype (Alternate f a) _
22+
23+derive newtype instance eqAlternate :: Eq (f a) => Eq (Alternate f a)
24+
25+derive newtype instance eq1Alternate :: Eq1 f => Eq1 (Alternate f)
26+
27+derive newtype instance ordAlternate :: Ord (f a) => Ord (Alternate f a)
28+
29+derive newtype instance ord1Alternate :: Ord1 f => Ord1 (Alternate f)
30+
31+derive newtype instance boundedAlternate :: Bounded (f a) => Bounded (Alternate f a)
32+
33+derive newtype instance functorAlternate :: Functor f => Functor (Alternate f)
34+
35+derive newtype instance applyAlternate :: Apply f => Apply (Alternate f)
36+
37+derive newtype instance applicativeAlternate :: Applicative f => Applicative (Alternate f)
38+
39+derive newtype instance altAlternate :: Alt f => Alt (Alternate f)
40+
41+derive newtype instance plusAlternate :: Plus f => Plus (Alternate f)
42+
43+derive newtype instance alternativeAlternate :: Alternative f => Alternative (Alternate f)
44+
45+derive newtype instance bindAlternate :: Bind f => Bind (Alternate f)
46+
47+derive newtype instance monadAlternate :: Monad f => Monad (Alternate f)
48+
49+derive newtype instance extendAlternate :: Extend f => Extend (Alternate f)
50+
51+derive newtype instance comonadAlternate :: Comonad f => Comonad (Alternate f)
52+
53+instance showAlternate :: Show (f a) => Show (Alternate f a) where
54+ show (Alternate a) = "(Alternate " <> show a <> ")"
55+
56+instance semigroupAlternate :: Alt f => Semigroup (Alternate f a) where
57+ append (Alternate a) (Alternate b) = Alternate (a <|> b)
58+
59+instance monoidAlternate :: Plus f => Monoid (Alternate f a) where
60+ mempty = Alternate empty
.spago/p/datetime-6.1.0/LICENSEnew file+26
@@ -0,0 +1,26 @@
1+Copyright 2018 PureScript
2+
3+Redistribution and use in source and binary forms, with or without modification,
4+are permitted provided that the following conditions are met:
5+
6+1. Redistributions of source code must retain the above copyright notice, this
7+list of conditions and the following disclaimer.
8+
9+2. Redistributions in binary form must reproduce the above copyright notice,
10+this list of conditions and the following disclaimer in the documentation and/or
11+other materials provided with the distribution.
12+
13+3. Neither the name of the copyright holder nor the names of its contributors
14+may be used to endorse or promote products derived from this software without
15+specific prior written permission.
16+
17+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
21+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.spago/p/datetime-6.1.0/README.mdnew file+19
@@ -0,0 +1,19 @@
1+# purescript-datetime
2+
3+[](https://github.com/purescript/purescript-datetime/releases)
4+[](https://github.com/purescript/purescript-datetime/actions?query=workflow%3ACI+branch%3Amaster)
5+[](https://pursuit.purescript.org/packages/purescript-datetime)
6+
7+Date and time types and functions.
8+
9+## Installation
10+
11+```
12+spago install datetime
13+```
14+
15+## Documentation
16+
17+This libary provides platform-independent representations of date and time. Parsing specific date formats, such as the ISO 8601 format, is the responsibility of other libraries, such as the [purescript-js-date](https://github.com/purescript-contrib/purescript-js-date) package. Likewise, writing a date/time type to string to display to humans is the responsibility of other libraries, such as the [purescript-formatters](https://github.com/slamdata/purescript-formatters) package.
18+
19+Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-datetime).
.spago/p/datetime-6.1.0/bower.jsonnew file+40
@@ -0,0 +1,40 @@
1+{
2+ "name": "purescript-datetime",
3+ "homepage": "https://github.com/purescript/purescript-datetime",
4+ "license": "BSD-3-Clause",
5+ "repository": {
6+ "type": "git",
7+ "url": "https://github.com/purescript/purescript-datetime.git"
8+ },
9+ "ignore": [
10+ "**/.*",
11+ "bower_components",
12+ "node_modules",
13+ "output",
14+ "bower.json",
15+ "package.json"
16+ ],
17+ "dependencies": {
18+ "purescript-bifunctors": "^6.0.0",
19+ "purescript-control": "^6.0.0",
20+ "purescript-either": "^6.0.0",
21+ "purescript-enums": "^6.0.0",
22+ "purescript-foldable-traversable": "^6.0.0",
23+ "purescript-functions": "^6.0.0",
24+ "purescript-gen": "^4.0.0",
25+ "purescript-integers": "^6.0.0",
26+ "purescript-lists": "^7.0.0",
27+ "purescript-maybe": "^6.0.0",
28+ "purescript-newtype": "^5.0.0",
29+ "purescript-numbers": "^9.0.0",
30+ "purescript-ordered-collections": "^3.0.0",
31+ "purescript-partial": "^4.0.0",
32+ "purescript-prelude": "^6.0.0",
33+ "purescript-tuples": "^7.0.0"
34+ },
35+ "devDependencies": {
36+ "purescript-assert": "^6.0.0",
37+ "purescript-console": "^6.0.0",
38+ "purescript-strings": "^6.0.0"
39+ }
40+}
.spago/p/datetime-6.1.0/package.jsonnew file+14
@@ -0,0 +1,14 @@
1+{
2+ "private": true,
3+ "scripts": {
4+ "clean": "rimraf output && rimraf .pulp-cache",
5+ "build": "eslint src && pulp build -- --censor-lib --strict",
6+ "test": "pulp test"
7+ },
8+ "devDependencies": {
9+ "eslint": "^7.15.0",
10+ "pulp": "16.0.0-0",
11+ "purescript-psa": "^0.8.2",
12+ "rimraf": "^3.0.2"
13+ }
14+}
.spago/p/datetime-6.1.0/purs.jsonnew file+28
@@ -0,0 +1,28 @@
1+{
2+ "name": "datetime",
3+ "version": "6.1.0",
4+ "license": "BSD-3-Clause",
5+ "location": {
6+ "githubOwner": "purescript",
7+ "githubRepo": "purescript-datetime"
8+ },
9+ "ref": "v6.1.0",
10+ "dependencies": {
11+ "bifunctors": ">=6.0.0 <7.0.0",
12+ "control": ">=6.0.0 <7.0.0",
13+ "either": ">=6.0.0 <7.0.0",
14+ "enums": ">=6.0.0 <7.0.0",
15+ "foldable-traversable": ">=6.0.0 <7.0.0",
16+ "functions": ">=6.0.0 <7.0.0",
17+ "gen": ">=4.0.0 <5.0.0",
18+ "integers": ">=6.0.0 <7.0.0",
19+ "lists": ">=7.0.0 <8.0.0",
20+ "maybe": ">=6.0.0 <7.0.0",
21+ "newtype": ">=5.0.0 <6.0.0",
22+ "numbers": ">=9.0.0 <10.0.0",
23+ "ordered-collections": ">=3.0.0 <4.0.0",
24+ "partial": ">=4.0.0 <5.0.0",
25+ "prelude": ">=6.0.0 <7.0.0",
26+ "tuples": ">=7.0.0 <8.0.0"
27+ }
28+}
.spago/p/datetime-6.1.0/src/Data/Date.jsnew file+22
@@ -0,0 +1,22 @@
1+var createDate = function (y, m, d) {
2+ var date = new Date(Date.UTC(y, m, d));
3+ if (y >= 0 && y < 100) {
4+ date.setUTCFullYear(y);
5+ }
6+ return date;
7+};
8+
9+export function canonicalDateImpl(ctor, y, m, d) {
10+ var date = createDate(y, m - 1, d);
11+ return ctor(date.getUTCFullYear())(date.getUTCMonth() + 1)(date.getUTCDate());
12+}
13+
14+export function calcWeekday(y, m, d) {
15+ return createDate(y, m - 1, d).getUTCDay();
16+}
17+
18+export function calcDiff(y1, m1, d1, y2, m2, d2) {
19+ var dt1 = createDate(y1, m1 - 1, d1);
20+ var dt2 = createDate(y2, m2 - 1, d2);
21+ return dt1.getTime() - dt2.getTime();
22+}
.spago/p/datetime-6.1.0/src/Data/Date.pursnew file+148
@@ -0,0 +1,148 @@
1+module Data.Date
2+ ( Date
3+ , canonicalDate
4+ , exactDate
5+ , year
6+ , month
7+ , day
8+ , weekday
9+ , diff
10+ , isLeapYear
11+ , lastDayOfMonth
12+ , adjust
13+ , module Data.Date.Component
14+ ) where
15+
16+import Prelude
17+
18+import Data.Date.Component (Day, Month(..), Weekday(..), Year)
19+import Data.Enum (class Enum, toEnum, fromEnum, succ, pred)
20+import Data.Function.Uncurried (Fn3, runFn3, Fn4, runFn4, Fn6, runFn6)
21+import Data.Int (fromNumber)
22+import Data.Maybe (Maybe(..), fromJust, fromMaybe, isNothing)
23+import Data.Time.Duration (class Duration, Days(..), Milliseconds, toDuration)
24+import Partial.Unsafe (unsafePartial)
25+
26+-- | A date value in the Gregorian calendar.
27+data Date = Date Year Month Day
28+
29+-- | Constructs a date from year, month, and day components. The resulting date
30+-- | components may not be identical to the input values, as the date will be
31+-- | canonicalised according to the Gregorian calendar. For example, date
32+-- | values for the invalid date 2016-02-31 will be corrected to 2016-03-02.
33+canonicalDate :: Year -> Month -> Day -> Date
34+canonicalDate y m d = runFn4 canonicalDateImpl mkDate y (fromEnum m) d
35+ where
36+ mkDate :: Year -> Int -> Day -> Date
37+ mkDate = unsafePartial \y' m' d' -> Date y' (fromJust (toEnum m')) d'
38+
39+-- | Constructs a date from year, month, and day components. The result will be
40+-- | `Nothing` if the provided values result in an invalid date.
41+exactDate :: Year -> Month -> Day -> Maybe Date
42+exactDate y m d =
43+ let dt = Date y m d
44+ in if canonicalDate y m d == dt then Just dt else Nothing
45+
46+derive instance eqDate :: Eq Date
47+derive instance ordDate :: Ord Date
48+
49+instance boundedDate :: Bounded Date where
50+ bottom = Date bottom bottom bottom
51+ top = Date top top top
52+
53+instance showDate :: Show Date where
54+ show (Date y m d) = "(Date " <> show y <> " " <> show m <> " " <> show d <> ")"
55+
56+instance enumDate :: Enum Date where
57+ succ (Date y m d) = Date <$> y' <*> pure m' <*> d'
58+ where
59+ d' = if isNothing sd then toEnum 1 else sd
60+ m' = if isNothing sd then fromMaybe January sm else m
61+ y' = if isNothing sd && isNothing sm then succ y else Just y
62+ sd = let v = succ d in if v > Just l then Nothing else v
63+ sm = succ m
64+ l = lastDayOfMonth y m
65+ pred (Date y m d) = Date <$> y' <*> pure m' <*> d'
66+ where
67+ d' = if isNothing pd then Just l else pd
68+ m' = if isNothing pd then fromMaybe December pm else m
69+ y' = if isNothing pd && isNothing pm then pred y else Just y
70+ pd = pred d
71+ pm = pred m
72+ l = lastDayOfMonth y m'
73+
74+-- | The year component of a date value.
75+year :: Date -> Year
76+year (Date y _ _) = y
77+
78+-- | The month component of a date value.
79+month :: Date -> Month
80+month (Date _ m _) = m
81+
82+-- | The day component of a date value.
83+day :: Date -> Day
84+day (Date _ _ d) = d
85+
86+-- | The weekday for a date value.
87+weekday :: Date -> Weekday
88+weekday = unsafePartial \(Date y m d) ->
89+ let n = runFn3 calcWeekday y (fromEnum m) d
90+ in if n == 0 then fromJust (toEnum 7) else fromJust (toEnum n)
91+
92+-- | Adjusts a date with a Duration in days. The number of days must
93+-- | already be an integer and fall within the valid range of values
94+-- | for the Int type.
95+adjust :: Days -> Date -> Maybe Date
96+adjust (Days n) date = fromNumber n >>= flip adj date
97+ where
98+ adj 0 dt = Just dt
99+ adj i (Date y m d) = adj i' =<< dt'
100+ where
101+ i' | low = j
102+ | hi = j - fromEnum l - 1
103+ | otherwise = 0
104+ dt' | low = pred =<< Date y m <$> toEnum 1
105+ | hi = succ (Date y m l)
106+ | otherwise = Date y m <$> toEnum j
107+ j = i + fromEnum d
108+ low = j < 1
109+ hi = j > fromEnum l
110+ l = lastDayOfMonth y (if low then fromMaybe December (pred m) else m)
111+
112+-- | Calculates the difference between two dates, returning the result as a
113+-- | duration.
114+diff :: forall d. Duration d => Date -> Date -> d
115+diff (Date y1 m1 d1) (Date y2 m2 d2) =
116+ toDuration $ runFn6 calcDiff y1 (fromEnum m1) d1 y2 (fromEnum m2) d2
117+
118+-- | Checks whether a year is a leap year according to the proleptic Gregorian
119+-- | calendar.
120+isLeapYear :: Year -> Boolean
121+isLeapYear y = (mod y' 4 == 0) && ((mod y' 400 == 0) || not (mod y' 100 == 0))
122+ where
123+ y' = fromEnum y
124+
125+-- | Get the final day of a month and year, accounting for leap years.
126+lastDayOfMonth :: Year -> Month -> Day
127+lastDayOfMonth y m = case m of
128+ January -> unsafeDay 31
129+ February
130+ | isLeapYear y -> unsafeDay 29
131+ | otherwise -> unsafeDay 28
132+ March -> unsafeDay 31
133+ April -> unsafeDay 30
134+ May -> unsafeDay 31
135+ June -> unsafeDay 30
136+ July -> unsafeDay 31
137+ August -> unsafeDay 31
138+ September -> unsafeDay 30
139+ October -> unsafeDay 31
140+ November -> unsafeDay 30
141+ December -> unsafeDay 31
142+ where
143+ unsafeDay = unsafePartial fromJust <<< toEnum
144+
145+-- TODO: these could (and probably should) be implemented in PS
146+foreign import canonicalDateImpl :: Fn4 (Year -> Int -> Day -> Date) Year Int Day Date
147+foreign import calcWeekday :: Fn3 Year Int Day Int
148+foreign import calcDiff :: Fn6 Year Int Day Year Int Day Milliseconds
.spago/p/datetime-6.1.0/src/Data/Date/Component.pursnew file+191
@@ -0,0 +1,191 @@
1+module Data.Date.Component
2+ ( Year
3+ , Month(..)
4+ , Day
5+ , Weekday(..)
6+ ) where
7+
8+import Prelude
9+
10+import Data.Enum (class Enum, class BoundedEnum, toEnum, fromEnum, Cardinality(..))
11+import Data.Maybe (Maybe(..))
12+
13+-- | A year component for a date.
14+-- |
15+-- | The constructor is private as the `Year` type is bounded to the range
16+-- | -271820 to 275759, inclusive. The `toEnum` function can be used to safely
17+-- | acquire a year value from an integer.
18+newtype Year = Year Int
19+
20+derive newtype instance eqYear :: Eq Year
21+derive newtype instance ordYear :: Ord Year
22+
23+-- Note: these seemingly arbitrary bounds come from relying on JS for date
24+-- manipulations, as it only supports date ±100,000,000 days of the Unix epoch.
25+-- Using these year values means `Date bottom bottom bottom` is a valid date,
26+-- likewise for `top`.
27+instance boundedYear :: Bounded Year where
28+ bottom = Year (-271820)
29+ top = Year 275759
30+
31+instance enumYear :: Enum Year where
32+ succ = toEnum <<< (_ + 1) <<< fromEnum
33+ pred = toEnum <<< (_ - 1) <<< fromEnum
34+
35+instance boundedEnumYear :: BoundedEnum Year where
36+ cardinality = Cardinality 547580
37+ toEnum n
38+ | n >= (-271820) && n <= 275759 = Just (Year n)
39+ | otherwise = Nothing
40+ fromEnum (Year n) = n
41+
42+instance showYear :: Show Year where
43+ show (Year y) = "(Year " <> show y <> ")"
44+
45+-- | A month component for a date in the Gregorian calendar.
46+data Month
47+ = January
48+ | February
49+ | March
50+ | April
51+ | May
52+ | June
53+ | July
54+ | August
55+ | September
56+ | October
57+ | November
58+ | December
59+
60+derive instance eqMonth :: Eq Month
61+derive instance ordMonth :: Ord Month
62+
63+instance boundedMonth :: Bounded Month where
64+ bottom = January
65+ top = December
66+
67+instance enumMonth :: Enum Month where
68+ succ = toEnum <<< (_ + 1) <<< fromEnum
69+ pred = toEnum <<< (_ - 1) <<< fromEnum
70+
71+instance boundedEnumMonth :: BoundedEnum Month where
72+ cardinality = Cardinality 12
73+ toEnum = case _ of
74+ 1 -> Just January
75+ 2 -> Just February
76+ 3 -> Just March
77+ 4 -> Just April
78+ 5 -> Just May
79+ 6 -> Just June
80+ 7 -> Just July
81+ 8 -> Just August
82+ 9 -> Just September
83+ 10 -> Just October
84+ 11 -> Just November
85+ 12 -> Just December
86+ _ -> Nothing
87+ fromEnum = case _ of
88+ January -> 1
89+ February -> 2
90+ March -> 3
91+ April -> 4
92+ May -> 5
93+ June -> 6
94+ July -> 7
95+ August -> 8
96+ September -> 9
97+ October -> 10
98+ November -> 11
99+ December -> 12
100+
101+instance showMonth :: Show Month where
102+ show January = "January"
103+ show February = "February"
104+ show March = "March"
105+ show April = "April"
106+ show May = "May"
107+ show June = "June"
108+ show July = "July"
109+ show August = "August"
110+ show September = "September"
111+ show October = "October"
112+ show November = "November"
113+ show December = "December"
114+
115+-- | A day component for a date.
116+-- |
117+-- | The constructor is private as the `Day` type is bounded to the range
118+-- | 1 to 31, inclusive. The `toEnum` function can be used to safely
119+-- | acquire a day value from an integer.
120+newtype Day = Day Int
121+
122+derive newtype instance eqDay :: Eq Day
123+derive newtype instance ordDay :: Ord Day
124+
125+instance boundedDay :: Bounded Day where
126+ bottom = Day 1
127+ top = Day 31
128+
129+instance enumDay :: Enum Day where
130+ succ = toEnum <<< (_ + 1) <<< fromEnum
131+ pred = toEnum <<< (_ - 1) <<< fromEnum
132+
133+instance boundedEnumDay :: BoundedEnum Day where
134+ cardinality = Cardinality 31
135+ toEnum n
136+ | n >= 1 && n <= 31 = Just (Day n)
137+ | otherwise = Nothing
138+ fromEnum (Day n) = n
139+
140+instance showDay :: Show Day where
141+ show (Day d) = "(Day " <> show d <> ")"
142+
143+-- | A type representing the days of the week in the Gregorian calendar.
144+data Weekday
145+ = Monday
146+ | Tuesday
147+ | Wednesday
148+ | Thursday
149+ | Friday
150+ | Saturday
151+ | Sunday
152+
153+derive instance eqWeekday :: Eq Weekday
154+derive instance ordWeekday :: Ord Weekday
155+
156+instance boundedWeekday :: Bounded Weekday where
157+ bottom = Monday
158+ top = Sunday
159+
160+instance enumWeekday :: Enum Weekday where
161+ succ = toEnum <<< (_ + 1) <<< fromEnum
162+ pred = toEnum <<< (_ - 1) <<< fromEnum
163+
164+instance boundedEnumWeekday :: BoundedEnum Weekday where
165+ cardinality = Cardinality 7
166+ toEnum = case _ of
167+ 1 -> Just Monday
168+ 2 -> Just Tuesday
169+ 3 -> Just Wednesday
170+ 4 -> Just Thursday
171+ 5 -> Just Friday
172+ 6 -> Just Saturday
173+ 7 -> Just Sunday
174+ _ -> Nothing
175+ fromEnum = case _ of
176+ Monday -> 1
177+ Tuesday -> 2
178+ Wednesday -> 3
179+ Thursday -> 4
180+ Friday -> 5
181+ Saturday -> 6
182+ Sunday -> 7
183+
184+instance showWeekday :: Show Weekday where
185+ show Monday = "Monday"
186+ show Tuesday = "Tuesday"
187+ show Wednesday = "Wednesday"
188+ show Thursday = "Thursday"
189+ show Friday = "Friday"
190+ show Saturday = "Saturday"
191+ show Sunday = "Sunday"
.spago/p/datetime-6.1.0/src/Data/Date/Component/Gen.pursnew file+25
@@ -0,0 +1,25 @@
1+module Data.Date.Component.Gen where
2+
3+import Prelude
4+import Control.Monad.Gen (class MonadGen, chooseInt)
5+import Data.Date.Component (Day, Month, Weekday, Year)
6+import Data.Enum (toEnum)
7+import Data.Enum.Gen (genBoundedEnum)
8+import Data.Maybe (fromJust)
9+import Partial.Unsafe (unsafePartial)
10+
11+-- | Generates a random `Year` in the range 1900-2100, inclusive.
12+genYear :: forall m. MonadGen m => m Year
13+genYear = unsafePartial fromJust <<< toEnum <$> chooseInt 1900 2100
14+
15+-- | Generates a random `Month` component.
16+genMonth :: forall m. MonadGen m => m Month
17+genMonth = genBoundedEnum
18+
19+-- | Generates a random `Day` component.
20+genDay :: forall m. MonadGen m => m Day
21+genDay = genBoundedEnum
22+
23+-- | Generates a random `Weekday` component.
24+genWeekday :: forall m. MonadGen m => m Weekday
25+genWeekday = genBoundedEnum
.spago/p/datetime-6.1.0/src/Data/Date/Gen.pursnew file+24
@@ -0,0 +1,24 @@
1+module Data.Date.Gen
2+ ( genDate
3+ , module Data.Date.Component.Gen
4+ ) where
5+
6+import Prelude
7+import Control.Monad.Gen (class MonadGen, chooseInt)
8+import Data.Date (Date, adjust, exactDate, isLeapYear)
9+import Data.Date.Component.Gen (genDay, genMonth, genWeekday, genYear)
10+import Data.Int (toNumber)
11+import Data.Maybe (fromJust)
12+import Data.Time.Duration (Days(..))
13+import Partial.Unsafe (unsafePartial)
14+
15+-- | Generates a random `Date` between 1st Jan 1900 and 31st Dec 2100,
16+-- | inclusive.
17+genDate :: forall m. MonadGen m => m Date
18+genDate = do
19+ year <- genYear
20+ let maxDays = if isLeapYear year then 365 else 364
21+ days <- Days <<< toNumber <$> chooseInt 0 maxDays
22+ pure $ unsafePartial $ fromJust do
23+ janFirst <- exactDate year bottom bottom
24+ adjust days janFirst
.spago/p/datetime-6.1.0/src/Data/DateTime.jsnew file+33
@@ -0,0 +1,33 @@
1+var createUTC = function (y, mo, d, h, m, s, ms) {
2+ var date = new Date(Date.UTC(y, mo, d, h, m, s, ms));
3+ if (y >= 0 && y < 100) {
4+ date.setUTCFullYear(y);
5+ }
6+ return date.getTime();
7+};
8+
9+export function calcDiff(rec1, rec2) {
10+ var msUTC1 = createUTC(rec1.year, rec1.month - 1, rec1.day, rec1.hour, rec1.minute, rec1.second, rec1.millisecond);
11+ var msUTC2 = createUTC(rec2.year, rec2.month - 1, rec2.day, rec2.hour, rec2.minute, rec2.second, rec2.millisecond);
12+ return msUTC1 - msUTC2;
13+}
14+
15+export function adjustImpl(just) {
16+ return function (nothing) {
17+ return function (offset) {
18+ return function (rec) {
19+ var msUTC = createUTC(rec.year, rec.month - 1, rec.day, rec.hour, rec.minute, rec.second, rec.millisecond);
20+ var dt = new Date(msUTC + offset);
21+ return isNaN(dt.getTime()) ? nothing : just({
22+ year: dt.getUTCFullYear(),
23+ month: dt.getUTCMonth() + 1,
24+ day: dt.getUTCDate(),
25+ hour: dt.getUTCHours(),
26+ minute: dt.getUTCMinutes(),
27+ second: dt.getUTCSeconds(),
28+ millisecond: dt.getUTCMilliseconds()
29+ });
30+ };
31+ };
32+ };
33+}
.spago/p/datetime-6.1.0/src/Data/DateTime.pursnew file+99
@@ -0,0 +1,99 @@
1+module Data.DateTime
2+ ( DateTime(..)
3+ , date
4+ , modifyDate
5+ , modifyDateF
6+ , time
7+ , modifyTime
8+ , modifyTimeF
9+ , adjust
10+ , diff
11+ , module Data.Date
12+ , module Data.Time
13+ ) where
14+
15+import Prelude
16+
17+import Data.Date (Date, Day, Month(..), Weekday(..), Year, canonicalDate, day, exactDate, month, weekday, year)
18+import Data.Enum (toEnum, fromEnum)
19+import Data.Function.Uncurried (Fn2, runFn2)
20+import Data.Time (Hour, Millisecond, Minute, Second, Time(..), hour, setHour, millisecond, setMillisecond, minute, setMinute, second, setSecond)
21+import Data.Time.Duration (class Duration, fromDuration, toDuration, Milliseconds)
22+import Data.Maybe (Maybe(..))
23+
24+-- | A date/time value in the Gregorian calendar/UTC time zone.
25+data DateTime = DateTime Date Time
26+
27+derive instance eqDateTime :: Eq DateTime
28+derive instance ordDateTime :: Ord DateTime
29+
30+instance boundedDateTime :: Bounded DateTime where
31+ bottom = DateTime bottom bottom
32+ top = DateTime top top
33+
34+instance showDateTime :: Show DateTime where
35+ show (DateTime d t) = "(DateTime " <> show d <> " " <> show t <> ")"
36+
37+date :: DateTime -> Date
38+date (DateTime d _) = d
39+
40+modifyDate :: (Date -> Date) -> DateTime -> DateTime
41+modifyDate f (DateTime d t) = DateTime (f d) t
42+
43+modifyDateF :: forall f. Functor f => (Date -> f Date) -> DateTime -> f DateTime
44+modifyDateF f (DateTime d t) = flip DateTime t <$> f d
45+
46+time :: DateTime -> Time
47+time (DateTime _ t) = t
48+
49+modifyTime :: (Time -> Time) -> DateTime -> DateTime
50+modifyTime f (DateTime d t) = DateTime d (f t)
51+
52+modifyTimeF :: forall f. Functor f => (Time -> f Time) -> DateTime -> f DateTime
53+modifyTimeF f (DateTime d t) = DateTime d <$> f t
54+
55+-- | Adjusts a date/time value with a duration offset. `Nothing` is returned
56+-- | if the resulting date would be outside of the range of valid dates.
57+adjust :: forall d. Duration d => d -> DateTime -> Maybe DateTime
58+adjust d dt =
59+ adjustImpl Just Nothing (fromDuration d) (toRecord dt) >>= \rec ->
60+ DateTime
61+ <$> join (exactDate <$> toEnum rec.year <*> toEnum rec.month <*> toEnum rec.day)
62+ <*> (Time <$> toEnum rec.hour <*> toEnum rec.minute <*> toEnum rec.second <*> toEnum rec.millisecond)
63+
64+-- | Calculates the difference between two date/time values, returning the
65+-- | result as a duration.
66+diff :: forall d. Duration d => DateTime -> DateTime -> d
67+diff dt1 dt2 = toDuration $ runFn2 calcDiff (toRecord dt1) (toRecord dt2)
68+
69+type DateRec =
70+ { year :: Int
71+ , month :: Int
72+ , day :: Int
73+ , hour :: Int
74+ , minute :: Int
75+ , second :: Int
76+ , millisecond :: Int
77+ }
78+
79+toRecord :: DateTime -> DateRec
80+toRecord (DateTime d t) =
81+ { year: fromEnum (year d)
82+ , month: fromEnum (month d)
83+ , day: fromEnum (day d)
84+ , hour: fromEnum (hour t)
85+ , minute: fromEnum (minute t)
86+ , second: fromEnum (second t)
87+ , millisecond: fromEnum (millisecond t)
88+ }
89+
90+-- TODO: these could (and probably should) be implemented in PS
91+
92+foreign import calcDiff :: Fn2 DateRec DateRec Milliseconds
93+
94+foreign import adjustImpl
95+ :: (forall a. a -> Maybe a)
96+ -> (forall a. Maybe a)
97+ -> Milliseconds
98+ -> DateRec
99+ -> Maybe DateRec
.spago/p/datetime-6.1.0/src/Data/DateTime/Gen.pursnew file+16
@@ -0,0 +1,16 @@
1+module Data.DateTime.Gen
2+ ( genDateTime
3+ , module Data.Date.Gen
4+ , module Data.Time.Gen
5+ ) where
6+
7+import Prelude
8+import Control.Monad.Gen (class MonadGen)
9+import Data.Date.Gen (genDate, genDay, genMonth, genWeekday, genYear)
10+import Data.DateTime (DateTime(..))
11+import Data.Time.Gen (genHour, genMillisecond, genMinute, genSecond, genTime)
12+
13+-- | Generates a random `DateTime` between 1st Jan 1900 00:00:00 and
14+-- | 31st Dec 2100 23:59:59, inclusive.
15+genDateTime :: forall m. MonadGen m => m DateTime
16+genDateTime = DateTime <$> genDate <*> genTime
.spago/p/datetime-6.1.0/src/Data/DateTime/Instant.jsnew file+18
@@ -0,0 +1,18 @@
1+var createDateTime = function (y, m, d, h, mi, s, ms) {
2+ var dateTime = new Date(Date.UTC(y, m, d, h, mi, s, ms));
3+ if (y >= 0 && y < 100) {
4+ dateTime.setUTCFullYear(y);
5+ }
6+ return dateTime;
7+};
8+
9+export function fromDateTimeImpl(y, mo, d, h, mi, s, ms) {
10+ return createDateTime(y, mo - 1, d, h, mi, s, ms).getTime();
11+}
12+
13+export function toDateTimeImpl(ctor) {
14+ return function (instant) {
15+ var dt = new Date(instant);
16+ return ctor (dt.getUTCFullYear())(dt.getUTCMonth() + 1)(dt.getUTCDate())(dt.getUTCHours())(dt.getUTCMinutes())(dt.getUTCSeconds())(dt.getUTCMilliseconds());
17+ };
18+}
.spago/p/datetime-6.1.0/src/Data/DateTime/Instant.pursnew file+91
@@ -0,0 +1,91 @@
1+module Data.DateTime.Instant
2+ ( Instant
3+ , instant
4+ , unInstant
5+ , fromDateTime
6+ , fromDate
7+ , toDateTime
8+ , diff
9+ ) where
10+
11+import Prelude
12+
13+import Data.DateTime (Millisecond, Second, Minute, Hour, Day, Year, DateTime(..), Date, Time(..), canonicalDate, millisecond, second, minute, hour, day, month, year)
14+import Data.Enum (fromEnum, toEnum)
15+import Data.Function.Uncurried (Fn7, runFn7)
16+import Data.Maybe (Maybe(..), fromJust)
17+import Data.Time.Duration (class Duration, Milliseconds(..), negateDuration, toDuration)
18+import Partial.Unsafe (unsafePartial)
19+
20+-- | An instant is a duration in milliseconds relative to the Unix epoch
21+-- | (1970-01-01 00:00:00 UTC).
22+-- |
23+-- | The constructor is private as the `Instant` range matches that of the
24+-- | `DateTime` type.
25+newtype Instant = Instant Milliseconds
26+
27+derive newtype instance eqDateTime :: Eq Instant
28+derive newtype instance ordDateTime :: Ord Instant
29+
30+instance boundedInstant :: Bounded Instant where
31+ bottom = Instant (Milliseconds (-8639977881600000.0))
32+ top = Instant (Milliseconds 8639977881599999.0)
33+
34+instance showInstant :: Show Instant where
35+ show (Instant ms) = "(Instant " <> show ms <> ")"
36+
37+-- Unfortunately Instant cannot be made a `BoundedEnum` as it "should" be,
38+-- unless enum cardinality and from/to range is extended to use a numeric type
39+-- bigger than Int32
40+
41+-- | Attempts to create an `Instant` from a `Milliseconds` duration. The
42+-- | minimum acceptable value equates to the `bottom` `DateTime` and the maximum
43+-- | acceptable value equates to the `top` `DateTime`.
44+instant :: Milliseconds -> Maybe Instant
45+instant ms@(Milliseconds n)
46+ | n >= -8639977881600000.0 && n <= 8639977881599999.0 = Just (Instant ms)
47+ | otherwise = Nothing
48+
49+-- | Lowers an `Instant` to a `Milliseconds` duration.
50+unInstant :: Instant -> Milliseconds
51+unInstant (Instant ms) = ms
52+
53+-- | Creates an `Instant` from a `DateTime` value.
54+fromDateTime :: DateTime -> Instant
55+fromDateTime (DateTime d t) =
56+ runFn7 fromDateTimeImpl
57+ (year d) (fromEnum (month d)) (day d)
58+ (hour t) (minute t) (second t) (millisecond t)
59+
60+-- | Creates an `Instant` from a `Date` value, using the assumed time 00:00:00.
61+fromDate :: Date -> Instant
62+fromDate d =
63+ runFn7 fromDateTimeImpl
64+ (year d) (fromEnum (month d)) (day d)
65+ bottom bottom bottom bottom
66+
67+-- | Creates a `DateTime` value from an `Instant`.
68+toDateTime :: Instant -> DateTime
69+toDateTime = toDateTimeImpl mkDateTime
70+ where
71+ mkDateTime = unsafePartial \y mo d h mi s ms ->
72+ DateTime (canonicalDate y (fromJust (toEnum mo)) d) (Time h mi s ms)
73+
74+-- TODO: these could (and probably should) be implemented in PS
75+foreign import fromDateTimeImpl :: Fn7 Year Int Day Hour Minute Second Millisecond Instant
76+foreign import toDateTimeImpl :: (Year -> Int -> Day -> Hour -> Minute -> Second -> Millisecond -> DateTime) -> Instant -> DateTime
77+
78+-- | Calculates the difference between two instants, returning the result as a duration.
79+-- | For example:
80+-- | ```
81+-- | do
82+-- | start <- liftEffect Now.now
83+-- | aLongRunningAff
84+-- | end <- liftEffect Now.now
85+-- | let
86+-- | hours :: Duration.Hours
87+-- | hours = Instant.diff end start
88+-- | log ("A long running Aff took " <> show hours)
89+-- | ```
90+diff :: forall d. Duration d => Instant → Instant → d
91+diff dt1 dt2 = toDuration (unInstant dt1 <> negateDuration (unInstant dt2))
.spago/p/datetime-6.1.0/src/Data/Interval.pursnew file+115
@@ -0,0 +1,115 @@
1+module Data.Interval
2+ ( Interval(..)
3+ , RecurringInterval(..)
4+ , module Exports
5+ ) where
6+
7+import Prelude
8+
9+import Control.Extend (class Extend, extend)
10+import Data.Bifoldable (class Bifoldable, bifoldl, bifoldr, bifoldrDefault, bifoldMapDefaultL)
11+import Data.Bifunctor (class Bifunctor, bimap)
12+import Data.Bitraversable (class Bitraversable, bitraverse, bisequenceDefault)
13+import Data.Foldable (class Foldable, foldl, foldr, foldrDefault, foldMapDefaultL)
14+import Data.Interval.Duration (Duration(..), DurationComponent(..), day, hour, millisecond, minute, month, second, week, year) as Exports
15+import Data.Maybe (Maybe)
16+import Data.Traversable (class Traversable, traverse, sequenceDefault)
17+
18+data RecurringInterval d a = RecurringInterval (Maybe Int) (Interval d a)
19+
20+derive instance eqRecurringInterval :: (Eq d, Eq a) => Eq (RecurringInterval d a)
21+derive instance ordRecurringInterval :: (Ord d, Ord a) => Ord (RecurringInterval d a)
22+instance showRecurringInterval :: (Show d, Show a) => Show (RecurringInterval d a) where
23+ show (RecurringInterval x y) = "(RecurringInterval " <> show x <> " " <> show y <> ")"
24+
25+interval :: ∀ d a. RecurringInterval d a -> Interval d a
26+interval (RecurringInterval _ i) = i
27+
28+over :: ∀ f d a d' a'. Functor f => (Interval d a -> f (Interval d' a')) -> RecurringInterval d a -> f (RecurringInterval d' a')
29+over f (RecurringInterval n i) = map (RecurringInterval n) (f i)
30+
31+instance functorRecurringInterval :: Functor (RecurringInterval d) where
32+ map f (RecurringInterval n i) = RecurringInterval n (map f i)
33+
34+instance bifunctorRecurringInterval :: Bifunctor RecurringInterval where
35+ bimap f g (RecurringInterval n i) = RecurringInterval n (bimap f g i)
36+
37+instance foldableRecurringInterval :: Foldable (RecurringInterval d) where
38+ foldl f i = foldl f i <<< interval
39+ foldr f i = foldr f i <<< interval
40+ foldMap = foldMapDefaultL
41+
42+instance bifoldableRecurringInterval :: Bifoldable RecurringInterval where
43+ bifoldl f g i = bifoldl f g i <<< interval
44+ bifoldr f g i = bifoldr f g i <<< interval
45+ bifoldMap = bifoldMapDefaultL
46+
47+instance traversableRecurringInterval :: Traversable (RecurringInterval d) where
48+ traverse f i = traverse f `over` i
49+ sequence = sequenceDefault
50+
51+instance bitraversableRecurringInterval :: Bitraversable RecurringInterval where
52+ bitraverse l r i = bitraverse l r `over` i
53+ bisequence = bisequenceDefault
54+
55+instance extendRecurringInterval :: Extend (RecurringInterval d) where
56+ extend f a@(RecurringInterval n i) = RecurringInterval n (extend (const (f a)) i)
57+
58+data Interval d a
59+ = StartEnd a a
60+ | DurationEnd d a
61+ | StartDuration a d
62+ | DurationOnly d
63+
64+derive instance eqInterval :: (Eq d, Eq a) => Eq (Interval d a)
65+derive instance ordInterval :: (Ord d, Ord a) => Ord (Interval d a)
66+instance showInterval :: (Show d, Show a) => Show (Interval d a) where
67+ show (StartEnd x y) = "(StartEnd " <> show x <> " " <> show y <> ")"
68+ show (DurationEnd d x) = "(DurationEnd " <> show d <> " " <> show x <> ")"
69+ show (StartDuration x d) = "(StartDuration " <> show x <> " " <> show d <> ")"
70+ show (DurationOnly d) = "(DurationOnly " <> show d <> ")"
71+
72+instance functorInterval :: Functor (Interval d) where
73+ map = bimap identity
74+
75+instance bifunctorInterval :: Bifunctor Interval where
76+ bimap _ f (StartEnd x y) = StartEnd (f x) (f y)
77+ bimap g f (DurationEnd d x) = DurationEnd (g d) (f x)
78+ bimap g f (StartDuration x d) = StartDuration (f x) (g d)
79+ bimap g _ (DurationOnly d) = DurationOnly (g d)
80+
81+instance foldableInterval :: Foldable (Interval d) where
82+ foldl f z (StartEnd x y) = (z `f` x) `f` y
83+ foldl f z (DurationEnd _ x) = z `f` x
84+ foldl f z (StartDuration x _) = z `f` x
85+ foldl _ z _ = z
86+ foldr x = foldrDefault x
87+ foldMap = foldMapDefaultL
88+
89+instance bifoldableInterval :: Bifoldable Interval where
90+ bifoldl _ f z (StartEnd x y) = (z `f` x) `f` y
91+ bifoldl g f z (DurationEnd d x) = (z `g` d) `f` x
92+ bifoldl g f z (StartDuration x d) = (z `g` d) `f` x
93+ bifoldl g _ z (DurationOnly d) = z `g` d
94+ bifoldr x = bifoldrDefault x
95+ bifoldMap = bifoldMapDefaultL
96+
97+instance traversableInterval :: Traversable (Interval d) where
98+ traverse f (StartEnd x y) = StartEnd <$> f x <*> f y
99+ traverse f (DurationEnd d x) = f x <#> DurationEnd d
100+ traverse f (StartDuration x d) = f x <#> (_ `StartDuration` d)
101+ traverse _ (DurationOnly d) = pure (DurationOnly d)
102+ sequence = sequenceDefault
103+
104+instance bitraversableInterval :: Bitraversable Interval where
105+ bitraverse _ r (StartEnd x y) = StartEnd <$> r x <*> r y
106+ bitraverse l r (DurationEnd d x) = DurationEnd <$> l d <*> r x
107+ bitraverse l r (StartDuration x d) = StartDuration <$> r x <*> l d
108+ bitraverse l _ (DurationOnly d) = DurationOnly <$> l d
109+ bisequence = bisequenceDefault
110+
111+instance extendInterval :: Extend (Interval d) where
112+ extend f a@(StartEnd _ _) = StartEnd (f a) (f a)
113+ extend f a@(DurationEnd d _) = DurationEnd d (f a)
114+ extend f a@(StartDuration _ d) = StartDuration (f a) d
115+ extend _ (DurationOnly d) = DurationOnly d
.spago/p/datetime-6.1.0/src/Data/Interval/Duration.pursnew file+73
@@ -0,0 +1,73 @@
1+module Data.Interval.Duration
2+ ( Duration(..)
3+ , DurationComponent(..)
4+ , year
5+ , month
6+ , week
7+ , day
8+ , hour
9+ , minute
10+ , second
11+ , millisecond
12+ ) where
13+
14+import Prelude
15+
16+import Data.Map as Map
17+import Data.Newtype (class Newtype)
18+
19+newtype Duration = Duration (Map.Map DurationComponent Number)
20+
21+derive instance eqDuration :: Eq Duration
22+derive instance ordDuration :: Ord Duration
23+derive instance newtypeDuration :: Newtype Duration _
24+
25+instance showDuration :: Show Duration where
26+ show (Duration d) = "(Duration " <> show d <> ")"
27+
28+instance semigroupDuration :: Semigroup Duration where
29+ append (Duration a) (Duration b) = Duration (Map.unionWith (+) a b)
30+
31+instance monoidDuration :: Monoid Duration where
32+ mempty = Duration Map.empty
33+
34+data DurationComponent = Second | Minute | Hour | Day | Week | Month | Year
35+derive instance eqDurationComponent :: Eq DurationComponent
36+derive instance ordDurationComponent :: Ord DurationComponent
37+
38+instance showDurationComponent :: Show DurationComponent where
39+ show Minute = "Minute"
40+ show Second = "Second"
41+ show Hour = "Hour"
42+ show Day = "Day"
43+ show Week = "Week"
44+ show Month = "Month"
45+ show Year = "Year"
46+
47+
48+week :: Number -> Duration
49+week = durationFromComponent Week
50+
51+year :: Number -> Duration
52+year = durationFromComponent Year
53+
54+month :: Number -> Duration
55+month = durationFromComponent Month
56+
57+day :: Number -> Duration
58+day = durationFromComponent Day
59+
60+hour :: Number -> Duration
61+hour = durationFromComponent Hour
62+
63+minute :: Number -> Duration
64+minute = durationFromComponent Minute
65+
66+second :: Number -> Duration
67+second = durationFromComponent Second
68+
69+millisecond :: Number -> Duration
70+millisecond = durationFromComponent Second <<< (_ / 1000.0)
71+
72+durationFromComponent :: DurationComponent -> Number -> Duration
73+durationFromComponent k v = Duration (Map.singleton k v)
.spago/p/datetime-6.1.0/src/Data/Interval/Duration/Iso.pursnew file+97
@@ -0,0 +1,97 @@
1+module Data.Interval.Duration.Iso
2+ ( IsoDuration
3+ , unIsoDuration
4+ , mkIsoDuration
5+ , Error(..)
6+ , Errors
7+ , prettyError
8+ ) where
9+
10+import Prelude
11+
12+import Control.Plus (empty)
13+import Data.Either (Either(..))
14+import Data.Foldable (fold, foldMap)
15+import Data.Interval.Duration (Duration(..), DurationComponent(..))
16+import Data.List (List(..), reverse, span, null)
17+import Data.List.NonEmpty (fromList)
18+import Data.List.Types (NonEmptyList)
19+import Data.Map as Map
20+import Data.Number as Number
21+import Data.Maybe (Maybe(..), isJust)
22+import Data.Monoid.Additive (Additive(..))
23+import Data.Newtype (unwrap)
24+import Data.Tuple (Tuple(..), snd)
25+
26+newtype IsoDuration = IsoDuration Duration
27+
28+derive instance eqIsoDuration :: Eq IsoDuration
29+derive instance ordIsoDuration :: Ord IsoDuration
30+instance showIsoDuration :: Show IsoDuration where
31+ show (IsoDuration d) = "(IsoDuration " <> show d <> ")"
32+
33+type Errors = NonEmptyList Error
34+
35+data Error
36+ = IsEmpty
37+ | InvalidWeekComponentUsage
38+ | ContainsNegativeValue DurationComponent
39+ | InvalidFractionalUse DurationComponent
40+
41+derive instance eqError :: Eq Error
42+derive instance ordError :: Ord Error
43+instance showError :: Show Error where
44+ show (IsEmpty) = "(IsEmpty)"
45+ show (InvalidWeekComponentUsage) = "(InvalidWeekComponentUsage)"
46+ show (ContainsNegativeValue c) = "(ContainsNegativeValue " <> show c <> ")"
47+ show (InvalidFractionalUse c) = "(InvalidFractionalUse " <> show c <> ")"
48+
49+prettyError :: Error -> String
50+prettyError (IsEmpty) = "Duration is empty (has no components)"
51+prettyError (InvalidWeekComponentUsage) = "Week component of Duration is used with other components"
52+prettyError (ContainsNegativeValue c) = "Component `" <> show c <> "` contains negative value"
53+prettyError (InvalidFractionalUse c) = "Invalid usage of Fractional value at component `" <> show c <> "`"
54+
55+
56+unIsoDuration :: IsoDuration -> Duration
57+unIsoDuration (IsoDuration a) = a
58+
59+mkIsoDuration :: Duration -> Either Errors IsoDuration
60+mkIsoDuration d = case fromList (checkValidIsoDuration d) of
61+ Just errs -> Left errs
62+ Nothing -> Right (IsoDuration d)
63+
64+checkValidIsoDuration :: Duration -> List Error
65+checkValidIsoDuration (Duration asMap) = check {asList, asMap}
66+ where
67+ asList = reverse (Map.toUnfoldable asMap)
68+ check = fold
69+ [ checkWeekUsage
70+ , checkEmptiness
71+ , checkFractionalUse
72+ , checkNegativeValues
73+ ]
74+
75+
76+type CheckEnv =
77+ { asList :: List (Tuple DurationComponent Number)
78+ , asMap :: Map.Map DurationComponent Number}
79+
80+checkWeekUsage :: CheckEnv -> List Error
81+checkWeekUsage {asMap} = if isJust (Map.lookup Week asMap) && Map.size asMap > 1
82+ then pure InvalidWeekComponentUsage else empty
83+
84+checkEmptiness :: CheckEnv -> List Error
85+checkEmptiness {asList} = if null asList then pure IsEmpty else empty
86+
87+checkFractionalUse :: CheckEnv -> List Error
88+checkFractionalUse {asList} = case _.rest (span (snd >>> not isFractional) asList) of
89+ Cons (Tuple c _) rest | checkRest rest -> pure (InvalidFractionalUse c)
90+ _ -> empty
91+ where
92+ isFractional a = Number.floor a /= a
93+ checkRest rest = unwrap (foldMap (snd >>> Number.abs >>> Additive) rest) > 0.0
94+
95+checkNegativeValues :: CheckEnv -> List Error
96+checkNegativeValues {asList} = flip foldMap asList \(Tuple c num) ->
97+ if num >= 0.0 then empty else pure (ContainsNegativeValue c)
.spago/p/datetime-6.1.0/src/Data/Time.pursnew file+123
@@ -0,0 +1,123 @@
1+module Data.Time
2+ ( Time(..)
3+ , hour, setHour
4+ , minute, setMinute
5+ , second, setSecond
6+ , millisecond, setMillisecond
7+ , adjust
8+ , diff
9+ , module Data.Time.Component
10+ ) where
11+
12+import Prelude
13+
14+import Data.Enum (fromEnum, toEnum)
15+import Data.Int as Int
16+import Data.Maybe (fromJust)
17+import Data.Number as Number
18+import Data.Newtype (unwrap)
19+import Data.Time.Component (Hour, Millisecond, Minute, Second)
20+import Data.Time.Duration (class Duration, Days(..), Milliseconds(..), fromDuration, negateDuration, toDuration)
21+import Data.Tuple (Tuple(..))
22+import Partial.Unsafe (unsafePartial)
23+
24+data Time = Time Hour Minute Second Millisecond
25+
26+derive instance eqTime :: Eq Time
27+derive instance ordTime :: Ord Time
28+
29+instance boundedTime :: Bounded Time where
30+ bottom = Time bottom bottom bottom bottom
31+ top = Time top top top top
32+
33+instance showTime :: Show Time where
34+ show (Time h m s ms) = "(Time " <> show h <> " " <> show m <> " " <> show s <> " " <> show ms <> ")"
35+
36+-- | The hour component of a time value.
37+hour :: Time -> Hour
38+hour (Time h _ _ _) = h
39+
40+-- | Alters the hour component of a time value.
41+setHour :: Hour -> Time -> Time
42+setHour h (Time _ m s ms) = Time h m s ms
43+
44+-- | The minute component of a time value.
45+minute :: Time -> Minute
46+minute (Time _ m _ _) = m
47+
48+-- | Alters the minute component of a time value.
49+setMinute :: Minute -> Time -> Time
50+setMinute m (Time h _ s ms) = Time h m s ms
51+
52+-- | The second component of a time value.
53+second :: Time -> Second
54+second (Time _ _ s _) = s
55+
56+-- | Alters the second component of a time value.
57+setSecond :: Second -> Time -> Time
58+setSecond s (Time h m _ ms) = Time h m s ms
59+
60+-- | The millisecond component of a time value.
61+millisecond :: Time -> Millisecond
62+millisecond (Time _ _ _ ms) = ms
63+
64+-- | Alters the millisecond component of a time value.
65+setMillisecond :: Millisecond -> Time -> Time
66+setMillisecond ms (Time h m s _) = Time h m s ms
67+
68+-- | Adjusts a time value with a duration offset. The result includes a
69+-- | remainder value of the whole number of days involved in the adjustment,
70+-- | for example, if a time of 23:00:00:00 has a duration of +2 hours added to
71+-- | it, the result will be 1 day, and 01:00:00:00. Correspondingly, if the
72+-- | duration is negative, a negative number of days may also be returned as
73+-- | the remainder.
74+adjust :: forall d. Duration d => d -> Time -> Tuple Days Time
75+adjust d t =
76+ let
77+ d' = fromDuration d
78+ tLength = timeToMillis t
79+ dayLength = 86400000.0
80+ wholeDays = Days $ Number.floor (unwrap d' / dayLength)
81+ msAdjust = d' <> negateDuration (fromDuration wholeDays)
82+ msAdjusted = tLength <> msAdjust
83+ wrap = if msAdjusted > maxTime then 1.0 else if msAdjusted < minTime then -1.0 else 0.0
84+ in
85+ Tuple
86+ (wholeDays <> Days wrap)
87+ (millisToTime (msAdjusted <> Milliseconds (dayLength * -wrap)))
88+
89+maxTime :: Milliseconds
90+maxTime = timeToMillis top
91+
92+minTime :: Milliseconds
93+minTime = timeToMillis bottom
94+
95+timeToMillis :: Time -> Milliseconds
96+timeToMillis t = Milliseconds
97+ $ 3600000.0 * Int.toNumber (fromEnum (hour t))
98+ + 60000.0 * Int.toNumber (fromEnum (minute t))
99+ + 1000.0 * Int.toNumber (fromEnum (second t))
100+ + Int.toNumber (fromEnum (millisecond t))
101+
102+millisToTime :: Milliseconds -> Time
103+millisToTime (Milliseconds ms') =
104+ let
105+ hourLength = 3600000.0
106+ minuteLength = 60000.0
107+ secondLength = 1000.0
108+ hours = Number.floor (ms' / hourLength)
109+ minutes = Number.floor ((ms' - hours * hourLength) / minuteLength)
110+ seconds = Number.floor ((ms' - (hours * hourLength + minutes * minuteLength)) / secondLength)
111+ milliseconds = ms' - (hours * hourLength + minutes * minuteLength + seconds * secondLength)
112+ in
113+ unsafePartial fromJust $
114+ Time
115+ <$> toEnum (Int.floor hours)
116+ <*> toEnum (Int.floor minutes)
117+ <*> toEnum (Int.floor seconds)
118+ <*> toEnum (Int.floor milliseconds)
119+
120+-- | Calculates the difference between two times, returning the result as a
121+-- | duration.
122+diff :: forall d. Duration d => Time -> Time -> d
123+diff t1 t2 = toDuration (timeToMillis t1 <> negateDuration (timeToMillis t2))
.spago/p/datetime-6.1.0/src/Data/Time/Component.pursnew file+128
@@ -0,0 +1,128 @@
1+module Data.Time.Component
2+ ( Hour
3+ , Minute
4+ , Second
5+ , Millisecond
6+ ) where
7+
8+import Prelude
9+
10+import Data.Enum (class Enum, class BoundedEnum, toEnum, fromEnum, Cardinality(..))
11+import Data.Maybe (Maybe(..))
12+
13+-- | An hour component for a time value.
14+-- |
15+-- | The constructor is private as values for the type are restricted to the
16+-- | range 0 to 23, inclusive. The `toEnum` function can be used to safely
17+-- | acquire an `Hour` value from an integer. Correspondingly, an `Hour` can be
18+-- | lowered to a plain integer with the `fromEnum` function.
19+newtype Hour = Hour Int
20+
21+derive newtype instance eqHour :: Eq Hour
22+derive newtype instance ordHour :: Ord Hour
23+
24+instance boundedHour :: Bounded Hour where
25+ bottom = Hour 0
26+ top = Hour 23
27+
28+instance enumHour :: Enum Hour where
29+ succ = toEnum <<< (_ + 1) <<< fromEnum
30+ pred = toEnum <<< (_ - 1) <<< fromEnum
31+
32+instance boundedEnumHour :: BoundedEnum Hour where
33+ cardinality = Cardinality 24
34+ toEnum n
35+ | n >= 0 && n <= 23 = Just (Hour n)
36+ | otherwise = Nothing
37+ fromEnum (Hour n) = n
38+
39+instance showHour :: Show Hour where
40+ show (Hour h) = "(Hour " <> show h <> ")"
41+
42+-- | An minute component for a time value.
43+-- |
44+-- | The constructor is private as values for the type are restricted to the
45+-- | range 0 to 59, inclusive. The `toEnum` function can be used to safely
46+-- | acquire an `Minute` value from an integer. Correspondingly, a `Minute` can
47+-- | be lowered to a plain integer with the `fromEnum` function.
48+newtype Minute = Minute Int
49+
50+derive newtype instance eqMinute :: Eq Minute
51+derive newtype instance ordMinute :: Ord Minute
52+
53+instance boundedMinute :: Bounded Minute where
54+ bottom = Minute 0
55+ top = Minute 59
56+
57+instance enumMinute :: Enum Minute where
58+ succ = toEnum <<< (_ + 1) <<< fromEnum
59+ pred = toEnum <<< (_ - 1) <<< fromEnum
60+
61+instance boundedEnumMinute :: BoundedEnum Minute where
62+ cardinality = Cardinality 60
63+ toEnum n
64+ | n >= 0 && n <= 59 = Just (Minute n)
65+ | otherwise = Nothing
66+ fromEnum (Minute n) = n
67+
68+instance showMinute :: Show Minute where
69+ show (Minute m) = "(Minute " <> show m <> ")"
70+
71+-- | An second component for a time value.
72+-- |
73+-- | The constructor is private as values for the type are restricted to the
74+-- | range 0 to 59, inclusive. The `toEnum` function can be used to safely
75+-- | acquire an `Second` value from an integer. Correspondingly, a `Second` can
76+-- | be lowered to a plain integer with the `fromEnum` function.
77+newtype Second = Second Int
78+
79+derive newtype instance eqSecond :: Eq Second
80+derive newtype instance ordSecond :: Ord Second
81+
82+instance boundedSecond :: Bounded Second where
83+ bottom = Second 0
84+ top = Second 59
85+
86+instance enumSecond :: Enum Second where
87+ succ = toEnum <<< (_ + 1) <<< fromEnum
88+ pred = toEnum <<< (_ - 1) <<< fromEnum
89+
90+instance boundedEnumSecond :: BoundedEnum Second where
91+ cardinality = Cardinality 60
92+ toEnum n
93+ | n >= 0 && n <= 59 = Just (Second n)
94+ | otherwise = Nothing
95+ fromEnum (Second n) = n
96+
97+instance showSecond :: Show Second where
98+ show (Second m) = "(Second " <> show m <> ")"
99+
100+-- | An millisecond component for a time value.
101+-- |
102+-- | The constructor is private as values for the type are restricted to the
103+-- | range 0 to 999, inclusive. The `toEnum` function can be used to safely
104+-- | acquire an `Millisecond` value from an integer. Correspondingly, a
105+-- | `Millisecond` can be lowered to a plain integer with the `fromEnum`
106+-- | function.
107+newtype Millisecond = Millisecond Int
108+
109+derive newtype instance eqMillisecond :: Eq Millisecond
110+derive newtype instance ordMillisecond :: Ord Millisecond
111+
112+instance boundedMillisecond :: Bounded Millisecond where
113+ bottom = Millisecond 0
114+ top = Millisecond 999
115+
116+instance enumMillisecond :: Enum Millisecond where
117+ succ = toEnum <<< (_ + 1) <<< fromEnum
118+ pred = toEnum <<< (_ - 1) <<< fromEnum
119+
120+instance boundedEnumMillisecond :: BoundedEnum Millisecond where
121+ cardinality = Cardinality 1000
122+ toEnum n
123+ | n >= 0 && n <= 999 = Just (Millisecond n)
124+ | otherwise = Nothing
125+ fromEnum (Millisecond n) = n
126+
127+instance showMillisecond :: Show Millisecond where
128+ show (Millisecond m) = "(Millisecond " <> show m <> ")"
.spago/p/datetime-6.1.0/src/Data/Time/Component/Gen.pursnew file+21
@@ -0,0 +1,21 @@
1+module Data.Time.Component.Gen where
2+
3+import Control.Monad.Gen (class MonadGen)
4+import Data.Enum.Gen (genBoundedEnum)
5+import Data.Time.Component (Hour, Millisecond, Minute, Second)
6+
7+-- | Generates a random `Hour` component.
8+genHour :: forall m. MonadGen m => m Hour
9+genHour = genBoundedEnum
10+
11+-- | Generates a random `Minute` component.
12+genMinute :: forall m. MonadGen m => m Minute
13+genMinute = genBoundedEnum
14+
15+-- | Generates a random `Second` component.
16+genSecond :: forall m. MonadGen m => m Second
17+genSecond = genBoundedEnum
18+
19+-- | Generates a random `Millisecond` component.
20+genMillisecond :: forall m. MonadGen m => m Millisecond
21+genMillisecond = genBoundedEnum
.spago/p/datetime-6.1.0/src/Data/Time/Duration.pursnew file+119
@@ -0,0 +1,119 @@
1+module Data.Time.Duration where
2+
3+import Prelude
4+
5+import Data.Newtype (class Newtype, over)
6+
7+-- | A duration measured in milliseconds.
8+newtype Milliseconds = Milliseconds Number
9+
10+derive instance newtypeMilliseconds :: Newtype Milliseconds _
11+derive newtype instance eqMilliseconds :: Eq Milliseconds
12+derive newtype instance ordMilliseconds :: Ord Milliseconds
13+
14+instance semigroupMilliseconds :: Semigroup Milliseconds where
15+ append (Milliseconds x) (Milliseconds y) = Milliseconds (x + y)
16+
17+instance monoidMilliseconds :: Monoid Milliseconds where
18+ mempty = Milliseconds 0.0
19+
20+instance showMilliseconds :: Show Milliseconds where
21+ show (Milliseconds n) = "(Milliseconds " <> show n <> ")"
22+
23+-- | A duration measured in seconds.
24+newtype Seconds = Seconds Number
25+
26+derive instance newtypeSeconds :: Newtype Seconds _
27+derive newtype instance eqSeconds :: Eq Seconds
28+derive newtype instance ordSeconds :: Ord Seconds
29+
30+instance semigroupSeconds :: Semigroup Seconds where
31+ append (Seconds x) (Seconds y) = Seconds (x + y)
32+
33+instance monoidSeconds :: Monoid Seconds where
34+ mempty = Seconds 0.0
35+
36+instance showSeconds :: Show Seconds where
37+ show (Seconds n) = "(Seconds " <> show n <> ")"
38+
39+-- | A duration measured in minutes.
40+newtype Minutes = Minutes Number
41+
42+derive instance newtypeMinutes :: Newtype Minutes _
43+derive newtype instance eqMinutes :: Eq Minutes
44+derive newtype instance ordMinutes :: Ord Minutes
45+
46+instance semigroupMinutes :: Semigroup Minutes where
47+ append (Minutes x) (Minutes y) = Minutes (x + y)
48+
49+instance monoidMinutes :: Monoid Minutes where
50+ mempty = Minutes 0.0
51+
52+instance showMinutes :: Show Minutes where
53+ show (Minutes n) = "(Minutes " <> show n <> ")"
54+
55+-- | A duration measured in hours.
56+newtype Hours = Hours Number
57+
58+derive instance newtypeHours :: Newtype Hours _
59+derive newtype instance eqHours :: Eq Hours
60+derive newtype instance ordHours :: Ord Hours
61+
62+instance semigroupHours :: Semigroup Hours where
63+ append (Hours x) (Hours y) = Hours (x + y)
64+
65+instance monoidHours :: Monoid Hours where
66+ mempty = Hours 0.0
67+
68+instance showHours :: Show Hours where
69+ show (Hours n) = "(Hours " <> show n <> ")"
70+
71+-- | A duration measured in days, where a day is assumed to be exactly 24 hours.
72+newtype Days = Days Number
73+
74+derive instance newtypeDays :: Newtype Days _
75+derive newtype instance eqDays :: Eq Days
76+derive newtype instance ordDays :: Ord Days
77+
78+instance semigroupDays :: Semigroup Days where
79+ append (Days x) (Days y) = Days (x + y)
80+
81+instance monoidDays :: Monoid Days where
82+ mempty = Days 0.0
83+
84+instance showDays :: Show Days where
85+ show (Days n) = "(Days " <> show n <> ")"
86+
87+-- | A class for enabling conversions between duration types.
88+class Duration a where
89+ fromDuration :: a -> Milliseconds
90+ toDuration :: Milliseconds -> a
91+
92+-- | Converts directly between durations of differing types.
93+convertDuration :: forall a b. Duration a => Duration b => a -> b
94+convertDuration = toDuration <<< fromDuration
95+
96+-- | Negates a duration, turning a positive duration negative or a negative
97+-- | duration positive.
98+negateDuration :: forall a. Duration a => a -> a
99+negateDuration = toDuration <<< over Milliseconds negate <<< fromDuration
100+
101+instance durationMilliseconds :: Duration Milliseconds where
102+ fromDuration = identity
103+ toDuration = identity
104+
105+instance durationSeconds :: Duration Seconds where
106+ fromDuration = over Seconds (_ * 1000.0)
107+ toDuration = over Milliseconds (_ / 1000.0)
108+
109+instance durationMinutes :: Duration Minutes where
110+ fromDuration = over Minutes (_ * 60000.0)
111+ toDuration = over Milliseconds (_ / 60000.0)
112+
113+instance durationHours :: Duration Hours where
114+ fromDuration = over Hours (_ * 3600000.0)
115+ toDuration = over Milliseconds (_ / 3600000.0)
116+
117+instance durationDays :: Duration Days where
118+ fromDuration = over Days (_ * 86400000.0)
119+ toDuration = over Milliseconds (_ / 86400000.0)
.spago/p/datetime-6.1.0/src/Data/Time/Duration/Gen.pursnew file+27
@@ -0,0 +1,27 @@
1+module Data.Time.Duration.Gen where
2+
3+import Prelude
4+
5+import Control.Monad.Gen (class MonadGen)
6+import Control.Monad.Gen as Gen
7+import Data.Time.Duration (Days(..), Hours(..), Milliseconds(..), Minutes(..), Seconds(..))
8+
9+-- | Generates a random `Milliseconds` duration, up to 10 minutes.
10+genMilliseconds :: forall m. MonadGen m => m Milliseconds
11+genMilliseconds = Milliseconds <$> Gen.chooseFloat 0.0 600000.0
12+
13+-- | Generates a random `Seconds` duration, up to 10 minutes.
14+genSeconds :: forall m. MonadGen m => m Seconds
15+genSeconds = Seconds <$> Gen.chooseFloat 0.0 600.0
16+
17+-- | Generates a random `Seconds` duration, up to 10 hours.
18+genMinutes :: forall m. MonadGen m => m Minutes
19+genMinutes = Minutes <$> Gen.chooseFloat 0.0 600.0
20+
21+-- | Generates a random `Hours` duration, up to 10 days.
22+genHours :: forall m. MonadGen m => m Hours
23+genHours = Hours <$> Gen.chooseFloat 0.0 240.0
24+
25+-- | Generates a random `Days` duration, up to 6 weeks.
26+genDays :: forall m. MonadGen m => m Days
27+genDays = Days <$> Gen.chooseFloat 0.0 42.0
.spago/p/datetime-6.1.0/src/Data/Time/Gen.pursnew file+13
@@ -0,0 +1,13 @@
1+module Data.Time.Gen
2+ ( genTime
3+ , module Data.Time.Component.Gen
4+ ) where
5+
6+import Prelude
7+import Control.Monad.Gen (class MonadGen)
8+import Data.Time (Time(..))
9+import Data.Time.Component.Gen (genHour, genMillisecond, genMinute, genSecond)
10+
11+-- | Generates a random `Time` between 00:00:00 and 23:59:59, inclusive.
12+genTime :: forall m. MonadGen m => m Time
13+genTime = Time <$> genHour <*> genMinute <*> genSecond <*> genMillisecond
.spago/p/distributive-6.0.0/LICENSEnew file+26
@@ -0,0 +1,26 @@
1+Copyright 2018 PureScript
2+
3+Redistribution and use in source and binary forms, with or without modification,
4+are permitted provided that the following conditions are met:
5+
6+1. Redistributions of source code must retain the above copyright notice, this
7+list of conditions and the following disclaimer.
8+
9+2. Redistributions in binary form must reproduce the above copyright notice,
10+this list of conditions and the following disclaimer in the documentation and/or
11+other materials provided with the distribution.
12+
13+3. Neither the name of the copyright holder nor the names of its contributors
14+may be used to endorse or promote products derived from this software without
15+specific prior written permission.
16+
17+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
21+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.spago/p/distributive-6.0.0/README.mdnew file+17
@@ -0,0 +1,17 @@
1+# purescript-distributive
2+
3+[](https://github.com/purescript/purescript-distributive/releases)
4+[](https://github.com/purescript/purescript-distributive/actions?query=workflow%3ACI+branch%3Amaster)
5+[](https://pursuit.purescript.org/packages/purescript-distributive)
6+
7+Distributive typeclass - the categorical dual of `Traversable`.
8+
9+## Installation
10+
11+```
12+spago install distributive
13+```
14+
15+## Documentation
16+
17+Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-distributive).
.spago/p/distributive-6.0.0/bower.jsonnew file+30
@@ -0,0 +1,30 @@
1+{
2+ "name": "purescript-distributive",
3+ "homepage": "https://github.com/purescript/purescript-distributive",
4+ "authors": [
5+ "Hardy Jones <jones3.hardy@gmail.com> (https://github.com/joneshf)",
6+ "John A. De Goes <john@degoes.net> (http://degoes.net)",
7+ "Sean Chalmers <sclhiannan@gmail.com>"
8+ ],
9+ "license": "BSD-3-Clause",
10+ "repository": {
11+ "type": "git",
12+ "url": "https://github.com/purescript/purescript-distributive.git"
13+ },
14+ "ignore": [
15+ "**/.*",
16+ "bower_components",
17+ "node_modules",
18+ "output",
19+ "test",
20+ "bower.json",
21+ "package.json"
22+ ],
23+ "dependencies": {
24+ "purescript-identity": "^6.0.0",
25+ "purescript-newtype": "^5.0.0",
26+ "purescript-prelude": "^6.0.0",
27+ "purescript-tuples": "^7.0.0",
28+ "purescript-type-equality": "^4.0.1"
29+ }
30+}
.spago/p/distributive-6.0.0/package.jsonnew file+12
@@ -0,0 +1,12 @@
1+{
2+ "private": true,
3+ "scripts": {
4+ "clean": "rimraf output && rimraf .pulp-cache",
5+ "build": "pulp build -- --censor-lib --strict"
6+ },
7+ "devDependencies": {
8+ "pulp": "16.0.0-0",
9+ "purescript-psa": "^0.8.2",
10+ "rimraf": "^3.0.2"
11+ }
12+}
.spago/p/distributive-6.0.0/purs.jsonnew file+17
@@ -0,0 +1,17 @@
1+{
2+ "name": "distributive",
3+ "version": "6.0.0",
4+ "license": "BSD-3-Clause",
5+ "location": {
6+ "githubOwner": "purescript",
7+ "githubRepo": "purescript-distributive"
8+ },
9+ "ref": "v6.0.0",
10+ "dependencies": {
11+ "identity": ">=6.0.0 <7.0.0",
12+ "newtype": ">=5.0.0 <6.0.0",
13+ "prelude": ">=6.0.0 <7.0.0",
14+ "tuples": ">=7.0.0 <8.0.0",
15+ "type-equality": ">=4.0.1 <5.0.0"
16+ }
17+}
.spago/p/distributive-6.0.0/src/Data/Distributive.pursnew file+67
@@ -0,0 +1,67 @@
1+module Data.Distributive where
2+
3+import Prelude
4+
5+import Data.Identity (Identity(..))
6+import Data.Newtype (unwrap)
7+import Data.Tuple (Tuple(..), snd)
8+import Type.Equality (class TypeEquals, from)
9+
10+-- | Categorical dual of `Traversable`:
11+-- |
12+-- | - `distribute` is the dual of `sequence` - it zips an arbitrary collection
13+-- | of containers.
14+-- | - `collect` is the dual of `traverse` - it traverses an arbitrary
15+-- | collection of values.
16+-- |
17+-- | Laws:
18+-- |
19+-- | - `distribute = collect identity`
20+-- | - `distribute <<< distribute = identity`
21+-- | - `collect f = distribute <<< map f`
22+-- | - `map f = unwrap <<< collect (Identity <<< f)`
23+-- | - `map distribute <<< collect f = unwrap <<< collect (Compose <<< f)`
24+class Functor f <= Distributive f where
25+ distribute :: forall a g. Functor g => g (f a) -> f (g a)
26+ collect :: forall a b g. Functor g => (a -> f b) -> g a -> f (g b)
27+
28+instance distributiveIdentity :: Distributive Identity where
29+ distribute = Identity <<< map unwrap
30+ collect f = Identity <<< map (unwrap <<< f)
31+
32+instance distributiveFunction :: Distributive ((->) e) where
33+ distribute a e = map (_ $ e) a
34+ collect f = distribute <<< map f
35+
36+instance distributiveTuple :: TypeEquals a Unit => Distributive (Tuple a) where
37+ collect = collectDefault
38+ distribute = Tuple (from unit) <<< map snd
39+
40+-- | A default implementation of `distribute`, based on `collect`.
41+distributeDefault
42+ :: forall a f g
43+ . Distributive f
44+ => Functor g
45+ => g (f a)
46+ -> f (g a)
47+distributeDefault = collect identity
48+
49+-- | A default implementation of `collect`, based on `distribute`.
50+collectDefault
51+ :: forall a b f g
52+ . Distributive f
53+ => Functor g
54+ => (a -> f b)
55+ -> g a
56+ -> f (g b)
57+collectDefault f = distribute <<< map f
58+
59+-- | Zip an arbitrary collection of containers and summarize the results
60+cotraverse
61+ :: forall a b f g
62+ . Distributive f
63+ => Functor g
64+ => (g a -> b)
65+ -> g (f a)
66+ -> f b
67+cotraverse f = map f <<< distribute
.spago/p/effect-4.0.0/LICENSEnew file+26
@@ -0,0 +1,26 @@
1+Copyright 2018 PureScript
2+
3+Redistribution and use in source and binary forms, with or without modification,
4+are permitted provided that the following conditions are met:
5+
6+1. Redistributions of source code must retain the above copyright notice, this
7+list of conditions and the following disclaimer.
8+
9+2. Redistributions in binary form must reproduce the above copyright notice,
10+this list of conditions and the following disclaimer in the documentation and/or
11+other materials provided with the distribution.
12+
13+3. Neither the name of the copyright holder nor the names of its contributors
14+may be used to endorse or promote products derived from this software without
15+specific prior written permission.
16+
17+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
21+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.spago/p/effect-4.0.0/README.mdnew file+173
@@ -0,0 +1,173 @@
1+# purescript-effect
2+
3+[](https://github.com/purescript/purescript-effect/releases)
4+[](https://github.com/purescript/purescript-effect/actions?query=workflow%3ACI+branch%3Amaster)
5+[](https://pursuit.purescript.org/packages/purescript-effect)
6+
7+The `Effect` monad, for handling native side effects.
8+
9+## Installation
10+
11+```
12+spago install effect
13+```
14+
15+## Documentation
16+
17+Values in PureScript do not have side-effects by default. This package provides
18+the standard type PureScript uses to handle "native" effects, i.e. effects
19+which are provided by the runtime system, and which cannot be emulated by pure
20+functions. Some examples of native effects are:
21+
22+- Console IO
23+- Random number generation
24+- Exceptions
25+- Reading/writing mutable state
26+
27+And in the browser:
28+
29+- DOM manipulation
30+- XMLHttpRequest / AJAX calls
31+- Interacting with a websocket
32+- Writing/reading to/from local storage
33+
34+All of these things may be represented in PureScript by the `Effect` type.
35+A value of the type `Effect a` represents a computation which may perform
36+some native effects, and which produces a value of the type `a` once it
37+finishes. For example, the module `Effect.Random` from `purescript-random`
38+exports a value `random`, whose type is `Effect Number`. When run, this
39+effect produces a random number between 0 and 1. To give another example,
40+the module `Effect.Console` exports a function `log`, whose type is
41+`String -> Effect Unit`. This function takes a string and produces an
42+effect which, when run, prints the provided string to the console.
43+
44+```purescript
45+module RandomExample where
46+import Prelude
47+import Effect (Effect)
48+import Effect.Random (random)
49+import Effect.Console (log)
50+
51+printRandom :: Effect Unit
52+printRandom = do
53+ n <- random
54+ log (show n)
55+```
56+
57+In this example, `printRandom` is an effect which generates a random
58+number between 0 and 1 and prints it to the console. You can test it out
59+in the repl:
60+
61+```
62+> import RandomExample
63+> printRandom
64+0.71831842260513870
65+unit
66+```
67+
68+The `unit` is there because all effects must produce a value. When there
69+is nothing useful to return, we usually use the type `Unit`, which has
70+just one value: `unit`.
71+
72+### Effects and Purity
73+
74+Note that using `Effect` does not compromise the purity of your program.
75+Functions which make use of `Effect` are still pure, in the sense that
76+all functions will return the same outputs given the same inputs.
77+
78+This is enabled by having the `Effect` type denote _values_ which can be
79+run to produce native effects; an `Effect a` is a computation which has
80+not yet necessarily been performed. In fact, there is no way of "running"
81+an `Effect` manually; we cannot provide a (safe) function of the type
82+`forall a. Effect a -> a`, because such a function would violate purity;
83+it could produce different outputs given the same input. (Note that there
84+is actually such a function in the module `Effect.Unsafe`, but it is best
85+avoided outside of exceptional circumstances.)
86+
87+Instead, the recommended way of "running" an effect is to include it as
88+part of your program's `main` value.
89+
90+A consequence of being able to represent native effects purely using
91+`Effect` is that you can construct and pass `Effect` values around your
92+programs freely. For example, we can write functions which can decide
93+whether to run a given effect just once, many times, or not at all:
94+
95+```purescript
96+-- | Runs an effect three times, provided that the given condition is
97+-- | true.
98+thriceIf :: Boolean -> Effect Unit -> Effect Unit
99+thriceIf cond effect =
100+ if cond
101+ then do
102+ effect
103+ effect
104+ effect
105+ else
106+ pure unit
107+```
108+
109+### Using Effects via the Foreign Function Interface
110+
111+A computation of type `Effect a` is implemented in JavaScript as a
112+zero-argument function whose body is expected to perform its side-effects
113+before finally returning its result. For example, suppose we wanted a
114+computation which would increment a global counter and return the new
115+result each time it was run. We can implement this as follows:
116+
117+```purescript
118+-- Counter.purs
119+foreign import incrCounter :: Effect Int
120+```
121+
122+and in the corresponding JavaScript module:
123+
124+```javascript
125+// Counter.js
126+exports.incrCounter = function () {
127+ if (!window.globalCounter) {
128+ window.globalCounter = 0;
129+ }
130+ return ++window.globalCounter;
131+};
132+```
133+
134+For more information about the FFI (Foreign Function Interface), see
135+the [documentation repository](https://github.com/purescript/documentation).
136+This package also provides a module
137+[Effect.Uncurried](https://pursuit.purescript.org/packages/purescript-effect/docs/Effect.Uncurried)
138+to simplify the process of making uncurried effectful JavaScript functions
139+available to PureScript via the FFI.
140+
141+### The Effect type is Magic
142+
143+The PureScript compiler has special support for the `Effect` monad.
144+Ordinarily, a chain of monadic binds might result in poor performance when
145+executed. However, the compiler can generate code for the `Effect` monad
146+without explicit calls to the monadic bind function `>>=`.
147+
148+Take the random number generation example from above. When compiled, the
149+compiler produces the following JavaScript:
150+
151+```javascript
152+var printRandom = function __do() {
153+ var $0 = Effect_Random.random();
154+ return Effect_Console.log(Data_Show.show(Data_Show.showNumber)($0))();
155+};
156+```
157+
158+whereas a more naive compiler might, for instance, produce:
159+
160+```javascript
161+var printRandom = Control_Bind.bind(Effect.bindEffect)(Effect_Random.random)(
162+ function ($0) {
163+ return Effect_Console.log(Data_Show.show(Data_Show.showNumber)($0));
164+ }
165+);
166+```
167+
168+While this is a small improvement, the benefit is greater when using
169+multiple nested calls to `>>=`.
170+
171+### API reference
172+
173+Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-effect).
.spago/p/effect-4.0.0/bower.jsonnew file+21
@@ -0,0 +1,21 @@
1+{
2+ "name": "purescript-effect",
3+ "homepage": "https://github.com/purescript/purescript-effect",
4+ "license": "BSD-3-Clause",
5+ "repository": {
6+ "type": "git",
7+ "url": "https://github.com/purescript/purescript-effect.git"
8+ },
9+ "ignore": [
10+ "**/.*",
11+ "bower_components",
12+ "node_modules",
13+ "output",
14+ "test",
15+ "bower.json",
16+ "package.json"
17+ ],
18+ "dependencies": {
19+ "purescript-prelude": "^6.0.0"
20+ }
21+}
.spago/p/effect-4.0.0/package.jsonnew file+13
@@ -0,0 +1,13 @@
1+{
2+ "private": true,
3+ "scripts": {
4+ "clean": "rimraf output && rimraf .pulp-cache",
5+ "build": "eslint src && pulp build -- --censor-lib --strict"
6+ },
7+ "devDependencies": {
8+ "eslint": "^7.15.0",
9+ "pulp": "16.0.0-0",
10+ "purescript-psa": "^0.8.2",
11+ "rimraf": "^3.0.2"
12+ }
13+}
.spago/p/effect-4.0.0/purs.jsonnew file+13
@@ -0,0 +1,13 @@
1+{
2+ "name": "effect",
3+ "version": "4.0.0",
4+ "license": "BSD-3-Clause",
5+ "location": {
6+ "githubOwner": "purescript",
7+ "githubRepo": "purescript-effect"
8+ },
9+ "ref": "v4.0.0",
10+ "dependencies": {
11+ "prelude": ">=6.0.0 <7.0.0"
12+ }
13+}
.spago/p/effect-4.0.0/src/Effect.jsnew file+51
@@ -0,0 +1,51 @@
1+export const pureE = function (a) {
2+ return function () {
3+ return a;
4+ };
5+};
6+
7+export const bindE = function (a) {
8+ return function (f) {
9+ return function () {
10+ return f(a())();
11+ };
12+ };
13+};
14+
15+export const untilE = function (f) {
16+ return function () {
17+ while (!f());
18+ };
19+};
20+
21+export const whileE = function (f) {
22+ return function (a) {
23+ return function () {
24+ while (f()) {
25+ a();
26+ }
27+ };
28+ };
29+};
30+
31+export const forE = function (lo) {
32+ return function (hi) {
33+ return function (f) {
34+ return function () {
35+ for (var i = lo; i < hi; i++) {
36+ f(i)();
37+ }
38+ };
39+ };
40+ };
41+};
42+
43+export const foreachE = function (as) {
44+ return function (f) {
45+ return function () {
46+ for (var i = 0, l = as.length; i < l; i++) {
47+ f(as[i])();
48+ }
49+ };
50+ };
51+};
.spago/p/effect-4.0.0/src/Effect.pursnew file+72
@@ -0,0 +1,72 @@
1+-- | This module provides the `Effect` type, which is used to represent
2+-- | _native_ effects. The `Effect` type provides a typed API for effectful
3+-- | computations, while at the same time generating efficient JavaScript.
4+module Effect
5+ ( Effect
6+ , untilE, whileE, forE, foreachE
7+ ) where
8+
9+import Prelude
10+
11+import Control.Apply (lift2)
12+
13+-- | A native effect. The type parameter denotes the return type of running the
14+-- | effect, that is, an `Effect Int` is a possibly-effectful computation which
15+-- | eventually produces a value of the type `Int` when it finishes.
16+foreign import data Effect :: Type -> Type
17+
18+type role Effect representational
19+
20+instance functorEffect :: Functor Effect where
21+ map = liftA1
22+
23+instance applyEffect :: Apply Effect where
24+ apply = ap
25+
26+instance applicativeEffect :: Applicative Effect where
27+ pure = pureE
28+
29+foreign import pureE :: forall a. a -> Effect a
30+
31+instance bindEffect :: Bind Effect where
32+ bind = bindE
33+
34+foreign import bindE :: forall a b. Effect a -> (a -> Effect b) -> Effect b
35+
36+instance monadEffect :: Monad Effect
37+
38+-- | The `Semigroup` instance for effects allows you to run two effects, one
39+-- | after the other, and then combine their results using the result type's
40+-- | `Semigroup` instance.
41+instance semigroupEffect :: Semigroup a => Semigroup (Effect a) where
42+ append = lift2 append
43+
44+-- | If you have a `Monoid a` instance, then `mempty :: Effect a` is defined as
45+-- | `pure mempty`.
46+instance monoidEffect :: Monoid a => Monoid (Effect a) where
47+ mempty = pureE mempty
48+
49+-- | Loop until a condition becomes `true`.
50+-- |
51+-- | `untilE b` is an effectful computation which repeatedly runs the effectful
52+-- | computation `b`, until its return value is `true`.
53+foreign import untilE :: Effect Boolean -> Effect Unit
54+
55+-- | Loop while a condition is `true`.
56+-- |
57+-- | `whileE b m` is effectful computation which runs the effectful computation
58+-- | `b`. If its result is `true`, it runs the effectful computation `m` and
59+-- | loops. If not, the computation ends.
60+foreign import whileE :: forall a. Effect Boolean -> Effect a -> Effect Unit
61+
62+-- | Loop over a consecutive collection of numbers.
63+-- |
64+-- | `forE lo hi f` runs the computation returned by the function `f` for each
65+-- | of the inputs between `lo` (inclusive) and `hi` (exclusive).
66+foreign import forE :: Int -> Int -> (Int -> Effect Unit) -> Effect Unit
67+
68+-- | Loop over an array of values.
69+-- |
70+-- | `foreachE xs f` runs the computation returned by the function `f` for each
71+-- | of the inputs `xs`.
72+foreign import foreachE :: forall a. Array a -> (a -> Effect Unit) -> Effect Unit
.spago/p/effect-4.0.0/src/Effect/Class.pursnew file+19
@@ -0,0 +1,19 @@
1+module Effect.Class where
2+
3+import Control.Category (identity)
4+import Control.Monad (class Monad)
5+import Effect (Effect)
6+
7+-- | The `MonadEffect` class captures those monads which support native effects.
8+-- |
9+-- | Instances are provided for `Effect` itself, and the standard monad
10+-- | transformers.
11+-- |
12+-- | `liftEffect` can be used in any appropriate monad transformer stack to lift an
13+-- | action of type `Effect a` into the monad.
14+-- |
15+class Monad m <= MonadEffect m where
16+ liftEffect :: forall a. Effect a -> m a
17+
18+instance monadEffectEffect :: MonadEffect Effect where
19+ liftEffect = identity
.spago/p/effect-4.0.0/src/Effect/Uncurried.jsnew file+229
@@ -0,0 +1,229 @@
1+export const mkEffectFn1 = function mkEffectFn1(fn) {
2+ return function(x) {
3+ return fn(x)();
4+ };
5+};
6+
7+export const mkEffectFn2 = function mkEffectFn2(fn) {
8+ return function(a, b) {
9+ return fn(a)(b)();
10+ };
11+};
12+
13+export const mkEffectFn3 = function mkEffectFn3(fn) {
14+ return function(a, b, c) {
15+ return fn(a)(b)(c)();
16+ };
17+};
18+
19+export const mkEffectFn4 = function mkEffectFn4(fn) {
20+ return function(a, b, c, d) {
21+ return fn(a)(b)(c)(d)();
22+ };
23+};
24+
25+export const mkEffectFn5 = function mkEffectFn5(fn) {
26+ return function(a, b, c, d, e) {
27+ return fn(a)(b)(c)(d)(e)();
28+ };
29+};
30+
31+export const mkEffectFn6 = function mkEffectFn6(fn) {
32+ return function(a, b, c, d, e, f) {
33+ return fn(a)(b)(c)(d)(e)(f)();
34+ };
35+};
36+
37+export const mkEffectFn7 = function mkEffectFn7(fn) {
38+ return function(a, b, c, d, e, f, g) {
39+ return fn(a)(b)(c)(d)(e)(f)(g)();
40+ };
41+};
42+
43+export const mkEffectFn8 = function mkEffectFn8(fn) {
44+ return function(a, b, c, d, e, f, g, h) {
45+ return fn(a)(b)(c)(d)(e)(f)(g)(h)();
46+ };
47+};
48+
49+export const mkEffectFn9 = function mkEffectFn9(fn) {
50+ return function(a, b, c, d, e, f, g, h, i) {
51+ return fn(a)(b)(c)(d)(e)(f)(g)(h)(i)();
52+ };
53+};
54+
55+export const mkEffectFn10 = function mkEffectFn10(fn) {
56+ return function(a, b, c, d, e, f, g, h, i, j) {
57+ return fn(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)();
58+ };
59+};
60+
61+export const runEffectFn1 = function runEffectFn1(fn) {
62+ return function(a) {
63+ return function() {
64+ return fn(a);
65+ };
66+ };
67+};
68+
69+export const runEffectFn2 = function runEffectFn2(fn) {
70+ return function(a) {
71+ return function(b) {
72+ return function() {
73+ return fn(a, b);
74+ };
75+ };
76+ };
77+};
78+
79+export const runEffectFn3 = function runEffectFn3(fn) {
80+ return function(a) {
81+ return function(b) {
82+ return function(c) {
83+ return function() {
84+ return fn(a, b, c);
85+ };
86+ };
87+ };
88+ };
89+};
90+
91+export const runEffectFn4 = function runEffectFn4(fn) {
92+ return function(a) {
93+ return function(b) {
94+ return function(c) {
95+ return function(d) {
96+ return function() {
97+ return fn(a, b, c, d);
98+ };
99+ };
100+ };
101+ };
102+ };
103+};
104+
105+export const runEffectFn5 = function runEffectFn5(fn) {
106+ return function(a) {
107+ return function(b) {
108+ return function(c) {
109+ return function(d) {
110+ return function(e) {
111+ return function() {
112+ return fn(a, b, c, d, e);
113+ };
114+ };
115+ };
116+ };
117+ };
118+ };
119+};
120+
121+export const runEffectFn6 = function runEffectFn6(fn) {
122+ return function(a) {
123+ return function(b) {
124+ return function(c) {
125+ return function(d) {
126+ return function(e) {
127+ return function(f) {
128+ return function() {
129+ return fn(a, b, c, d, e, f);
130+ };
131+ };
132+ };
133+ };
134+ };
135+ };
136+ };
137+};
138+
139+export const runEffectFn7 = function runEffectFn7(fn) {
140+ return function(a) {
141+ return function(b) {
142+ return function(c) {
143+ return function(d) {
144+ return function(e) {
145+ return function(f) {
146+ return function(g) {
147+ return function() {
148+ return fn(a, b, c, d, e, f, g);
149+ };
150+ };
151+ };
152+ };
153+ };
154+ };
155+ };
156+ };
157+};
158+
159+export const runEffectFn8 = function runEffectFn8(fn) {
160+ return function(a) {
161+ return function(b) {
162+ return function(c) {
163+ return function(d) {
164+ return function(e) {
165+ return function(f) {
166+ return function(g) {
167+ return function(h) {
168+ return function() {
169+ return fn(a, b, c, d, e, f, g, h);
170+ };
171+ };
172+ };
173+ };
174+ };
175+ };
176+ };
177+ };
178+ };
179+};
180+
181+export const runEffectFn9 = function runEffectFn9(fn) {
182+ return function(a) {
183+ return function(b) {
184+ return function(c) {
185+ return function(d) {
186+ return function(e) {
187+ return function(f) {
188+ return function(g) {
189+ return function(h) {
190+ return function(i) {
191+ return function() {
192+ return fn(a, b, c, d, e, f, g, h, i);
193+ };
194+ };
195+ };
196+ };
197+ };
198+ };
199+ };
200+ };
201+ };
202+ };
203+};
204+
205+export const runEffectFn10 = function runEffectFn10(fn) {
206+ return function(a) {
207+ return function(b) {
208+ return function(c) {
209+ return function(d) {
210+ return function(e) {
211+ return function(f) {
212+ return function(g) {
213+ return function(h) {
214+ return function(i) {
215+ return function(j) {
216+ return function() {
217+ return fn(a, b, c, d, e, f, g, h, i, j);
218+ };
219+ };
220+ };
221+ };
222+ };
223+ };
224+ };
225+ };
226+ };
227+ };
228+ };
229+};
.spago/p/effect-4.0.0/src/Effect/Uncurried.pursnew file+286
@@ -0,0 +1,286 @@
1+-- | This module defines types for effectful uncurried functions, as well as
2+-- | functions for converting back and forth between them.
3+-- |
4+-- | This makes it possible to give a PureScript type to JavaScript functions
5+-- | such as this one:
6+-- |
7+-- | ```javascript
8+-- | function logMessage(level, message) {
9+-- | console.log(level + ": " + message);
10+-- | }
11+-- | ```
12+-- |
13+-- | In particular, note that `logMessage` performs effects immediately after
14+-- | receiving all of its parameters, so giving it the type `Data.Function.Fn2
15+-- | String String Unit`, while convenient, would effectively be a lie.
16+-- |
17+-- | One way to handle this would be to convert the function into the normal
18+-- | PureScript form (namely, a curried function returning an Effect action),
19+-- | and performing the marshalling in JavaScript, in the FFI module, like this:
20+-- |
21+-- | ```purescript
22+-- | -- In the PureScript file:
23+-- | foreign import logMessage :: String -> String -> Effect Unit
24+-- | ```
25+-- |
26+-- | ```javascript
27+-- | // In the FFI file:
28+-- | exports.logMessage = function(level) {
29+-- | return function(message) {
30+-- | return function() {
31+-- | logMessage(level, message);
32+-- | };
33+-- | };
34+-- | };
35+-- | ```
36+-- |
37+-- | This method, unfortunately, turns out to be both tiresome and error-prone.
38+-- | This module offers an alternative solution. By providing you with:
39+-- |
40+-- | * the ability to give the real `logMessage` function a PureScript type,
41+-- | and
42+-- | * functions for converting between this form and the normal PureScript
43+-- | form,
44+-- |
45+-- | the FFI boilerplate is no longer needed. The previous example becomes:
46+-- |
47+-- | ```purescript
48+-- | -- In the PureScript file:
49+-- | foreign import logMessageImpl :: EffectFn2 String String Unit
50+-- | ```
51+-- |
52+-- | ```javascript
53+-- | // In the FFI file:
54+-- | exports.logMessageImpl = logMessage
55+-- | ```
56+-- |
57+-- | You can then use `runEffectFn2` to provide a nicer version:
58+-- |
59+-- | ```purescript
60+-- | logMessage :: String -> String -> Effect Unit
61+-- | logMessage = runEffectFn2 logMessageImpl
62+-- | ```
63+-- |
64+-- | (note that this has the same type as the original `logMessage`).
65+-- |
66+-- | Effectively, we have reduced the risk of errors by moving as much code into
67+-- | PureScript as possible, so that we can leverage the type system. Hopefully,
68+-- | this is a little less tiresome too.
69+-- |
70+-- | Here's a slightly more advanced example. Here, because we are using
71+-- | callbacks, we need to use `mkEffectFn{N}` as well.
72+-- |
73+-- | Suppose our `logMessage` changes so that it sometimes sends details of the
74+-- | message to some external server, and in those cases, we want the resulting
75+-- | `HttpResponse` (for whatever reason).
76+-- |
77+-- | ```javascript
78+-- | function logMessage(level, message, callback) {
79+-- | console.log(level + ": " + message);
80+-- | if (level > LogLevel.WARN) {
81+-- | LogAggregatorService.post("/logs", {
82+-- | level: level,
83+-- | message: message
84+-- | }, callback);
85+-- | } else {
86+-- | callback(null);
87+-- | }
88+-- | }
89+-- | ```
90+-- |
91+-- | The import then looks like this:
92+-- | ```purescript
93+-- | foreign import logMessageImpl
94+-- | EffectFn3
95+-- | String
96+-- | String
97+-- | (EffectFn1 (Nullable HttpResponse) Unit)
98+-- | Unit
99+-- | ```
100+-- |
101+-- | And, as before, the FFI file is extremely simple:
102+-- |
103+-- | ```javascript
104+-- | exports.logMessageImpl = logMessage
105+-- | ```
106+-- |
107+-- | Finally, we use `runEffectFn{N}` and `mkEffectFn{N}` for a more comfortable
108+-- | PureScript version:
109+-- |
110+-- | ```purescript
111+-- | logMessage ::
112+-- | String ->
113+-- | String ->
114+-- | (Nullable HttpResponse -> Effect Unit) ->
115+-- | Effect Unit
116+-- | logMessage level message callback =
117+-- | runEffectFn3 logMessageImpl level message (mkEffectFn1 callback)
118+-- | ```
119+-- |
120+-- | The general naming scheme for functions and types in this module is as
121+-- | follows:
122+-- |
123+-- | * `EffectFn{N}` means, an uncurried function which accepts N arguments and
124+-- | performs some effects. The first N arguments are the actual function's
125+-- | argument. The last type argument is the return type.
126+-- | * `runEffectFn{N}` takes an `EffectFn` of N arguments, and converts it into
127+-- | the normal PureScript form: a curried function which returns an Effect
128+-- | action.
129+-- | * `mkEffectFn{N}` is the inverse of `runEffectFn{N}`. It can be useful for
130+-- | callbacks.
131+-- |
132+
133+module Effect.Uncurried where
134+
135+import Data.Monoid (class Monoid, class Semigroup, mempty, (<>))
136+import Effect (Effect)
137+
138+foreign import data EffectFn1 :: Type -> Type -> Type
139+
140+type role EffectFn1 representational representational
141+
142+foreign import data EffectFn2 :: Type -> Type -> Type -> Type
143+
144+type role EffectFn2 representational representational representational
145+
146+foreign import data EffectFn3 :: Type -> Type -> Type -> Type -> Type
147+
148+type role EffectFn3 representational representational representational representational
149+
150+foreign import data EffectFn4 :: Type -> Type -> Type -> Type -> Type -> Type
151+
152+type role EffectFn4 representational representational representational representational representational
153+
154+foreign import data EffectFn5 :: Type -> Type -> Type -> Type -> Type -> Type -> Type
155+
156+type role EffectFn5 representational representational representational representational representational representational
157+
158+foreign import data EffectFn6 :: Type -> Type -> Type -> Type -> Type -> Type -> Type -> Type
159+
160+type role EffectFn6 representational representational representational representational representational representational representational
161+
162+foreign import data EffectFn7 :: Type -> Type -> Type -> Type -> Type -> Type -> Type -> Type -> Type
163+
164+type role EffectFn7 representational representational representational representational representational representational representational representational
165+
166+foreign import data EffectFn8 :: Type -> Type -> Type -> Type -> Type -> Type -> Type -> Type -> Type -> Type
167+
168+type role EffectFn8 representational representational representational representational representational representational representational representational representational
169+
170+foreign import data EffectFn9 :: Type -> Type -> Type -> Type -> Type -> Type -> Type -> Type -> Type -> Type -> Type
171+
172+type role EffectFn9 representational representational representational representational representational representational representational representational representational representational
173+
174+foreign import data EffectFn10 :: Type -> Type -> Type -> Type -> Type -> Type -> Type -> Type -> Type -> Type -> Type -> Type
175+
176+type role EffectFn10 representational representational representational representational representational representational representational representational representational representational representational
177+
178+foreign import mkEffectFn1 :: forall a r.
179+ (a -> Effect r) -> EffectFn1 a r
180+foreign import mkEffectFn2 :: forall a b r.
181+ (a -> b -> Effect r) -> EffectFn2 a b r
182+foreign import mkEffectFn3 :: forall a b c r.
183+ (a -> b -> c -> Effect r) -> EffectFn3 a b c r
184+foreign import mkEffectFn4 :: forall a b c d r.
185+ (a -> b -> c -> d -> Effect r) -> EffectFn4 a b c d r
186+foreign import mkEffectFn5 :: forall a b c d e r.
187+ (a -> b -> c -> d -> e -> Effect r) -> EffectFn5 a b c d e r
188+foreign import mkEffectFn6 :: forall a b c d e f r.
189+ (a -> b -> c -> d -> e -> f -> Effect r) -> EffectFn6 a b c d e f r
190+foreign import mkEffectFn7 :: forall a b c d e f g r.
191+ (a -> b -> c -> d -> e -> f -> g -> Effect r) -> EffectFn7 a b c d e f g r
192+foreign import mkEffectFn8 :: forall a b c d e f g h r.
193+ (a -> b -> c -> d -> e -> f -> g -> h -> Effect r) -> EffectFn8 a b c d e f g h r
194+foreign import mkEffectFn9 :: forall a b c d e f g h i r.
195+ (a -> b -> c -> d -> e -> f -> g -> h -> i -> Effect r) -> EffectFn9 a b c d e f g h i r
196+foreign import mkEffectFn10 :: forall a b c d e f g h i j r.
197+ (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> Effect r) -> EffectFn10 a b c d e f g h i j r
198+
199+foreign import runEffectFn1 :: forall a r.
200+ EffectFn1 a r -> a -> Effect r
201+foreign import runEffectFn2 :: forall a b r.
202+ EffectFn2 a b r -> a -> b -> Effect r
203+foreign import runEffectFn3 :: forall a b c r.
204+ EffectFn3 a b c r -> a -> b -> c -> Effect r
205+foreign import runEffectFn4 :: forall a b c d r.
206+ EffectFn4 a b c d r -> a -> b -> c -> d -> Effect r
207+foreign import runEffectFn5 :: forall a b c d e r.
208+ EffectFn5 a b c d e r -> a -> b -> c -> d -> e -> Effect r
209+foreign import runEffectFn6 :: forall a b c d e f r.
210+ EffectFn6 a b c d e f r -> a -> b -> c -> d -> e -> f -> Effect r
211+foreign import runEffectFn7 :: forall a b c d e f g r.
212+ EffectFn7 a b c d e f g r -> a -> b -> c -> d -> e -> f -> g -> Effect r
213+foreign import runEffectFn8 :: forall a b c d e f g h r.
214+ EffectFn8 a b c d e f g h r -> a -> b -> c -> d -> e -> f -> g -> h -> Effect r
215+foreign import runEffectFn9 :: forall a b c d e f g h i r.
216+ EffectFn9 a b c d e f g h i r -> a -> b -> c -> d -> e -> f -> g -> h -> i -> Effect r
217+foreign import runEffectFn10 :: forall a b c d e f g h i j r.
218+ EffectFn10 a b c d e f g h i j r -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> Effect r
219+
220+-- The reason these are written eta-expanded instead of as:
221+-- ```
222+-- append f1 f2 = mkEffectFnN $ runEffectFnN f1 <> runEffectFnN f2
223+-- ```
224+-- is to help the compiler recognize that it can emit uncurried
225+-- JS functions (which are more efficient), when an appended
226+-- EffectFn is applied to all its arguments
227+
228+instance semigroupEffectFn1 :: Semigroup r => Semigroup (EffectFn1 a r) where
229+ append f1 f2 = mkEffectFn1 \a -> runEffectFn1 f1 a <> runEffectFn1 f2 a
230+
231+instance semigroupEffectFn2 :: Semigroup r => Semigroup (EffectFn2 a b r) where
232+ append f1 f2 = mkEffectFn2 \a b -> runEffectFn2 f1 a b <> runEffectFn2 f2 a b
233+
234+instance semigroupEffectFn3 :: Semigroup r => Semigroup (EffectFn3 a b c r) where
235+ append f1 f2 = mkEffectFn3 \a b c -> runEffectFn3 f1 a b c <> runEffectFn3 f2 a b c
236+
237+instance semigroupEffectFn4 :: Semigroup r => Semigroup (EffectFn4 a b c d r) where
238+ append f1 f2 = mkEffectFn4 \a b c d -> runEffectFn4 f1 a b c d <> runEffectFn4 f2 a b c d
239+
240+instance semigroupEffectFn5 :: Semigroup r => Semigroup (EffectFn5 a b c d e r) where
241+ append f1 f2 = mkEffectFn5 \a b c d e -> runEffectFn5 f1 a b c d e <> runEffectFn5 f2 a b c d e
242+
243+instance semigroupEffectFn6 :: Semigroup r => Semigroup (EffectFn6 a b c d e f r) where
244+ append f1 f2 = mkEffectFn6 \a b c d e f -> runEffectFn6 f1 a b c d e f <> runEffectFn6 f2 a b c d e f
245+
246+instance semigroupEffectFn7 :: Semigroup r => Semigroup (EffectFn7 a b c d e f g r) where
247+ append f1 f2 = mkEffectFn7 \a b c d e f g -> runEffectFn7 f1 a b c d e f g <> runEffectFn7 f2 a b c d e f g
248+
249+instance semigroupEffectFn8 :: Semigroup r => Semigroup (EffectFn8 a b c d e f g h r) where
250+ append f1 f2 = mkEffectFn8 \a b c d e f g h -> runEffectFn8 f1 a b c d e f g h <> runEffectFn8 f2 a b c d e f g h
251+
252+instance semigroupEffectFn9 :: Semigroup r => Semigroup (EffectFn9 a b c d e f g h i r) where
253+ append f1 f2 = mkEffectFn9 \a b c d e f g h i -> runEffectFn9 f1 a b c d e f g h i <> runEffectFn9 f2 a b c d e f g h i
254+
255+instance semigroupEffectFn10 :: Semigroup r => Semigroup (EffectFn10 a b c d e f g h i j r) where
256+ append f1 f2 = mkEffectFn10 \a b c d e f g h i j -> runEffectFn10 f1 a b c d e f g h i j <> runEffectFn10 f2 a b c d e f g h i j
257+
258+instance monoidEffectFn1 :: Monoid r => Monoid (EffectFn1 a r) where
259+ mempty = mkEffectFn1 \_ -> mempty
260+
261+instance monoidEffectFn2 :: Monoid r => Monoid (EffectFn2 a b r) where
262+ mempty = mkEffectFn2 \_ _ -> mempty
263+
264+instance monoidEffectFn3 :: Monoid r => Monoid (EffectFn3 a b c r) where
265+ mempty = mkEffectFn3 \_ _ _ -> mempty
266+
267+instance monoidEffectFn4 :: Monoid r => Monoid (EffectFn4 a b c d r) where
268+ mempty = mkEffectFn4 \_ _ _ _ -> mempty
269+
270+instance monoidEffectFn5 :: Monoid r => Monoid (EffectFn5 a b c d e r) where
271+ mempty = mkEffectFn5 \_ _ _ _ _ -> mempty
272+
273+instance monoidEffectFn6 :: Monoid r => Monoid (EffectFn6 a b c d e f r) where
274+ mempty = mkEffectFn6 \_ _ _ _ _ _ -> mempty
275+
276+instance monoidEffectFn7 :: Monoid r => Monoid (EffectFn7 a b c d e f g r) where
277+ mempty = mkEffectFn7 \_ _ _ _ _ _ _ -> mempty
278+
279+instance monoidEffectFn8 :: Monoid r => Monoid (EffectFn8 a b c d e f g h r) where
280+ mempty = mkEffectFn8 \_ _ _ _ _ _ _ _ -> mempty
281+
282+instance monoidEffectFn9 :: Monoid r => Monoid (EffectFn9 a b c d e f g h i r) where
283+ mempty = mkEffectFn9 \_ _ _ _ _ _ _ _ _ -> mempty
284+
285+instance monoidEffectFn10 :: Monoid r => Monoid (EffectFn10 a b c d e f g h i j r) where
286+ mempty = mkEffectFn10 \_ _ _ _ _ _ _ _ _ _ -> mempty
.spago/p/effect-4.0.0/src/Effect/Unsafe.jsnew file+3
@@ -0,0 +1,3 @@
1+export const unsafePerformEffect = function (f) {
2+ return f();
3+};
.spago/p/effect-4.0.0/src/Effect/Unsafe.pursnew file+8
@@ -0,0 +1,8 @@
1+module Effect.Unsafe where
2+
3+import Effect (Effect)
4+
5+-- | Run an effectful computation.
6+-- |
7+-- | *Note*: use of this function can result in arbitrary side-effects.
8+foreign import unsafePerformEffect :: forall a. Effect a -> a
.spago/p/either-6.1.0/LICENSEnew file+26
@@ -0,0 +1,26 @@
1+Copyright 2018 PureScript
2+
3+Redistribution and use in source and binary forms, with or without modification,
4+are permitted provided that the following conditions are met:
5+
6+1. Redistributions of source code must retain the above copyright notice, this
7+list of conditions and the following disclaimer.
8+
9+2. Redistributions in binary form must reproduce the above copyright notice,
10+this list of conditions and the following disclaimer in the documentation and/or
11+other materials provided with the distribution.
12+
13+3. Neither the name of the copyright holder nor the names of its contributors
14+may be used to endorse or promote products derived from this software without
15+specific prior written permission.
16+
17+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
21+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.spago/p/either-6.1.0/README.mdnew file+19
@@ -0,0 +1,19 @@
1+# purescript-either
2+
3+[](https://github.com/purescript/purescript-either/releases)
4+[](https://github.com/purescript/purescript-either/actions?query=workflow%3ACI+branch%3Amaster)
5+[](https://pursuit.purescript.org/packages/purescript-either)
6+
7+The `Either` type provides is used to represent values that can be one of two possibilities. For example, `Either Int Number` can be used in a place where either integers or floating point numbers are acceptable.
8+
9+A common use for this type is error handling, where by convention the `Left` constructor carries error messages and the `Right` constructor carries expected values (“`Right` is right”). This convention is used as the `Functor`, `Applicative`, `Monad`, etc. instances all operate on the `Right` part of the `Either`.
10+
11+## Installation
12+
13+```
14+spago install either
15+```
16+
17+## Documentation
18+
19+Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-either).
.spago/p/either-6.1.0/bower.jsonnew file+29
@@ -0,0 +1,29 @@
1+{
2+ "name": "purescript-either",
3+ "homepage": "https://github.com/purescript/purescript-either",
4+ "license": "BSD-3-Clause",
5+ "repository": {
6+ "type": "git",
7+ "url": "https://github.com/purescript/purescript-either.git"
8+ },
9+ "ignore": [
10+ "**/.*",
11+ "bower_components",
12+ "node_modules",
13+ "output",
14+ "test",
15+ "bower.json",
16+ "package.json"
17+ ],
18+ "dependencies": {
19+ "purescript-control": "^6.0.0",
20+ "purescript-invariant": "^6.0.0",
21+ "purescript-maybe": "^6.0.0",
22+ "purescript-prelude": "^6.0.0"
23+ },
24+ "devDependencies": {
25+ "purescript-assert": "^6.0.0",
26+ "purescript-console": "^6.0.0",
27+ "purescript-effect": "^4.0.0"
28+ }
29+}
.spago/p/either-6.1.0/package.jsonnew file+13
@@ -0,0 +1,13 @@
1+{
2+ "private": true,
3+ "scripts": {
4+ "clean": "rimraf output && rimraf .pulp-cache",
5+ "build": "pulp build -- --censor-lib --strict",
6+ "test": "pulp test"
7+ },
8+ "devDependencies": {
9+ "pulp": "16.0.0-0",
10+ "purescript-psa": "^0.8.2",
11+ "rimraf": "^3.0.2"
12+ }
13+}
.spago/p/either-6.1.0/purs.jsonnew file+16
@@ -0,0 +1,16 @@
1+{
2+ "name": "either",
3+ "version": "6.1.0",
4+ "license": "BSD-3-Clause",
5+ "location": {
6+ "githubOwner": "purescript",
7+ "githubRepo": "purescript-either"
8+ },
9+ "ref": "v6.1.0",
10+ "dependencies": {
11+ "control": ">=6.0.0 <7.0.0",
12+ "invariant": ">=6.0.0 <7.0.0",
13+ "maybe": ">=6.0.0 <7.0.0",
14+ "prelude": ">=6.0.0 <7.0.0"
15+ }
16+}
.spago/p/either-6.1.0/src/Data/Either.pursnew file+294
@@ -0,0 +1,294 @@
1+module Data.Either where
2+
3+import Prelude
4+
5+import Control.Alt (class Alt, (<|>))
6+import Control.Extend (class Extend)
7+import Data.Eq (class Eq1)
8+import Data.Functor.Invariant (class Invariant, imapF)
9+import Data.Generic.Rep (class Generic)
10+import Data.Maybe (Maybe(..), maybe, maybe')
11+import Data.Ord (class Ord1)
12+
13+-- | The `Either` type is used to represent a choice between two types of value.
14+-- |
15+-- | A common use case for `Either` is error handling, where `Left` is used to
16+-- | carry an error value and `Right` is used to carry a success value.
17+data Either a b = Left a | Right b
18+
19+-- | The `Functor` instance allows functions to transform the contents of a
20+-- | `Right` with the `<$>` operator:
21+-- |
22+-- | ``` purescript
23+-- | f <$> Right x == Right (f x)
24+-- | ```
25+-- |
26+-- | `Left` values are untouched:
27+-- |
28+-- | ``` purescript
29+-- | f <$> Left y == Left y
30+-- | ```
31+derive instance functorEither :: Functor (Either a)
32+
33+derive instance genericEither :: Generic (Either a b) _
34+
35+instance invariantEither :: Invariant (Either a) where
36+ imap = imapF
37+
38+-- | The `Apply` instance allows functions contained within a `Right` to
39+-- | transform a value contained within a `Right` using the `(<*>)` operator:
40+-- |
41+-- | ``` purescript
42+-- | Right f <*> Right x == Right (f x)
43+-- | ```
44+-- |
45+-- | `Left` values are left untouched:
46+-- |
47+-- | ``` purescript
48+-- | Left f <*> Right x == Left f
49+-- | Right f <*> Left y == Left y
50+-- | ```
51+-- |
52+-- | Combining `Functor`'s `<$>` with `Apply`'s `<*>` can be used to transform a
53+-- | pure function to take `Either`-typed arguments so `f :: a -> b -> c`
54+-- | becomes `f :: Either l a -> Either l b -> Either l c`:
55+-- |
56+-- | ``` purescript
57+-- | f <$> Right x <*> Right y == Right (f x y)
58+-- | ```
59+-- |
60+-- | The `Left`-preserving behaviour of both operators means the result of
61+-- | an expression like the above but where any one of the values is `Left`
62+-- | means the whole result becomes `Left` also, taking the first `Left` value
63+-- | found:
64+-- |
65+-- | ``` purescript
66+-- | f <$> Left x <*> Right y == Left x
67+-- | f <$> Right x <*> Left y == Left y
68+-- | f <$> Left x <*> Left y == Left x
69+-- | ```
70+instance applyEither :: Apply (Either e) where
71+ apply (Left e) _ = Left e
72+ apply (Right f) r = f <$> r
73+
74+-- | The `Applicative` instance enables lifting of values into `Either` with the
75+-- | `pure` function:
76+-- |
77+-- | ``` purescript
78+-- | pure x :: Either _ _ == Right x
79+-- | ```
80+-- |
81+-- | Combining `Functor`'s `<$>` with `Apply`'s `<*>` and `Applicative`'s
82+-- | `pure` can be used to pass a mixture of `Either` and non-`Either` typed
83+-- | values to a function that does not usually expect them, by using `pure`
84+-- | for any value that is not already `Either` typed:
85+-- |
86+-- | ``` purescript
87+-- | f <$> Right x <*> pure y == Right (f x y)
88+-- | ```
89+-- |
90+-- | Even though `pure = Right` it is recommended to use `pure` in situations
91+-- | like this as it allows the choice of `Applicative` to be changed later
92+-- | without having to go through and replace `Right` with a new constructor.
93+instance applicativeEither :: Applicative (Either e) where
94+ pure = Right
95+
96+-- | The `Alt` instance allows for a choice to be made between two `Either`
97+-- | values with the `<|>` operator, where the first `Right` encountered
98+-- | is taken.
99+-- |
100+-- | ``` purescript
101+-- | Right x <|> Right y == Right x
102+-- | Left x <|> Right y == Right y
103+-- | Left x <|> Left y == Left y
104+-- | ```
105+instance altEither :: Alt (Either e) where
106+ alt (Left _) r = r
107+ alt l _ = l
108+
109+-- | The `Bind` instance allows sequencing of `Either` values and functions that
110+-- | return an `Either` by using the `>>=` operator:
111+-- |
112+-- | ``` purescript
113+-- | Left x >>= f = Left x
114+-- | Right x >>= f = f x
115+-- | ```
116+-- |
117+-- | `Either`'s "do notation" can be understood to work like this:
118+-- | ``` purescript
119+-- | x :: forall e a. Either e a
120+-- | x = --
121+-- |
122+-- | y :: forall e b. Either e b
123+-- | y = --
124+-- |
125+-- | foo :: forall e a. (a -> b -> c) -> Either e c
126+-- | foo f = do
127+-- | x' <- x
128+-- | y' <- y
129+-- | pure (f x' y')
130+-- | ```
131+-- |
132+-- | ...which is equivalent to...
133+-- |
134+-- | ``` purescript
135+-- | x >>= (\x' -> y >>= (\y' -> pure (f x' y')))
136+-- | ```
137+-- |
138+-- | ...and is the same as writing...
139+-- |
140+-- | ```
141+-- | foo :: forall e a. (a -> b -> c) -> Either e c
142+-- | foo f = case x of
143+-- | Left e ->
144+-- | Left e
145+-- | Right x -> case y of
146+-- | Left e ->
147+-- | Left e
148+-- | Right y ->
149+-- | Right (f x y)
150+-- | ```
151+instance bindEither :: Bind (Either e) where
152+ bind = either (\e _ -> Left e) (\a f -> f a)
153+
154+-- | The `Monad` instance guarantees that there are both `Applicative` and
155+-- | `Bind` instances for `Either`.
156+instance monadEither :: Monad (Either e)
157+
158+-- | The `Extend` instance allows sequencing of `Either` values and functions
159+-- | that accept an `Either` and return a non-`Either` result using the
160+-- | `<<=` operator.
161+-- |
162+-- | ``` purescript
163+-- | f <<= Left x = Left x
164+-- | f <<= Right x = Right (f (Right x))
165+-- | ```
166+instance extendEither :: Extend (Either e) where
167+ extend _ (Left y) = Left y
168+ extend f x = Right (f x)
169+
170+-- | The `Show` instance allows `Either` values to be rendered as a string with
171+-- | `show` whenever there is an `Show` instance for both type the `Either` can
172+-- | contain.
173+instance showEither :: (Show a, Show b) => Show (Either a b) where
174+ show (Left x) = "(Left " <> show x <> ")"
175+ show (Right y) = "(Right " <> show y <> ")"
176+
177+-- | The `Eq` instance allows `Either` values to be checked for equality with
178+-- | `==` and inequality with `/=` whenever there is an `Eq` instance for both
179+-- | types the `Either` can contain.
180+derive instance eqEither :: (Eq a, Eq b) => Eq (Either a b)
181+
182+derive instance eq1Either :: Eq a => Eq1 (Either a)
183+
184+-- | The `Ord` instance allows `Either` values to be compared with
185+-- | `compare`, `>`, `>=`, `<` and `<=` whenever there is an `Ord` instance for
186+-- | both types the `Either` can contain.
187+-- |
188+-- | Any `Left` value is considered to be less than a `Right` value.
189+derive instance ordEither :: (Ord a, Ord b) => Ord (Either a b)
190+
191+derive instance ord1Either :: Ord a => Ord1 (Either a)
192+
193+instance boundedEither :: (Bounded a, Bounded b) => Bounded (Either a b) where
194+ top = Right top
195+ bottom = Left bottom
196+
197+instance semigroupEither :: (Semigroup b) => Semigroup (Either a b) where
198+ append x y = append <$> x <*> y
199+
200+-- | Takes two functions and an `Either` value, if the value is a `Left` the
201+-- | inner value is applied to the first function, if the value is a `Right`
202+-- | the inner value is applied to the second function.
203+-- |
204+-- | ``` purescript
205+-- | either f g (Left x) == f x
206+-- | either f g (Right y) == g y
207+-- | ```
208+either :: forall a b c. (a -> c) -> (b -> c) -> Either a b -> c
209+either f _ (Left a) = f a
210+either _ g (Right b) = g b
211+
212+-- | Combine two alternatives.
213+choose :: forall m a b. Alt m => m a -> m b -> m (Either a b)
214+choose a b = Left <$> a <|> Right <$> b
215+
216+-- | Returns `true` when the `Either` value was constructed with `Left`.
217+isLeft :: forall a b. Either a b -> Boolean
218+isLeft = either (const true) (const false)
219+
220+-- | Returns `true` when the `Either` value was constructed with `Right`.
221+isRight :: forall a b. Either a b -> Boolean
222+isRight = either (const false) (const true)
223+
224+-- | A function that extracts the value from the `Left` data constructor.
225+-- | The first argument is a default value, which will be returned in the
226+-- | case where a `Right` is passed to `fromLeft`.
227+fromLeft :: forall a b. a -> Either a b -> a
228+fromLeft _ (Left a) = a
229+fromLeft default _ = default
230+
231+-- | Similar to `fromLeft` but for use in cases where the default value may be
232+-- | expensive to compute. As PureScript is not lazy, the standard `fromLeft`
233+-- | has to evaluate the default value before returning the result,
234+-- | whereas here the value is only computed when the `Either` is known
235+-- | to be `Right`.
236+fromLeft' :: forall a b. (Unit -> a) -> Either a b -> a
237+fromLeft' _ (Left a) = a
238+fromLeft' default _ = default unit
239+
240+-- | A function that extracts the value from the `Right` data constructor.
241+-- | The first argument is a default value, which will be returned in the
242+-- | case where a `Left` is passed to `fromRight`.
243+fromRight :: forall a b. b -> Either a b -> b
244+fromRight _ (Right b) = b
245+fromRight default _ = default
246+
247+-- | Similar to `fromRight` but for use in cases where the default value may be
248+-- | expensive to compute. As PureScript is not lazy, the standard `fromRight`
249+-- | has to evaluate the default value before returning the result,
250+-- | whereas here the value is only computed when the `Either` is known
251+-- | to be `Left`.
252+fromRight' :: forall a b. (Unit -> b) -> Either a b -> b
253+fromRight' _ (Right b) = b
254+fromRight' default _ = default unit
255+
256+-- | Takes a default and a `Maybe` value, if the value is a `Just`, turn it into
257+-- | a `Right`, if the value is a `Nothing` use the provided default as a `Left`
258+-- |
259+-- | ```purescript
260+-- | note "default" Nothing = Left "default"
261+-- | note "default" (Just 1) = Right 1
262+-- | ```
263+note :: forall a b. a -> Maybe b -> Either a b
264+note a = maybe (Left a) Right
265+
266+-- | Similar to `note`, but for use in cases where the default value may be
267+-- | expensive to compute.
268+-- |
269+-- | ```purescript
270+-- | note' (\_ -> "default") Nothing = Left "default"
271+-- | note' (\_ -> "default") (Just 1) = Right 1
272+-- | ```
273+note' :: forall a b. (Unit -> a) -> Maybe b -> Either a b
274+note' f = maybe' (Left <<< f) Right
275+
276+-- | Turns an `Either` into a `Maybe`, by throwing potential `Left` values away and converting
277+-- | them into `Nothing`. `Right` values get turned into `Just`s.
278+-- |
279+-- | ```purescript
280+-- | hush (Left "ParseError") = Nothing
281+-- | hush (Right 42) = Just 42
282+-- | ```
283+hush :: forall a b. Either a b -> Maybe b
284+hush = either (const Nothing) Just
285+
286+-- | Turns an `Either` into a `Maybe`, by throwing potential `Right` values away and converting
287+-- | them into `Nothing`. `Left` values get turned into `Just`s.
288+-- |
289+-- | ```purescript
290+-- | blush (Left "ParseError") = Just "Parse Error"
291+-- | blush (Right 42) = Nothing
292+-- | ```
293+blush :: forall a b. Either a b -> Maybe a
294+blush = either Just (const Nothing)
.spago/p/either-6.1.0/src/Data/Either/Inject.pursnew file+23
@@ -0,0 +1,23 @@
1+module Data.Either.Inject where
2+
3+import Prelude
4+
5+import Data.Either (Either(..), either)
6+import Data.Maybe (Maybe(..))
7+
8+class Inject a b where
9+ inj :: a -> b
10+ prj :: b -> Maybe a
11+
12+instance injectReflexive :: Inject a a where
13+ inj = identity
14+ prj = Just
15+
16+else instance injectLeft :: Inject a (Either a b) where
17+ inj = Left
18+ prj = either Just (const Nothing)
19+
20+else instance injectRight :: Inject a b => Inject a (Either c b) where
21+ inj = Right <<< inj
22+ prj = either (const Nothing) prj
23+
.spago/p/either-6.1.0/src/Data/Either/Nested.pursnew file+278
@@ -0,0 +1,278 @@
1+-- | Utilities for n-eithers: sums types with more than two terms built from nested eithers.
2+-- |
3+-- | Nested eithers arise naturally in sum combinators. You shouldn't
4+-- | represent sum data using nested eithers, but if combinators you're working with
5+-- | create them, utilities in this module will allow to to more easily work
6+-- | with them, including translating to and from more traditional sum types.
7+-- |
8+-- | ```purescript
9+-- | data Color = Red Number | Green Number | Blue Number
10+-- |
11+-- | fromEither3 :: Either3 Number Number Number -> Color
12+-- | fromEither3 = either3 Red Green Blue
13+-- |
14+-- | toEither3 :: Color -> Either3 Number Number Number
15+-- | toEither3 (Red v) = in1 v
16+-- | toEither3 (Green v) = in2 v
17+-- | toEither3 (Blue v) = in3 v
18+-- | ```
19+module Data.Either.Nested
20+ ( type (\/), (\/)
21+ , in1, in2, in3, in4, in5, in6, in7, in8, in9, in10
22+ , at1, at2, at3, at4, at5, at6, at7, at8, at9, at10
23+ , Either1, Either2, Either3, Either4, Either5, Either6, Either7, Either8, Either9, Either10
24+ , either1, either2, either3, either4, either5, either6, either7, either8, either9, either10
25+ ) where
26+
27+import Data.Either (Either(..), either)
28+import Data.Void (Void, absurd)
29+
30+infixr 6 type Either as \/
31+
32+-- | The `\/` operator alias for the `either` function allows easy matching on nested Eithers. For example, consider the function
33+-- |
34+-- | ```purescript
35+-- | f :: (Int \/ String \/ Boolean) -> String
36+-- | f (Left x) = show x
37+-- | f (Right (Left y)) = y
38+-- | f (Right (Right z)) = if z then "Yes" else "No"
39+-- | ```
40+-- |
41+-- | The `\/` operator alias allows us to rewrite this function as
42+-- |
43+-- | ```purescript
44+-- | f :: (Int \/ String \/ Boolean) -> String
45+-- | f = show \/ identity \/ if _ then "Yes" else "No"
46+-- | ```
47+infixr 6 either as \/
48+
49+type Either1 a = a \/ Void
50+type Either2 a b = a \/ b \/ Void
51+type Either3 a b c = a \/ b \/ c \/ Void
52+type Either4 a b c d = a \/ b \/ c \/ d \/ Void
53+type Either5 a b c d e = a \/ b \/ c \/ d \/ e \/ Void
54+type Either6 a b c d e f = a \/ b \/ c \/ d \/ e \/ f \/ Void
55+type Either7 a b c d e f g = a \/ b \/ c \/ d \/ e \/ f \/ g \/ Void
56+type Either8 a b c d e f g h = a \/ b \/ c \/ d \/ e \/ f \/ g \/ h \/ Void
57+type Either9 a b c d e f g h i = a \/ b \/ c \/ d \/ e \/ f \/ g \/ h \/ i \/ Void
58+type Either10 a b c d e f g h i j = a \/ b \/ c \/ d \/ e \/ f \/ g \/ h \/ i \/ j \/ Void
59+
60+in1 :: forall a z. a -> a \/ z
61+in1 = Left
62+
63+in2 :: forall a b z. b -> a \/ b \/ z
64+in2 v = Right (Left v)
65+
66+in3 :: forall a b c z. c -> a \/ b \/ c \/ z
67+in3 v = Right (Right (Left v))
68+
69+in4 :: forall a b c d z. d -> a \/ b \/ c \/ d \/ z
70+in4 v = Right (Right (Right (Left v)))
71+
72+in5 :: forall a b c d e z. e -> a \/ b \/ c \/ d \/ e \/ z
73+in5 v = Right (Right (Right (Right (Left v))))
74+
75+in6 :: forall a b c d e f z. f -> a \/ b \/ c \/ d \/ e \/ f \/ z
76+in6 v = Right (Right (Right (Right (Right (Left v)))))
77+
78+in7 :: forall a b c d e f g z. g -> a \/ b \/ c \/ d \/ e \/ f \/ g \/ z
79+in7 v = Right (Right (Right (Right (Right (Right (Left v))))))
80+
81+in8 :: forall a b c d e f g h z. h -> a \/ b \/ c \/ d \/ e \/ f \/ g \/ h \/ z
82+in8 v = Right (Right (Right (Right (Right (Right (Right (Left v)))))))
83+
84+in9 :: forall a b c d e f g h i z. i -> a \/ b \/ c \/ d \/ e \/ f \/ g \/ h \/ i \/ z
85+in9 v = Right (Right (Right (Right (Right (Right (Right (Right (Left v))))))))
86+
87+in10 :: forall a b c d e f g h i j z. j -> a \/ b \/ c \/ d \/ e \/ f \/ g \/ h \/ i \/ j \/ z
88+in10 v = Right (Right (Right (Right (Right (Right (Right (Right (Right (Left v)))))))))
89+
90+at1 :: forall r a z. r -> (a -> r) -> a \/ z -> r
91+at1 b f y = case y of
92+ Left r -> f r
93+ _ -> b
94+
95+at2 :: forall r a b z. r -> (b -> r) -> a \/ b \/ z -> r
96+at2 b f y = case y of
97+ Right (Left r) -> f r
98+ _ -> b
99+
100+at3 :: forall r a b c z. r -> (c -> r) -> a \/ b \/ c \/ z -> r
101+at3 b f y = case y of
102+ Right (Right (Left r)) -> f r
103+ _ -> b
104+
105+at4 :: forall r a b c d z. r -> (d -> r) -> a \/ b \/ c \/ d \/ z -> r
106+at4 b f y = case y of
107+ Right (Right (Right (Left r))) -> f r
108+ _ -> b
109+
110+at5 :: forall r a b c d e z. r -> (e -> r) -> a \/ b \/ c \/ d \/ e \/ z -> r
111+at5 b f y = case y of
112+ Right (Right (Right (Right (Left r)))) -> f r
113+ _ -> b
114+
115+at6 :: forall r a b c d e f z. r -> (f -> r) -> a \/ b \/ c \/ d \/ e \/ f \/ z -> r
116+at6 b f y = case y of
117+ Right (Right (Right (Right (Right (Left r))))) -> f r
118+ _ -> b
119+
120+at7 :: forall r a b c d e f g z. r -> (g -> r) -> a \/ b \/ c \/ d \/ e \/ f \/ g \/ z -> r
121+at7 b f y = case y of
122+ Right (Right (Right (Right (Right (Right (Left r)))))) -> f r
123+ _ -> b
124+
125+at8 :: forall r a b c d e f g h z. r -> (h -> r) -> a \/ b \/ c \/ d \/ e \/ f \/ g \/ h \/ z -> r
126+at8 b f y = case y of
127+ Right (Right (Right (Right (Right (Right (Right (Left r))))))) -> f r
128+ _ -> b
129+
130+at9 :: forall r a b c d e f g h i z. r -> (i -> r) -> a \/ b \/ c \/ d \/ e \/ f \/ g \/ h \/ i \/ z -> r
131+at9 b f y = case y of
132+ Right (Right (Right (Right (Right (Right (Right (Right (Left r)))))))) -> f r
133+ _ -> b
134+
135+at10 :: forall r a b c d e f g h i j z. r -> (j -> r) -> a \/ b \/ c \/ d \/ e \/ f \/ g \/ h \/ i \/ j \/ z -> r
136+at10 b f y = case y of
137+ Right (Right (Right (Right (Right (Right (Right (Right (Right (Left r))))))))) -> f r
138+ _ -> b
139+
140+either1 :: forall a. Either1 a -> a
141+either1 y = case y of
142+ Left r -> r
143+ Right _1 -> absurd _1
144+
145+either2 :: forall r a b. (a -> r) -> (b -> r) -> Either2 a b -> r
146+either2 a b y = case y of
147+ Left r -> a r
148+ Right _1 -> case _1 of
149+ Left r -> b r
150+ Right _2 -> absurd _2
151+
152+either3 :: forall r a b c. (a -> r) -> (b -> r) -> (c -> r) -> Either3 a b c -> r
153+either3 a b c y = case y of
154+ Left r -> a r
155+ Right _1 -> case _1 of
156+ Left r -> b r
157+ Right _2 -> case _2 of
158+ Left r -> c r
159+ Right _3 -> absurd _3
160+
161+either4 :: forall r a b c d. (a -> r) -> (b -> r) -> (c -> r) -> (d -> r) -> Either4 a b c d -> r
162+either4 a b c d y = case y of
163+ Left r -> a r
164+ Right _1 -> case _1 of
165+ Left r -> b r
166+ Right _2 -> case _2 of
167+ Left r -> c r
168+ Right _3 -> case _3 of
169+ Left r -> d r
170+ Right _4 -> absurd _4
171+
172+either5 :: forall r a b c d e. (a -> r) -> (b -> r) -> (c -> r) -> (d -> r) -> (e -> r) -> Either5 a b c d e -> r
173+either5 a b c d e y = case y of
174+ Left r -> a r
175+ Right _1 -> case _1 of
176+ Left r -> b r
177+ Right _2 -> case _2 of
178+ Left r -> c r
179+ Right _3 -> case _3 of
180+ Left r -> d r
181+ Right _4 -> case _4 of
182+ Left r -> e r
183+ Right _5 -> absurd _5
184+
185+either6 :: forall r a b c d e f. (a -> r) -> (b -> r) -> (c -> r) -> (d -> r) -> (e -> r) -> (f -> r) -> Either6 a b c d e f -> r
186+either6 a b c d e f y = case y of
187+ Left r -> a r
188+ Right _1 -> case _1 of
189+ Left r -> b r
190+ Right _2 -> case _2 of
191+ Left r -> c r
192+ Right _3 -> case _3 of
193+ Left r -> d r
194+ Right _4 -> case _4 of
195+ Left r -> e r
196+ Right _5 -> case _5 of
197+ Left r -> f r
198+ Right _6 -> absurd _6
199+
200+either7 :: forall r a b c d e f g. (a -> r) -> (b -> r) -> (c -> r) -> (d -> r) -> (e -> r) -> (f -> r) -> (g -> r) -> Either7 a b c d e f g -> r
201+either7 a b c d e f g y = case y of
202+ Left r -> a r
203+ Right _1 -> case _1 of
204+ Left r -> b r
205+ Right _2 -> case _2 of
206+ Left r -> c r
207+ Right _3 -> case _3 of
208+ Left r -> d r
209+ Right _4 -> case _4 of
210+ Left r -> e r
211+ Right _5 -> case _5 of
212+ Left r -> f r
213+ Right _6 -> case _6 of
214+ Left r -> g r
215+ Right _7 -> absurd _7
216+
217+either8 :: forall r a b c d e f g h. (a -> r) -> (b -> r) -> (c -> r) -> (d -> r) -> (e -> r) -> (f -> r) -> (g -> r) -> (h -> r) -> Either8 a b c d e f g h -> r
218+either8 a b c d e f g h y = case y of
219+ Left r -> a r
220+ Right _1 -> case _1 of
221+ Left r -> b r
222+ Right _2 -> case _2 of
223+ Left r -> c r
224+ Right _3 -> case _3 of
225+ Left r -> d r
226+ Right _4 -> case _4 of
227+ Left r -> e r
228+ Right _5 -> case _5 of
229+ Left r -> f r
230+ Right _6 -> case _6 of
231+ Left r -> g r
232+ Right _7 -> case _7 of
233+ Left r -> h r
234+ Right _8 -> absurd _8
235+
236+either9 :: forall r a b c d e f g h i. (a -> r) -> (b -> r) -> (c -> r) -> (d -> r) -> (e -> r) -> (f -> r) -> (g -> r) -> (h -> r) -> (i -> r) -> Either9 a b c d e f g h i -> r
237+either9 a b c d e f g h i y = case y of
238+ Left r -> a r
239+ Right _1 -> case _1 of
240+ Left r -> b r
241+ Right _2 -> case _2 of
242+ Left r -> c r
243+ Right _3 -> case _3 of
244+ Left r -> d r
245+ Right _4 -> case _4 of
246+ Left r -> e r
247+ Right _5 -> case _5 of
248+ Left r -> f r
249+ Right _6 -> case _6 of
250+ Left r -> g r
251+ Right _7 -> case _7 of
252+ Left r -> h r
253+ Right _8 -> case _8 of
254+ Left r -> i r
255+ Right _9 -> absurd _9
256+
257+either10 :: forall r a b c d e f g h i j. (a -> r) -> (b -> r) -> (c -> r) -> (d -> r) -> (e -> r) -> (f -> r) -> (g -> r) -> (h -> r) -> (i -> r) -> (j -> r) -> Either10 a b c d e f g h i j -> r
258+either10 a b c d e f g h i j y = case y of
259+ Left r -> a r
260+ Right _1 -> case _1 of
261+ Left r -> b r
262+ Right _2 -> case _2 of
263+ Left r -> c r
264+ Right _3 -> case _3 of
265+ Left r -> d r
266+ Right _4 -> case _4 of
267+ Left r -> e r
268+ Right _5 -> case _5 of
269+ Left r -> f r
270+ Right _6 -> case _6 of
271+ Left r -> g r
272+ Right _7 -> case _7 of
273+ Left r -> h r
274+ Right _8 -> case _8 of
275+ Left r -> i r
276+ Right _9 -> case _9 of
277+ Left r -> j r
278+ Right _10 -> absurd _10
.spago/p/enums-6.0.1/LICENSEnew file+26
@@ -0,0 +1,26 @@
1+Copyright 2018 PureScript
2+
3+Redistribution and use in source and binary forms, with or without modification,
4+are permitted provided that the following conditions are met:
5+
6+1. Redistributions of source code must retain the above copyright notice, this
7+list of conditions and the following disclaimer.
8+
9+2. Redistributions in binary form must reproduce the above copyright notice,
10+this list of conditions and the following disclaimer in the documentation and/or
11+other materials provided with the distribution.
12+
13+3. Neither the name of the copyright holder nor the names of its contributors
14+may be used to endorse or promote products derived from this software without
15+specific prior written permission.
16+
17+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
21+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.spago/p/enums-6.0.1/README.mdnew file+17
@@ -0,0 +1,17 @@
1+# purescript-enums
2+
3+[](https://github.com/purescript/purescript-enums/releases)
4+[](https://github.com/purescript/purescript-enums/actions?query=workflow%3ACI+branch%3Amaster)
5+[](https://pursuit.purescript.org/packages/purescript-enums)
6+
7+Operations for sequentially ordered types.
8+
9+## Installation
10+
11+```
12+spago install enums
13+```
14+
15+## Documentation
16+
17+Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-enums).
.spago/p/enums-6.0.1/bower.jsonnew file+35
@@ -0,0 +1,35 @@
1+{
2+ "name": "purescript-enums",
3+ "homepage": "https://github.com/purescript/purescript-enums",
4+ "license": "BSD-3-Clause",
5+ "repository": {
6+ "type": "git",
7+ "url": "https://github.com/purescript/purescript-enums.git"
8+ },
9+ "ignore": [
10+ "**/.*",
11+ "bower_components",
12+ "node_modules",
13+ "output",
14+ "test",
15+ "bower.json",
16+ "gulpfile.js",
17+ "package.json"
18+ ],
19+ "dependencies": {
20+ "purescript-control": "^6.0.0",
21+ "purescript-either": "^6.0.0",
22+ "purescript-gen": "^4.0.0",
23+ "purescript-maybe": "^6.0.0",
24+ "purescript-newtype": "^5.0.0",
25+ "purescript-nonempty": "^7.0.0",
26+ "purescript-partial": "^4.0.0",
27+ "purescript-prelude": "^6.0.0",
28+ "purescript-tuples": "^7.0.0",
29+ "purescript-unfoldable": "^6.0.0"
30+ },
31+ "devDependencies": {
32+ "purescript-assert": "^6.0.0",
33+ "purescript-console": "^6.0.0"
34+ }
35+}
.spago/p/enums-6.0.1/package.jsonnew file+13
@@ -0,0 +1,13 @@
1+{
2+ "private": true,
3+ "scripts": {
4+ "clean": "rimraf output && rimraf .pulp-cache",
5+ "build": "pulp build -- --censor-lib --strict",
6+ "test": "pulp test"
7+ },
8+ "devDependencies": {
9+ "pulp": "16.0.0-0",
10+ "purescript-psa": "^0.8.2",
11+ "rimraf": "^3.0.2"
12+ }
13+}
.spago/p/enums-6.0.1/purs.jsonnew file+22
@@ -0,0 +1,22 @@
1+{
2+ "name": "enums",
3+ "version": "6.0.1",
4+ "license": "BSD-3-Clause",
5+ "location": {
6+ "githubOwner": "purescript",
7+ "githubRepo": "purescript-enums"
8+ },
9+ "ref": "v6.0.1",
10+ "dependencies": {
11+ "control": ">=6.0.0 <7.0.0",
12+ "either": ">=6.0.0 <7.0.0",
13+ "gen": ">=4.0.0 <5.0.0",
14+ "maybe": ">=6.0.0 <7.0.0",
15+ "newtype": ">=5.0.0 <6.0.0",
16+ "nonempty": ">=7.0.0 <8.0.0",
17+ "partial": ">=4.0.0 <5.0.0",
18+ "prelude": ">=6.0.0 <7.0.0",
19+ "tuples": ">=7.0.0 <8.0.0",
20+ "unfoldable": ">=6.0.0 <7.0.0"
21+ }
22+}
.spago/p/enums-6.0.1/src/Data/Enum.jsnew file+7
@@ -0,0 +1,7 @@
1+export function toCharCode(c) {
2+ return c.charCodeAt(0);
3+}
4+
5+export function fromCharCode(c) {
6+ return String.fromCharCode(c);
7+}
.spago/p/enums-6.0.1/src/Data/Enum.pursnew file+321
@@ -0,0 +1,321 @@
1+module Data.Enum
2+ ( class Enum, succ, pred
3+ , class BoundedEnum, cardinality, toEnum, fromEnum
4+ , toEnumWithDefaults
5+ , Cardinality(..)
6+ , enumFromTo
7+ , enumFromThenTo
8+ , upFrom
9+ , upFromIncluding
10+ , downFrom
11+ , downFromIncluding
12+ , defaultSucc
13+ , defaultPred
14+ , defaultCardinality
15+ , defaultToEnum
16+ , defaultFromEnum
17+ ) where
18+
19+import Prelude
20+
21+import Control.MonadPlus (guard)
22+import Data.Either (Either(..))
23+import Data.Maybe (Maybe(..), maybe, fromJust)
24+import Data.Newtype (class Newtype)
25+import Data.Tuple (Tuple(..))
26+import Data.Unfoldable (class Unfoldable, singleton, unfoldr)
27+import Data.Unfoldable1 (class Unfoldable1, unfoldr1)
28+import Partial.Unsafe (unsafePartial)
29+
30+-- | Type class for enumerations.
31+-- |
32+-- | Laws:
33+-- | - Successor: `all (a < _) (succ a)`
34+-- | - Predecessor: `all (_ < a) (pred a)`
35+-- | - Succ retracts pred: `pred >=> succ >=> pred = pred`
36+-- | - Pred retracts succ: `succ >=> pred >=> succ = succ`
37+-- | - Non-skipping succ: `b <= a || any (_ <= b) (succ a)`
38+-- | - Non-skipping pred: `a <= b || any (b <= _) (pred a)`
39+-- |
40+-- | The retraction laws can intuitively be understood as saying that `succ` is
41+-- | the opposite of `pred`; if you apply `succ` and then `pred` to something,
42+-- | you should end up with what you started with (although of course this
43+-- | doesn't apply if you tried to `succ` the last value in an enumeration and
44+-- | therefore got `Nothing` out).
45+-- |
46+-- | The non-skipping laws can intuitively be understood as saying that `succ`
47+-- | shouldn't skip over any elements of your type. For example, _without_ the
48+-- | non-skipping laws, it would be permissible to write an `Enum Int` instance
49+-- | where `succ x = Just (x+2)`, and similarly `pred x = Just (x-2)`.
50+class Ord a <= Enum a where
51+ succ :: a -> Maybe a
52+ pred :: a -> Maybe a
53+
54+instance enumBoolean :: Enum Boolean where
55+ succ false = Just true
56+ succ _ = Nothing
57+ pred true = Just false
58+ pred _= Nothing
59+
60+instance enumInt :: Enum Int where
61+ succ n = if n < top then Just (n + 1) else Nothing
62+ pred n = if n > bottom then Just (n - 1) else Nothing
63+
64+instance enumChar :: Enum Char where
65+ succ = defaultSucc charToEnum toCharCode
66+ pred = defaultPred charToEnum toCharCode
67+
68+instance enumUnit :: Enum Unit where
69+ succ = const Nothing
70+ pred = const Nothing
71+
72+instance enumOrdering :: Enum Ordering where
73+ succ LT = Just EQ
74+ succ EQ = Just GT
75+ succ GT = Nothing
76+ pred LT = Nothing
77+ pred EQ = Just LT
78+ pred GT = Just EQ
79+
80+instance enumMaybe :: BoundedEnum a => Enum (Maybe a) where
81+ succ Nothing = Just (Just bottom)
82+ succ (Just a) = Just <$> succ a
83+ pred Nothing = Nothing
84+ pred (Just a) = Just (pred a)
85+
86+instance enumEither :: (BoundedEnum a, BoundedEnum b) => Enum (Either a b) where
87+ succ (Left a) = maybe (Just (Right bottom)) (Just <<< Left) (succ a)
88+ succ (Right b) = maybe Nothing (Just <<< Right) (succ b)
89+ pred (Left a) = maybe Nothing (Just <<< Left) (pred a)
90+ pred (Right b) = maybe (Just (Left top)) (Just <<< Right) (pred b)
91+
92+instance enumTuple :: (Enum a, BoundedEnum b) => Enum (Tuple a b) where
93+ succ (Tuple a b) = maybe (flip Tuple bottom <$> succ a) (Just <<< Tuple a) (succ b)
94+ pred (Tuple a b) = maybe (flip Tuple top <$> pred a) (Just <<< Tuple a) (pred b)
95+
96+-- | Type class for finite enumerations.
97+-- |
98+-- | This should not be considered a part of a numeric hierarchy, as in Haskell.
99+-- | Rather, this is a type class for small, ordered sum types with
100+-- | statically-determined cardinality and the ability to easily compute
101+-- | successor and predecessor elements like `DayOfWeek`.
102+-- |
103+-- | Laws:
104+-- |
105+-- | - ```succ bottom >>= succ >>= succ ... succ [cardinality - 1 times] == top```
106+-- | - ```pred top >>= pred >>= pred ... pred [cardinality - 1 times] == bottom```
107+-- | - ```forall a > bottom: pred a >>= succ == Just a```
108+-- | - ```forall a < top: succ a >>= pred == Just a```
109+-- | - ```forall a > bottom: fromEnum <$> pred a = pred (fromEnum a)```
110+-- | - ```forall a < top: fromEnum <$> succ a = succ (fromEnum a)```
111+-- | - ```e1 `compare` e2 == fromEnum e1 `compare` fromEnum e2```
112+-- | - ```toEnum (fromEnum a) = Just a```
113+class (Bounded a, Enum a) <= BoundedEnum a where
114+ cardinality :: Cardinality a
115+ toEnum :: Int -> Maybe a
116+ fromEnum :: a -> Int
117+
118+instance boundedEnumBoolean :: BoundedEnum Boolean where
119+ cardinality = Cardinality 2
120+ toEnum 0 = Just false
121+ toEnum 1 = Just true
122+ toEnum _ = Nothing
123+ fromEnum false = 0
124+ fromEnum true = 1
125+
126+instance boundedEnumChar :: BoundedEnum Char where
127+ cardinality = Cardinality (toCharCode top - toCharCode bottom)
128+ toEnum = charToEnum
129+ fromEnum = toCharCode
130+
131+instance boundedEnumUnit :: BoundedEnum Unit where
132+ cardinality = Cardinality 1
133+ toEnum 0 = Just unit
134+ toEnum _ = Nothing
135+ fromEnum = const 0
136+
137+instance boundedEnumOrdering :: BoundedEnum Ordering where
138+ cardinality = Cardinality 3
139+ toEnum 0 = Just LT
140+ toEnum 1 = Just EQ
141+ toEnum 2 = Just GT
142+ toEnum _ = Nothing
143+ fromEnum LT = 0
144+ fromEnum EQ = 1
145+ fromEnum GT = 2
146+
147+-- | Like `toEnum` but returns the first argument if `x` is less than
148+-- | `fromEnum bottom` and the second argument if `x` is greater than
149+-- | `fromEnum top`.
150+-- |
151+-- | ``` purescript
152+-- | toEnumWithDefaults False True (-1) -- False
153+-- | toEnumWithDefaults False True 0 -- False
154+-- | toEnumWithDefaults False True 1 -- True
155+-- | toEnumWithDefaults False True 2 -- True
156+-- | ```
157+toEnumWithDefaults :: forall a. BoundedEnum a => a -> a -> Int -> a
158+toEnumWithDefaults low high x = case toEnum x of
159+ Just enum -> enum
160+ Nothing -> if x < fromEnum (bottom :: a) then low else high
161+
162+-- | A type for the size of finite enumerations.
163+newtype Cardinality :: forall k. k -> Type
164+newtype Cardinality a = Cardinality Int
165+
166+type role Cardinality representational
167+
168+derive instance newtypeCardinality :: Newtype (Cardinality a) _
169+derive newtype instance eqCardinality :: Eq (Cardinality a)
170+derive newtype instance ordCardinality :: Ord (Cardinality a)
171+
172+instance showCardinality :: Show (Cardinality a) where
173+ show (Cardinality n) = "(Cardinality " <> show n <> ")"
174+
175+-- | Returns a contiguous sequence of elements from the first value to the
176+-- | second value (inclusive).
177+-- |
178+-- | ``` purescript
179+-- | enumFromTo 0 3 = [0, 1, 2, 3]
180+-- | enumFromTo 'c' 'a' = ['c', 'b', 'a']
181+-- | ```
182+-- |
183+-- | The example shows `Array` return values, but the result can be any type
184+-- | with an `Unfoldable1` instance.
185+enumFromTo :: forall a u. Enum a => Unfoldable1 u => a -> a -> u a
186+enumFromTo = case _, _ of
187+ from, to
188+ | from == to -> singleton from
189+ | from < to -> unfoldr1 (go succ (<=) to) from
190+ | otherwise -> unfoldr1 (go pred (>=) to) from
191+ where
192+ go step op to a = Tuple a (step a >>= \a' -> guard (a' `op` to) $> a')
193+
194+-- | Returns a sequence of elements from the first value, taking steps
195+-- | according to the difference between the first and second value, up to
196+-- | (but not exceeding) the third value.
197+-- |
198+-- | ``` purescript
199+-- | enumFromThenTo 0 2 6 = [0, 2, 4, 6]
200+-- | enumFromThenTo 0 3 5 = [0, 3]
201+-- | ```
202+-- |
203+-- | Note that there is no `BoundedEnum` instance for integers, they're just
204+-- | being used here for illustrative purposes to help clarify the behaviour.
205+-- |
206+-- | The example shows `Array` return values, but the result can be any type
207+-- | with an `Unfoldable1` instance.
208+enumFromThenTo :: forall f a. Unfoldable f => Functor f => BoundedEnum a => a -> a -> a -> f a
209+enumFromThenTo = unsafePartial \a b c ->
210+ let
211+ a' = fromEnum a
212+ b' = fromEnum b
213+ c' = fromEnum c
214+ in
215+ (toEnum >>> fromJust) <$> unfoldr (go (b' - a') c') a'
216+ where
217+ go step to e
218+ | e <= to = Just (Tuple e (e + step))
219+ | otherwise = Nothing
220+
221+-- | Produces all successors of an `Enum` value, excluding the start value.
222+upFrom :: forall a u. Enum a => Unfoldable u => a -> u a
223+upFrom = unfoldr (map diag <<< succ)
224+
225+-- | Produces all successors of an `Enum` value, including the start value.
226+-- |
227+-- | `upFromIncluding bottom` will return all values in an `Enum`.
228+upFromIncluding :: ∀ a u. Enum a => Unfoldable1 u => a -> u a
229+upFromIncluding = unfoldr1 (Tuple <*> succ)
230+
231+-- | Produces all predecessors of an `Enum` value, excluding the start value.
232+downFrom :: forall a u. Enum a => Unfoldable u => a -> u a
233+downFrom = unfoldr (map diag <<< pred)
234+
235+-- | Produces all predecessors of an `Enum` value, including the start value.
236+-- |
237+-- | `downFromIncluding top` will return all values in an `Enum`, in reverse
238+-- | order.
239+downFromIncluding :: forall a u. Enum a => Unfoldable1 u => a -> u a
240+downFromIncluding = unfoldr1 (Tuple <*> pred)
241+
242+-- | Provides a default implementation for `succ`, given a function that maps
243+-- | integers to values in the `Enum`, and a function that maps values in the
244+-- | `Enum` back to integers. The integer mapping must agree in both directions
245+-- | for this to implement a law-abiding `succ`.
246+-- |
247+-- | If a `BoundedEnum` instance exists for `a`, the `toEnum` and `fromEnum`
248+-- | functions can be used here:
249+-- |
250+-- | ``` purescript
251+-- | succ = defaultSucc toEnum fromEnum
252+-- | ```
253+defaultSucc :: forall a. (Int -> Maybe a) -> (a -> Int) -> a -> Maybe a
254+defaultSucc toEnum' fromEnum' a = toEnum' (fromEnum' a + 1)
255+
256+-- | Provides a default implementation for `pred`, given a function that maps
257+-- | integers to values in the `Enum`, and a function that maps values in the
258+-- | `Enum` back to integers. The integer mapping must agree in both directions
259+-- | for this to implement a law-abiding `pred`.
260+-- |
261+-- | If a `BoundedEnum` instance exists for `a`, the `toEnum` and `fromEnum`
262+-- | functions can be used here:
263+-- |
264+-- | ``` purescript
265+-- | pred = defaultPred toEnum fromEnum
266+-- | ```
267+defaultPred :: forall a. (Int -> Maybe a) -> (a -> Int) -> a -> Maybe a
268+defaultPred toEnum' fromEnum' a = toEnum' (fromEnum' a - 1)
269+
270+-- | Provides a default implementation for `cardinality`.
271+-- |
272+-- | Runs in `O(n)` where `n` is `fromEnum top`
273+defaultCardinality :: forall a. Bounded a => Enum a => Cardinality a
274+defaultCardinality = Cardinality $ go 1 (bottom :: a) where
275+ go i x =
276+ case succ x of
277+ Just x' -> go (i + 1) x'
278+ Nothing -> i
279+
280+-- | Provides a default implementation for `toEnum`.
281+-- |
282+-- | - Assumes `fromEnum bottom = 0`.
283+-- | - Cannot be used in conjuction with `defaultSucc`.
284+-- |
285+-- | Runs in `O(n)` where `n` is `fromEnum a`.
286+defaultToEnum :: forall a. Bounded a => Enum a => Int -> Maybe a
287+defaultToEnum i' =
288+ if i' < 0
289+ then Nothing
290+ else go i' bottom
291+ where
292+ go i x =
293+ if i == 0
294+ then Just x
295+ -- We avoid using >>= here because it foils tail-call optimization
296+ else case succ x of
297+ Just x' -> go (i - 1) x'
298+ Nothing -> Nothing
299+
300+-- | Provides a default implementation for `fromEnum`.
301+-- |
302+-- | - Assumes `toEnum 0 = Just bottom`.
303+-- | - Cannot be used in conjuction with `defaultPred`.
304+-- |
305+-- | Runs in `O(n)` where `n` is `fromEnum a`.
306+defaultFromEnum :: forall a. Enum a => a -> Int
307+defaultFromEnum = go 0 where
308+ go i x =
309+ case pred x of
310+ Just x' -> go (i + 1) x'
311+ Nothing -> i
312+
313+diag :: forall a. a -> Tuple a a
314+diag a = Tuple a a
315+
316+charToEnum :: Int -> Maybe Char
317+charToEnum n | n >= toCharCode bottom && n <= toCharCode top = Just (fromCharCode n)
318+charToEnum _ = Nothing
319+
320+foreign import toCharCode :: Char -> Int
321+foreign import fromCharCode :: Int -> Char
.spago/p/enums-6.0.1/src/Data/Enum/Gen.pursnew file+18
@@ -0,0 +1,18 @@
1+module Data.Enum.Gen where
2+
3+import Prelude
4+
5+import Control.Monad.Gen (class MonadGen, elements)
6+import Data.Enum (class BoundedEnum, succ, enumFromTo)
7+import Data.Maybe (Maybe(..))
8+import Data.NonEmpty ((:|))
9+
10+-- | Create a random generator for a finite enumeration.
11+genBoundedEnum :: forall m a. MonadGen m => BoundedEnum a => m a
12+genBoundedEnum =
13+ case succ bottom of
14+ Just a →
15+ let possibilities = enumFromTo a top :: Array a
16+ in elements (bottom :| possibilities)
17+ Nothing →
18+ pure bottom
.spago/p/enums-6.0.1/src/Data/Enum/Generic.pursnew file+118
@@ -0,0 +1,118 @@
1+module Data.Enum.Generic where
2+
3+import Prelude
4+
5+import Data.Enum (class BoundedEnum, class Enum, Cardinality(..), cardinality, fromEnum, pred, succ, toEnum)
6+import Data.Generic.Rep (class Generic, Argument(..), Constructor(..), NoArguments(..), Product(..), Sum(..), from, to)
7+import Data.Bounded.Generic (class GenericBottom, class GenericTop, genericBottom', genericTop')
8+import Data.Maybe (Maybe(..))
9+import Data.Newtype (unwrap)
10+
11+class GenericEnum a where
12+ genericPred' :: a -> Maybe a
13+ genericSucc' :: a -> Maybe a
14+
15+instance genericEnumNoArguments :: GenericEnum NoArguments where
16+ genericPred' _ = Nothing
17+ genericSucc' _ = Nothing
18+
19+instance genericEnumArgument :: Enum a => GenericEnum (Argument a) where
20+ genericPred' (Argument a) = Argument <$> pred a
21+ genericSucc' (Argument a) = Argument <$> succ a
22+
23+instance genericEnumConstructor :: GenericEnum a => GenericEnum (Constructor name a) where
24+ genericPred' (Constructor a) = Constructor <$> genericPred' a
25+ genericSucc' (Constructor a) = Constructor <$> genericSucc' a
26+
27+instance genericEnumSum :: (GenericEnum a, GenericTop a, GenericEnum b, GenericBottom b) => GenericEnum (Sum a b) where
28+ genericPred' = case _ of
29+ Inl a -> Inl <$> genericPred' a
30+ Inr b -> case genericPred' b of
31+ Nothing -> Just (Inl genericTop')
32+ Just b' -> Just (Inr b')
33+ genericSucc' = case _ of
34+ Inl a -> case genericSucc' a of
35+ Nothing -> Just (Inr genericBottom')
36+ Just a' -> Just (Inl a')
37+ Inr b -> Inr <$> genericSucc' b
38+
39+instance genericEnumProduct :: (GenericEnum a, GenericTop a, GenericBottom a, GenericEnum b, GenericTop b, GenericBottom b) => GenericEnum (Product a b) where
40+ genericPred' (Product a b) = case genericPred' b of
41+ Just p -> Just $ Product a p
42+ Nothing -> flip Product genericTop' <$> genericPred' a
43+ genericSucc' (Product a b) = case genericSucc' b of
44+ Just s -> Just $ Product a s
45+ Nothing -> flip Product genericBottom' <$> genericSucc' a
46+
47+
48+-- | A `Generic` implementation of the `pred` member from the `Enum` type class.
49+genericPred :: forall a rep. Generic a rep => GenericEnum rep => a -> Maybe a
50+genericPred = map to <<< genericPred' <<< from
51+
52+-- | A `Generic` implementation of the `succ` member from the `Enum` type class.
53+genericSucc :: forall a rep. Generic a rep => GenericEnum rep => a -> Maybe a
54+genericSucc = map to <<< genericSucc' <<< from
55+
56+class GenericBoundedEnum a where
57+ genericCardinality' :: Cardinality a
58+ genericToEnum' :: Int -> Maybe a
59+ genericFromEnum' :: a -> Int
60+
61+instance genericBoundedEnumNoArguments :: GenericBoundedEnum NoArguments where
62+ genericCardinality' = Cardinality 1
63+ genericToEnum' i = if i == 0 then Just NoArguments else Nothing
64+ genericFromEnum' _ = 0
65+
66+instance genericBoundedEnumArgument :: BoundedEnum a => GenericBoundedEnum (Argument a) where
67+ genericCardinality' = Cardinality (unwrap (cardinality :: Cardinality a))
68+ genericToEnum' i = Argument <$> toEnum i
69+ genericFromEnum' (Argument a) = fromEnum a
70+
71+instance genericBoundedEnumConstructor :: GenericBoundedEnum a => GenericBoundedEnum (Constructor name a) where
72+ genericCardinality' = Cardinality (unwrap (genericCardinality' :: Cardinality a))
73+ genericToEnum' i = Constructor <$> genericToEnum' i
74+ genericFromEnum' (Constructor a) = genericFromEnum' a
75+
76+instance genericBoundedEnumSum :: (GenericBoundedEnum a, GenericBoundedEnum b) => GenericBoundedEnum (Sum a b) where
77+ genericCardinality' =
78+ Cardinality
79+ $ unwrap (genericCardinality' :: Cardinality a)
80+ + unwrap (genericCardinality' :: Cardinality b)
81+ genericToEnum' n = to genericCardinality'
82+ where
83+ to :: Cardinality a -> Maybe (Sum a b)
84+ to (Cardinality ca)
85+ | n >= 0 && n < ca = Inl <$> genericToEnum' n
86+ | otherwise = Inr <$> genericToEnum' (n - ca)
87+ genericFromEnum' = case _ of
88+ Inl a -> genericFromEnum' a
89+ Inr b -> genericFromEnum' b + unwrap (genericCardinality' :: Cardinality a)
90+
91+
92+instance genericBoundedEnumProduct :: (GenericBoundedEnum a, GenericBoundedEnum b) => GenericBoundedEnum (Product a b) where
93+ genericCardinality' =
94+ Cardinality
95+ $ unwrap (genericCardinality' :: Cardinality a)
96+ * unwrap (genericCardinality' :: Cardinality b)
97+ genericToEnum' n = to genericCardinality'
98+ where to :: Cardinality b -> Maybe (Product a b)
99+ to (Cardinality cb) = Product <$> (genericToEnum' $ n `div` cb) <*> (genericToEnum' $ n `mod` cb)
100+ genericFromEnum' = from genericCardinality'
101+ where from :: Cardinality b -> (Product a b) -> Int
102+ from (Cardinality cb) (Product a b) = genericFromEnum' a * cb + genericFromEnum' b
103+
104+
105+-- | A `Generic` implementation of the `cardinality` member from the
106+-- | `BoundedEnum` type class.
107+genericCardinality :: forall a rep. Generic a rep => GenericBoundedEnum rep => Cardinality a
108+genericCardinality = Cardinality (unwrap (genericCardinality' :: Cardinality rep))
109+
110+-- | A `Generic` implementation of the `toEnum` member from the `BoundedEnum`
111+-- | type class.
112+genericToEnum :: forall a rep. Generic a rep => GenericBoundedEnum rep => Int -> Maybe a
113+genericToEnum = map to <<< genericToEnum'
114+
115+-- | A `Generic` implementation of the `fromEnum` member from the `BoundedEnum`
116+-- | type class.
117+genericFromEnum :: forall a rep. Generic a rep => GenericBoundedEnum rep => a -> Int
118+genericFromEnum = genericFromEnum' <<< from
.spago/p/exceptions-6.1.0/LICENSEnew file+26
@@ -0,0 +1,26 @@
1+Copyright 2018 PureScript
2+
3+Redistribution and use in source and binary forms, with or without modification,
4+are permitted provided that the following conditions are met:
5+
6+1. Redistributions of source code must retain the above copyright notice, this
7+list of conditions and the following disclaimer.
8+
9+2. Redistributions in binary form must reproduce the above copyright notice,
10+this list of conditions and the following disclaimer in the documentation and/or
11+other materials provided with the distribution.
12+
13+3. Neither the name of the copyright holder nor the names of its contributors
14+may be used to endorse or promote products derived from this software without
15+specific prior written permission.
16+
17+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
21+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.spago/p/exceptions-6.1.0/README.mdnew file+17
@@ -0,0 +1,17 @@
1+# purescript-exceptions
2+
3+[](https://github.com/purescript/purescript-exceptions/releases)
4+[](https://github.com/purescript/purescript-exceptions/actions?query=workflow%3ACI+branch%3Amaster)
5+[](https://pursuit.purescript.org/packages/purescript-exceptions)
6+
7+Exception effects.
8+
9+## Installation
10+
11+```
12+spago install exceptions
13+```
14+
15+## Documentation
16+
17+Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-exceptions).
.spago/p/exceptions-6.1.0/bower.jsonnew file+24
@@ -0,0 +1,24 @@
1+{
2+ "name": "purescript-exceptions",
3+ "homepage": "https://github.com/purescript/purescript-exceptions",
4+ "license": "BSD-3-Clause",
5+ "repository": {
6+ "type": "git",
7+ "url": "https://github.com/purescript/purescript-exceptions.git"
8+ },
9+ "ignore": [
10+ "**/.*",
11+ "bower_components",
12+ "node_modules",
13+ "output",
14+ "test",
15+ "bower.json",
16+ "package.json"
17+ ],
18+ "dependencies": {
19+ "purescript-effect": "^4.0.0",
20+ "purescript-either": "^6.0.0",
21+ "purescript-maybe": "^6.0.0",
22+ "purescript-prelude": "^6.0.0"
23+ }
24+}
.spago/p/exceptions-6.1.0/package.jsonnew file+13
@@ -0,0 +1,13 @@
1+{
2+ "private": true,
3+ "scripts": {
4+ "clean": "rimraf output && rimraf .pulp-cache",
5+ "build": "eslint src && pulp build -- --censor-lib --strict"
6+ },
7+ "devDependencies": {
8+ "eslint": "^7.15.0",
9+ "pulp": "16.0.0-0",
10+ "purescript-psa": "^0.8.2",
11+ "rimraf": "^3.0.2"
12+ }
13+}
.spago/p/exceptions-6.1.0/purs.jsonnew file+16
@@ -0,0 +1,16 @@
1+{
2+ "name": "exceptions",
3+ "version": "6.1.0",
4+ "license": "BSD-3-Clause",
5+ "location": {
6+ "githubOwner": "purescript",
7+ "githubRepo": "purescript-exceptions"
8+ },
9+ "ref": "v6.1.0",
10+ "dependencies": {
11+ "effect": ">=4.0.0 <5.0.0",
12+ "either": ">=6.0.0 <7.0.0",
13+ "maybe": ">=6.0.0 <7.0.0",
14+ "prelude": ">=6.0.0 <7.0.0"
15+ }
16+}
.spago/p/exceptions-6.1.0/src/Effect/Exception.jsnew file+59
@@ -0,0 +1,59 @@
1+export function showErrorImpl(err) {
2+ return err.stack || err.toString();
3+}
4+
5+export function error(msg) {
6+ return new Error(msg);
7+}
8+
9+export function errorWithCause(msg) {
10+ return function(cause) {
11+ return new Error(msg, { cause });
12+ };
13+}
14+
15+export function errorWithName(msg) {
16+ return function(name) {
17+ const e = new Error(msg);
18+ e.name = name;
19+ return e;
20+ };
21+}
22+
23+export function message(e) {
24+ return e.message;
25+}
26+
27+export function name(e) {
28+ return e.name || "Error";
29+}
30+
31+export function stackImpl(just) {
32+ return function (nothing) {
33+ return function (e) {
34+ return e.stack ? just(e.stack) : nothing;
35+ };
36+ };
37+}
38+
39+export function throwException(e) {
40+ return function () {
41+ throw e;
42+ };
43+}
44+
45+export function catchException(c) {
46+ return function (t) {
47+ return function () {
48+ try {
49+ return t();
50+ } catch (e) {
51+ if (e instanceof Error || Object.prototype.toString.call(e) === "[object Error]") {
52+ return c(e)();
53+ } else {
54+ return c(new Error(e.toString()))();
55+ }
56+ }
57+ };
58+ };
59+}
.spago/p/exceptions-6.1.0/src/Effect/Exception.pursnew file+110
@@ -0,0 +1,110 @@
1+-- | This module defines an effect, actions and handlers for working
2+-- | with JavaScript exceptions.
3+
4+module Effect.Exception
5+ ( Error
6+ , catchException
7+ , error
8+ , errorWithCause
9+ , errorWithName
10+ , message
11+ , name
12+ , stack
13+ , throw
14+ , throwException
15+ , try
16+ )
17+ where
18+
19+import Prelude
20+
21+import Effect (Effect)
22+
23+import Data.Either (Either(..))
24+import Data.Maybe (Maybe(..))
25+
26+-- | The type of JavaScript errors
27+foreign import data Error :: Type
28+
29+instance showError :: Show Error where
30+ show = showErrorImpl
31+
32+foreign import showErrorImpl :: Error -> String
33+
34+-- | Create a JavaScript error, specifying a message
35+foreign import error :: String -> Error
36+
37+-- | Create a JavaScript error, specifying a message and a cause
38+foreign import errorWithCause :: String -> Error -> Error
39+
40+-- | Create a JavaScript error, specifying a message and a name
41+foreign import errorWithName :: String -> String -> Error
42+
43+-- | Get the error message from a JavaScript error
44+foreign import message :: Error -> String
45+
46+-- | Get the error name when defined, or fallback to 'Error'
47+foreign import name :: Error -> String
48+
49+-- | Get the stack trace from a JavaScript error
50+stack :: Error -> Maybe String
51+stack = stackImpl Just Nothing
52+
53+foreign import stackImpl
54+ :: (forall a. a -> Maybe a)
55+ -> (forall a. Maybe a)
56+ -> Error
57+ -> Maybe String
58+
59+-- | Throw an exception
60+-- |
61+-- | For example:
62+-- |
63+-- | ```purescript
64+-- | main = do
65+-- | x <- readNumber
66+-- | when (x < 0) $ throwException $
67+-- | error "Expected a non-negative number"
68+-- | ```
69+foreign import throwException
70+ :: forall a
71+ . Error
72+ -> Effect a
73+
74+-- | Catch an exception by providing an exception handler.
75+-- |
76+-- | For example:
77+-- |
78+-- | ```purescript
79+-- | main = catchException Console.logShow do
80+-- | Console.log "Exceptions thrown in this block will be logged to the console"
81+-- | ```
82+foreign import catchException
83+ :: forall a
84+ . (Error -> Effect a)
85+ -> Effect a
86+ -> Effect a
87+
88+-- | A shortcut allowing you to throw an error in one step. Defined as
89+-- | `throwException <<< error`.
90+throw :: forall a. String -> Effect a
91+throw = throwException <<< error
92+
93+-- | Runs an Eff and returns eventual Exceptions as a `Left` value. If the
94+-- | computation succeeds the result gets wrapped in a `Right`.
95+-- |
96+-- | For example:
97+-- |
98+-- | ```purescript
99+-- | main :: Effect Unit
100+-- | main = do
101+-- | result <- try (readTextFile UTF8 "README.md")
102+-- | case result of
103+-- | Right lines ->
104+-- | Console.log ("README: \n" <> lines )
105+-- | Left error ->
106+-- | Console.error ("Couldn't open README.md. Error was: " <> show error)
107+-- | ```
108+
109+try :: forall a. Effect a -> Effect (Either Error a)
110+try action = catchException (pure <<< Left) (Right <$> action)
.spago/p/exceptions-6.1.0/src/Effect/Exception/Unsafe.pursnew file+14
@@ -0,0 +1,14 @@
1+module Effect.Exception.Unsafe where
2+
3+import Effect.Exception (Error, error, throwException)
4+import Effect.Unsafe (unsafePerformEffect)
5+import Control.Semigroupoid ((<<<))
6+
7+-- | Throw an exception in pure code. This function should be used very
8+-- | sparingly, as it can cause unexpected crashes at runtime.
9+unsafeThrowException :: forall a. Error -> a
10+unsafeThrowException = unsafePerformEffect <<< throwException
11+
12+-- | Defined as `unsafeThrowException <<< error`.
13+unsafeThrow :: forall a. String -> a
14+unsafeThrow = unsafeThrowException <<< error
.spago/p/exists-6.0.0/LICENSEnew file+26
@@ -0,0 +1,26 @@
1+Copyright 2018 PureScript
2+
3+Redistribution and use in source and binary forms, with or without modification,
4+are permitted provided that the following conditions are met:
5+
6+1. Redistributions of source code must retain the above copyright notice, this
7+list of conditions and the following disclaimer.
8+
9+2. Redistributions in binary form must reproduce the above copyright notice,
10+this list of conditions and the following disclaimer in the documentation and/or
11+other materials provided with the distribution.
12+
13+3. Neither the name of the copyright holder nor the names of its contributors
14+may be used to endorse or promote products derived from this software without
15+specific prior written permission.
16+
17+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
21+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.spago/p/exists-6.0.0/README.mdnew file+37
@@ -0,0 +1,37 @@
1+# purescript-exists
2+
3+[](https://github.com/purescript/purescript-exists/releases)
4+[](https://github.com/purescript/purescript-exists/actions?query=workflow%3ACI+branch%3Amaster)
5+[](https://pursuit.purescript.org/packages/purescript-exists)
6+
7+The `Exists` type, for encoding existential types.
8+
9+## Installation
10+
11+```
12+spago install exists
13+```
14+
15+## Overview
16+
17+The type `Exists f` is isomorphic to the existential type `exists a. f a`.
18+
19+For example, consider the type `exists s. Tuple s (s -> Tuple s a)` which represents infinite streams of elements of type `a`.
20+
21+This type can be constructed by creating a type constructor `StreamF` as follows:
22+
23+```purescript
24+data StreamF a s = StreamF s (s -> Tuple s a)
25+```
26+
27+We can then define the type of streams using `Exists`:
28+
29+```purescript
30+type Stream a = Exists (StreamF a)
31+```
32+
33+The `mkExists` and `runExists` functions then enable packing and unpacking of `SteamF` into/out of `Stream`.
34+
35+## Documentation
36+
37+Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-exists).
.spago/p/exists-6.0.0/bower.jsonnew file+25
@@ -0,0 +1,25 @@
1+{
2+ "name": "purescript-exists",
3+ "homepage": "https://github.com/purescript/purescript-exists",
4+ "description": "Existential types as a library",
5+ "license": "BSD-3-Clause",
6+ "repository": {
7+ "type": "git",
8+ "url": "https://github.com/purescript/purescript-exists.git"
9+ },
10+ "ignore": [
11+ "**/.*",
12+ "bower_components",
13+ "node_modules",
14+ "output",
15+ "test",
16+ "bower.json",
17+ "package.json"
18+ ],
19+ "dependencies": {
20+ "purescript-unsafe-coerce": "^6.0.0"
21+ },
22+ "devDependencies": {
23+ "purescript-console": "^6.0.0"
24+ }
25+}
.spago/p/exists-6.0.0/package.jsonnew file+13
@@ -0,0 +1,13 @@
1+{
2+ "private": true,
3+ "scripts": {
4+ "clean": "rimraf output && rimraf .pulp-cache",
5+ "build": "pulp build -- --censor-lib --strict",
6+ "test": "pulp test"
7+ },
8+ "devDependencies": {
9+ "pulp": "16.0.0-0",
10+ "purescript-psa": "^0.8.2",
11+ "rimraf": "^3.0.2"
12+ }
13+}
.spago/p/exists-6.0.0/purs.jsonnew file+14
@@ -0,0 +1,14 @@
1+{
2+ "name": "exists",
3+ "version": "6.0.0",
4+ "license": "BSD-3-Clause",
5+ "description": "Existential types as a library",
6+ "location": {
7+ "githubOwner": "purescript",
8+ "githubRepo": "purescript-exists"
9+ },
10+ "ref": "v6.0.0",
11+ "dependencies": {
12+ "unsafe-coerce": ">=6.0.0 <7.0.0"
13+ }
14+}
.spago/p/exists-6.0.0/src/Data/Exists.pursnew file+57
@@ -0,0 +1,57 @@
1+module Data.Exists where
2+
3+import Unsafe.Coerce (unsafeCoerce)
4+
5+-- | This type constructor can be used to existentially quantify over a type.
6+-- |
7+-- | Specifically, the type `Exists f` is isomorphic to the existential type `exists a. f a`.
8+-- |
9+-- | Existential types can be encoded using universal types (`forall`) for endofunctors in more general
10+-- | categories. The benefit of this library is that, by using the FFI, we can create an efficient
11+-- | representation of the existential by simply hiding type information.
12+-- |
13+-- | For example, consider the type `exists s. Tuple s (s -> Tuple s a)` which represents infinite streams
14+-- | of elements of type `a`.
15+-- |
16+-- | This type can be constructed by creating a type constructor `StreamF` as follows:
17+-- |
18+-- | ```purescript
19+-- | data StreamF a s = StreamF s (s -> Tuple s a)
20+-- | ```
21+-- |
22+-- | We can then define the type of streams using `Exists`:
23+-- |
24+-- | ```purescript
25+-- | type Stream a = Exists (StreamF a)
26+-- | ```
27+foreign import data Exists :: forall k. (k -> Type) -> Type
28+
29+type role Exists representational
30+
31+-- | The `mkExists` function is used to introduce a value of type `Exists f`, by providing a value of
32+-- | type `f a`, for some type `a` which will be hidden in the existentially-quantified type.
33+-- |
34+-- | For example, to create a value of type `Stream Number`, we might use `mkExists` as follows:
35+-- |
36+-- | ```purescript
37+-- | nats :: Stream Number
38+-- | nats = mkExists $ StreamF 0 (\n -> Tuple (n + 1) n)
39+-- | ```
40+mkExists :: forall f a. f a -> Exists f
41+mkExists = unsafeCoerce
42+
43+-- | The `runExists` function is used to eliminate a value of type `Exists f`. The rank 2 type ensures
44+-- | that the existentially-quantified type does not escape its scope. Since the function is required
45+-- | to work for _any_ type `a`, it will work for the existentially-quantified type.
46+-- |
47+-- | For example, we can write a function to obtain the head of a stream by using `runExists` as follows:
48+-- |
49+-- | ```purescript
50+-- | head :: forall a. Stream a -> a
51+-- | head = runExists head'
52+-- | where
53+-- | head' :: forall s. StreamF a s -> a
54+-- | head' (StreamF s f) = snd (f s)
55+-- | ```
56+runExists :: forall f r. (forall a. f a -> r) -> Exists f -> r
57+runExists = unsafeCoerce
.spago/p/foldable-traversable-6.0.0/LICENSEnew file+26
@@ -0,0 +1,26 @@
1+Copyright 2018 PureScript
2+
3+Redistribution and use in source and binary forms, with or without modification,
4+are permitted provided that the following conditions are met:
5+
6+1. Redistributions of source code must retain the above copyright notice, this
7+list of conditions and the following disclaimer.
8+
9+2. Redistributions in binary form must reproduce the above copyright notice,
10+this list of conditions and the following disclaimer in the documentation and/or
11+other materials provided with the distribution.
12+
13+3. Neither the name of the copyright holder nor the names of its contributors
14+may be used to endorse or promote products derived from this software without
15+specific prior written permission.
16+
17+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
21+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.spago/p/foldable-traversable-6.0.0/README.mdnew file+17
@@ -0,0 +1,17 @@
1+# purescript-foldable-traversable
2+
3+[](https://github.com/purescript/purescript-foldable-traversable/releases)
4+[](https://github.com/purescript/purescript-foldable-traversable/actions?query=workflow%3ACI+branch%3Amaster)
5+[](https://pursuit.purescript.org/packages/purescript-foldable-traversable)
6+
7+Classes for foldable and traversable data structures.
8+
9+## Installation
10+
11+```
12+spago install foldable-traversable
13+```
14+
15+## Documentation
16+
17+Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-foldable-traversable).
.spago/p/foldable-traversable-6.0.0/bower.jsonnew file+38
@@ -0,0 +1,38 @@
1+{
2+ "name": "purescript-foldable-traversable",
3+ "homepage": "https://github.com/purescript/purescript-foldable-traversable",
4+ "description": "Classes for foldable and traversable data structures",
5+ "license": "BSD-3-Clause",
6+ "repository": {
7+ "type": "git",
8+ "url": "https://github.com/purescript/purescript-foldable-traversable.git"
9+ },
10+ "ignore": [
11+ "**/.*",
12+ "bower_components",
13+ "node_modules",
14+ "output",
15+ "test",
16+ "bower.json",
17+ "package.json"
18+ ],
19+ "dependencies": {
20+ "purescript-bifunctors": "^6.0.0",
21+ "purescript-const": "^6.0.0",
22+ "purescript-control": "^6.0.0",
23+ "purescript-either": "^6.0.0",
24+ "purescript-functors": "^5.0.0",
25+ "purescript-identity": "^6.0.0",
26+ "purescript-maybe": "^6.0.0",
27+ "purescript-newtype": "^5.0.0",
28+ "purescript-orders": "^6.0.0",
29+ "purescript-prelude": "^6.0.0",
30+ "purescript-tuples": "^7.0.0"
31+ },
32+ "devDependencies": {
33+ "purescript-assert": "^6.0.0",
34+ "purescript-console": "^6.0.0",
35+ "purescript-integers": "^6.0.0",
36+ "purescript-unsafe-coerce": "^6.0.0"
37+ }
38+}
.spago/p/foldable-traversable-6.0.0/package.jsonnew file+14
@@ -0,0 +1,14 @@
1+{
2+ "private": true,
3+ "scripts": {
4+ "clean": "rimraf output && rimraf .pulp-cache",
5+ "build": "eslint src && pulp build -- --censor-lib --strict",
6+ "test": "pulp test"
7+ },
8+ "devDependencies": {
9+ "eslint": "^7.15.0",
10+ "pulp": "16.0.0-0",
11+ "purescript-psa": "^0.8.2",
12+ "rimraf": "^3.0.2"
13+ }
14+}
.spago/p/foldable-traversable-6.0.0/purs.jsonnew file+24
@@ -0,0 +1,24 @@
1+{
2+ "name": "foldable-traversable",
3+ "version": "6.0.0",
4+ "license": "BSD-3-Clause",
5+ "description": "Classes for foldable and traversable data structures",
6+ "location": {
7+ "githubOwner": "purescript",
8+ "githubRepo": "purescript-foldable-traversable"
9+ },
10+ "ref": "v6.0.0",
11+ "dependencies": {
12+ "bifunctors": ">=6.0.0 <7.0.0",
13+ "const": ">=6.0.0 <7.0.0",
14+ "control": ">=6.0.0 <7.0.0",
15+ "either": ">=6.0.0 <7.0.0",
16+ "functors": ">=5.0.0 <6.0.0",
17+ "identity": ">=6.0.0 <7.0.0",
18+ "maybe": ">=6.0.0 <7.0.0",
19+ "newtype": ">=5.0.0 <6.0.0",
20+ "orders": ">=6.0.0 <7.0.0",
21+ "prelude": ">=6.0.0 <7.0.0",
22+ "tuples": ">=7.0.0 <8.0.0"
23+ }
24+}
.spago/p/foldable-traversable-6.0.0/src/Data/Bifoldable.pursnew file+198
@@ -0,0 +1,198 @@
1+module Data.Bifoldable where
2+
3+import Prelude
4+
5+import Control.Apply (applySecond)
6+import Data.Const (Const(..))
7+import Data.Either (Either(..))
8+import Data.Foldable (class Foldable, foldr, foldl, foldMap)
9+import Data.Functor.Clown (Clown(..))
10+import Data.Functor.Flip (Flip(..))
11+import Data.Functor.Joker (Joker(..))
12+import Data.Functor.Product2 (Product2(..))
13+import Data.Monoid.Conj (Conj(..))
14+import Data.Monoid.Disj (Disj(..))
15+import Data.Monoid.Dual (Dual(..))
16+import Data.Monoid.Endo (Endo(..))
17+import Data.Newtype (unwrap)
18+import Data.Tuple (Tuple(..))
19+
20+-- | `Bifoldable` represents data structures with two type arguments which can be
21+-- | folded.
22+-- |
23+-- | A fold for such a structure requires two step functions, one for each type
24+-- | argument. Type class instances should choose the appropriate step function based
25+-- | on the type of the element encountered at each point of the fold.
26+-- |
27+-- | Default implementations are provided by the following functions:
28+-- |
29+-- | - `bifoldrDefault`
30+-- | - `bifoldlDefault`
31+-- | - `bifoldMapDefaultR`
32+-- | - `bifoldMapDefaultL`
33+-- |
34+-- | Note: some combinations of the default implementations are unsafe to
35+-- | use together - causing a non-terminating mutually recursive cycle.
36+-- | These combinations are documented per function.
37+class Bifoldable p where
38+ bifoldr :: forall a b c. (a -> c -> c) -> (b -> c -> c) -> c -> p a b -> c
39+ bifoldl :: forall a b c. (c -> a -> c) -> (c -> b -> c) -> c -> p a b -> c
40+ bifoldMap :: forall m a b. Monoid m => (a -> m) -> (b -> m) -> p a b -> m
41+
42+instance bifoldableClown :: Foldable f => Bifoldable (Clown f) where
43+ bifoldr l _ u (Clown f) = foldr l u f
44+ bifoldl l _ u (Clown f) = foldl l u f
45+ bifoldMap l _ (Clown f) = foldMap l f
46+
47+instance bifoldableJoker :: Foldable f => Bifoldable (Joker f) where
48+ bifoldr _ r u (Joker f) = foldr r u f
49+ bifoldl _ r u (Joker f) = foldl r u f
50+ bifoldMap _ r (Joker f) = foldMap r f
51+
52+instance bifoldableFlip :: Bifoldable p => Bifoldable (Flip p) where
53+ bifoldr r l u (Flip p) = bifoldr l r u p
54+ bifoldl r l u (Flip p) = bifoldl l r u p
55+ bifoldMap r l (Flip p) = bifoldMap l r p
56+
57+instance bifoldableProduct2 :: (Bifoldable f, Bifoldable g) => Bifoldable (Product2 f g) where
58+ bifoldr l r u m = bifoldrDefault l r u m
59+ bifoldl l r u m = bifoldlDefault l r u m
60+ bifoldMap l r (Product2 f g) = bifoldMap l r f <> bifoldMap l r g
61+
62+instance bifoldableEither :: Bifoldable Either where
63+ bifoldr f _ z (Left a) = f a z
64+ bifoldr _ g z (Right b) = g b z
65+ bifoldl f _ z (Left a) = f z a
66+ bifoldl _ g z (Right b) = g z b
67+ bifoldMap f _ (Left a) = f a
68+ bifoldMap _ g (Right b) = g b
69+
70+instance bifoldableTuple :: Bifoldable Tuple where
71+ bifoldMap f g (Tuple a b) = f a <> g b
72+ bifoldr f g z (Tuple a b) = f a (g b z)
73+ bifoldl f g z (Tuple a b) = g (f z a) b
74+
75+instance bifoldableConst :: Bifoldable Const where
76+ bifoldr f _ z (Const a) = f a z
77+ bifoldl f _ z (Const a) = f z a
78+ bifoldMap f _ (Const a) = f a
79+
80+-- | A default implementation of `bifoldr` using `bifoldMap`.
81+-- |
82+-- | Note: when defining a `Bifoldable` instance, this function is unsafe to
83+-- | use in combination with `bifoldMapDefaultR`.
84+bifoldrDefault
85+ :: forall p a b c
86+ . Bifoldable p
87+ => (a -> c -> c)
88+ -> (b -> c -> c)
89+ -> c
90+ -> p a b
91+ -> c
92+bifoldrDefault f g z p = unwrap (bifoldMap (Endo <<< f) (Endo <<< g) p) z
93+
94+-- | A default implementation of `bifoldl` using `bifoldMap`.
95+-- |
96+-- | Note: when defining a `Bifoldable` instance, this function is unsafe to
97+-- | use in combination with `bifoldMapDefaultL`.
98+bifoldlDefault
99+ :: forall p a b c
100+ . Bifoldable p
101+ => (c -> a -> c)
102+ -> (c -> b -> c)
103+ -> c
104+ -> p a b
105+ -> c
106+bifoldlDefault f g z p =
107+ unwrap
108+ (unwrap
109+ (bifoldMap (Dual <<< Endo <<< flip f) (Dual <<< Endo <<< flip g) p))
110+ z
111+
112+-- | A default implementation of `bifoldMap` using `bifoldr`.
113+-- |
114+-- | Note: when defining a `Bifoldable` instance, this function is unsafe to
115+-- | use in combination with `bifoldrDefault`.
116+bifoldMapDefaultR
117+ :: forall p m a b
118+ . Bifoldable p
119+ => Monoid m
120+ => (a -> m)
121+ -> (b -> m)
122+ -> p a b
123+ -> m
124+bifoldMapDefaultR f g = bifoldr (append <<< f) (append <<< g) mempty
125+
126+-- | A default implementation of `bifoldMap` using `bifoldl`.
127+-- |
128+-- | Note: when defining a `Bifoldable` instance, this function is unsafe to
129+-- | use in combination with `bifoldlDefault`.
130+bifoldMapDefaultL
131+ :: forall p m a b
132+ . Bifoldable p
133+ => Monoid m
134+ => (a -> m)
135+ -> (b -> m)
136+ -> p a b
137+ -> m
138+bifoldMapDefaultL f g = bifoldl (\m a -> m <> f a) (\m b -> m <> g b) mempty
139+
140+
141+-- | Fold a data structure, accumulating values in a monoidal type.
142+bifold :: forall t m. Bifoldable t => Monoid m => t m m -> m
143+bifold = bifoldMap identity identity
144+
145+-- | Traverse a data structure, accumulating effects using an `Applicative` functor,
146+-- | ignoring the final result.
147+bitraverse_
148+ :: forall t f a b c d
149+ . Bifoldable t
150+ => Applicative f
151+ => (a -> f c)
152+ -> (b -> f d)
153+ -> t a b
154+ -> f Unit
155+bitraverse_ f g = bifoldr (applySecond <<< f) (applySecond <<< g) (pure unit)
156+
157+-- | A version of `bitraverse_` with the data structure as the first argument.
158+bifor_
159+ :: forall t f a b c d
160+ . Bifoldable t
161+ => Applicative f
162+ => t a b
163+ -> (a -> f c)
164+ -> (b -> f d)
165+ -> f Unit
166+bifor_ t f g = bitraverse_ f g t
167+
168+-- | Collapse a data structure, collecting effects using an `Applicative` functor,
169+-- | ignoring the final result.
170+bisequence_
171+ :: forall t f a b
172+ . Bifoldable t
173+ => Applicative f
174+ => t (f a) (f b)
175+ -> f Unit
176+bisequence_ = bitraverse_ identity identity
177+
178+-- | Test whether a predicate holds at any position in a data structure.
179+biany
180+ :: forall t a b c
181+ . Bifoldable t
182+ => BooleanAlgebra c
183+ => (a -> c)
184+ -> (b -> c)
185+ -> t a b
186+ -> c
187+biany p q = unwrap <<< bifoldMap (Disj <<< p) (Disj <<< q)
188+
189+-- | Test whether a predicate holds at all positions in a data structure.
190+biall
191+ :: forall t a b c
192+ . Bifoldable t
193+ => BooleanAlgebra c
194+ => (a -> c)
195+ -> (b -> c)
196+ -> t a b
197+ -> c
198+biall p q = unwrap <<< bifoldMap (Conj <<< p) (Conj <<< q)
.spago/p/foldable-traversable-6.0.0/src/Data/Bitraversable.pursnew file+136
@@ -0,0 +1,136 @@
1+module Data.Bitraversable
2+ ( class Bitraversable, bitraverse, bisequence
3+ , bitraverseDefault
4+ , bisequenceDefault
5+ , ltraverse
6+ , rtraverse
7+ , bifor
8+ , lfor
9+ , rfor
10+ , module Data.Bifoldable
11+ ) where
12+
13+import Prelude
14+
15+import Data.Bifoldable (class Bifoldable, biall, biany, bifold, bifoldMap, bifoldMapDefaultL, bifoldMapDefaultR, bifoldl, bifoldlDefault, bifoldr, bifoldrDefault, bifor_, bisequence_, bitraverse_)
16+import Data.Traversable (class Traversable, traverse, sequence)
17+import Data.Bifunctor (class Bifunctor, bimap)
18+import Data.Const (Const(..))
19+import Data.Either (Either(..))
20+import Data.Functor.Clown (Clown(..))
21+import Data.Functor.Flip (Flip(..))
22+import Data.Functor.Joker (Joker(..))
23+import Data.Functor.Product2 (Product2(..))
24+import Data.Tuple (Tuple(..))
25+
26+-- | `Bitraversable` represents data structures with two type arguments which can be
27+-- | traversed.
28+-- |
29+-- | A traversal for such a structure requires two functions, one for each type
30+-- | argument. Type class instances should choose the appropriate function based
31+-- | on the type of the element encountered at each point of the traversal.
32+-- |
33+-- | Default implementations are provided by the following functions:
34+-- |
35+-- | - `bitraverseDefault`
36+-- | - `bisequenceDefault`
37+class (Bifunctor t, Bifoldable t) <= Bitraversable t where
38+ bitraverse :: forall f a b c d. Applicative f => (a -> f c) -> (b -> f d) -> t a b -> f (t c d)
39+ bisequence :: forall f a b. Applicative f => t (f a) (f b) -> f (t a b)
40+
41+instance bitraversableClown :: Traversable f => Bitraversable (Clown f) where
42+ bitraverse l _ (Clown f) = Clown <$> traverse l f
43+ bisequence (Clown f) = Clown <$> sequence f
44+
45+instance bitraversableJoker :: Traversable f => Bitraversable (Joker f) where
46+ bitraverse _ r (Joker f) = Joker <$> traverse r f
47+ bisequence (Joker f) = Joker <$> sequence f
48+
49+instance bitraversableFlip :: Bitraversable p => Bitraversable (Flip p) where
50+ bitraverse r l (Flip p) = Flip <$> bitraverse l r p
51+ bisequence (Flip p) = Flip <$> bisequence p
52+
53+instance bitraversableProduct2 :: (Bitraversable f, Bitraversable g) => Bitraversable (Product2 f g) where
54+ bitraverse l r (Product2 f g) = Product2 <$> bitraverse l r f <*> bitraverse l r g
55+ bisequence (Product2 f g) = Product2 <$> bisequence f <*> bisequence g
56+
57+instance bitraversableEither :: Bitraversable Either where
58+ bitraverse f _ (Left a) = Left <$> f a
59+ bitraverse _ g (Right b) = Right <$> g b
60+ bisequence (Left a) = Left <$> a
61+ bisequence (Right b) = Right <$> b
62+
63+instance bitraversableTuple :: Bitraversable Tuple where
64+ bitraverse f g (Tuple a b) = Tuple <$> f a <*> g b
65+ bisequence (Tuple a b) = Tuple <$> a <*> b
66+
67+instance bitraversableConst :: Bitraversable Const where
68+ bitraverse f _ (Const a) = Const <$> f a
69+ bisequence (Const a) = Const <$> a
70+
71+ltraverse
72+ :: forall t b c a f
73+ . Bitraversable t
74+ => Applicative f
75+ => (a -> f c)
76+ -> t a b
77+ -> f (t c b)
78+ltraverse f = bitraverse f pure
79+
80+rtraverse
81+ :: forall t b c a f
82+ . Bitraversable t
83+ => Applicative f
84+ => (b -> f c)
85+ -> t a b
86+ -> f (t a c)
87+rtraverse = bitraverse pure
88+
89+-- | A default implementation of `bitraverse` using `bisequence` and `bimap`.
90+bitraverseDefault
91+ :: forall t f a b c d
92+ . Bitraversable t
93+ => Applicative f
94+ => (a -> f c)
95+ -> (b -> f d)
96+ -> t a b
97+ -> f (t c d)
98+bitraverseDefault f g t = bisequence (bimap f g t)
99+
100+-- | A default implementation of `bisequence` using `bitraverse`.
101+bisequenceDefault
102+ :: forall t f a b
103+ . Bitraversable t
104+ => Applicative f
105+ => t (f a) (f b)
106+ -> f (t a b)
107+bisequenceDefault = bitraverse identity identity
108+
109+-- | Traverse a data structure, accumulating effects and results using an `Applicative` functor.
110+bifor
111+ :: forall t f a b c d
112+ . Bitraversable t
113+ => Applicative f
114+ => t a b
115+ -> (a -> f c)
116+ -> (b -> f d)
117+ -> f (t c d)
118+bifor t f g = bitraverse f g t
119+
120+lfor
121+ :: forall t b c a f
122+ . Bitraversable t
123+ => Applicative f
124+ => t a b
125+ -> (a -> f c)
126+ -> f (t c b)
127+lfor t f = bitraverse f pure t
128+
129+rfor
130+ :: forall t b c a f
131+ . Bitraversable t
132+ => Applicative f
133+ => t a b
134+ -> (b -> f c)
135+ -> f (t a c)
136+rfor t f = bitraverse pure f t
.spago/p/foldable-traversable-6.0.0/src/Data/Foldable.jsnew file+25
@@ -0,0 +1,25 @@
1+export const foldrArray = function (f) {
2+ return function (init) {
3+ return function (xs) {
4+ var acc = init;
5+ var len = xs.length;
6+ for (var i = len - 1; i >= 0; i--) {
7+ acc = f(xs[i])(acc);
8+ }
9+ return acc;
10+ };
11+ };
12+};
13+
14+export const foldlArray = function (f) {
15+ return function (init) {
16+ return function (xs) {
17+ var acc = init;
18+ var len = xs.length;
19+ for (var i = 0; i < len; i++) {
20+ acc = f(acc)(xs[i]);
21+ }
22+ return acc;
23+ };
24+ };
25+};
.spago/p/foldable-traversable-6.0.0/src/Data/Foldable.pursnew file+471
@@ -0,0 +1,471 @@
1+module Data.Foldable
2+ ( class Foldable, foldr, foldl, foldMap
3+ , foldrDefault, foldlDefault, foldMapDefaultL, foldMapDefaultR
4+ , fold
5+ , foldM
6+ , traverse_
7+ , for_
8+ , sequence_
9+ , oneOf
10+ , oneOfMap
11+ , intercalate
12+ , surroundMap
13+ , surround
14+ , and
15+ , or
16+ , all
17+ , any
18+ , sum
19+ , product
20+ , elem
21+ , notElem
22+ , indexl
23+ , indexr
24+ , find
25+ , findMap
26+ , maximum
27+ , maximumBy
28+ , minimum
29+ , minimumBy
30+ , null
31+ , length
32+ , lookup
33+ ) where
34+
35+import Prelude
36+
37+import Control.Plus (class Plus, alt, empty)
38+import Data.Const (Const)
39+import Data.Either (Either(..))
40+import Data.Functor.App (App(..))
41+import Data.Functor.Compose (Compose(..))
42+import Data.Functor.Coproduct (Coproduct, coproduct)
43+import Data.Functor.Product (Product(..))
44+import Data.Identity (Identity(..))
45+import Data.Maybe (Maybe(..))
46+import Data.Maybe.First (First(..))
47+import Data.Maybe.Last (Last(..))
48+import Data.Monoid.Additive (Additive(..))
49+import Data.Monoid.Conj (Conj(..))
50+import Data.Monoid.Disj (Disj(..))
51+import Data.Monoid.Dual (Dual(..))
52+import Data.Monoid.Endo (Endo(..))
53+import Data.Monoid.Multiplicative (Multiplicative(..))
54+import Data.Newtype (alaF, unwrap)
55+import Data.Tuple (Tuple(..))
56+
57+-- | `Foldable` represents data structures which can be _folded_.
58+-- |
59+-- | - `foldr` folds a structure from the right
60+-- | - `foldl` folds a structure from the left
61+-- | - `foldMap` folds a structure by accumulating values in a `Monoid`
62+-- |
63+-- | Default implementations are provided by the following functions:
64+-- |
65+-- | - `foldrDefault`
66+-- | - `foldlDefault`
67+-- | - `foldMapDefaultR`
68+-- | - `foldMapDefaultL`
69+-- |
70+-- | Note: some combinations of the default implementations are unsafe to
71+-- | use together - causing a non-terminating mutually recursive cycle.
72+-- | These combinations are documented per function.
73+class Foldable f where
74+ foldr :: forall a b. (a -> b -> b) -> b -> f a -> b
75+ foldl :: forall a b. (b -> a -> b) -> b -> f a -> b
76+ foldMap :: forall a m. Monoid m => (a -> m) -> f a -> m
77+
78+-- | A default implementation of `foldr` using `foldMap`.
79+-- |
80+-- | Note: when defining a `Foldable` instance, this function is unsafe to use
81+-- | in combination with `foldMapDefaultR`.
82+foldrDefault
83+ :: forall f a b
84+ . Foldable f
85+ => (a -> b -> b)
86+ -> b
87+ -> f a
88+ -> b
89+foldrDefault c u xs = unwrap (foldMap (Endo <<< c) xs) u
90+
91+-- | A default implementation of `foldl` using `foldMap`.
92+-- |
93+-- | Note: when defining a `Foldable` instance, this function is unsafe to use
94+-- | in combination with `foldMapDefaultL`.
95+foldlDefault
96+ :: forall f a b
97+ . Foldable f
98+ => (b -> a -> b)
99+ -> b
100+ -> f a
101+ -> b
102+foldlDefault c u xs = unwrap (unwrap (foldMap (Dual <<< Endo <<< flip c) xs)) u
103+
104+-- | A default implementation of `foldMap` using `foldr`.
105+-- |
106+-- | Note: when defining a `Foldable` instance, this function is unsafe to use
107+-- | in combination with `foldrDefault`.
108+foldMapDefaultR
109+ :: forall f a m
110+ . Foldable f
111+ => Monoid m
112+ => (a -> m)
113+ -> f a
114+ -> m
115+foldMapDefaultR f = foldr (\x acc -> f x <> acc) mempty
116+
117+-- | A default implementation of `foldMap` using `foldl`.
118+-- |
119+-- | Note: when defining a `Foldable` instance, this function is unsafe to use
120+-- | in combination with `foldlDefault`.
121+foldMapDefaultL
122+ :: forall f a m
123+ . Foldable f
124+ => Monoid m
125+ => (a -> m)
126+ -> f a
127+ -> m
128+foldMapDefaultL f = foldl (\acc x -> acc <> f x) mempty
129+
130+instance foldableArray :: Foldable Array where
131+ foldr = foldrArray
132+ foldl = foldlArray
133+ foldMap = foldMapDefaultR
134+
135+foreign import foldrArray :: forall a b. (a -> b -> b) -> b -> Array a -> b
136+foreign import foldlArray :: forall a b. (b -> a -> b) -> b -> Array a -> b
137+
138+instance foldableMaybe :: Foldable Maybe where
139+ foldr _ z Nothing = z
140+ foldr f z (Just x) = x `f` z
141+ foldl _ z Nothing = z
142+ foldl f z (Just x) = z `f` x
143+ foldMap _ Nothing = mempty
144+ foldMap f (Just x) = f x
145+
146+instance foldableFirst :: Foldable First where
147+ foldr f z (First x) = foldr f z x
148+ foldl f z (First x) = foldl f z x
149+ foldMap f (First x) = foldMap f x
150+
151+instance foldableLast :: Foldable Last where
152+ foldr f z (Last x) = foldr f z x
153+ foldl f z (Last x) = foldl f z x
154+ foldMap f (Last x) = foldMap f x
155+
156+instance foldableAdditive :: Foldable Additive where
157+ foldr f z (Additive x) = x `f` z
158+ foldl f z (Additive x) = z `f` x
159+ foldMap f (Additive x) = f x
160+
161+instance foldableDual :: Foldable Dual where
162+ foldr f z (Dual x) = x `f` z
163+ foldl f z (Dual x) = z `f` x
164+ foldMap f (Dual x) = f x
165+
166+instance foldableDisj :: Foldable Disj where
167+ foldr f z (Disj x) = f x z
168+ foldl f z (Disj x) = f z x
169+ foldMap f (Disj x) = f x
170+
171+instance foldableConj :: Foldable Conj where
172+ foldr f z (Conj x) = f x z
173+ foldl f z (Conj x) = f z x
174+ foldMap f (Conj x) = f x
175+
176+instance foldableMultiplicative :: Foldable Multiplicative where
177+ foldr f z (Multiplicative x) = x `f` z
178+ foldl f z (Multiplicative x) = z `f` x
179+ foldMap f (Multiplicative x) = f x
180+
181+instance foldableEither :: Foldable (Either a) where
182+ foldr _ z (Left _) = z
183+ foldr f z (Right x) = f x z
184+ foldl _ z (Left _) = z
185+ foldl f z (Right x) = f z x
186+ foldMap _ (Left _) = mempty
187+ foldMap f (Right x) = f x
188+
189+instance foldableTuple :: Foldable (Tuple a) where
190+ foldr f z (Tuple _ x) = f x z
191+ foldl f z (Tuple _ x) = f z x
192+ foldMap f (Tuple _ x) = f x
193+
194+instance foldableIdentity :: Foldable Identity where
195+ foldr f z (Identity x) = f x z
196+ foldl f z (Identity x) = f z x
197+ foldMap f (Identity x) = f x
198+
199+instance foldableConst :: Foldable (Const a) where
200+ foldr _ z _ = z
201+ foldl _ z _ = z
202+ foldMap _ _ = mempty
203+
204+instance foldableProduct :: (Foldable f, Foldable g) => Foldable (Product f g) where
205+ foldr f z (Product (Tuple fa ga)) = foldr f (foldr f z ga) fa
206+ foldl f z (Product (Tuple fa ga)) = foldl f (foldl f z fa) ga
207+ foldMap f (Product (Tuple fa ga)) = foldMap f fa <> foldMap f ga
208+
209+instance foldableCoproduct :: (Foldable f, Foldable g) => Foldable (Coproduct f g) where
210+ foldr f z = coproduct (foldr f z) (foldr f z)
211+ foldl f z = coproduct (foldl f z) (foldl f z)
212+ foldMap f = coproduct (foldMap f) (foldMap f)
213+
214+instance foldableCompose :: (Foldable f, Foldable g) => Foldable (Compose f g) where
215+ foldr f i (Compose fga) = foldr (flip (foldr f)) i fga
216+ foldl f i (Compose fga) = foldl (foldl f) i fga
217+ foldMap f (Compose fga) = foldMap (foldMap f) fga
218+
219+instance foldableApp :: Foldable f => Foldable (App f) where
220+ foldr f i (App x) = foldr f i x
221+ foldl f i (App x) = foldl f i x
222+ foldMap f (App x) = foldMap f x
223+
224+-- | Fold a data structure, accumulating values in some `Monoid`.
225+fold :: forall f m. Foldable f => Monoid m => f m -> m
226+fold = foldMap identity
227+
228+-- | Similar to 'foldl', but the result is encapsulated in a monad.
229+-- |
230+-- | Note: this function is not generally stack-safe, e.g., for monads which
231+-- | build up thunks a la `Eff`.
232+foldM :: forall f m a b. Foldable f => Monad m => (b -> a -> m b) -> b -> f a -> m b
233+foldM f b0 = foldl (\b a -> b >>= flip f a) (pure b0)
234+
235+-- | Traverse a data structure, performing some effects encoded by an
236+-- | `Applicative` functor at each value, ignoring the final result.
237+-- |
238+-- | For example:
239+-- |
240+-- | ```purescript
241+-- | traverse_ print [1, 2, 3]
242+-- | ```
243+traverse_
244+ :: forall a b f m
245+ . Applicative m
246+ => Foldable f
247+ => (a -> m b)
248+ -> f a
249+ -> m Unit
250+traverse_ f = foldr ((*>) <<< f) (pure unit)
251+
252+-- | A version of `traverse_` with its arguments flipped.
253+-- |
254+-- | This can be useful when running an action written using do notation
255+-- | for every element in a data structure:
256+-- |
257+-- | For example:
258+-- |
259+-- | ```purescript
260+-- | for_ [1, 2, 3] \n -> do
261+-- | print n
262+-- | trace "squared is"
263+-- | print (n * n)
264+-- | ```
265+for_
266+ :: forall a b f m
267+ . Applicative m
268+ => Foldable f
269+ => f a
270+ -> (a -> m b)
271+ -> m Unit
272+for_ = flip traverse_
273+
274+-- | Perform all of the effects in some data structure in the order
275+-- | given by the `Foldable` instance, ignoring the final result.
276+-- |
277+-- | For example:
278+-- |
279+-- | ```purescript
280+-- | sequence_ [ trace "Hello, ", trace " world!" ]
281+-- | ```
282+sequence_ :: forall a f m. Applicative m => Foldable f => f (m a) -> m Unit
283+sequence_ = traverse_ identity
284+
285+-- | Combines a collection of elements using the `Alt` operation.
286+oneOf :: forall f g a. Foldable f => Plus g => f (g a) -> g a
287+oneOf = foldr alt empty
288+
289+-- | Folds a structure into some `Plus`.
290+oneOfMap :: forall f g a b. Foldable f => Plus g => (a -> g b) -> f a -> g b
291+oneOfMap f = foldr (alt <<< f) empty
292+
293+-- | Fold a data structure, accumulating values in some `Monoid`,
294+-- | combining adjacent elements using the specified separator.
295+-- |
296+-- | For example:
297+-- |
298+-- | ```purescript
299+-- | > intercalate ", " ["Lorem", "ipsum", "dolor"]
300+-- | = "Lorem, ipsum, dolor"
301+-- |
302+-- | > intercalate "*" ["a", "b", "c"]
303+-- | = "a*b*c"
304+-- |
305+-- | > intercalate [1] [[2, 3], [4, 5], [6, 7]]
306+-- | = [2, 3, 1, 4, 5, 1, 6, 7]
307+-- | ```
308+intercalate :: forall f m. Foldable f => Monoid m => m -> f m -> m
309+intercalate sep xs = (foldl go { init: true, acc: mempty } xs).acc
310+ where
311+ go { init: true } x = { init: false, acc: x }
312+ go { acc: acc } x = { init: false, acc: acc <> sep <> x }
313+
314+-- | `foldMap` but with each element surrounded by some fixed value.
315+-- |
316+-- | For example:
317+-- |
318+-- | ```purescript
319+-- | > surroundMap "*" show []
320+-- | = "*"
321+-- |
322+-- | > surroundMap "*" show [1]
323+-- | = "*1*"
324+-- |
325+-- | > surroundMap "*" show [1, 2]
326+-- | = "*1*2*"
327+-- |
328+-- | > surroundMap "*" show [1, 2, 3]
329+-- | = "*1*2*3*"
330+-- | ```
331+surroundMap :: forall f a m. Foldable f => Semigroup m => m -> (a -> m) -> f a -> m
332+surroundMap d t f = unwrap (foldMap joined f) d
333+ where joined a = Endo \m -> d <> t a <> m
334+
335+-- | `fold` but with each element surrounded by some fixed value.
336+-- |
337+-- | For example:
338+-- |
339+-- | ```purescript
340+-- | > surround "*" []
341+-- | = "*"
342+-- |
343+-- | > surround "*" ["1"]
344+-- | = "*1*"
345+-- |
346+-- | > surround "*" ["1", "2"]
347+-- | = "*1*2*"
348+-- |
349+-- | > surround "*" ["1", "2", "3"]
350+-- | = "*1*2*3*"
351+-- | ```
352+surround :: forall f m. Foldable f => Semigroup m => m -> f m -> m
353+surround d = surroundMap d identity
354+
355+-- | The conjunction of all the values in a data structure. When specialized
356+-- | to `Boolean`, this function will test whether all of the values in a data
357+-- | structure are `true`.
358+and :: forall a f. Foldable f => HeytingAlgebra a => f a -> a
359+and = all identity
360+
361+-- | The disjunction of all the values in a data structure. When specialized
362+-- | to `Boolean`, this function will test whether any of the values in a data
363+-- | structure is `true`.
364+or :: forall a f. Foldable f => HeytingAlgebra a => f a -> a
365+or = any identity
366+
367+-- | `all f` is the same as `and <<< map f`; map a function over the structure,
368+-- | and then get the conjunction of the results.
369+all :: forall a b f. Foldable f => HeytingAlgebra b => (a -> b) -> f a -> b
370+all = alaF Conj foldMap
371+
372+-- | `any f` is the same as `or <<< map f`; map a function over the structure,
373+-- | and then get the disjunction of the results.
374+any :: forall a b f. Foldable f => HeytingAlgebra b => (a -> b) -> f a -> b
375+any = alaF Disj foldMap
376+
377+-- | Find the sum of the numeric values in a data structure.
378+sum :: forall a f. Foldable f => Semiring a => f a -> a
379+sum = foldl (+) zero
380+
381+-- | Find the product of the numeric values in a data structure.
382+product :: forall a f. Foldable f => Semiring a => f a -> a
383+product = foldl (*) one
384+
385+-- | Test whether a value is an element of a data structure.
386+elem :: forall a f. Foldable f => Eq a => a -> f a -> Boolean
387+elem = any <<< (==)
388+
389+-- | Test whether a value is not an element of a data structure.
390+notElem :: forall a f. Foldable f => Eq a => a -> f a -> Boolean
391+notElem x = not <<< elem x
392+
393+-- | Try to get nth element from the left in a data structure
394+indexl :: forall a f. Foldable f => Int -> f a -> Maybe a
395+indexl idx = _.elem <<< foldl go { elem: Nothing, pos: 0 }
396+ where
397+ go cursor a =
398+ case cursor.elem of
399+ Just _ -> cursor
400+ _ ->
401+ if cursor.pos == idx
402+ then { elem: Just a, pos: cursor.pos }
403+ else { pos: cursor.pos + 1, elem: cursor.elem }
404+
405+-- | Try to get nth element from the right in a data structure
406+indexr :: forall a f. Foldable f => Int -> f a -> Maybe a
407+indexr idx = _.elem <<< foldr go { elem: Nothing, pos: 0 }
408+ where
409+ go a cursor =
410+ case cursor.elem of
411+ Just _ -> cursor
412+ _ ->
413+ if cursor.pos == idx
414+ then { elem: Just a, pos: cursor.pos }
415+ else { pos: cursor.pos + 1, elem: cursor.elem }
416+
417+-- | Try to find an element in a data structure which satisfies a predicate.
418+find :: forall a f. Foldable f => (a -> Boolean) -> f a -> Maybe a
419+find p = foldl go Nothing
420+ where
421+ go Nothing x | p x = Just x
422+ go r _ = r
423+
424+-- | Try to find an element in a data structure which satisfies a predicate mapping.
425+findMap :: forall a b f. Foldable f => (a -> Maybe b) -> f a -> Maybe b
426+findMap p = foldl go Nothing
427+ where
428+ go Nothing x = p x
429+ go r _ = r
430+
431+-- | Find the largest element of a structure, according to its `Ord` instance.
432+maximum :: forall a f. Ord a => Foldable f => f a -> Maybe a
433+maximum = maximumBy compare
434+
435+-- | Find the largest element of a structure, according to a given comparison
436+-- | function. The comparison function should represent a total ordering (see
437+-- | the `Ord` type class laws); if it does not, the behaviour is undefined.
438+maximumBy :: forall a f. Foldable f => (a -> a -> Ordering) -> f a -> Maybe a
439+maximumBy cmp = foldl max' Nothing
440+ where
441+ max' Nothing x = Just x
442+ max' (Just x) y = Just (if cmp x y == GT then x else y)
443+
444+-- | Find the smallest element of a structure, according to its `Ord` instance.
445+minimum :: forall a f. Ord a => Foldable f => f a -> Maybe a
446+minimum = minimumBy compare
447+
448+-- | Find the smallest element of a structure, according to a given comparison
449+-- | function. The comparison function should represent a total ordering (see
450+-- | the `Ord` type class laws); if it does not, the behaviour is undefined.
451+minimumBy :: forall a f. Foldable f => (a -> a -> Ordering) -> f a -> Maybe a
452+minimumBy cmp = foldl min' Nothing
453+ where
454+ min' Nothing x = Just x
455+ min' (Just x) y = Just (if cmp x y == LT then x else y)
456+
457+-- | Test whether the structure is empty.
458+-- | Optimized for structures that are similar to cons-lists, because there
459+-- | is no general way to do better.
460+null :: forall a f. Foldable f => f a -> Boolean
461+null = foldr (\_ _ -> false) true
462+
463+-- | Returns the size/length of a finite structure.
464+-- | Optimized for structures that are similar to cons-lists, because there
465+-- | is no general way to do better.
466+length :: forall a b f. Foldable f => Semiring b => f a -> b
467+length = foldl (\c _ -> add one c) zero
468+
469+-- | Lookup a value in a data structure of `Tuple`s, generalizing association lists.
470+lookup :: forall a b f. Foldable f => Eq a => a -> f (Tuple a b) -> Maybe b
471+lookup a = unwrap <<< foldMap \(Tuple a' b) -> First (if a == a' then Just b else Nothing)
.spago/p/foldable-traversable-6.0.0/src/Data/FoldableWithIndex.pursnew file+370
@@ -0,0 +1,370 @@
1+module Data.FoldableWithIndex
2+ ( class FoldableWithIndex, foldrWithIndex, foldlWithIndex, foldMapWithIndex
3+ , foldrWithIndexDefault
4+ , foldlWithIndexDefault
5+ , foldMapWithIndexDefaultR
6+ , foldMapWithIndexDefaultL
7+ , foldWithIndexM
8+ , traverseWithIndex_
9+ , forWithIndex_
10+ , surroundMapWithIndex
11+ , allWithIndex
12+ , anyWithIndex
13+ , findWithIndex
14+ , findMapWithIndex
15+ , foldrDefault
16+ , foldlDefault
17+ , foldMapDefault
18+ ) where
19+
20+import Prelude
21+
22+import Data.Const (Const)
23+import Data.Either (Either(..))
24+import Data.Foldable (class Foldable, foldMap, foldl, foldr)
25+import Data.Functor.App (App(..))
26+import Data.Functor.Compose (Compose(..))
27+import Data.Functor.Coproduct (Coproduct, coproduct)
28+import Data.Functor.Product (Product(..))
29+import Data.FunctorWithIndex (mapWithIndex)
30+import Data.Identity (Identity(..))
31+import Data.Maybe (Maybe(..))
32+import Data.Maybe.First (First)
33+import Data.Maybe.Last (Last)
34+import Data.Monoid.Additive (Additive)
35+import Data.Monoid.Conj (Conj(..))
36+import Data.Monoid.Disj (Disj(..))
37+import Data.Monoid.Dual (Dual(..))
38+import Data.Monoid.Endo (Endo(..))
39+import Data.Monoid.Multiplicative (Multiplicative)
40+import Data.Newtype (unwrap)
41+import Data.Tuple (Tuple(..), curry)
42+
43+-- | A `Foldable` with an additional index.
44+-- | A `FoldableWithIndex` instance must be compatible with its `Foldable`
45+-- | instance
46+-- | ```purescript
47+-- | foldr f = foldrWithIndex (const f)
48+-- | foldl f = foldlWithIndex (const f)
49+-- | foldMap f = foldMapWithIndex (const f)
50+-- | ```
51+-- |
52+-- | Default implementations are provided by the following functions:
53+-- |
54+-- | - `foldrWithIndexDefault`
55+-- | - `foldlWithIndexDefault`
56+-- | - `foldMapWithIndexDefaultR`
57+-- | - `foldMapWithIndexDefaultL`
58+-- |
59+-- | Note: some combinations of the default implementations are unsafe to
60+-- | use together - causing a non-terminating mutually recursive cycle.
61+-- | These combinations are documented per function.
62+class Foldable f <= FoldableWithIndex i f | f -> i where
63+ foldrWithIndex :: forall a b. (i -> a -> b -> b) -> b -> f a -> b
64+ foldlWithIndex :: forall a b. (i -> b -> a -> b) -> b -> f a -> b
65+ foldMapWithIndex :: forall a m. Monoid m => (i -> a -> m) -> f a -> m
66+
67+-- | A default implementation of `foldrWithIndex` using `foldMapWithIndex`.
68+-- |
69+-- | Note: when defining a `FoldableWithIndex` instance, this function is
70+-- | unsafe to use in combination with `foldMapWithIndexDefaultR`.
71+foldrWithIndexDefault
72+ :: forall i f a b
73+ . FoldableWithIndex i f
74+ => (i -> a -> b -> b)
75+ -> b
76+ -> f a
77+ -> b
78+foldrWithIndexDefault c u xs = unwrap (foldMapWithIndex (\i -> Endo <<< c i) xs) u
79+
80+-- | A default implementation of `foldlWithIndex` using `foldMapWithIndex`.
81+-- |
82+-- | Note: when defining a `FoldableWithIndex` instance, this function is
83+-- | unsafe to use in combination with `foldMapWithIndexDefaultL`.
84+foldlWithIndexDefault
85+ :: forall i f a b
86+ . FoldableWithIndex i f
87+ => (i -> b -> a -> b)
88+ -> b
89+ -> f a
90+ -> b
91+foldlWithIndexDefault c u xs = unwrap (unwrap (foldMapWithIndex (\i -> Dual <<< Endo <<< flip (c i)) xs)) u
92+
93+-- | A default implementation of `foldMapWithIndex` using `foldrWithIndex`.
94+-- |
95+-- | Note: when defining a `FoldableWithIndex` instance, this function is
96+-- | unsafe to use in combination with `foldrWithIndexDefault`.
97+foldMapWithIndexDefaultR
98+ :: forall i f a m
99+ . FoldableWithIndex i f
100+ => Monoid m
101+ => (i -> a -> m)
102+ -> f a
103+ -> m
104+foldMapWithIndexDefaultR f = foldrWithIndex (\i x acc -> f i x <> acc) mempty
105+
106+-- | A default implementation of `foldMapWithIndex` using `foldlWithIndex`.
107+-- |
108+-- | Note: when defining a `FoldableWithIndex` instance, this function is
109+-- | unsafe to use in combination with `foldlWithIndexDefault`.
110+foldMapWithIndexDefaultL
111+ :: forall i f a m
112+ . FoldableWithIndex i f
113+ => Monoid m
114+ => (i -> a -> m)
115+ -> f a
116+ -> m
117+foldMapWithIndexDefaultL f = foldlWithIndex (\i acc x -> acc <> f i x) mempty
118+
119+instance foldableWithIndexArray :: FoldableWithIndex Int Array where
120+ foldrWithIndex f z = foldr (\(Tuple i x) y -> f i x y) z <<< mapWithIndex Tuple
121+ foldlWithIndex f z = foldl (\y (Tuple i x) -> f i y x) z <<< mapWithIndex Tuple
122+ foldMapWithIndex = foldMapWithIndexDefaultR
123+
124+instance foldableWithIndexMaybe :: FoldableWithIndex Unit Maybe where
125+ foldrWithIndex f = foldr $ f unit
126+ foldlWithIndex f = foldl $ f unit
127+ foldMapWithIndex f = foldMap $ f unit
128+
129+instance foldableWithIndexFirst :: FoldableWithIndex Unit First where
130+ foldrWithIndex f = foldr $ f unit
131+ foldlWithIndex f = foldl $ f unit
132+ foldMapWithIndex f = foldMap $ f unit
133+
134+instance foldableWithIndexLast :: FoldableWithIndex Unit Last where
135+ foldrWithIndex f = foldr $ f unit
136+ foldlWithIndex f = foldl $ f unit
137+ foldMapWithIndex f = foldMap $ f unit
138+
139+instance foldableWithIndexAdditive :: FoldableWithIndex Unit Additive where
140+ foldrWithIndex f = foldr $ f unit
141+ foldlWithIndex f = foldl $ f unit
142+ foldMapWithIndex f = foldMap $ f unit
143+
144+instance foldableWithIndexDual :: FoldableWithIndex Unit Dual where
145+ foldrWithIndex f = foldr $ f unit
146+ foldlWithIndex f = foldl $ f unit
147+ foldMapWithIndex f = foldMap $ f unit
148+
149+instance foldableWithIndexDisj :: FoldableWithIndex Unit Disj where
150+ foldrWithIndex f = foldr $ f unit
151+ foldlWithIndex f = foldl $ f unit
152+ foldMapWithIndex f = foldMap $ f unit
153+
154+instance foldableWithIndexConj :: FoldableWithIndex Unit Conj where
155+ foldrWithIndex f = foldr $ f unit
156+ foldlWithIndex f = foldl $ f unit
157+ foldMapWithIndex f = foldMap $ f unit
158+
159+instance foldableWithIndexMultiplicative :: FoldableWithIndex Unit Multiplicative where
160+ foldrWithIndex f = foldr $ f unit
161+ foldlWithIndex f = foldl $ f unit
162+ foldMapWithIndex f = foldMap $ f unit
163+
164+instance foldableWithIndexEither :: FoldableWithIndex Unit (Either a) where
165+ foldrWithIndex _ z (Left _) = z
166+ foldrWithIndex f z (Right x) = f unit x z
167+ foldlWithIndex _ z (Left _) = z
168+ foldlWithIndex f z (Right x) = f unit z x
169+ foldMapWithIndex _ (Left _) = mempty
170+ foldMapWithIndex f (Right x) = f unit x
171+
172+instance foldableWithIndexTuple :: FoldableWithIndex Unit (Tuple a) where
173+ foldrWithIndex f z (Tuple _ x) = f unit x z
174+ foldlWithIndex f z (Tuple _ x) = f unit z x
175+ foldMapWithIndex f (Tuple _ x) = f unit x
176+
177+instance foldableWithIndexIdentity :: FoldableWithIndex Unit Identity where
178+ foldrWithIndex f z (Identity x) = f unit x z
179+ foldlWithIndex f z (Identity x) = f unit z x
180+ foldMapWithIndex f (Identity x) = f unit x
181+
182+instance foldableWithIndexConst :: FoldableWithIndex Void (Const a) where
183+ foldrWithIndex _ z _ = z
184+ foldlWithIndex _ z _ = z
185+ foldMapWithIndex _ _ = mempty
186+
187+instance foldableWithIndexProduct :: (FoldableWithIndex a f, FoldableWithIndex b g) => FoldableWithIndex (Either a b) (Product f g) where
188+ foldrWithIndex f z (Product (Tuple fa ga)) = foldrWithIndex (f <<< Left) (foldrWithIndex (f <<< Right) z ga) fa
189+ foldlWithIndex f z (Product (Tuple fa ga)) = foldlWithIndex (f <<< Right) (foldlWithIndex (f <<< Left) z fa) ga
190+ foldMapWithIndex f (Product (Tuple fa ga)) = foldMapWithIndex (f <<< Left) fa <> foldMapWithIndex (f <<< Right) ga
191+
192+instance foldableWithIndexCoproduct :: (FoldableWithIndex a f, FoldableWithIndex b g) => FoldableWithIndex (Either a b) (Coproduct f g) where
193+ foldrWithIndex f z = coproduct (foldrWithIndex (f <<< Left) z) (foldrWithIndex (f <<< Right) z)
194+ foldlWithIndex f z = coproduct (foldlWithIndex (f <<< Left) z) (foldlWithIndex (f <<< Right) z)
195+ foldMapWithIndex f = coproduct (foldMapWithIndex (f <<< Left)) (foldMapWithIndex (f <<< Right))
196+
197+instance foldableWithIndexCompose :: (FoldableWithIndex a f, FoldableWithIndex b g) => FoldableWithIndex (Tuple a b) (Compose f g) where
198+ foldrWithIndex f i (Compose fga) = foldrWithIndex (\a -> flip (foldrWithIndex (curry f a))) i fga
199+ foldlWithIndex f i (Compose fga) = foldlWithIndex (foldlWithIndex <<< curry f) i fga
200+ foldMapWithIndex f (Compose fga) = foldMapWithIndex (foldMapWithIndex <<< curry f) fga
201+
202+instance foldableWithIndexApp :: FoldableWithIndex a f => FoldableWithIndex a (App f) where
203+ foldrWithIndex f z (App x) = foldrWithIndex f z x
204+ foldlWithIndex f z (App x) = foldlWithIndex f z x
205+ foldMapWithIndex f (App x) = foldMapWithIndex f x
206+
207+
208+-- | Similar to 'foldlWithIndex', but the result is encapsulated in a monad.
209+-- |
210+-- | Note: this function is not generally stack-safe, e.g., for monads which
211+-- | build up thunks a la `Eff`.
212+foldWithIndexM
213+ :: forall i f m a b
214+ . FoldableWithIndex i f
215+ => Monad m
216+ => (i -> a -> b -> m a)
217+ -> a
218+ -> f b
219+ -> m a
220+foldWithIndexM f a0 = foldlWithIndex (\i ma b -> ma >>= flip (f i) b) (pure a0)
221+
222+-- | Traverse a data structure with access to the index, performing some
223+-- | effects encoded by an `Applicative` functor at each value, ignoring the
224+-- | final result.
225+-- |
226+-- | For example:
227+-- |
228+-- | ```purescript
229+-- | > traverseWithIndex_ (curry logShow) ["a", "b", "c"]
230+-- | (Tuple 0 "a")
231+-- | (Tuple 1 "b")
232+-- | (Tuple 2 "c")
233+-- | ```
234+traverseWithIndex_
235+ :: forall i a b f m
236+ . Applicative m
237+ => FoldableWithIndex i f
238+ => (i -> a -> m b)
239+ -> f a
240+ -> m Unit
241+traverseWithIndex_ f = foldrWithIndex (\i -> (*>) <<< f i) (pure unit)
242+
243+-- | A version of `traverseWithIndex_` with its arguments flipped.
244+-- |
245+-- | This can be useful when running an action written using do notation
246+-- | for every element in a data structure:
247+-- |
248+-- | For example:
249+-- |
250+-- | ```purescript
251+-- | forWithIndex_ ["a", "b", "c"] \i x -> do
252+-- | logShow i
253+-- | log x
254+-- | ```
255+forWithIndex_
256+ :: forall i a b f m
257+ . Applicative m
258+ => FoldableWithIndex i f
259+ => f a
260+ -> (i -> a -> m b)
261+ -> m Unit
262+forWithIndex_ = flip traverseWithIndex_
263+
264+-- | `foldMapWithIndex` but with each element surrounded by some fixed value.
265+-- |
266+-- | For example:
267+-- |
268+-- | ```purescript
269+-- | > surroundMapWithIndex "*" (\i x -> show i <> x) []
270+-- | = "*"
271+-- |
272+-- | > surroundMapWithIndex "*" (\i x -> show i <> x) ["a"]
273+-- | = "*0a*"
274+-- |
275+-- | > surroundMapWithIndex "*" (\i x -> show i <> x) ["a", "b"]
276+-- | = "*0a*1b*"
277+-- |
278+-- | > surroundMapWithIndex "*" (\i x -> show i <> x) ["a", "b", "c"]
279+-- | = "*0a*1b*2c*"
280+-- | ```
281+surroundMapWithIndex
282+ :: forall i f a m
283+ . FoldableWithIndex i f
284+ => Semigroup m
285+ => m
286+ -> (i -> a -> m)
287+ -> f a
288+ -> m
289+surroundMapWithIndex d t f = unwrap (foldMapWithIndex joined f) d
290+ where joined i a = Endo \m -> d <> t i a <> m
291+
292+-- | `allWithIndex f` is the same as `and <<< mapWithIndex f`; map a function over the
293+-- | structure, and then get the conjunction of the results.
294+allWithIndex
295+ :: forall i a b f
296+ . FoldableWithIndex i f
297+ => HeytingAlgebra b
298+ => (i -> a -> b)
299+ -> f a
300+ -> b
301+allWithIndex t = unwrap <<< foldMapWithIndex (\i -> Conj <<< t i)
302+
303+-- | `anyWithIndex f` is the same as `or <<< mapWithIndex f`; map a function over the
304+-- | structure, and then get the disjunction of the results.
305+anyWithIndex
306+ :: forall i a b f
307+ . FoldableWithIndex i f
308+ => HeytingAlgebra b
309+ => (i -> a -> b)
310+ -> f a
311+ -> b
312+anyWithIndex t = unwrap <<< foldMapWithIndex (\i -> Disj <<< t i)
313+
314+-- | Try to find an element in a data structure which satisfies a predicate
315+-- | with access to the index.
316+findWithIndex
317+ :: forall i a f
318+ . FoldableWithIndex i f
319+ => (i -> a -> Boolean)
320+ -> f a
321+ -> Maybe { index :: i, value :: a }
322+findWithIndex p = foldlWithIndex go Nothing
323+ where
324+ go
325+ :: i
326+ -> Maybe { index :: i, value :: a }
327+ -> a
328+ -> Maybe { index :: i, value :: a }
329+ go i Nothing x | p i x = Just { index: i, value: x }
330+ go _ r _ = r
331+
332+-- | Try to find an element in a data structure which satisfies a predicate mapping
333+-- | with access to the index.
334+findMapWithIndex
335+ :: forall i a b f
336+ . FoldableWithIndex i f
337+ => (i -> a -> Maybe b)
338+ -> f a
339+ -> Maybe b
340+findMapWithIndex f = foldlWithIndex go Nothing
341+ where
342+ go
343+ :: i
344+ -> Maybe b
345+ -> a
346+ -> Maybe b
347+ go i Nothing x = f i x
348+ go _ r _ = r
349+
350+-- | A default implementation of `foldr` using `foldrWithIndex`
351+foldrDefault
352+ :: forall i f a b
353+ . FoldableWithIndex i f
354+ => (a -> b -> b) -> b -> f a -> b
355+foldrDefault f = foldrWithIndex (const f)
356+
357+-- | A default implementation of `foldl` using `foldlWithIndex`
358+foldlDefault
359+ :: forall i f a b
360+ . FoldableWithIndex i f
361+ => (b -> a -> b) -> b -> f a -> b
362+foldlDefault f = foldlWithIndex (const f)
363+
364+-- | A default implementation of `foldMap` using `foldMapWithIndex`
365+foldMapDefault
366+ :: forall i f a m
367+ . FoldableWithIndex i f
368+ => Monoid m
369+ => (a -> m) -> f a -> m
370+foldMapDefault f = foldMapWithIndex (const f)
.spago/p/foldable-traversable-6.0.0/src/Data/FunctorWithIndex.jsnew file+10
@@ -0,0 +1,10 @@
1+export const mapWithIndexArray = function (f) {
2+ return function (xs) {
3+ var l = xs.length;
4+ var result = Array(l);
5+ for (var i = 0; i < l; i++) {
6+ result[i] = f(i)(xs[i]);
7+ }
8+ return result;
9+ };
10+};
.spago/p/foldable-traversable-6.0.0/src/Data/FunctorWithIndex.pursnew file+93
@@ -0,0 +1,93 @@
1+module Data.FunctorWithIndex
2+ ( class FunctorWithIndex, mapWithIndex, mapDefault
3+ ) where
4+
5+import Prelude
6+
7+import Data.Bifunctor (bimap)
8+import Data.Const (Const(..))
9+import Data.Either (Either(..))
10+import Data.Functor.App (App(..))
11+import Data.Functor.Compose (Compose(..))
12+import Data.Functor.Coproduct (Coproduct(..))
13+import Data.Functor.Product (Product(..))
14+import Data.Identity (Identity(..))
15+import Data.Maybe (Maybe)
16+import Data.Maybe.First (First)
17+import Data.Maybe.Last (Last)
18+import Data.Monoid.Additive (Additive)
19+import Data.Monoid.Conj (Conj)
20+import Data.Monoid.Disj (Disj)
21+import Data.Monoid.Dual (Dual)
22+import Data.Monoid.Multiplicative (Multiplicative)
23+import Data.Tuple (Tuple, curry)
24+
25+-- | A `Functor` with an additional index.
26+-- | Instances must satisfy a modified form of the `Functor` laws
27+-- | ```purescript
28+-- | mapWithIndex (\_ a -> a) = identity
29+-- | mapWithIndex f . mapWithIndex g = mapWithIndex (\i -> f i <<< g i)
30+-- | ```
31+-- | and be compatible with the `Functor` instance
32+-- | ```purescript
33+-- | map f = mapWithIndex (const f)
34+-- | ```
35+class Functor f <= FunctorWithIndex i f | f -> i where
36+ mapWithIndex :: forall a b. (i -> a -> b) -> f a -> f b
37+
38+foreign import mapWithIndexArray :: forall a b. (Int -> a -> b) -> Array a -> Array b
39+
40+instance functorWithIndexArray :: FunctorWithIndex Int Array where
41+ mapWithIndex = mapWithIndexArray
42+
43+instance functorWithIndexMaybe :: FunctorWithIndex Unit Maybe where
44+ mapWithIndex f = map $ f unit
45+
46+instance functorWithIndexFirst :: FunctorWithIndex Unit First where
47+ mapWithIndex f = map $ f unit
48+
49+instance functorWithIndexLast :: FunctorWithIndex Unit Last where
50+ mapWithIndex f = map $ f unit
51+
52+instance functorWithIndexAdditive :: FunctorWithIndex Unit Additive where
53+ mapWithIndex f = map $ f unit
54+
55+instance functorWithIndexDual :: FunctorWithIndex Unit Dual where
56+ mapWithIndex f = map $ f unit
57+
58+instance functorWithIndexConj :: FunctorWithIndex Unit Conj where
59+ mapWithIndex f = map $ f unit
60+
61+instance functorWithIndexDisj :: FunctorWithIndex Unit Disj where
62+ mapWithIndex f = map $ f unit
63+
64+instance functorWithIndexMultiplicative :: FunctorWithIndex Unit Multiplicative where
65+ mapWithIndex f = map $ f unit
66+
67+instance functorWithIndexEither :: FunctorWithIndex Unit (Either a) where
68+ mapWithIndex f = map $ f unit
69+
70+instance functorWithIndexTuple :: FunctorWithIndex Unit (Tuple a) where
71+ mapWithIndex f = map $ f unit
72+
73+instance functorWithIndexIdentity :: FunctorWithIndex Unit Identity where
74+ mapWithIndex f (Identity a) = Identity (f unit a)
75+
76+instance functorWithIndexConst :: FunctorWithIndex Void (Const a) where
77+ mapWithIndex _ (Const x) = Const x
78+
79+instance functorWithIndexProduct :: (FunctorWithIndex a f, FunctorWithIndex b g) => FunctorWithIndex (Either a b) (Product f g) where
80+ mapWithIndex f (Product fga) = Product (bimap (mapWithIndex (f <<< Left)) (mapWithIndex (f <<< Right)) fga)
81+
82+instance functorWithIndexCoproduct :: (FunctorWithIndex a f, FunctorWithIndex b g) => FunctorWithIndex (Either a b) (Coproduct f g) where
83+ mapWithIndex f (Coproduct e) = Coproduct (bimap (mapWithIndex (f <<< Left)) (mapWithIndex (f <<< Right)) e)
84+
85+instance functorWithIndexCompose :: (FunctorWithIndex a f, FunctorWithIndex b g) => FunctorWithIndex (Tuple a b) (Compose f g) where
86+ mapWithIndex f (Compose fga) = Compose $ mapWithIndex (mapWithIndex <<< curry f) fga
87+
88+instance functorWithIndexApp :: FunctorWithIndex a f => FunctorWithIndex a (App f) where
89+ mapWithIndex f (App x) = App $ mapWithIndex f x
90+
91+-- | A default implementation of Functor's `map` in terms of `mapWithIndex`
92+mapDefault :: forall i f a b. FunctorWithIndex i f => (a -> b) -> f a -> f b
93+mapDefault f = mapWithIndex (const f)
.spago/p/foldable-traversable-6.0.0/src/Data/Semigroup/Foldable.pursnew file+178
@@ -0,0 +1,178 @@
1+module Data.Semigroup.Foldable
2+ ( class Foldable1
3+ , foldMap1
4+ , fold1
5+ , foldr1
6+ , foldl1
7+ , traverse1_
8+ , for1_
9+ , sequence1_
10+ , foldr1Default
11+ , foldl1Default
12+ , foldMap1DefaultR
13+ , foldMap1DefaultL
14+ , intercalate
15+ , intercalateMap
16+ , maximum
17+ , maximumBy
18+ , minimum
19+ , minimumBy
20+ ) where
21+
22+import Prelude
23+
24+import Data.Foldable (class Foldable)
25+import Data.Identity (Identity(..))
26+import Data.Monoid.Dual (Dual(..))
27+import Data.Monoid.Multiplicative (Multiplicative(..))
28+import Data.Newtype (ala, alaF)
29+import Data.Ord.Max (Max(..))
30+import Data.Ord.Min (Min(..))
31+import Data.Tuple (Tuple(..))
32+
33+-- | `Foldable1` represents data structures with a minimum of one element that can be _folded_.
34+-- |
35+-- | - `foldr1` folds a structure from the right
36+-- | - `foldl1` folds a structure from the left
37+-- | - `foldMap1` folds a structure by accumulating values in a `Semigroup`
38+-- |
39+-- | Default implementations are provided by the following functions:
40+-- |
41+-- | - `foldr1Default`
42+-- | - `foldl1Default`
43+-- | - `foldMap1DefaultR`
44+-- | - `foldMap1DefaultL`
45+-- |
46+-- | Note: some combinations of the default implementations are unsafe to
47+-- | use together - causing a non-terminating mutually recursive cycle.
48+-- | These combinations are documented per function.
49+class Foldable t <= Foldable1 t where
50+ foldr1 :: forall a. (a -> a -> a) -> t a -> a
51+ foldl1 :: forall a. (a -> a -> a) -> t a -> a
52+ foldMap1 :: forall a m. Semigroup m => (a -> m) -> t a -> m
53+
54+-- | A default implementation of `foldr1` using `foldMap1`.
55+-- |
56+-- | Note: when defining a `Foldable1` instance, this function is unsafe to use
57+-- | in combination with `foldMap1DefaultR`.
58+foldr1Default :: forall t a. Foldable1 t => (a -> a -> a) -> t a -> a
59+foldr1Default = flip (runFoldRight1 <<< foldMap1 mkFoldRight1)
60+
61+-- | A default implementation of `foldl1` using `foldMap1`.
62+-- |
63+-- | Note: when defining a `Foldable1` instance, this function is unsafe to use
64+-- | in combination with `foldMap1DefaultL`.
65+foldl1Default :: forall t a. Foldable1 t => (a -> a -> a) -> t a -> a
66+foldl1Default = flip (runFoldRight1 <<< alaF Dual foldMap1 mkFoldRight1) <<< flip
67+
68+-- | A default implementation of `foldMap1` using `foldr1`.
69+-- |
70+-- | Note: when defining a `Foldable1` instance, this function is unsafe to use
71+-- | in combination with `foldr1Default`.
72+foldMap1DefaultR :: forall t m a. Foldable1 t => Functor t => Semigroup m => (a -> m) -> t a -> m
73+foldMap1DefaultR f = map f >>> foldr1 (<>)
74+
75+-- | A default implementation of `foldMap1` using `foldl1`.
76+-- |
77+-- | Note: when defining a `Foldable1` instance, this function is unsafe to use
78+-- | in combination with `foldl1Default`.
79+foldMap1DefaultL :: forall t m a. Foldable1 t => Functor t => Semigroup m => (a -> m) -> t a -> m
80+foldMap1DefaultL f = map f >>> foldl1 (<>)
81+
82+instance foldableDual :: Foldable1 Dual where
83+ foldr1 _ (Dual x) = x
84+ foldl1 _ (Dual x) = x
85+ foldMap1 f (Dual x) = f x
86+
87+instance foldableMultiplicative :: Foldable1 Multiplicative where
88+ foldr1 _ (Multiplicative x) = x
89+ foldl1 _ (Multiplicative x) = x
90+ foldMap1 f (Multiplicative x) = f x
91+
92+instance foldableTuple :: Foldable1 (Tuple a) where
93+ foldMap1 f (Tuple _ x) = f x
94+ foldr1 _ (Tuple _ x) = x
95+ foldl1 _ (Tuple _ x) = x
96+
97+instance foldableIdentity :: Foldable1 Identity where
98+ foldMap1 f (Identity x) = f x
99+ foldl1 _ (Identity x) = x
100+ foldr1 _ (Identity x) = x
101+
102+-- | Fold a data structure, accumulating values in some `Semigroup`.
103+fold1 :: forall t m. Foldable1 t => Semigroup m => t m -> m
104+fold1 = foldMap1 identity
105+
106+newtype Act :: forall k. (k -> Type) -> k -> Type
107+newtype Act f a = Act (f a)
108+
109+getAct :: forall f a. Act f a -> f a
110+getAct (Act f) = f
111+
112+instance semigroupAct :: Apply f => Semigroup (Act f a) where
113+ append (Act a) (Act b) = Act (a *> b)
114+
115+-- | Traverse a data structure, performing some effects encoded by an
116+-- | `Apply` instance at each value, ignoring the final result.
117+traverse1_ :: forall t f a b. Foldable1 t => Apply f => (a -> f b) -> t a -> f Unit
118+traverse1_ f t = unit <$ getAct (foldMap1 (Act <<< f) t)
119+
120+-- | A version of `traverse1_` with its arguments flipped.
121+-- |
122+-- | This can be useful when running an action written using do notation
123+-- | for every element in a data structure:
124+for1_ :: forall t f a b. Foldable1 t => Apply f => t a -> (a -> f b) -> f Unit
125+for1_ = flip traverse1_
126+
127+-- | Perform all of the effects in some data structure in the order
128+-- | given by the `Foldable1` instance, ignoring the final result.
129+sequence1_ :: forall t f a. Foldable1 t => Apply f => t (f a) -> f Unit
130+sequence1_ = traverse1_ identity
131+
132+maximum :: forall f a. Ord a => Foldable1 f => f a -> a
133+maximum = ala Max foldMap1
134+
135+maximumBy :: forall f a. Foldable1 f => (a -> a -> Ordering) -> f a -> a
136+maximumBy cmp = foldl1 \x y -> if cmp x y == GT then x else y
137+
138+minimum :: forall f a. Ord a => Foldable1 f => f a -> a
139+minimum = ala Min foldMap1
140+
141+minimumBy :: forall f a. Foldable1 f => (a -> a -> Ordering) -> f a -> a
142+minimumBy cmp = foldl1 \x y -> if cmp x y == LT then x else y
143+
144+-- | Internal. Used by intercalation functions.
145+newtype JoinWith a = JoinWith (a -> a)
146+
147+joinee :: forall a. JoinWith a -> a -> a
148+joinee (JoinWith x) = x
149+
150+instance semigroupJoinWith :: Semigroup a => Semigroup (JoinWith a) where
151+ append (JoinWith a) (JoinWith b) = JoinWith $ \j -> a j <> j <> b j
152+
153+-- | Fold a data structure using a `Semigroup` instance,
154+-- | combining adjacent elements using the specified separator.
155+intercalate :: forall f m. Foldable1 f => Semigroup m => m -> f m -> m
156+intercalate = flip intercalateMap identity
157+
158+-- | Fold a data structure, accumulating values in some `Semigroup`,
159+-- | combining adjacent elements using the specified separator.
160+intercalateMap
161+ :: forall f m a
162+ . Foldable1 f
163+ => Semigroup m
164+ => m -> (a -> m) -> f a -> m
165+intercalateMap j f foldable =
166+ joinee (foldMap1 (JoinWith <<< const <<< f) foldable) j
167+
168+-- | Internal. Used by foldr1Default and foldl1Default.
169+data FoldRight1 a = FoldRight1 (a -> (a -> a -> a) -> a) a
170+
171+instance foldRight1Semigroup :: Semigroup (FoldRight1 a) where
172+ append (FoldRight1 lf lr) (FoldRight1 rf rr) = FoldRight1 (\a f -> lf (f lr (rf a f)) f) rr
173+
174+mkFoldRight1 :: forall a. a -> FoldRight1 a
175+mkFoldRight1 = FoldRight1 const
176+
177+runFoldRight1 :: forall a. FoldRight1 a -> (a -> a -> a) -> a
178+runFoldRight1 (FoldRight1 f a) = f a
.spago/p/foldable-traversable-6.0.0/src/Data/Semigroup/Traversable.pursnew file+72
@@ -0,0 +1,72 @@
1+module Data.Semigroup.Traversable where
2+
3+import Prelude
4+
5+import Data.Identity (Identity(..))
6+import Data.Monoid.Dual (Dual(..))
7+import Data.Monoid.Multiplicative (Multiplicative(..))
8+import Data.Semigroup.Foldable (class Foldable1)
9+import Data.Traversable (class Traversable)
10+import Data.Tuple (Tuple(..))
11+
12+-- | `Traversable1` represents data structures with a minimum of one element that can be _traversed_,
13+-- | accumulating results and effects in some `Applicative` functor.
14+-- |
15+-- | - `traverse1` runs an action for every element in a data structure,
16+-- | and accumulates the results.
17+-- | - `sequence1` runs the actions _contained_ in a data structure,
18+-- | and accumulates the results.
19+-- |
20+-- | The `traverse1` and `sequence1` functions should be compatible in the
21+-- | following sense:
22+-- |
23+-- | - `traverse1 f xs = sequence1 (f <$> xs)`
24+-- | - `sequence1 = traverse1 identity`
25+-- |
26+-- | `Traversable1` instances should also be compatible with the corresponding
27+-- | `Foldable1` instances, in the following sense:
28+-- |
29+-- | - `foldMap1 f = runConst <<< traverse1 (Const <<< f)`
30+-- |
31+-- | Default implementations are provided by the following functions:
32+-- |
33+-- | - `traverse1Default`
34+-- | - `sequence1Default`
35+class (Foldable1 t, Traversable t) <= Traversable1 t where
36+ traverse1 :: forall a b f. Apply f => (a -> f b) -> t a -> f (t b)
37+ sequence1 :: forall b f. Apply f => t (f b) -> f (t b)
38+
39+instance traversableDual :: Traversable1 Dual where
40+ traverse1 f (Dual x) = Dual <$> f x
41+ sequence1 = sequence1Default
42+
43+instance traversableMultiplicative :: Traversable1 Multiplicative where
44+ traverse1 f (Multiplicative x) = Multiplicative <$> f x
45+ sequence1 = sequence1Default
46+
47+instance traversableTuple :: Traversable1 (Tuple a) where
48+ traverse1 f (Tuple x y) = Tuple x <$> f y
49+ sequence1 (Tuple x y) = Tuple x <$> y
50+
51+instance traversableIdentity :: Traversable1 Identity where
52+ traverse1 f (Identity x) = Identity <$> f x
53+ sequence1 (Identity x) = Identity <$> x
54+
55+-- | A default implementation of `traverse1` using `sequence1`.
56+traverse1Default
57+ :: forall t a b m
58+ . Traversable1 t
59+ => Apply m
60+ => (a -> m b)
61+ -> t a
62+ -> m (t b)
63+traverse1Default f ta = sequence1 (f <$> ta)
64+
65+-- | A default implementation of `sequence1` using `traverse1`.
66+sequence1Default
67+ :: forall t a m
68+ . Traversable1 t
69+ => Apply m
70+ => t (m a)
71+ -> m (t a)
72+sequence1Default = traverse1 identity
.spago/p/foldable-traversable-6.0.0/src/Data/Traversable.jsnew file+52
@@ -0,0 +1,52 @@
1+// jshint maxparams: 3
2+
3+export const traverseArrayImpl = (function () {
4+ function array1(a) {
5+ return [a];
6+ }
7+
8+ function array2(a) {
9+ return function (b) {
10+ return [a, b];
11+ };
12+ }
13+
14+ function array3(a) {
15+ return function (b) {
16+ return function (c) {
17+ return [a, b, c];
18+ };
19+ };
20+ }
21+
22+ function concat2(xs) {
23+ return function (ys) {
24+ return xs.concat(ys);
25+ };
26+ }
27+
28+ return function (apply) {
29+ return function (map) {
30+ return function (pure) {
31+ return function (f) {
32+ return function (array) {
33+ function go(bot, top) {
34+ switch (top - bot) {
35+ case 0: return pure([]);
36+ case 1: return map(array1)(f(array[bot]));
37+ case 2: return apply(map(array2)(f(array[bot])))(f(array[bot + 1]));
38+ case 3: return apply(apply(map(array3)(f(array[bot])))(f(array[bot + 1])))(f(array[bot + 2]));
39+ default:
40+ // This slightly tricky pivot selection aims to produce two
41+ // even-length partitions where possible.
42+ var pivot = bot + Math.floor((top - bot) / 4) * 2;
43+ return apply(map(concat2)(go(bot, pivot)))(go(pivot, top));
44+ }
45+ }
46+ return go(0, array.length);
47+ };
48+ };
49+ };
50+ };
51+ };
52+})();
.spago/p/foldable-traversable-6.0.0/src/Data/Traversable.pursnew file+257
@@ -0,0 +1,257 @@
1+module Data.Traversable
2+ ( class Traversable, traverse, sequence
3+ , traverseDefault, sequenceDefault
4+ , for
5+ , scanl
6+ , scanr
7+ , mapAccumL
8+ , mapAccumR
9+ , module Data.Foldable
10+ , module Data.Traversable.Accum
11+ ) where
12+
13+import Prelude
14+
15+import Control.Apply (lift2)
16+import Data.Const (Const(..))
17+import Data.Either (Either(..))
18+import Data.Foldable (class Foldable, all, and, any, elem, find, fold, foldMap, foldMapDefaultL, foldMapDefaultR, foldl, foldlDefault, foldr, foldrDefault, for_, intercalate, maximum, maximumBy, minimum, minimumBy, notElem, oneOf, or, sequence_, sum, traverse_)
19+import Data.Functor.App (App(..))
20+import Data.Functor.Compose (Compose(..))
21+import Data.Functor.Coproduct (Coproduct(..), coproduct)
22+import Data.Functor.Product (Product(..), product)
23+import Data.Identity (Identity(..))
24+import Data.Maybe (Maybe(..))
25+import Data.Maybe.First (First(..))
26+import Data.Maybe.Last (Last(..))
27+import Data.Monoid.Additive (Additive(..))
28+import Data.Monoid.Conj (Conj(..))
29+import Data.Monoid.Disj (Disj(..))
30+import Data.Monoid.Dual (Dual(..))
31+import Data.Monoid.Multiplicative (Multiplicative(..))
32+import Data.Traversable.Accum (Accum)
33+import Data.Traversable.Accum.Internal (StateL(..), StateR(..), stateL, stateR)
34+import Data.Tuple (Tuple(..))
35+
36+-- | `Traversable` represents data structures which can be _traversed_,
37+-- | accumulating results and effects in some `Applicative` functor.
38+-- |
39+-- | - `traverse` runs an action for every element in a data structure,
40+-- | and accumulates the results.
41+-- | - `sequence` runs the actions _contained_ in a data structure,
42+-- | and accumulates the results.
43+-- |
44+-- | ```purescript
45+-- | import Data.Traversable
46+-- | import Data.Maybe
47+-- | import Data.Int (fromNumber)
48+-- |
49+-- | sequence [Just 1, Just 2, Just 3] == Just [1,2,3]
50+-- | sequence [Nothing, Just 2, Just 3] == Nothing
51+-- |
52+-- | traverse fromNumber [1.0, 2.0, 3.0] == Just [1,2,3]
53+-- | traverse fromNumber [1.5, 2.0, 3.0] == Nothing
54+-- |
55+-- | traverse logShow [1,2,3]
56+-- | -- prints:
57+-- | 1
58+-- | 2
59+-- | 3
60+-- |
61+-- | traverse (\x -> [x, 0]) [1,2,3] == [[1,2,3],[1,2,0],[1,0,3],[1,0,0],[0,2,3],[0,2,0],[0,0,3],[0,0,0]]
62+-- | ```
63+-- |
64+-- | The `traverse` and `sequence` functions should be compatible in the
65+-- | following sense:
66+-- |
67+-- | - `traverse f xs = sequence (f <$> xs)`
68+-- | - `sequence = traverse identity`
69+-- |
70+-- | `Traversable` instances should also be compatible with the corresponding
71+-- | `Foldable` instances, in the following sense:
72+-- |
73+-- | - `foldMap f = runConst <<< traverse (Const <<< f)`
74+-- |
75+-- | Default implementations are provided by the following functions:
76+-- |
77+-- | - `traverseDefault`
78+-- | - `sequenceDefault`
79+class (Functor t, Foldable t) <= Traversable t where
80+ traverse :: forall a b m. Applicative m => (a -> m b) -> t a -> m (t b)
81+ sequence :: forall a m. Applicative m => t (m a) -> m (t a)
82+
83+-- | A default implementation of `traverse` using `sequence` and `map`.
84+traverseDefault
85+ :: forall t a b m
86+ . Traversable t
87+ => Applicative m
88+ => (a -> m b)
89+ -> t a
90+ -> m (t b)
91+traverseDefault f ta = sequence (f <$> ta)
92+
93+-- | A default implementation of `sequence` using `traverse`.
94+sequenceDefault
95+ :: forall t a m
96+ . Traversable t
97+ => Applicative m
98+ => t (m a)
99+ -> m (t a)
100+sequenceDefault = traverse identity
101+
102+instance traversableArray :: Traversable Array where
103+ traverse = traverseArrayImpl apply map pure
104+ sequence = sequenceDefault
105+
106+foreign import traverseArrayImpl
107+ :: forall m a b
108+ . (forall x y. m (x -> y) -> m x -> m y)
109+ -> (forall x y. (x -> y) -> m x -> m y)
110+ -> (forall x. x -> m x)
111+ -> (a -> m b)
112+ -> Array a
113+ -> m (Array b)
114+
115+instance traversableMaybe :: Traversable Maybe where
116+ traverse _ Nothing = pure Nothing
117+ traverse f (Just x) = Just <$> f x
118+ sequence Nothing = pure Nothing
119+ sequence (Just x) = Just <$> x
120+
121+instance traversableFirst :: Traversable First where
122+ traverse f (First x) = First <$> traverse f x
123+ sequence (First x) = First <$> sequence x
124+
125+instance traversableLast :: Traversable Last where
126+ traverse f (Last x) = Last <$> traverse f x
127+ sequence (Last x) = Last <$> sequence x
128+
129+instance traversableAdditive :: Traversable Additive where
130+ traverse f (Additive x) = Additive <$> f x
131+ sequence (Additive x) = Additive <$> x
132+
133+instance traversableDual :: Traversable Dual where
134+ traverse f (Dual x) = Dual <$> f x
135+ sequence (Dual x) = Dual <$> x
136+
137+instance traversableConj :: Traversable Conj where
138+ traverse f (Conj x) = Conj <$> f x
139+ sequence (Conj x) = Conj <$> x
140+
141+instance traversableDisj :: Traversable Disj where
142+ traverse f (Disj x) = Disj <$> f x
143+ sequence (Disj x) = Disj <$> x
144+
145+instance traversableMultiplicative :: Traversable Multiplicative where
146+ traverse f (Multiplicative x) = Multiplicative <$> f x
147+ sequence (Multiplicative x) = Multiplicative <$> x
148+
149+instance traversableEither :: Traversable (Either a) where
150+ traverse _ (Left x) = pure (Left x)
151+ traverse f (Right x) = Right <$> f x
152+ sequence (Left x) = pure (Left x)
153+ sequence (Right x) = Right <$> x
154+
155+instance traversableTuple :: Traversable (Tuple a) where
156+ traverse f (Tuple x y) = Tuple x <$> f y
157+ sequence (Tuple x y) = Tuple x <$> y
158+
159+instance traversableIdentity :: Traversable Identity where
160+ traverse f (Identity x) = Identity <$> f x
161+ sequence (Identity x) = Identity <$> x
162+
163+instance traversableConst :: Traversable (Const a) where
164+ traverse _ (Const x) = pure (Const x)
165+ sequence (Const x) = pure (Const x)
166+
167+instance traversableProduct :: (Traversable f, Traversable g) => Traversable (Product f g) where
168+ traverse f (Product (Tuple fa ga)) = lift2 product (traverse f fa) (traverse f ga)
169+ sequence (Product (Tuple fa ga)) = lift2 product (sequence fa) (sequence ga)
170+
171+instance traversableCoproduct :: (Traversable f, Traversable g) => Traversable (Coproduct f g) where
172+ traverse f = coproduct
173+ (map (Coproduct <<< Left) <<< traverse f)
174+ (map (Coproduct <<< Right) <<< traverse f)
175+ sequence = coproduct
176+ (map (Coproduct <<< Left) <<< sequence)
177+ (map (Coproduct <<< Right) <<< sequence)
178+
179+instance traversableCompose :: (Traversable f, Traversable g) => Traversable (Compose f g) where
180+ traverse f (Compose fga) = map Compose $ traverse (traverse f) fga
181+ sequence = traverse identity
182+
183+instance traversableApp :: Traversable f => Traversable (App f) where
184+ traverse f (App x) = App <$> traverse f x
185+ sequence (App x) = App <$> sequence x
186+
187+-- | A version of `traverse` with its arguments flipped.
188+-- |
189+-- |
190+-- | This can be useful when running an action written using do notation
191+-- | for every element in a data structure:
192+-- |
193+-- | For example:
194+-- |
195+-- | ```purescript
196+-- | for [1, 2, 3] \n -> do
197+-- | print n
198+-- | return (n * n)
199+-- | ```
200+for
201+ :: forall a b m t
202+ . Applicative m
203+ => Traversable t
204+ => t a
205+ -> (a -> m b)
206+ -> m (t b)
207+for x f = traverse f x
208+
209+-- | Fold a data structure from the left, keeping all intermediate results
210+-- | instead of only the final result. Note that the initial value does not
211+-- | appear in the result (unlike Haskell's `Prelude.scanl`).
212+-- |
213+-- | ```purescript
214+-- | scanl (+) 0 [1,2,3] = [1,3,6]
215+-- | scanl (-) 10 [1,2,3] = [9,7,4]
216+-- | ```
217+scanl :: forall a b f. Traversable f => (b -> a -> b) -> b -> f a -> f b
218+scanl f b0 xs = (mapAccumL (\b a -> let b' = f b a in { accum: b', value: b' }) b0 xs).value
219+
220+-- | Fold a data structure from the left, keeping all intermediate results
221+-- | instead of only the final result.
222+-- |
223+-- | Unlike `scanl`, `mapAccumL` allows the type of accumulator to differ
224+-- | from the element type of the final data structure.
225+mapAccumL
226+ :: forall a b s f
227+ . Traversable f
228+ => (s -> a -> Accum s b)
229+ -> s
230+ -> f a
231+ -> Accum s (f b)
232+mapAccumL f s0 xs = stateL (traverse (\a -> StateL \s -> f s a) xs) s0
233+
234+-- | Fold a data structure from the right, keeping all intermediate results
235+-- | instead of only the final result. Note that the initial value does not
236+-- | appear in the result (unlike Haskell's `Prelude.scanr`).
237+-- |
238+-- | ```purescript
239+-- | scanr (+) 0 [1,2,3] = [6,5,3]
240+-- | scanr (flip (-)) 10 [1,2,3] = [4,5,7]
241+-- | ```
242+scanr :: forall a b f. Traversable f => (a -> b -> b) -> b -> f a -> f b
243+scanr f b0 xs = (mapAccumR (\b a -> let b' = f a b in { accum: b', value: b' }) b0 xs).value
244+
245+-- | Fold a data structure from the right, keeping all intermediate results
246+-- | instead of only the final result.
247+-- |
248+-- | Unlike `scanr`, `mapAccumR` allows the type of accumulator to differ
249+-- | from the element type of the final data structure.
250+mapAccumR
251+ :: forall a b s f
252+ . Traversable f
253+ => (s -> a -> Accum s b)
254+ -> s
255+ -> f a
256+ -> Accum s (f b)
257+mapAccumR f s0 xs = stateR (traverse (\a -> StateR \s -> f s a) xs) s0
.spago/p/foldable-traversable-6.0.0/src/Data/Traversable/Accum.pursnew file+5
@@ -0,0 +1,5 @@
1+module Data.Traversable.Accum
2+ ( Accum
3+ ) where
4+
5+type Accum s a = { accum :: s, value :: a }
.spago/p/foldable-traversable-6.0.0/src/Data/Traversable/Accum/Internal.pursnew file+44
@@ -0,0 +1,44 @@
1+module Data.Traversable.Accum.Internal
2+ ( StateL(..)
3+ , stateL
4+ , StateR(..)
5+ , stateR
6+ ) where
7+
8+import Prelude
9+import Data.Traversable.Accum (Accum)
10+
11+newtype StateL s a = StateL (s -> Accum s a)
12+
13+stateL :: forall s a. StateL s a -> s -> Accum s a
14+stateL (StateL k) = k
15+
16+instance functorStateL :: Functor (StateL s) where
17+ map f k = StateL \s -> case stateL k s of
18+ { accum: s1, value: a } -> { accum: s1, value: f a }
19+
20+instance applyStateL :: Apply (StateL s) where
21+ apply f x = StateL \s -> case stateL f s of
22+ { accum: s1, value: f' } -> case stateL x s1 of
23+ { accum: s2, value: x' } -> { accum: s2, value: f' x' }
24+
25+instance applicativeStateL :: Applicative (StateL s) where
26+ pure a = StateL \s -> { accum: s, value: a }
27+
28+
29+newtype StateR s a = StateR (s -> Accum s a)
30+
31+stateR :: forall s a. StateR s a -> s -> Accum s a
32+stateR (StateR k) = k
33+
34+instance functorStateR :: Functor (StateR s) where
35+ map f k = StateR \s -> case stateR k s of
36+ { accum: s1, value: a } -> { accum: s1, value: f a }
37+
38+instance applyStateR :: Apply (StateR s) where
39+ apply f x = StateR \s -> case stateR x s of
40+ { accum: s1, value: x' } -> case stateR f s1 of
41+ { accum: s2, value: f' } -> { accum: s2, value: f' x' }
42+
43+instance applicativeStateR :: Applicative (StateR s) where
44+ pure a = StateR \s -> { accum: s, value: a }
.spago/p/foldable-traversable-6.0.0/src/Data/TraversableWithIndex.pursnew file+213
@@ -0,0 +1,213 @@
1+module Data.TraversableWithIndex
2+ ( class TraversableWithIndex, traverseWithIndex
3+ , traverseWithIndexDefault
4+ , forWithIndex
5+ , scanlWithIndex
6+ , mapAccumLWithIndex
7+ , scanrWithIndex
8+ , mapAccumRWithIndex
9+ , traverseDefault
10+ , module Data.Traversable.Accum
11+ ) where
12+
13+import Prelude
14+
15+import Control.Apply (lift2)
16+import Data.Const (Const(..))
17+import Data.Either (Either(..))
18+import Data.FoldableWithIndex (class FoldableWithIndex)
19+import Data.Functor.App (App(..))
20+import Data.Functor.Compose (Compose(..))
21+import Data.Functor.Coproduct (Coproduct(..), coproduct)
22+import Data.Functor.Product (Product(..), product)
23+import Data.FunctorWithIndex (class FunctorWithIndex, mapWithIndex)
24+import Data.Identity (Identity(..))
25+import Data.Maybe (Maybe)
26+import Data.Maybe.First (First)
27+import Data.Maybe.Last (Last)
28+import Data.Monoid.Additive (Additive)
29+import Data.Monoid.Conj (Conj)
30+import Data.Monoid.Disj (Disj)
31+import Data.Monoid.Dual (Dual)
32+import Data.Monoid.Multiplicative (Multiplicative)
33+import Data.Traversable (class Traversable, sequence, traverse)
34+import Data.Traversable.Accum (Accum)
35+import Data.Traversable.Accum.Internal (StateL(..), StateR(..), stateL, stateR)
36+import Data.Tuple (Tuple(..), curry)
37+
38+
39+-- | A `Traversable` with an additional index.
40+-- | A `TraversableWithIndex` instance must be compatible with its
41+-- | `Traversable` instance
42+-- | ```purescript
43+-- | traverse f = traverseWithIndex (const f)
44+-- | ```
45+-- | with its `FoldableWithIndex` instance
46+-- | ```
47+-- | foldMapWithIndex f = unwrap <<< traverseWithIndex (\i -> Const <<< f i)
48+-- | ```
49+-- | and with its `FunctorWithIndex` instance
50+-- | ```
51+-- | mapWithIndex f = unwrap <<< traverseWithIndex (\i -> Identity <<< f i)
52+-- | ```
53+-- |
54+-- | A default implementation is provided by `traverseWithIndexDefault`.
55+class (FunctorWithIndex i t, FoldableWithIndex i t, Traversable t) <= TraversableWithIndex i t | t -> i where
56+ traverseWithIndex :: forall a b m. Applicative m => (i -> a -> m b) -> t a -> m (t b)
57+
58+-- | A default implementation of `traverseWithIndex` using `sequence` and `mapWithIndex`.
59+traverseWithIndexDefault
60+ :: forall i t a b m
61+ . TraversableWithIndex i t
62+ => Applicative m
63+ => (i -> a -> m b)
64+ -> t a
65+ -> m (t b)
66+traverseWithIndexDefault f = sequence <<< mapWithIndex f
67+
68+instance traversableWithIndexArray :: TraversableWithIndex Int Array where
69+ traverseWithIndex = traverseWithIndexDefault
70+
71+instance traversableWithIndexMaybe :: TraversableWithIndex Unit Maybe where
72+ traverseWithIndex f = traverse $ f unit
73+
74+instance traversableWithIndexFirst :: TraversableWithIndex Unit First where
75+ traverseWithIndex f = traverse $ f unit
76+
77+instance traversableWithIndexLast :: TraversableWithIndex Unit Last where
78+ traverseWithIndex f = traverse $ f unit
79+
80+instance traversableWithIndexAdditive :: TraversableWithIndex Unit Additive where
81+ traverseWithIndex f = traverse $ f unit
82+
83+instance traversableWithIndexDual :: TraversableWithIndex Unit Dual where
84+ traverseWithIndex f = traverse $ f unit
85+
86+instance traversableWithIndexConj :: TraversableWithIndex Unit Conj where
87+ traverseWithIndex f = traverse $ f unit
88+
89+instance traversableWithIndexDisj :: TraversableWithIndex Unit Disj where
90+ traverseWithIndex f = traverse $ f unit
91+
92+instance traversableWithIndexMultiplicative :: TraversableWithIndex Unit Multiplicative where
93+ traverseWithIndex f = traverse $ f unit
94+
95+instance traversableWithIndexEither :: TraversableWithIndex Unit (Either a) where
96+ traverseWithIndex _ (Left x) = pure (Left x)
97+ traverseWithIndex f (Right x) = Right <$> f unit x
98+
99+instance traversableWithIndexTuple :: TraversableWithIndex Unit (Tuple a) where
100+ traverseWithIndex f (Tuple x y) = Tuple x <$> f unit y
101+
102+instance traversableWithIndexIdentity :: TraversableWithIndex Unit Identity where
103+ traverseWithIndex f (Identity x) = Identity <$> f unit x
104+
105+instance traversableWithIndexConst :: TraversableWithIndex Void (Const a) where
106+ traverseWithIndex _ (Const x) = pure (Const x)
107+
108+instance traversableWithIndexProduct :: (TraversableWithIndex a f, TraversableWithIndex b g) => TraversableWithIndex (Either a b) (Product f g) where
109+ traverseWithIndex f (Product (Tuple fa ga)) = lift2 product (traverseWithIndex (f <<< Left) fa) (traverseWithIndex (f <<< Right) ga)
110+
111+instance traversableWithIndexCoproduct :: (TraversableWithIndex a f, TraversableWithIndex b g) => TraversableWithIndex (Either a b) (Coproduct f g) where
112+ traverseWithIndex f = coproduct
113+ (map (Coproduct <<< Left) <<< traverseWithIndex (f <<< Left))
114+ (map (Coproduct <<< Right) <<< traverseWithIndex (f <<< Right))
115+
116+instance traversableWithIndexCompose :: (TraversableWithIndex a f, TraversableWithIndex b g) => TraversableWithIndex (Tuple a b) (Compose f g) where
117+ traverseWithIndex f (Compose fga) = map Compose $ traverseWithIndex (traverseWithIndex <<< curry f) fga
118+
119+instance traversableWithIndexApp :: TraversableWithIndex a f => TraversableWithIndex a (App f) where
120+ traverseWithIndex f (App x) = App <$> traverseWithIndex f x
121+
122+-- | A version of `traverseWithIndex` with its arguments flipped.
123+-- |
124+-- |
125+-- | This can be useful when running an action written using do notation
126+-- | for every element in a data structure:
127+-- |
128+-- | For example:
129+-- |
130+-- | ```purescript
131+-- | for [1, 2, 3] \i x -> do
132+-- | logShow i
133+-- | pure (x * x)
134+-- | ```
135+forWithIndex
136+ :: forall i a b m t
137+ . Applicative m
138+ => TraversableWithIndex i t
139+ => t a
140+ -> (i -> a -> m b)
141+ -> m (t b)
142+forWithIndex = flip traverseWithIndex
143+
144+-- | Fold a data structure from the left with access to the indices, keeping
145+-- | all intermediate results instead of only the final result. Note that the
146+-- | initial value does not appear in the result (unlike Haskell's
147+-- | `Prelude.scanl`).
148+-- |
149+-- | ```purescript
150+-- | scanlWithIndex (\i y x -> i + y + x) 0 [1, 2, 3] = [1, 4, 9]
151+-- | ```
152+scanlWithIndex
153+ :: forall i a b f
154+ . TraversableWithIndex i f
155+ => (i -> b -> a -> b)
156+ -> b
157+ -> f a
158+ -> f b
159+scanlWithIndex f b0 xs =
160+ (mapAccumLWithIndex (\i b a -> let b' = f i b a in { accum: b', value: b' }) b0 xs).value
161+
162+-- | Fold a data structure from the left with access to the indices, keeping
163+-- | all intermediate results instead of only the final result.
164+-- |
165+-- | Unlike `scanlWithIndex`, `mapAccumLWithIndex` allows the type of accumulator to differ
166+-- | from the element type of the final data structure.
167+mapAccumLWithIndex
168+ :: forall i a b s f
169+ . TraversableWithIndex i f
170+ => (i -> s -> a -> Accum s b)
171+ -> s
172+ -> f a
173+ -> Accum s (f b)
174+mapAccumLWithIndex f s0 xs = stateL (traverseWithIndex (\i a -> StateL \s -> f i s a) xs) s0
175+
176+-- | Fold a data structure from the right with access to the indices, keeping
177+-- | all intermediate results instead of only the final result. Note that the
178+-- | initial value does not appear in the result (unlike Haskell's `Prelude.scanr`).
179+-- |
180+-- | ```purescript
181+-- | scanrWithIndex (\i x y -> i + x + y) 0 [1, 2, 3] = [9, 8, 5]
182+-- | ```
183+scanrWithIndex
184+ :: forall i a b f
185+ . TraversableWithIndex i f
186+ => (i -> a -> b -> b)
187+ -> b
188+ -> f a
189+ -> f b
190+scanrWithIndex f b0 xs =
191+ (mapAccumRWithIndex (\i b a -> let b' = f i a b in { accum: b', value: b' }) b0 xs).value
192+
193+-- | Fold a data structure from the right with access to the indices, keeping
194+-- | all intermediate results instead of only the final result.
195+-- |
196+-- | Unlike `scanrWithIndex`, `imapAccumRWithIndex` allows the type of accumulator to differ
197+-- | from the element type of the final data structure.
198+mapAccumRWithIndex
199+ :: forall i a b s f
200+ . TraversableWithIndex i f
201+ => (i -> s -> a -> Accum s b)
202+ -> s
203+ -> f a
204+ -> Accum s (f b)
205+mapAccumRWithIndex f s0 xs = stateR (traverseWithIndex (\i a -> StateR \s -> f i s a) xs) s0
206+
207+-- | A default implementation of `traverse` in terms of `traverseWithIndex`
208+traverseDefault
209+ :: forall i t a b m
210+ . TraversableWithIndex i t
211+ => Applicative m
212+ => (a -> m b) -> t a -> m (t b)
213+traverseDefault f = traverseWithIndex (const f)
.spago/p/foreign-7.0.0/LICENSEnew file+26
@@ -0,0 +1,26 @@
1+Copyright 2018 PureScript
2+
3+Redistribution and use in source and binary forms, with or without modification,
4+are permitted provided that the following conditions are met:
5+
6+1. Redistributions of source code must retain the above copyright notice, this
7+list of conditions and the following disclaimer.
8+
9+2. Redistributions in binary form must reproduce the above copyright notice,
10+this list of conditions and the following disclaimer in the documentation and/or
11+other materials provided with the distribution.
12+
13+3. Neither the name of the copyright holder nor the names of its contributors
14+may be used to endorse or promote products derived from this software without
15+specific prior written permission.
16+
17+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
21+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.spago/p/foreign-7.0.0/README.mdnew file+29
@@ -0,0 +1,29 @@
1+# purescript-foreign
2+
3+[](https://github.com/purescript/purescript-foreign/releases)
4+[](https://github.com/purescript/purescript-foreign/actions?query=workflow%3ACI+branch%3Amaster)
5+[](https://pursuit.purescript.org/packages/purescript-foreign)
6+
7+Library for dealing with foreign data (JavaScript objects).
8+
9+## Installation
10+
11+```
12+spago install foreign
13+```
14+
15+## Examples
16+
17+- [Simple types](examples/SimpleTypes.purs)
18+- [Arrays](examples/Arrays.purs)
19+- [Objects](examples/Objects.purs)
20+- [Complex objects](examples/Complex.purs)
21+- [Applicative style parser](examples/Applicative.purs)
22+- [Maybe for nulls](examples/MaybeNullable.purs)
23+- [Nested objects](examples/Nested.purs)
24+- [Unions](examples/Union.purs)
25+- [Parser errors](examples/ParseErrors.purs)
26+
27+## Documentation
28+
29+Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-foreign).
.spago/p/foreign-7.0.0/bower.jsonnew file+36
@@ -0,0 +1,36 @@
1+{
2+ "name": "purescript-foreign",
3+ "homepage": "https://github.com/purescript/purescript-foreign",
4+ "authors": [
5+ "Gary Burgess <gary.burgess@gmail.com>",
6+ "Phil Freeman <paf31@cantab.net>"
7+ ],
8+ "repository": {
9+ "type": "git",
10+ "url": "https://github.com/purescript/purescript-foreign.git"
11+ },
12+ "license": "BSD-3-Clause",
13+ "ignore": [
14+ "**/.*",
15+ "bower_components",
16+ "examples",
17+ "node_modules",
18+ "output",
19+ "bower.json",
20+ "package.json"
21+ ],
22+ "dependencies": {
23+ "purescript-either": "^6.0.0",
24+ "purescript-functions": "^6.0.0",
25+ "purescript-identity": "^6.0.0",
26+ "purescript-integers": "^6.0.0",
27+ "purescript-lists": "^7.0.0",
28+ "purescript-maybe": "^6.0.0",
29+ "purescript-prelude": "^6.0.0",
30+ "purescript-strings": "^6.0.0",
31+ "purescript-transformers": "^6.0.0"
32+ },
33+ "devDependencies": {
34+ "purescript-console": "^6.0.0"
35+ }
36+}
.spago/p/foreign-7.0.0/package.jsonnew file+14
@@ -0,0 +1,14 @@
1+{
2+ "private": true,
3+ "scripts": {
4+ "clean": "rimraf output && rimraf .pulp-cache",
5+ "build": "eslint src && pulp build -- --censor-lib --strict",
6+ "test": "pulp build -I examples -- --censor-lib --strict"
7+ },
8+ "devDependencies": {
9+ "eslint": "^7.15.0",
10+ "pulp": "16.0.0-0",
11+ "purescript-psa": "^0.8.2",
12+ "rimraf": "^3.0.2"
13+ }
14+}
.spago/p/foreign-7.0.0/purs.jsonnew file+21
@@ -0,0 +1,21 @@
1+{
2+ "name": "foreign",
3+ "version": "7.0.0",
4+ "license": "BSD-3-Clause",
5+ "location": {
6+ "githubOwner": "purescript",
7+ "githubRepo": "purescript-foreign"
8+ },
9+ "ref": "v7.0.0",
10+ "dependencies": {
11+ "either": ">=6.0.0 <7.0.0",
12+ "functions": ">=6.0.0 <7.0.0",
13+ "integers": ">=6.0.0 <7.0.0",
14+ "lists": ">=7.0.0 <8.0.0",
15+ "maybe": ">=6.0.0 <7.0.0",
16+ "prelude": ">=6.0.0 <7.0.0",
17+ "strings": ">=6.0.0 <7.0.0",
18+ "transformers": ">=6.0.0 <7.0.0",
19+ "unsafe-coerce": ">=6.0.0 <7.0.0"
20+ }
21+}
.spago/p/foreign-7.0.0/src/Foreign.jsnew file+19
@@ -0,0 +1,19 @@
1+export function typeOf(value) {
2+ return typeof value;
3+}
4+
5+export function tagOf(value) {
6+ return Object.prototype.toString.call(value).slice(8, -1);
7+}
8+
9+export function isNull(value) {
10+ return value === null;
11+}
12+
13+export function isUndefined(value) {
14+ return value === undefined;
15+}
16+
17+export const isArray = Array.isArray || function (value) {
18+ return Object.prototype.toString.call(value) === "[object Array]";
19+};
.spago/p/foreign-7.0.0/src/Foreign.pursnew file+186
@@ -0,0 +1,186 @@
1+-- | This module defines types and functions for working with _foreign_
2+-- | data.
3+-- |
4+-- | `ExceptT (NonEmptyList ForeignError) m` is used in this library
5+-- | to encode possible failures when dealing with foreign data.
6+-- |
7+-- | The `Alt` instance for `ExceptT` allows us to accumulate errors,
8+-- | unlike `Either`, which preserves only the last error.
9+module Foreign
10+ ( Foreign
11+ , ForeignError(..)
12+ , MultipleErrors(..)
13+ , F
14+ , FT
15+ , renderForeignError
16+ , unsafeToForeign
17+ , unsafeFromForeign
18+ , unsafeReadTagged
19+ , typeOf
20+ , tagOf
21+ , isNull
22+ , isUndefined
23+ , isArray
24+ , readString
25+ , readChar
26+ , readBoolean
27+ , readNumber
28+ , readInt
29+ , readArray
30+ , readNull
31+ , readUndefined
32+ , readNullOrUndefined
33+ , fail
34+ ) where
35+
36+import Prelude
37+
38+import Control.Monad.Except (Except, ExceptT, mapExceptT, throwError)
39+import Data.Either (Either(..), either)
40+import Data.Int as Int
41+import Data.List.NonEmpty (NonEmptyList)
42+import Data.List.NonEmpty as NEL
43+import Data.Maybe (Maybe(..), maybe)
44+import Data.String.CodeUnits (toChar)
45+import Unsafe.Coerce (unsafeCoerce)
46+
47+-- | A type for _foreign data_.
48+-- |
49+-- | Foreign data is data from any external _unknown_ or _unreliable_
50+-- | source, for which it cannot be guaranteed that the runtime representation
51+-- | conforms to that of any particular type.
52+-- |
53+-- | Suitable applications of `Foreign` are
54+-- |
55+-- | - To represent responses from web services
56+-- | - To integrate with external JavaScript libraries.
57+foreign import data Foreign :: Type
58+
59+-- | A type for foreign type errors
60+data ForeignError
61+ = ForeignError String
62+ | TypeMismatch String String
63+ | ErrorAtIndex Int ForeignError
64+ | ErrorAtProperty String ForeignError
65+
66+derive instance eqForeignError :: Eq ForeignError
67+derive instance ordForeignError :: Ord ForeignError
68+
69+instance showForeignError :: Show ForeignError where
70+ show (ForeignError msg) = "(ForeignError " <> show msg <> ")"
71+ show (ErrorAtIndex i e) = "(ErrorAtIndex " <> show i <> " " <> show e <> ")"
72+ show (ErrorAtProperty prop e) = "(ErrorAtProperty " <> show prop <> " " <> show e <> ")"
73+ show (TypeMismatch exps act) = "(TypeMismatch " <> show exps <> " " <> show act <> ")"
74+
75+-- | A type for accumulating multiple `ForeignError`s.
76+type MultipleErrors = NonEmptyList ForeignError
77+
78+renderForeignError :: ForeignError -> String
79+renderForeignError (ForeignError msg) = msg
80+renderForeignError (ErrorAtIndex i e) = "Error at array index " <> show i <> ": " <> renderForeignError e
81+renderForeignError (ErrorAtProperty prop e) = "Error at property " <> show prop <> ": " <> renderForeignError e
82+renderForeignError (TypeMismatch exp act) = "Type mismatch: expected " <> exp <> ", found " <> act
83+
84+-- | While this alias is not deprecated, it is recommended
85+-- | that one use `Except (NonEmptyList ForeignError)` directly
86+-- | for all future usages rather than this type alias.
87+-- |
88+-- | An error monad, used in this library to encode possible failures when
89+-- | dealing with foreign data.
90+-- |
91+-- | The `Alt` instance for `Except` allows us to accumulate errors,
92+-- | unlike `Either`, which preserves only the last error.
93+type F = Except MultipleErrors
94+
95+-- | While this alias is not deprecated, it is recommended
96+-- | that one use `ExceptT (NonEmptyList ForeignError)` directly
97+-- | for all future usages rather than this type alias.
98+type FT = ExceptT MultipleErrors
99+
100+-- | Coerce any value to the a `Foreign` value.
101+-- |
102+-- | This is considered unsafe as it's only intended to be used on primitive
103+-- | JavaScript types, rather than PureScript types. Exporting PureScript values
104+-- | via the FFI can be dangerous as they can be mutated by code outside the
105+-- | PureScript program, resulting in difficult to diagnose problems elsewhere.
106+unsafeToForeign :: forall a. a -> Foreign
107+unsafeToForeign = unsafeCoerce
108+
109+-- | Unsafely coerce a `Foreign` value.
110+unsafeFromForeign :: forall a. Foreign -> a
111+unsafeFromForeign = unsafeCoerce
112+
113+-- | Read the Javascript _type_ of a value
114+foreign import typeOf :: Foreign -> String
115+
116+-- | Read the Javascript _tag_ of a value.
117+-- |
118+-- | This function wraps the `Object.toString` method.
119+foreign import tagOf :: Foreign -> String
120+
121+-- | Unsafely coerce a `Foreign` value when the value has a particular `tagOf`
122+-- | value.
123+unsafeReadTagged :: forall m a. Monad m => String -> Foreign -> ExceptT (NonEmptyList ForeignError) m a
124+unsafeReadTagged tag value
125+ | tagOf value == tag = pure (unsafeFromForeign value)
126+ | otherwise = fail $ TypeMismatch tag (tagOf value)
127+
128+-- | Test whether a foreign value is null
129+foreign import isNull :: Foreign -> Boolean
130+
131+-- | Test whether a foreign value is undefined
132+foreign import isUndefined :: Foreign -> Boolean
133+
134+-- | Test whether a foreign value is an array
135+foreign import isArray :: Foreign -> Boolean
136+
137+-- | Attempt to coerce a foreign value to a `String`.
138+readString :: forall m. Monad m => Foreign -> ExceptT (NonEmptyList ForeignError) m String
139+readString = unsafeReadTagged "String"
140+
141+-- | Attempt to coerce a foreign value to a `Char`.
142+readChar :: forall m. Monad m => Foreign -> ExceptT (NonEmptyList ForeignError) m Char
143+readChar value = mapExceptT (map $ either (const error) fromString) (readString value)
144+ where
145+ fromString = maybe error pure <<< toChar
146+ error = Left $ NEL.singleton $ TypeMismatch "Char" (tagOf value)
147+
148+-- | Attempt to coerce a foreign value to a `Boolean`.
149+readBoolean :: forall m. Monad m => Foreign -> ExceptT (NonEmptyList ForeignError) m Boolean
150+readBoolean = unsafeReadTagged "Boolean"
151+
152+-- | Attempt to coerce a foreign value to a `Number`.
153+readNumber :: forall m. Monad m => Foreign -> ExceptT (NonEmptyList ForeignError) m Number
154+readNumber = unsafeReadTagged "Number"
155+
156+-- | Attempt to coerce a foreign value to an `Int`.
157+readInt :: forall m. Monad m => Foreign -> ExceptT (NonEmptyList ForeignError) m Int
158+readInt value = mapExceptT (map $ either (const error) fromNumber) (readNumber value)
159+ where
160+ fromNumber = maybe error pure <<< Int.fromNumber
161+ error = Left $ NEL.singleton $ TypeMismatch "Int" (tagOf value)
162+
163+-- | Attempt to coerce a foreign value to an array.
164+readArray :: forall m. Monad m => Foreign -> ExceptT (NonEmptyList ForeignError) m (Array Foreign)
165+readArray value
166+ | isArray value = pure $ unsafeFromForeign value
167+ | otherwise = fail $ TypeMismatch "array" (tagOf value)
168+
169+readNull :: forall m. Monad m => Foreign -> ExceptT (NonEmptyList ForeignError) m (Maybe Foreign)
170+readNull value
171+ | isNull value = pure Nothing
172+ | otherwise = pure (Just value)
173+
174+readUndefined :: forall m. Monad m => Foreign -> ExceptT (NonEmptyList ForeignError) m (Maybe Foreign)
175+readUndefined value
176+ | isUndefined value = pure Nothing
177+ | otherwise = pure (Just value)
178+
179+readNullOrUndefined :: forall m. Monad m => Foreign -> ExceptT (NonEmptyList ForeignError) m (Maybe Foreign)
180+readNullOrUndefined value
181+ | isNull value || isUndefined value = pure Nothing
182+ | otherwise = pure (Just value)
183+
184+-- | Throws a failure error in `ExceptT (NonEmptyList ForeignError) m`.
185+fail :: forall m a. Monad m => ForeignError -> ExceptT (NonEmptyList ForeignError) m a
186+fail = throwError <<< NEL.singleton
.spago/p/foreign-7.0.0/src/Foreign/Index.jsnew file+11
@@ -0,0 +1,11 @@
1+export function unsafeReadPropImpl(f, s, key, value) {
2+ return value == null ? f : s(value[key]);
3+}
4+
5+export function unsafeHasOwnProperty(prop, value) {
6+ return Object.prototype.hasOwnProperty.call(value, prop);
7+}
8+
9+export function unsafeHasProperty(prop, value) {
10+ return prop in value;
11+}
.spago/p/foreign-7.0.0/src/Foreign/Index.pursnew file+84
@@ -0,0 +1,84 @@
1+-- | This module defines a type class for types which act like
2+-- | _property indices_.
3+
4+module Foreign.Index
5+ ( class Index
6+ , class Indexable
7+ , readProp
8+ , readIndex
9+ , ix, (!)
10+ , index
11+ , hasProperty
12+ , hasOwnProperty
13+ , errorAt
14+ ) where
15+
16+import Prelude
17+
18+import Control.Monad.Except.Trans (ExceptT)
19+
20+import Foreign (Foreign, ForeignError(..), typeOf, isUndefined, isNull, fail)
21+import Data.Function.Uncurried (Fn2, runFn2, Fn4, runFn4)
22+import Data.List.NonEmpty (NonEmptyList)
23+
24+-- | This type class identifies types that act like _property indices_.
25+-- |
26+-- | The canonical instances are for `String`s and `Int`s.
27+class Index i m | i -> m where
28+ index :: Foreign -> i -> ExceptT (NonEmptyList ForeignError) m Foreign
29+ hasProperty :: i -> Foreign -> Boolean
30+ hasOwnProperty :: i -> Foreign -> Boolean
31+ errorAt :: i -> ForeignError -> ForeignError
32+
33+class Indexable a m | a -> m where
34+ ix :: forall i. Index i m => a -> i -> ExceptT (NonEmptyList ForeignError) m Foreign
35+
36+infixl 9 ix as !
37+
38+foreign import unsafeReadPropImpl :: forall r k. Fn4 r (Foreign -> r) k Foreign r
39+
40+unsafeReadProp :: forall k m. Monad m => k -> Foreign -> ExceptT (NonEmptyList ForeignError) m Foreign
41+unsafeReadProp k value =
42+ runFn4 unsafeReadPropImpl (fail (TypeMismatch "object" (typeOf value))) pure k value
43+
44+-- | Attempt to read a value from a foreign value property
45+readProp :: forall m. Monad m => String -> Foreign -> ExceptT (NonEmptyList ForeignError) m Foreign
46+readProp = unsafeReadProp
47+
48+-- | Attempt to read a value from a foreign value at the specified numeric index
49+readIndex :: forall m. Monad m => Int -> Foreign -> ExceptT (NonEmptyList ForeignError) m Foreign
50+readIndex = unsafeReadProp
51+
52+foreign import unsafeHasOwnProperty :: forall k. Fn2 k Foreign Boolean
53+
54+hasOwnPropertyImpl :: forall k. k -> Foreign -> Boolean
55+hasOwnPropertyImpl _ value | isNull value = false
56+hasOwnPropertyImpl _ value | isUndefined value = false
57+hasOwnPropertyImpl p value | typeOf value == "object" || typeOf value == "function" = runFn2 unsafeHasOwnProperty p value
58+hasOwnPropertyImpl _ _ = false
59+
60+foreign import unsafeHasProperty :: forall k. Fn2 k Foreign Boolean
61+
62+hasPropertyImpl :: forall k. k -> Foreign -> Boolean
63+hasPropertyImpl _ value | isNull value = false
64+hasPropertyImpl _ value | isUndefined value = false
65+hasPropertyImpl p value | typeOf value == "object" || typeOf value == "function" = runFn2 unsafeHasProperty p value
66+hasPropertyImpl _ _ = false
67+
68+instance indexString :: Monad m => Index String m where
69+ index = flip readProp
70+ hasProperty = hasPropertyImpl
71+ hasOwnProperty = hasOwnPropertyImpl
72+ errorAt = ErrorAtProperty
73+
74+instance indexInt :: Monad m => Index Int m where
75+ index = flip readIndex
76+ hasProperty = hasPropertyImpl
77+ hasOwnProperty = hasOwnPropertyImpl
78+ errorAt = ErrorAtIndex
79+
80+instance indexableForeign :: Monad m => Indexable Foreign m where
81+ ix = index
82+
83+instance indexableExceptT :: Monad m => Indexable (ExceptT (NonEmptyList ForeignError) m Foreign) m where
84+ ix f i = flip index i =<< f
.spago/p/foreign-7.0.0/src/Foreign/Keys.jsnew file+9
@@ -0,0 +1,9 @@
1+export const unsafeKeys = Object.keys || function (value) {
2+ var keys = [];
3+ for (var prop in value) {
4+ if (Object.prototype.hasOwnProperty.call(value, prop)) {
5+ keys.push(prop);
6+ }
7+ }
8+ return keys;
9+};
.spago/p/foreign-7.0.0/src/Foreign/Keys.pursnew file+22
@@ -0,0 +1,22 @@
1+-- | This module provides functions for working with object properties
2+-- | of Javascript objects.
3+
4+module Foreign.Keys
5+ ( keys
6+ ) where
7+
8+import Prelude
9+
10+import Foreign (Foreign, ForeignError(..), typeOf, isUndefined, isNull, fail)
11+import Control.Monad.Except (ExceptT)
12+import Data.List.NonEmpty (NonEmptyList)
13+
14+foreign import unsafeKeys :: Foreign -> Array String
15+
16+-- | Get an array of the properties defined on a foreign value
17+keys :: forall m. Monad m => Foreign -> ExceptT (NonEmptyList ForeignError) m (Array String)
18+keys value
19+ | isNull value = fail $ TypeMismatch "object" "null"
20+ | isUndefined value = fail $ TypeMismatch "object" "undefined"
21+ | typeOf value == "object" = pure $ unsafeKeys value
22+ | otherwise = fail $ TypeMismatch "object" (typeOf value)
.spago/p/foreign-object-4.1.0/LICENSEnew file+26
@@ -0,0 +1,26 @@
1+Copyright 2018 PureScript
2+
3+Redistribution and use in source and binary forms, with or without modification,
4+are permitted provided that the following conditions are met:
5+
6+1. Redistributions of source code must retain the above copyright notice, this
7+list of conditions and the following disclaimer.
8+
9+2. Redistributions in binary form must reproduce the above copyright notice,
10+this list of conditions and the following disclaimer in the documentation and/or
11+other materials provided with the distribution.
12+
13+3. Neither the name of the copyright holder nor the names of its contributors
14+may be used to endorse or promote products derived from this software without
15+specific prior written permission.
16+
17+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
21+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.spago/p/foreign-object-4.1.0/README.mdnew file+54
@@ -0,0 +1,54 @@
1+# purescript-foreign-object
2+
3+[](https://github.com/purescript/purescript-foreign-object/releases)
4+[](https://github.com/purescript/purescript-foreign-object/actions?query=workflow%3ACI+branch%3Amaster)
5+[](https://pursuit.purescript.org/packages/purescript-foreign-object)
6+
7+Functions for working with homogeneous JavaScript objects from PureScript. Similar to using `Map String a` but simply reusing JavaScript objects.
8+
9+## Installation
10+
11+```
12+spago install foreign-object
13+```
14+
15+## Example
16+
17+```purs
18+example = do
19+ let
20+ -- make an empty Object
21+ empty = FO.empty
22+
23+ -- insert to an empty Object
24+ inserted = FO.insert "a" 1 empty
25+
26+ -- or: use the singleton function
27+ -- singleton FO.singleton "a" 1
28+
29+ -- lookup values for existing in the Object as a result of Maybe
30+ let lookup = FO.lookup "a" inserted
31+ Assert.assertEqual { actual: lookup, expected: Just 1 }
32+
33+ -- delete a value from an Object
34+ let deleted = FO.delete "a" inserted
35+ Assert.assertEqual { actual: deleted, expected: FO.empty }
36+
37+ let
38+ -- convert homogeneous records to Object
39+ converted = FO.fromHomogeneous { a: 1, b: 2, c: 3}
40+ -- check that the converted is equal to a regularly built Object
41+ built
42+ = FO.empty
43+ # FO.insert "a" 1
44+ # FO.insert "b" 2
45+ # FO.insert "c" 3
46+
47+ Assert.assertEqual { actual: converted, expected: built }
48+```
49+
50+See the [tests](test/Main.purs) for more examples.
51+
52+## Documentation
53+
54+Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-foreign-object).
.spago/p/foreign-object-4.1.0/bower.jsonnew file+42
@@ -0,0 +1,42 @@
1+{
2+ "name": "purescript-foreign-object",
3+ "homepage": "https://github.com/purescript/purescript-foreign-object",
4+ "authors": [
5+ "Phil Freeman <paf31@cantab.net>",
6+ "John A. De Goes <john@degoes.net>"
7+ ],
8+ "repository": {
9+ "type": "git",
10+ "url": "https://github.com/purescript/purescript-foreign-object.git"
11+ },
12+ "license": "BSD-3-Clause",
13+ "ignore": [
14+ "**/.*",
15+ "bower_components",
16+ "node_modules",
17+ "output",
18+ "test",
19+ "bower.json",
20+ "package.json"
21+ ],
22+ "dependencies": {
23+ "purescript-arrays": "^7.0.0",
24+ "purescript-foldable-traversable": "^6.0.0",
25+ "purescript-functions": "^6.0.0",
26+ "purescript-gen": "^4.0.0",
27+ "purescript-lists": "^7.0.0",
28+ "purescript-maybe": "^6.0.0",
29+ "purescript-prelude": "^6.0.0",
30+ "purescript-st": "^6.0.0",
31+ "purescript-tailrec": "^6.0.0",
32+ "purescript-tuples": "^7.0.0",
33+ "purescript-typelevel-prelude": "^7.0.0",
34+ "purescript-unfoldable": "^6.0.0"
35+ },
36+ "devDependencies": {
37+ "purescript-assert": "^6.0.0",
38+ "purescript-minibench": "^4.0.0",
39+ "purescript-ordered-collections": "^3.0.0",
40+ "purescript-quickcheck": "^8.0.1"
41+ }
42+}
.spago/p/foreign-object-4.1.0/package.jsonnew file+17
@@ -0,0 +1,17 @@
1+{
2+ "private": true,
3+ "scripts": {
4+ "clean": "rimraf output && rimraf .pulp-cache",
5+ "build": "eslint src && pulp build -- --censor-lib --strict",
6+ "test": "pulp test",
7+ "bench:build": "purs compile 'bench/**/*.purs' 'src/**/*.purs' 'bower_components/*/src/**/*.purs'",
8+ "bench:run": "node -e 'require(\"./output/Bench.Main/index.js\").main()'",
9+ "bench": "npm run bench:build && npm run bench:run"
10+ },
11+ "devDependencies": {
12+ "eslint": "^7.15.0",
13+ "pulp": "16.0.0-0",
14+ "purescript-psa": "^0.8.2",
15+ "rimraf": "^3.0.2"
16+ }
17+}
.spago/p/foreign-object-4.1.0/purs.jsonnew file+25
@@ -0,0 +1,25 @@
1+{
2+ "name": "foreign-object",
3+ "version": "4.1.0",
4+ "license": "BSD-3-Clause",
5+ "location": {
6+ "githubOwner": "purescript",
7+ "githubRepo": "purescript-foreign-object"
8+ },
9+ "ref": "v4.1.0",
10+ "dependencies": {
11+ "arrays": ">=7.0.0 <8.0.0",
12+ "foldable-traversable": ">=6.0.0 <7.0.0",
13+ "functions": ">=6.0.0 <7.0.0",
14+ "gen": ">=4.0.0 <5.0.0",
15+ "lists": ">=7.0.0 <8.0.0",
16+ "maybe": ">=6.0.0 <7.0.0",
17+ "prelude": ">=6.0.0 <7.0.0",
18+ "st": ">=6.0.0 <7.0.0",
19+ "tailrec": ">=6.0.0 <7.0.0",
20+ "tuples": ">=7.0.0 <8.0.0",
21+ "typelevel-prelude": ">=7.0.0 <8.0.0",
22+ "unfoldable": ">=6.0.0 <7.0.0",
23+ "unsafe-coerce": ">=6.0.0 <7.0.0"
24+ }
25+}
.spago/p/foreign-object-4.1.0/src/Foreign/Object.jsnew file+116
@@ -0,0 +1,116 @@
1+export function _copyST(m) {
2+ return function () {
3+ var r = {};
4+ for (var k in m) {
5+ if (hasOwnProperty.call(m, k)) {
6+ r[k] = m[k];
7+ }
8+ }
9+ return r;
10+ };
11+}
12+
13+export const empty = {};
14+
15+export function runST(f) {
16+ return f();
17+}
18+
19+export function _fmapObject(m0, f) {
20+ var m = {};
21+ for (var k in m0) {
22+ if (hasOwnProperty.call(m0, k)) {
23+ m[k] = f(m0[k]);
24+ }
25+ }
26+ return m;
27+}
28+
29+export function _mapWithKey(m0, f) {
30+ var m = {};
31+ for (var k in m0) {
32+ if (hasOwnProperty.call(m0, k)) {
33+ m[k] = f(k)(m0[k]);
34+ }
35+ }
36+ return m;
37+}
38+
39+export function _foldM(bind) {
40+ return function (f) {
41+ return function (mz) {
42+ return function (m) {
43+ var acc = mz;
44+ function g(k) {
45+ return function (z) {
46+ return f(z)(k)(m[k]);
47+ };
48+ }
49+ for (var k in m) {
50+ if (hasOwnProperty.call(m, k)) {
51+ acc = bind(acc)(g(k));
52+ }
53+ }
54+ return acc;
55+ };
56+ };
57+ };
58+}
59+
60+export function _foldSCObject(m, z, f, fromMaybe) {
61+ var acc = z;
62+ for (var k in m) {
63+ if (hasOwnProperty.call(m, k)) {
64+ var maybeR = f(acc)(k)(m[k]);
65+ var r = fromMaybe(null)(maybeR);
66+ if (r === null) return acc;
67+ else acc = r;
68+ }
69+ }
70+ return acc;
71+}
72+
73+export function all(f) {
74+ return function (m) {
75+ for (var k in m) {
76+ if (hasOwnProperty.call(m, k) && !f(k)(m[k])) return false;
77+ }
78+ return true;
79+ };
80+}
81+
82+export function size(m) {
83+ var s = 0;
84+ for (var k in m) {
85+ if (hasOwnProperty.call(m, k)) {
86+ ++s;
87+ }
88+ }
89+ return s;
90+}
91+
92+export function _lookup(no, yes, k, m) {
93+ return k in m ? yes(m[k]) : no;
94+}
95+
96+export function _lookupST(no, yes, k, m) {
97+ return function () {
98+ return k in m ? yes(m[k]) : no;
99+ };
100+}
101+
102+export function toArrayWithKey(f) {
103+ return function (m) {
104+ var r = [];
105+ for (var k in m) {
106+ if (hasOwnProperty.call(m, k)) {
107+ r.push(f(k)(m[k]));
108+ }
109+ }
110+ return r;
111+ };
112+}
113+
114+export const keys = Object.keys || toArrayWithKey(function (k) {
115+ return function () { return k; };
116+});
.spago/p/foreign-object-4.1.0/src/Foreign/Object.pursnew file+316
@@ -0,0 +1,316 @@
1+-- | This module defines a type of native homogeneous Javascript Objects.
2+-- |
3+-- | To maximize performance, Javascript objects are not wrapped,
4+-- | and some native code is used even when it's not necessary.
5+
6+module Foreign.Object
7+ ( Object
8+ , empty
9+ , isEmpty
10+ , size
11+ , singleton
12+ , insert
13+ , lookup
14+ , toUnfoldable
15+ , toAscUnfoldable
16+ , fromFoldable
17+ , fromFoldableWith
18+ , fromFoldableWithIndex
19+ , fromHomogeneous
20+ , delete
21+ , pop
22+ , member
23+ , alter
24+ , update
25+ , mapWithKey
26+ , filterWithKey
27+ , filterKeys
28+ , filter
29+ , keys
30+ , values
31+ , union
32+ , unionWith
33+ , unions
34+ , isSubmap
35+ , fold
36+ , foldMap
37+ , foldM
38+ , foldMaybe
39+ , all
40+ , thawST
41+ , freezeST
42+ , runST
43+ , toArrayWithKey
44+ ) where
45+
46+import Prelude
47+
48+import Control.Monad.ST (ST)
49+import Control.Monad.ST as ST
50+import Data.Array as A
51+import Data.Eq (class Eq1)
52+import Data.Foldable (class Foldable, foldl, foldr, for_)
53+import Data.FoldableWithIndex (class FoldableWithIndex, forWithIndex_)
54+import Data.Function.Uncurried (Fn2, runFn2, Fn4, runFn4)
55+import Data.FunctorWithIndex (class FunctorWithIndex)
56+import Data.Maybe (Maybe(..), maybe, fromMaybe)
57+import Data.Traversable (class Traversable, traverse)
58+import Data.TraversableWithIndex (class TraversableWithIndex, traverseWithIndex)
59+import Data.Tuple (Tuple(..), fst, uncurry)
60+import Data.Unfoldable (class Unfoldable)
61+import Foreign.Object.ST (STObject)
62+import Foreign.Object.ST as OST
63+import Type.Row.Homogeneous (class Homogeneous)
64+import Unsafe.Coerce (unsafeCoerce)
65+
66+-- | `Object a` represents a homogeneous JS Object with values of type `a`.
67+foreign import data Object :: Type -> Type
68+
69+type role Object representational
70+
71+foreign import _copyST :: forall a b r. a -> ST r b
72+
73+-- | Convert an immutable Object into a mutable Object
74+thawST :: forall a r. Object a -> ST r (STObject r a)
75+thawST = _copyST
76+
77+-- | Convert a mutable Object into an immutable Object
78+freezeST :: forall a r. STObject r a -> ST r (Object a)
79+freezeST = _copyST
80+
81+-- | Freeze a mutable Object, creating an immutable Object. Use this function as you would use
82+-- | `Control.Monad.ST.run` (from the `purescript-st` package) to freeze a mutable reference.
83+-- |
84+-- | The rank-2 type prevents the Object from escaping the scope of `runST`.
85+foreign import runST :: forall a. (forall r. ST r (STObject r a)) -> Object a
86+
87+mutate :: forall a b. (forall r. STObject r a -> ST r b) -> Object a -> Object a
88+mutate f m = runST do
89+ s <- thawST m
90+ _ <- f s
91+ pure s
92+
93+foreign import _fmapObject :: forall a b. Fn2 (Object a) (a -> b) (Object b)
94+
95+instance functorObject :: Functor Object where
96+ map f m = runFn2 _fmapObject m f
97+
98+instance functorWithIndexObject :: FunctorWithIndex String Object where
99+ mapWithIndex = mapWithKey
100+
101+foreign import _foldM :: forall a m z. (m -> (z -> m) -> m) -> (z -> String -> a -> m) -> m -> Object a -> m
102+
103+-- | Fold the keys and values of an object
104+fold :: forall a z. (z -> String -> a -> z) -> z -> Object a -> z
105+fold = _foldM ((#))
106+
107+-- | Fold the keys and values of an object, accumulating values using some
108+-- | `Monoid`.
109+foldMap :: forall a m. Monoid m => (String -> a -> m) -> Object a -> m
110+foldMap f = fold (\acc k v -> acc <> f k v) mempty
111+
112+-- | Fold the keys and values of an object, accumulating values and effects in
113+-- | some `Monad`.
114+foldM :: forall a m z. Monad m => (z -> String -> a -> m z) -> z -> Object a -> m z
115+foldM f z = _foldM bind f (pure z)
116+
117+instance foldableObject :: Foldable Object where
118+ foldl f = fold (\z _ -> f z)
119+ foldr f z m = foldr f z (values m)
120+ foldMap f = foldMap (const f)
121+
122+instance foldableWithIndexObject :: FoldableWithIndex String Object where
123+ foldlWithIndex f = fold (flip f)
124+ foldrWithIndex f z m = foldr (uncurry f) z (toArrayWithKey Tuple m)
125+ foldMapWithIndex = foldMap
126+
127+instance traversableObject :: Traversable Object where
128+ traverse = traverseWithIndex <<< const
129+ sequence = traverse identity
130+
131+instance traversableWithIndexObject :: TraversableWithIndex String Object where
132+ traverseWithIndex f ms =
133+ fold (\acc k v -> flip (insert k) <$> acc <*> f k v) (pure empty) ms
134+
135+-- Unfortunately the above are not short-circuitable (consider using purescript-machines)
136+-- so we need special cases:
137+
138+foreign import _foldSCObject :: forall a z. Fn4 (Object a) z (z -> String -> a -> Maybe z) (forall b. b -> Maybe b -> b) z
139+
140+-- | Fold the keys and values of a map.
141+-- |
142+-- | This function allows the folding function to terminate the fold early,
143+-- | using `Maybe`.
144+foldMaybe :: forall a z. (z -> String -> a -> Maybe z) -> z -> Object a -> z
145+foldMaybe f z m = runFn4 _foldSCObject m z f fromMaybe
146+
147+-- | Test whether all key/value pairs in a `Object` satisfy a predicate.
148+foreign import all :: forall a. (String -> a -> Boolean) -> Object a -> Boolean
149+
150+instance eqObject :: Eq a => Eq (Object a) where
151+ eq m1 m2 = (isSubmap m1 m2) && (isSubmap m2 m1)
152+
153+instance eq1Object :: Eq1 Object where
154+ eq1 = eq
155+
156+-- Internal use
157+toAscArray :: forall v. Object v -> Array (Tuple String v)
158+toAscArray = toAscUnfoldable
159+
160+instance ordObject :: Ord a => Ord (Object a) where
161+ compare m1 m2 = compare (toAscArray m1) (toAscArray m2)
162+
163+instance showObject :: Show a => Show (Object a) where
164+ show m = "(fromFoldable " <> show (toArray m) <> ")"
165+
166+-- | An empty map
167+foreign import empty :: forall a. Object a
168+
169+-- | Test whether one map contains all of the keys and values contained in another map
170+isSubmap :: forall a. Eq a => Object a -> Object a -> Boolean
171+isSubmap m1 m2 = all f m1 where
172+ f k v = runFn4 _lookup false ((==) v) k m2
173+
174+-- | Test whether a map is empty
175+isEmpty :: forall a. Object a -> Boolean
176+isEmpty = all (\_ _ -> false)
177+
178+-- | Calculate the number of key/value pairs in a map
179+foreign import size :: forall a. Object a -> Int
180+
181+-- | Create an `Object a` with one key/value pair
182+singleton :: forall a. String -> a -> Object a
183+singleton k v = runST (OST.poke k v =<< OST.new)
184+
185+foreign import _lookup :: forall a z. Fn4 z (a -> z) String (Object a) z
186+
187+-- | Lookup the value for a key in a map
188+lookup :: forall a. String -> Object a -> Maybe a
189+lookup = runFn4 _lookup Nothing Just
190+
191+-- | Test whether a `String` appears as a key in a map
192+member :: forall a. String -> Object a -> Boolean
193+member = runFn4 _lookup false (const true)
194+
195+-- | Insert or replace a key/value pair in a map
196+insert :: forall a. String -> a -> Object a -> Object a
197+insert k v = mutate (OST.poke k v)
198+
199+-- | Delete a key and value from a map
200+delete :: forall a. String -> Object a -> Object a
201+delete k = mutate (OST.delete k)
202+
203+-- | Delete a key and value from a map, returning the value
204+-- | as well as the subsequent map
205+pop :: forall a. String -> Object a -> Maybe (Tuple a (Object a))
206+pop k m = lookup k m <#> \a -> Tuple a (delete k m)
207+
208+-- | Insert, remove or update a value for a key in a map
209+alter :: forall a. (Maybe a -> Maybe a) -> String -> Object a -> Object a
210+alter f k m = case f (k `lookup` m) of
211+ Nothing -> delete k m
212+ Just v -> insert k v m
213+
214+-- | Remove or update a value for a key in a map
215+update :: forall a. (a -> Maybe a) -> String -> Object a -> Object a
216+update f k m = alter (maybe Nothing f) k m
217+
218+-- | Create an `Object a` from a foldable collection of key/value pairs
219+fromFoldable :: forall f a. Foldable f => f (Tuple String a) -> Object a
220+fromFoldable l = runST do
221+ s <- OST.new
222+ ST.foreach (A.fromFoldable l) \(Tuple k v) -> void $ OST.poke k v s
223+ pure s
224+
225+-- | Create an `Object a` from a `String`-indexed foldable collection
226+fromFoldableWithIndex :: forall f a. FoldableWithIndex String f => f a -> Object a
227+fromFoldableWithIndex l = runST do
228+ s <- OST.new
229+ forWithIndex_ l \k v -> OST.poke k v s
230+ pure s
231+
232+foreign import _lookupST :: forall a r z. Fn4 z (a -> z) String (STObject r a) (ST r z)
233+
234+-- | Create an `Object a` from a foldable collection of key/value pairs, using the
235+-- | specified function to combine values for duplicate keys.
236+fromFoldableWith :: forall f a. Foldable f => (a -> a -> a) -> f (Tuple String a) -> Object a
237+fromFoldableWith f l = runST (do
238+ s <- OST.new
239+ for_ l (\(Tuple k v) -> runFn4 _lookupST v (f v) k s >>= \v' -> OST.poke k v' s)
240+ pure s)
241+
242+-- | Create an `Object a` from a homogeneous record, i.e. all of the record
243+-- | fields are of the same type.
244+fromHomogeneous :: forall r a. Homogeneous r a => { | r } -> Object a
245+fromHomogeneous = unsafeCoerce
246+
247+foreign import toArrayWithKey :: forall a b . (String -> a -> b) -> Object a -> Array b
248+
249+-- | Unfolds a map into a list of key/value pairs
250+toUnfoldable :: forall f a. Unfoldable f => Object a -> f (Tuple String a)
251+toUnfoldable = A.toUnfoldable <<< toArrayWithKey Tuple
252+
253+-- | Unfolds a map into a list of key/value pairs which is guaranteed to be
254+-- | sorted by key
255+toAscUnfoldable :: forall f a. Unfoldable f => Object a -> f (Tuple String a)
256+toAscUnfoldable = A.toUnfoldable <<< A.sortWith fst <<< toArrayWithKey Tuple
257+
258+-- Internal
259+toArray :: forall a. Object a -> Array (Tuple String a)
260+toArray = toArrayWithKey Tuple
261+
262+-- | Get an array of the keys in a map
263+foreign import keys :: forall a. Object a -> Array String
264+
265+-- | Get a list of the values in a map
266+values :: forall a. Object a -> Array a
267+values = toArrayWithKey (\_ v -> v)
268+
269+-- | Compute the union of two maps, preferring the first map in the case of
270+-- | duplicate keys.
271+union :: forall a. Object a -> Object a -> Object a
272+union m = mutate (\s -> foldM (\s' k v -> OST.poke k v s') s m)
273+
274+-- | Compute the union of two maps, using the specified function
275+-- | to combine values for duplicate keys.
276+unionWith :: forall a. (a -> a -> a) -> Object a -> Object a -> Object a
277+unionWith f m1 m2 =
278+ mutate (\s1 -> foldM (\s2 k v1 -> OST.poke k (runFn4 _lookup v1 (\v2 -> f v1 v2) k m2) s2) s1 m1) m2
279+
280+-- | Compute the union of a collection of maps
281+unions :: forall f a. Foldable f => f (Object a) -> Object a
282+unions = foldl union empty
283+
284+foreign import _mapWithKey :: forall a b. Fn2 (Object a) (String -> a -> b) (Object b)
285+
286+-- | Apply a function of two arguments to each key/value pair, producing a new map
287+mapWithKey :: forall a b. (String -> a -> b) -> Object a -> Object b
288+mapWithKey f m = runFn2 _mapWithKey m f
289+
290+instance semigroupObject :: (Semigroup a) => Semigroup (Object a) where
291+ append = unionWith (<>)
292+
293+instance monoidObject :: (Semigroup a) => Monoid (Object a) where
294+ mempty = empty
295+
296+-- | Filter out those key/value pairs of a map for which a predicate
297+-- | fails to hold.
298+filterWithKey :: forall a. (String -> a -> Boolean) -> Object a -> Object a
299+filterWithKey predicate m = runST go
300+ where
301+ go :: forall r. ST r (STObject r a)
302+ go = do
303+ m' <- OST.new
304+ foldM step m' m
305+ where
306+ step acc k v = if predicate k v then OST.poke k v acc else pure acc
307+
308+-- | Filter out those key/value pairs of a map for which a predicate
309+-- | on the key fails to hold.
310+filterKeys :: (String -> Boolean) -> Object ~> Object
311+filterKeys predicate = filterWithKey $ const <<< predicate
312+
313+-- | Filter out those key/value pairs of a map for which a predicate
314+-- | on the value fails to hold.
315+filter :: forall a. (a -> Boolean) -> Object a -> Object a
316+filter predicate = filterWithKey $ const predicate
.spago/p/foreign-object-4.1.0/src/Foreign/Object/Gen.pursnew file+23
@@ -0,0 +1,23 @@
1+module Foreign.Object.Gen where
2+
3+import Prelude
4+
5+import Control.Monad.Gen (class MonadGen, chooseInt, resize, sized, unfoldable)
6+import Control.Monad.Rec.Class (class MonadRec)
7+import Foreign.Object (Object, fromFoldable)
8+import Data.Tuple (Tuple(..))
9+import Data.List (List)
10+
11+-- | Generates a `Object` using the specified key and value generators.
12+genForeignObject
13+ :: forall m a
14+ . MonadRec m
15+ => MonadGen m
16+ => m String
17+ -> m a
18+ -> m (Object a)
19+genForeignObject genKey genValue = sized \size -> do
20+ newSize <- chooseInt 0 size
21+ resize (const newSize) $
22+ (fromFoldable :: List (Tuple String a) -> Object a)
23+ <$> unfoldable (Tuple <$> genKey <*> genValue)
.spago/p/foreign-object-4.1.0/src/Foreign/Object/ST.jsnew file+37
@@ -0,0 +1,37 @@
1+const newImpl = function () {
2+ return {};
3+};
4+export { newImpl as new };
5+
6+export function peekImpl(just) {
7+ return function (nothing) {
8+ return function (k) {
9+ return function (m) {
10+ return function () {
11+ return {}.hasOwnProperty.call(m, k) ? just(m[k]) : nothing;
12+ };
13+ };
14+ };
15+ };
16+}
17+
18+export function poke(k) {
19+ return function (v) {
20+ return function (m) {
21+ return function () {
22+ m[k] = v;
23+ return m;
24+ };
25+ };
26+ };
27+}
28+
29+const deleteImpl = function (k) {
30+ return function (m) {
31+ return function () {
32+ delete m[k];
33+ return m;
34+ };
35+ };
36+};
37+export { deleteImpl as delete };
.spago/p/foreign-object-4.1.0/src/Foreign/Object/ST.pursnew file+42
@@ -0,0 +1,42 @@
1+-- | Helper functions for working with mutable objects using the `ST` effect.
2+-- |
3+-- | This module can be used when performance is important and mutation is a
4+-- | local effect.
5+
6+module Foreign.Object.ST
7+ ( STObject
8+ , new
9+ , peek
10+ , poke
11+ , delete
12+ ) where
13+
14+import Control.Monad.ST (ST, Region)
15+import Data.Maybe (Maybe(..))
16+
17+-- | A reference to a mutable object
18+-- |
19+-- | The first type parameter represents the memory region which the map belongs
20+-- | to. The second type parameter defines the type of elements of the mutable
21+-- | object.
22+-- |
23+-- | The runtime representation of a value of type `STObject r a` is the same as
24+-- | that of `Object a`, except that mutation is allowed.
25+foreign import data STObject :: Region -> Type -> Type
26+
27+type role STObject nominal representational
28+
29+-- | Create a new, empty mutable object
30+foreign import new :: forall a r. ST r (STObject r a)
31+
32+-- | Get the value for a key in a mutable object
33+peek :: forall a r. String -> STObject r a -> ST r (Maybe a)
34+peek = peekImpl Just Nothing
35+
36+foreign import peekImpl :: forall a b r. (a -> b) -> b -> String -> STObject r a -> ST r b
37+
38+-- | Update the value for a key in a mutable object
39+foreign import poke :: forall a r. String -> a -> STObject r a -> ST r (STObject r a)
40+
41+-- | Remove a key and the corresponding value from a mutable object
42+foreign import delete :: forall a r. String -> STObject r a -> ST r (STObject r a)
.spago/p/foreign-object-4.1.0/src/Foreign/Object/ST/Unsafe.jsnew file+5
@@ -0,0 +1,5 @@
1+export function unsafeFreeze(m) {
2+ return function () {
3+ return m;
4+ };
5+}
.spago/p/foreign-object-4.1.0/src/Foreign/Object/ST/Unsafe.pursnew file+10
@@ -0,0 +1,10 @@
1+module Foreign.Object.ST.Unsafe where
2+
3+import Control.Monad.ST (ST)
4+import Foreign.Object (Object)
5+import Foreign.Object.ST (STObject)
6+
7+-- | Unsafely get the object out of ST without copying it
8+-- |
9+-- | If you later change the ST version of the map the pure value will also change.
10+foreign import unsafeFreeze :: forall a r. STObject r a -> ST r (Object a)
.spago/p/foreign-object-4.1.0/src/Foreign/Object/Unsafe.jsnew file+5
@@ -0,0 +1,5 @@
1+export function unsafeIndex(m) {
2+ return function (k) {
3+ return m[k];
4+ };
5+}
.spago/p/foreign-object-4.1.0/src/Foreign/Object/Unsafe.pursnew file+10
@@ -0,0 +1,10 @@
1+module Foreign.Object.Unsafe
2+ ( unsafeIndex
3+ ) where
4+
5+import Foreign.Object (Object)
6+
7+-- | Unsafely get the value for a key in a object.
8+-- |
9+-- | This function does not check whether the key exists in the object.
10+foreign import unsafeIndex :: forall a. Object a -> String -> a
.spago/p/functions-6.0.0/LICENSEnew file+26
@@ -0,0 +1,26 @@
1+Copyright 2018 PureScript
2+
3+Redistribution and use in source and binary forms, with or without modification,
4+are permitted provided that the following conditions are met:
5+
6+1. Redistributions of source code must retain the above copyright notice, this
7+list of conditions and the following disclaimer.
8+
9+2. Redistributions in binary form must reproduce the above copyright notice,
10+this list of conditions and the following disclaimer in the documentation and/or
11+other materials provided with the distribution.
12+
13+3. Neither the name of the copyright holder nor the names of its contributors
14+may be used to endorse or promote products derived from this software without
15+specific prior written permission.
16+
17+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
21+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.spago/p/functions-6.0.0/README.mdnew file+17
@@ -0,0 +1,17 @@
1+# purescript-functions
2+
3+[](https://github.com/purescript/purescript-functions/releases)
4+[](https://github.com/purescript/purescript-functions/actions?query=workflow%3ACI+branch%3Amaster)
5+[](https://pursuit.purescript.org/packages/purescript-functions)
6+
7+Function combinators and types for uncurried multi-argument functions.
8+
9+## Installation
10+
11+```
12+spago install functions
13+```
14+
15+## Documentation
16+
17+Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-functions).
.spago/p/functions-6.0.0/bower.jsonnew file+21
@@ -0,0 +1,21 @@
1+{
2+ "name": "purescript-functions",
3+ "homepage": "https://github.com/purescript/purescript-functions",
4+ "license": "BSD-3-Clause",
5+ "repository": {
6+ "type": "git",
7+ "url": "https://github.com/purescript/purescript-functions.git"
8+ },
9+ "ignore": [
10+ "**/.*",
11+ "bower_components",
12+ "node_modules",
13+ "output",
14+ "test",
15+ "bower.json",
16+ "package.json"
17+ ],
18+ "dependencies": {
19+ "purescript-prelude": "^6.0.0"
20+ }
21+}
.spago/p/functions-6.0.0/package.jsonnew file+13
@@ -0,0 +1,13 @@
1+{
2+ "private": true,
3+ "scripts": {
4+ "clean": "rimraf output && rimraf .pulp-cache",
5+ "build": "eslint src && pulp build -- --censor-lib --strict"
6+ },
7+ "devDependencies": {
8+ "eslint": "^7.15.0",
9+ "pulp": "16.0.0-0",
10+ "purescript-psa": "^0.8.2",
11+ "rimraf": "^3.0.2"
12+ }
13+}
.spago/p/functions-6.0.0/purs.jsonnew file+13
@@ -0,0 +1,13 @@
1+{
2+ "name": "functions",
3+ "version": "6.0.0",
4+ "license": "BSD-3-Clause",
5+ "location": {
6+ "githubOwner": "purescript",
7+ "githubRepo": "purescript-functions"
8+ },
9+ "ref": "v6.0.0",
10+ "dependencies": {
11+ "prelude": ">=6.0.0 <7.0.0"
12+ }
13+}
.spago/p/functions-6.0.0/src/Data/Function/Uncurried.jsnew file+218
@@ -0,0 +1,218 @@
1+// module Data.Function.Uncurried
2+
3+export const mkFn0 = function (fn) {
4+ return function () {
5+ return fn();
6+ };
7+};
8+
9+export const mkFn2 = function (fn) {
10+ /* jshint maxparams: 2 */
11+ return function (a, b) {
12+ return fn(a)(b);
13+ };
14+};
15+
16+export const mkFn3 = function (fn) {
17+ /* jshint maxparams: 3 */
18+ return function (a, b, c) {
19+ return fn(a)(b)(c);
20+ };
21+};
22+
23+export const mkFn4 = function (fn) {
24+ /* jshint maxparams: 4 */
25+ return function (a, b, c, d) {
26+ return fn(a)(b)(c)(d);
27+ };
28+};
29+
30+export const mkFn5 = function (fn) {
31+ /* jshint maxparams: 5 */
32+ return function (a, b, c, d, e) {
33+ return fn(a)(b)(c)(d)(e);
34+ };
35+};
36+
37+export const mkFn6 = function (fn) {
38+ /* jshint maxparams: 6 */
39+ return function (a, b, c, d, e, f) {
40+ return fn(a)(b)(c)(d)(e)(f);
41+ };
42+};
43+
44+export const mkFn7 = function (fn) {
45+ /* jshint maxparams: 7 */
46+ return function (a, b, c, d, e, f, g) {
47+ return fn(a)(b)(c)(d)(e)(f)(g);
48+ };
49+};
50+
51+export const mkFn8 = function (fn) {
52+ /* jshint maxparams: 8 */
53+ return function (a, b, c, d, e, f, g, h) {
54+ return fn(a)(b)(c)(d)(e)(f)(g)(h);
55+ };
56+};
57+
58+export const mkFn9 = function (fn) {
59+ /* jshint maxparams: 9 */
60+ return function (a, b, c, d, e, f, g, h, i) {
61+ return fn(a)(b)(c)(d)(e)(f)(g)(h)(i);
62+ };
63+};
64+
65+export const mkFn10 = function (fn) {
66+ /* jshint maxparams: 10 */
67+ return function (a, b, c, d, e, f, g, h, i, j) {
68+ return fn(a)(b)(c)(d)(e)(f)(g)(h)(i)(j);
69+ };
70+};
71+
72+export const runFn0 = function (fn) {
73+ return fn();
74+};
75+
76+export const runFn2 = function (fn) {
77+ return function (a) {
78+ return function (b) {
79+ return fn(a, b);
80+ };
81+ };
82+};
83+
84+export const runFn3 = function (fn) {
85+ return function (a) {
86+ return function (b) {
87+ return function (c) {
88+ return fn(a, b, c);
89+ };
90+ };
91+ };
92+};
93+
94+export const runFn4 = function (fn) {
95+ return function (a) {
96+ return function (b) {
97+ return function (c) {
98+ return function (d) {
99+ return fn(a, b, c, d);
100+ };
101+ };
102+ };
103+ };
104+};
105+
106+export const runFn5 = function (fn) {
107+ return function (a) {
108+ return function (b) {
109+ return function (c) {
110+ return function (d) {
111+ return function (e) {
112+ return fn(a, b, c, d, e);
113+ };
114+ };
115+ };
116+ };
117+ };
118+};
119+
120+export const runFn6 = function (fn) {
121+ return function (a) {
122+ return function (b) {
123+ return function (c) {
124+ return function (d) {
125+ return function (e) {
126+ return function (f) {
127+ return fn(a, b, c, d, e, f);
128+ };
129+ };
130+ };
131+ };
132+ };
133+ };
134+};
135+
136+export const runFn7 = function (fn) {
137+ return function (a) {
138+ return function (b) {
139+ return function (c) {
140+ return function (d) {
141+ return function (e) {
142+ return function (f) {
143+ return function (g) {
144+ return fn(a, b, c, d, e, f, g);
145+ };
146+ };
147+ };
148+ };
149+ };
150+ };
151+ };
152+};
153+
154+export const runFn8 = function (fn) {
155+ return function (a) {
156+ return function (b) {
157+ return function (c) {
158+ return function (d) {
159+ return function (e) {
160+ return function (f) {
161+ return function (g) {
162+ return function (h) {
163+ return fn(a, b, c, d, e, f, g, h);
164+ };
165+ };
166+ };
167+ };
168+ };
169+ };
170+ };
171+ };
172+};
173+
174+export const runFn9 = function (fn) {
175+ return function (a) {
176+ return function (b) {
177+ return function (c) {
178+ return function (d) {
179+ return function (e) {
180+ return function (f) {
181+ return function (g) {
182+ return function (h) {
183+ return function (i) {
184+ return fn(a, b, c, d, e, f, g, h, i);
185+ };
186+ };
187+ };
188+ };
189+ };
190+ };
191+ };
192+ };
193+ };
194+};
195+
196+export const runFn10 = function (fn) {
197+ return function (a) {
198+ return function (b) {
199+ return function (c) {
200+ return function (d) {
201+ return function (e) {
202+ return function (f) {
203+ return function (g) {
204+ return function (h) {
205+ return function (i) {
206+ return function (j) {
207+ return fn(a, b, c, d, e, f, g, h, i, j);
208+ };
209+ };
210+ };
211+ };
212+ };
213+ };
214+ };
215+ };
216+ };
217+ };
218+};
.spago/p/functions-6.0.0/src/Data/Function/Uncurried.pursnew file+124
@@ -0,0 +1,124 @@
1+module Data.Function.Uncurried where
2+
3+import Data.Unit (Unit)
4+
5+-- | A function of zero arguments
6+foreign import data Fn0 :: Type -> Type
7+
8+type role Fn0 representational
9+
10+-- | A function of one argument
11+type Fn1 a b = a -> b
12+
13+-- | A function of two arguments
14+foreign import data Fn2 :: Type -> Type -> Type -> Type
15+
16+type role Fn2 representational representational representational
17+
18+-- | A function of three arguments
19+foreign import data Fn3 :: Type -> Type -> Type -> Type -> Type
20+
21+type role Fn3 representational representational representational representational
22+
23+-- | A function of four arguments
24+foreign import data Fn4 :: Type -> Type -> Type -> Type -> Type -> Type
25+
26+type role Fn4 representational representational representational representational representational
27+
28+-- | A function of five arguments
29+foreign import data Fn5 :: Type -> Type -> Type -> Type -> Type -> Type -> Type
30+
31+type role Fn5 representational representational representational representational representational representational
32+
33+-- | A function of six arguments
34+foreign import data Fn6 :: Type -> Type -> Type -> Type -> Type -> Type -> Type -> Type
35+
36+type role Fn6 representational representational representational representational representational representational representational
37+
38+-- | A function of seven arguments
39+foreign import data Fn7 :: Type -> Type -> Type -> Type -> Type -> Type -> Type -> Type -> Type
40+
41+type role Fn7 representational representational representational representational representational representational representational representational
42+
43+-- | A function of eight arguments
44+foreign import data Fn8 :: Type -> Type -> Type -> Type -> Type -> Type -> Type -> Type -> Type -> Type
45+
46+type role Fn8 representational representational representational representational representational representational representational representational representational
47+
48+-- | A function of nine arguments
49+foreign import data Fn9 :: Type -> Type -> Type -> Type -> Type -> Type -> Type -> Type -> Type -> Type -> Type
50+
51+type role Fn9 representational representational representational representational representational representational representational representational representational representational
52+
53+-- | A function of ten arguments
54+foreign import data Fn10 :: Type -> Type -> Type -> Type -> Type -> Type -> Type -> Type -> Type -> Type -> Type -> Type
55+
56+type role Fn10 representational representational representational representational representational representational representational representational representational representational representational
57+
58+-- | Create a function of no arguments
59+foreign import mkFn0 :: forall a. (Unit -> a) -> Fn0 a
60+
61+-- | Create a function of one argument
62+mkFn1 :: forall a b. (a -> b) -> Fn1 a b
63+mkFn1 f = f
64+
65+-- | Create a function of two arguments from a curried function
66+foreign import mkFn2 :: forall a b c. (a -> b -> c) -> Fn2 a b c
67+
68+-- | Create a function of three arguments from a curried function
69+foreign import mkFn3 :: forall a b c d. (a -> b -> c -> d) -> Fn3 a b c d
70+
71+-- | Create a function of four arguments from a curried function
72+foreign import mkFn4 :: forall a b c d e. (a -> b -> c -> d -> e) -> Fn4 a b c d e
73+
74+-- | Create a function of five arguments from a curried function
75+foreign import mkFn5 :: forall a b c d e f. (a -> b -> c -> d -> e -> f) -> Fn5 a b c d e f
76+
77+-- | Create a function of six arguments from a curried function
78+foreign import mkFn6 :: forall a b c d e f g. (a -> b -> c -> d -> e -> f -> g) -> Fn6 a b c d e f g
79+
80+-- | Create a function of seven arguments from a curried function
81+foreign import mkFn7 :: forall a b c d e f g h. (a -> b -> c -> d -> e -> f -> g -> h) -> Fn7 a b c d e f g h
82+
83+-- | Create a function of eight arguments from a curried function
84+foreign import mkFn8 :: forall a b c d e f g h i. (a -> b -> c -> d -> e -> f -> g -> h -> i) -> Fn8 a b c d e f g h i
85+
86+-- | Create a function of nine arguments from a curried function
87+foreign import mkFn9 :: forall a b c d e f g h i j. (a -> b -> c -> d -> e -> f -> g -> h -> i -> j) -> Fn9 a b c d e f g h i j
88+
89+-- | Create a function of ten arguments from a curried function
90+foreign import mkFn10 :: forall a b c d e f g h i j k. (a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k) -> Fn10 a b c d e f g h i j k
91+
92+-- | Apply a function of no arguments
93+foreign import runFn0 :: forall a. Fn0 a -> a
94+
95+-- | Apply a function of one argument
96+runFn1 :: forall a b. Fn1 a b -> a -> b
97+runFn1 f = f
98+
99+-- | Apply a function of two arguments
100+foreign import runFn2 :: forall a b c. Fn2 a b c -> a -> b -> c
101+
102+-- | Apply a function of three arguments
103+foreign import runFn3 :: forall a b c d. Fn3 a b c d -> a -> b -> c -> d
104+
105+-- | Apply a function of four arguments
106+foreign import runFn4 :: forall a b c d e. Fn4 a b c d e -> a -> b -> c -> d -> e
107+
108+-- | Apply a function of five arguments
109+foreign import runFn5 :: forall a b c d e f. Fn5 a b c d e f -> a -> b -> c -> d -> e -> f
110+
111+-- | Apply a function of six arguments
112+foreign import runFn6 :: forall a b c d e f g. Fn6 a b c d e f g -> a -> b -> c -> d -> e -> f -> g
113+
114+-- | Apply a function of seven arguments
115+foreign import runFn7 :: forall a b c d e f g h. Fn7 a b c d e f g h -> a -> b -> c -> d -> e -> f -> g -> h
116+
117+-- | Apply a function of eight arguments
118+foreign import runFn8 :: forall a b c d e f g h i. Fn8 a b c d e f g h i -> a -> b -> c -> d -> e -> f -> g -> h -> i
119+
120+-- | Apply a function of nine arguments
121+foreign import runFn9 :: forall a b c d e f g h i j. Fn9 a b c d e f g h i j -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j
122+
123+-- | Apply a function of ten arguments
124+foreign import runFn10 :: forall a b c d e f g h i j k. Fn10 a b c d e f g h i j k -> a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k
.spago/p/functors-5.0.0/LICENSEnew file+26
@@ -0,0 +1,26 @@
1+Copyright 2018 PureScript
2+
3+Redistribution and use in source and binary forms, with or without modification,
4+are permitted provided that the following conditions are met:
5+
6+1. Redistributions of source code must retain the above copyright notice, this
7+list of conditions and the following disclaimer.
8+
9+2. Redistributions in binary form must reproduce the above copyright notice,
10+this list of conditions and the following disclaimer in the documentation and/or
11+other materials provided with the distribution.
12+
13+3. Neither the name of the copyright holder nor the names of its contributors
14+may be used to endorse or promote products derived from this software without
15+specific prior written permission.
16+
17+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
21+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.spago/p/functors-5.0.0/README.mdnew file+17
@@ -0,0 +1,17 @@
1+# purescript-functors
2+
3+[](https://github.com/purescript/purescript-functors/releases)
4+[](https://github.com/purescript/purescript-functors/actions?query=workflow%3ACI+branch%3Amaster)
5+[](https://pursuit.purescript.org/packages/purescript-functors)
6+
7+Functor products, coproducts, and composition.
8+
9+## Installation
10+
11+```
12+spago install functors
13+```
14+
15+## Documentation
16+
17+Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-functors).
.spago/p/functors-5.0.0/bower.jsonnew file+37
@@ -0,0 +1,37 @@
1+{
2+ "name": "purescript-functors",
3+ "homepage": "https://github.com/purescript/purescript-functors",
4+ "description": "Functor products, coproducts, and composition",
5+ "license": "BSD-3-Clause",
6+ "repository": {
7+ "type": "git",
8+ "url": "https://github.com/purescript/purescript-functors.git"
9+ },
10+ "ignore": [
11+ "**/.*",
12+ "bower_components",
13+ "node_modules",
14+ "output",
15+ "test",
16+ "bower.json",
17+ "package.json"
18+ ],
19+ "dependencies": {
20+ "purescript-bifunctors": "^6.0.0",
21+ "purescript-const": "^6.0.0",
22+ "purescript-contravariant": "^6.0.0",
23+ "purescript-control": "^6.0.0",
24+ "purescript-distributive": "^6.0.0",
25+ "purescript-either": "^6.0.0",
26+ "purescript-invariant": "^6.0.0",
27+ "purescript-maybe": "^6.0.0",
28+ "purescript-newtype": "^5.0.0",
29+ "purescript-prelude": "^6.0.0",
30+ "purescript-profunctor": "^6.0.0",
31+ "purescript-tuples": "^7.0.0",
32+ "purescript-unsafe-coerce": "^6.0.0"
33+ },
34+ "devDependencies": {
35+ "purescript-assert": "^6.0.0"
36+ }
37+}
.spago/p/functors-5.0.0/package.jsonnew file+13
@@ -0,0 +1,13 @@
1+{
2+ "private": true,
3+ "scripts": {
4+ "clean": "rimraf output && rimraf .pulp-cache",
5+ "build": "pulp build -- --censor-lib --strict",
6+ "test": "pulp test"
7+ },
8+ "devDependencies": {
9+ "pulp": "16.0.0-0",
10+ "purescript-psa": "^0.8.2",
11+ "rimraf": "^3.0.2"
12+ }
13+}
.spago/p/functors-5.0.0/purs.jsonnew file+26
@@ -0,0 +1,26 @@
1+{
2+ "name": "functors",
3+ "version": "5.0.0",
4+ "license": "BSD-3-Clause",
5+ "description": "Functor products, coproducts, and composition",
6+ "location": {
7+ "githubOwner": "purescript",
8+ "githubRepo": "purescript-functors"
9+ },
10+ "ref": "v5.0.0",
11+ "dependencies": {
12+ "bifunctors": ">=6.0.0 <7.0.0",
13+ "const": ">=6.0.0 <7.0.0",
14+ "contravariant": ">=6.0.0 <7.0.0",
15+ "control": ">=6.0.0 <7.0.0",
16+ "distributive": ">=6.0.0 <7.0.0",
17+ "either": ">=6.0.0 <7.0.0",
18+ "invariant": ">=6.0.0 <7.0.0",
19+ "maybe": ">=6.0.0 <7.0.0",
20+ "newtype": ">=5.0.0 <6.0.0",
21+ "prelude": ">=6.0.0 <7.0.0",
22+ "profunctor": ">=6.0.0 <7.0.0",
23+ "tuples": ">=7.0.0 <8.0.0",
24+ "unsafe-coerce": ">=6.0.0 <7.0.0"
25+ }
26+}
.spago/p/functors-5.0.0/src/Data/Functor/App.pursnew file+56
@@ -0,0 +1,56 @@
1+module Data.Functor.App where
2+
3+import Prelude
4+
5+import Control.Alt (class Alt)
6+import Control.Alternative (class Alternative)
7+import Control.Apply (lift2)
8+import Control.Comonad (class Comonad)
9+import Control.Extend (class Extend)
10+import Control.Lazy (class Lazy)
11+import Control.MonadPlus (class MonadPlus)
12+import Control.Plus (class Plus)
13+import Data.Eq (class Eq1)
14+import Data.Newtype (class Newtype)
15+import Data.Ord (class Ord1)
16+import Unsafe.Coerce (unsafeCoerce)
17+
18+newtype App :: forall k. (k -> Type) -> k -> Type
19+newtype App f a = App (f a)
20+
21+hoistApp :: forall f g. (f ~> g) -> App f ~> App g
22+hoistApp f (App fa) = App (f fa)
23+
24+hoistLiftApp :: forall f g a. f (g a) -> f (App g a)
25+hoistLiftApp = unsafeCoerce -- safe as newtypes have no runtime representation
26+
27+hoistLowerApp :: forall f g a. f (App g a) -> f (g a)
28+hoistLowerApp = unsafeCoerce -- safe as newtypes have no runtime representation
29+
30+derive instance newtypeApp :: Newtype (App f a) _
31+derive instance eqApp :: (Eq1 f, Eq a) => Eq (App f a)
32+derive instance eq1App :: Eq1 f => Eq1 (App f)
33+derive instance ordApp :: (Ord1 f, Ord a) => Ord (App f a)
34+derive instance ord1App :: Ord1 f => Ord1 (App f)
35+
36+instance showApp :: Show (f a) => Show (App f a) where
37+ show (App fa) = "(App " <> show fa <> ")"
38+
39+instance semigroupApp :: (Apply f, Semigroup a) => Semigroup (App f a) where
40+ append (App fa1) (App fa2) = App (lift2 append fa1 fa2)
41+
42+instance monoidApp :: (Applicative f, Monoid a) => Monoid (App f a) where
43+ mempty = App (pure mempty)
44+
45+derive newtype instance functorApp :: Functor f => Functor (App f)
46+derive newtype instance applyApp :: Apply f => Apply (App f)
47+derive newtype instance applicativeApp :: Applicative f => Applicative (App f)
48+derive newtype instance bindApp :: Bind f => Bind (App f)
49+derive newtype instance monadApp :: Monad f => Monad (App f)
50+derive newtype instance altApp :: Alt f => Alt (App f)
51+derive newtype instance plusApp :: Plus f => Plus (App f)
52+derive newtype instance alternativeApp :: Alternative f => Alternative (App f)
53+derive newtype instance monadPlusApp :: MonadPlus f => MonadPlus (App f)
54+derive newtype instance lazyApp :: Lazy (f a) => Lazy (App f a)
55+derive newtype instance extendApp :: Extend f => Extend (App f)
56+derive newtype instance comonadApp :: Comonad f => Comonad (App f)
.spago/p/functors-5.0.0/src/Data/Functor/Clown.pursnew file+44
@@ -0,0 +1,44 @@
1+module Data.Functor.Clown where
2+
3+import Prelude
4+
5+import Control.Biapplicative (class Biapplicative)
6+import Control.Biapply (class Biapply)
7+import Data.Bifunctor (class Bifunctor)
8+import Data.Functor.Contravariant (class Contravariant, cmap)
9+import Data.Newtype (class Newtype)
10+import Data.Profunctor (class Profunctor)
11+
12+-- | This advanced type's usage and its relation to `Joker` is best understood
13+-- | by reading through "Clowns to the Left, Jokers to the Right (Functional
14+-- | Pearl)"
15+-- | https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.475.6134&rep=rep1&type=pdf
16+newtype Clown :: (Type -> Type) -> Type -> Type -> Type
17+newtype Clown f a b = Clown (f a)
18+
19+derive instance newtypeClown :: Newtype (Clown f a b) _
20+
21+derive newtype instance eqClown :: Eq (f a) => Eq (Clown f a b)
22+
23+derive newtype instance ordClown :: Ord (f a) => Ord (Clown f a b)
24+
25+instance showClown :: Show (f a) => Show (Clown f a b) where
26+ show (Clown x) = "(Clown " <> show x <> ")"
27+
28+instance functorClown :: Functor (Clown f a) where
29+ map _ (Clown a) = Clown a
30+
31+instance bifunctorClown :: Functor f => Bifunctor (Clown f) where
32+ bimap f _ (Clown a) = Clown (map f a)
33+
34+instance biapplyClown :: Apply f => Biapply (Clown f) where
35+ biapply (Clown fg) (Clown xy) = Clown (fg <*> xy)
36+
37+instance biapplicativeClown :: Applicative f => Biapplicative (Clown f) where
38+ bipure a _ = Clown (pure a)
39+
40+instance profunctorClown :: Contravariant f => Profunctor (Clown f) where
41+ dimap f _ (Clown a) = Clown (cmap f a)
42+
43+hoistClown :: forall f g a b. (f ~> g) -> Clown f a b -> Clown g a b
44+hoistClown f (Clown a) = Clown (f a)
.spago/p/functors-5.0.0/src/Data/Functor/Compose.pursnew file+58
@@ -0,0 +1,58 @@
1+module Data.Functor.Compose where
2+
3+import Prelude
4+
5+import Control.Alt (class Alt, alt)
6+import Control.Alternative (class Alternative)
7+import Control.Plus (class Plus, empty)
8+import Data.Eq (class Eq1, eq1)
9+import Data.Functor.App (hoistLiftApp)
10+import Data.Newtype (class Newtype)
11+import Data.Ord (class Ord1, compare1)
12+
13+-- | `Compose f g` is the composition of the two functors `f` and `g`.
14+newtype Compose :: forall k1 k2. (k2 -> Type) -> (k1 -> k2) -> k1 -> Type
15+newtype Compose f g a = Compose (f (g a))
16+
17+bihoistCompose
18+ :: forall f g h i
19+ . Functor f
20+ => (f ~> h)
21+ -> (g ~> i)
22+ -> Compose f g
23+ ~> Compose h i
24+bihoistCompose natF natG (Compose fga) = Compose (natF (map natG fga))
25+
26+derive instance newtypeCompose :: Newtype (Compose f g a) _
27+
28+instance eqCompose :: (Eq1 f, Eq1 g, Eq a) => Eq (Compose f g a) where
29+ eq (Compose fga1) (Compose fga2) =
30+ eq1 (hoistLiftApp fga1) (hoistLiftApp fga2)
31+
32+derive instance eq1Compose :: (Eq1 f, Eq1 g) => Eq1 (Compose f g)
33+
34+instance ordCompose :: (Ord1 f, Ord1 g, Ord a) => Ord (Compose f g a) where
35+ compare (Compose fga1) (Compose fga2) =
36+ compare1 (hoistLiftApp fga1) (hoistLiftApp fga2)
37+
38+derive instance ord1Compose :: (Ord1 f, Ord1 g) => Ord1 (Compose f g)
39+
40+instance showCompose :: Show (f (g a)) => Show (Compose f g a) where
41+ show (Compose fga) = "(Compose " <> show fga <> ")"
42+
43+instance functorCompose :: (Functor f, Functor g) => Functor (Compose f g) where
44+ map f (Compose fga) = Compose $ map f <$> fga
45+
46+instance applyCompose :: (Apply f, Apply g) => Apply (Compose f g) where
47+ apply (Compose f) (Compose x) = Compose $ apply <$> f <*> x
48+
49+instance applicativeCompose :: (Applicative f, Applicative g) => Applicative (Compose f g) where
50+ pure = Compose <<< pure <<< pure
51+
52+instance altCompose :: (Alt f, Functor g) => Alt (Compose f g) where
53+ alt (Compose a) (Compose b) = Compose $ alt a b
54+
55+instance plusCompose :: (Plus f, Functor g) => Plus (Compose f g) where
56+ empty = Compose empty
57+
58+instance alternativeCompose :: (Alternative f, Applicative g) => Alternative (Compose f g)
.spago/p/functors-5.0.0/src/Data/Functor/Coproduct.pursnew file+76
@@ -0,0 +1,76 @@
1+module Data.Functor.Coproduct where
2+
3+import Prelude
4+
5+import Control.Comonad (class Comonad, extract)
6+import Control.Extend (class Extend, extend)
7+import Data.Bifunctor (bimap)
8+import Data.Either (Either(..))
9+import Data.Eq (class Eq1, eq1)
10+import Data.Newtype (class Newtype)
11+import Data.Ord (class Ord1, compare1)
12+
13+-- | `Coproduct f g` is the coproduct of two functors `f` and `g`
14+newtype Coproduct :: forall k. (k -> Type) -> (k -> Type) -> k -> Type
15+newtype Coproduct f g a = Coproduct (Either (f a) (g a))
16+
17+-- | Left injection
18+left :: forall f g a. f a -> Coproduct f g a
19+left fa = Coproduct (Left fa)
20+
21+-- | Right injection
22+right :: forall f g a. g a -> Coproduct f g a
23+right ga = Coproduct (Right ga)
24+
25+-- | Eliminate a coproduct by providing eliminators for the left and
26+-- | right components
27+coproduct :: forall f g a b. (f a -> b) -> (g a -> b) -> Coproduct f g a -> b
28+coproduct f _ (Coproduct (Left a)) = f a
29+coproduct _ g (Coproduct (Right b)) = g b
30+
31+-- | Change the underlying functors in a coproduct
32+bihoistCoproduct
33+ :: forall f g h i
34+ . (f ~> h)
35+ -> (g ~> i)
36+ -> Coproduct f g
37+ ~> Coproduct h i
38+bihoistCoproduct natF natG (Coproduct e) = Coproduct (bimap natF natG e)
39+
40+derive instance newtypeCoproduct :: Newtype (Coproduct f g a) _
41+
42+instance eqCoproduct :: (Eq1 f, Eq1 g, Eq a) => Eq (Coproduct f g a) where
43+ eq = eq1
44+
45+instance eq1Coproduct :: (Eq1 f, Eq1 g) => Eq1 (Coproduct f g) where
46+ eq1 (Coproduct x) (Coproduct y) =
47+ case x, y of
48+ Left fa, Left ga -> eq1 fa ga
49+ Right fa, Right ga -> eq1 fa ga
50+ _, _ -> false
51+
52+instance ordCoproduct :: (Ord1 f, Ord1 g, Ord a) => Ord (Coproduct f g a) where
53+ compare = compare1
54+
55+instance ord1Coproduct :: (Ord1 f, Ord1 g) => Ord1 (Coproduct f g) where
56+ compare1 (Coproduct x) (Coproduct y) =
57+ case x, y of
58+ Left fa, Left ga -> compare1 fa ga
59+ Left _, _ -> LT
60+ _, Left _ -> GT
61+ Right fa, Right ga -> compare1 fa ga
62+
63+instance showCoproduct :: (Show (f a), Show (g a)) => Show (Coproduct f g a) where
64+ show (Coproduct (Left fa)) = "(left " <> show fa <> ")"
65+ show (Coproduct (Right ga)) = "(right " <> show ga <> ")"
66+
67+instance functorCoproduct :: (Functor f, Functor g) => Functor (Coproduct f g) where
68+ map f (Coproduct e) = Coproduct (bimap (map f) (map f) e)
69+
70+instance extendCoproduct :: (Extend f, Extend g) => Extend (Coproduct f g) where
71+ extend f = Coproduct <<< coproduct
72+ (Left <<< extend (f <<< Coproduct <<< Left))
73+ (Right <<< extend (f <<< Coproduct <<< Right))
74+
75+instance comonadCoproduct :: (Comonad f, Comonad g) => Comonad (Coproduct f g) where
76+ extract = coproduct extract extract
.spago/p/functors-5.0.0/src/Data/Functor/Coproduct/Inject.pursnew file+24
@@ -0,0 +1,24 @@
1+module Data.Functor.Coproduct.Inject where
2+
3+import Prelude
4+
5+import Data.Either (Either(..))
6+import Data.Functor.Coproduct (Coproduct(..), coproduct)
7+import Data.Maybe (Maybe(..))
8+
9+class Inject :: forall k. (k -> Type) -> (k -> Type) -> Constraint
10+class Inject f g where
11+ inj :: forall a. f a -> g a
12+ prj :: forall a. g a -> Maybe (f a)
13+
14+instance injectReflexive :: Inject f f where
15+ inj = identity
16+ prj = Just
17+
18+else instance injectLeft :: Inject f (Coproduct f g) where
19+ inj = Coproduct <<< Left
20+ prj = coproduct Just (const Nothing)
21+
22+else instance injectRight :: Inject f g => Inject f (Coproduct h g) where
23+ inj = Coproduct <<< Right <<< inj
24+ prj = coproduct (const Nothing) prj
.spago/p/functors-5.0.0/src/Data/Functor/Coproduct/Nested.pursnew file+273
@@ -0,0 +1,273 @@
1+module Data.Functor.Coproduct.Nested where
2+
3+import Prelude
4+
5+import Data.Const (Const)
6+import Data.Either (Either(..))
7+import Data.Functor.Coproduct (Coproduct(..), coproduct, left, right)
8+import Data.Newtype (unwrap)
9+
10+type Coproduct1 :: forall k. (k -> Type) -> k -> Type
11+type Coproduct1 a = C2 a (Const Void)
12+type Coproduct2 :: forall k. (k -> Type) -> (k -> Type) -> k -> Type
13+type Coproduct2 a b = C3 a b (Const Void)
14+type Coproduct3 :: forall k. (k -> Type) -> (k -> Type) -> (k -> Type) -> k -> Type
15+type Coproduct3 a b c = C4 a b c (Const Void)
16+type Coproduct4 :: forall k. (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> k -> Type
17+type Coproduct4 a b c d = C5 a b c d (Const Void)
18+type Coproduct5 :: forall k. (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> k -> Type
19+type Coproduct5 a b c d e = C6 a b c d e (Const Void)
20+type Coproduct6 :: forall k. (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> k -> Type
21+type Coproduct6 a b c d e f = C7 a b c d e f (Const Void)
22+type Coproduct7 :: forall k. (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> k -> Type
23+type Coproduct7 a b c d e f g = C8 a b c d e f g (Const Void)
24+type Coproduct8 :: forall k. (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> k -> Type
25+type Coproduct8 a b c d e f g h = C9 a b c d e f g h (Const Void)
26+type Coproduct9 :: forall k. (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> k -> Type
27+type Coproduct9 a b c d e f g h i = C10 a b c d e f g h i (Const Void)
28+type Coproduct10 :: forall k. (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> k -> Type
29+type Coproduct10 a b c d e f g h i j = C11 a b c d e f g h i j (Const Void)
30+
31+type C2 :: forall k. (k -> Type) -> (k -> Type) -> k -> Type
32+type C2 a z = Coproduct a z
33+type C3 :: forall k. (k -> Type) -> (k -> Type) -> (k -> Type) -> k -> Type
34+type C3 a b z = Coproduct a (C2 b z)
35+type C4 :: forall k. (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> k -> Type
36+type C4 a b c z = Coproduct a (C3 b c z)
37+type C5 :: forall k. (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> k -> Type
38+type C5 a b c d z = Coproduct a (C4 b c d z)
39+type C6 :: forall k. (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> k -> Type
40+type C6 a b c d e z = Coproduct a (C5 b c d e z)
41+type C7 :: forall k. (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> k -> Type
42+type C7 a b c d e f z = Coproduct a (C6 b c d e f z)
43+type C8 :: forall k. (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> k -> Type
44+type C8 a b c d e f g z = Coproduct a (C7 b c d e f g z)
45+type C9 :: forall k. (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> k -> Type
46+type C9 a b c d e f g h z = Coproduct a (C8 b c d e f g h z)
47+type C10 :: forall k. (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> k -> Type
48+type C10 a b c d e f g h i z = Coproduct a (C9 b c d e f g h i z)
49+type C11 :: forall k. (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> k -> Type
50+type C11 a b c d e f g h i j z = Coproduct a (C10 b c d e f g h i j z)
51+
52+infixr 6 coproduct as <\/>
53+infixr 6 type Coproduct as <\/>
54+
55+in1 :: forall a z. a ~> C2 a z
56+in1 = left
57+
58+in2 :: forall a b z. b ~> C3 a b z
59+in2 v = right (left v)
60+
61+in3 :: forall a b c z. c ~> C4 a b c z
62+in3 v = right (right (left v))
63+
64+in4 :: forall a b c d z. d ~> C5 a b c d z
65+in4 v = right (right (right (left v)))
66+
67+in5 :: forall a b c d e z. e ~> C6 a b c d e z
68+in5 v = right (right (right (right (left v))))
69+
70+in6 :: forall a b c d e f z. f ~> C7 a b c d e f z
71+in6 v = right (right (right (right (right (left v)))))
72+
73+in7 :: forall a b c d e f g z. g ~> C8 a b c d e f g z
74+in7 v = right (right (right (right (right (right (left v))))))
75+
76+in8 :: forall a b c d e f g h z. h ~> C9 a b c d e f g h z
77+in8 v = right (right (right (right (right (right (right (left v)))))))
78+
79+in9 :: forall a b c d e f g h i z. i ~> C10 a b c d e f g h i z
80+in9 v = right (right (right (right (right (right (right (right (left v))))))))
81+
82+in10 :: forall a b c d e f g h i j z. j ~> C11 a b c d e f g h i j z
83+in10 v = right (right (right (right (right (right (right (right (right (left v)))))))))
84+
85+at1 :: forall r x a z. r -> (a x -> r) -> C2 a z x -> r
86+at1 b f y = case y of
87+ Coproduct (Left r) -> f r
88+ _ -> b
89+
90+at2 :: forall r x a b z. r -> (b x -> r) -> C3 a b z x -> r
91+at2 b f y = case y of
92+ Coproduct (Right (Coproduct (Left r))) -> f r
93+ _ -> b
94+
95+at3 :: forall r x a b c z. r -> (c x -> r) -> C4 a b c z x -> r
96+at3 b f y = case y of
97+ Coproduct (Right (Coproduct (Right (Coproduct (Left r))))) -> f r
98+ _ -> b
99+
100+at4 :: forall r x a b c d z. r -> (d x -> r) -> C5 a b c d z x -> r
101+at4 b f y = case y of
102+ Coproduct (Right (Coproduct (Right (Coproduct (Right (Coproduct (Left r))))))) -> f r
103+ _ -> b
104+
105+at5 :: forall r x a b c d e z. r -> (e x -> r) -> C6 a b c d e z x -> r
106+at5 b f y = case y of
107+ Coproduct (Right (Coproduct (Right (Coproduct (Right (Coproduct (Right (Coproduct (Left r))))))))) -> f r
108+ _ -> b
109+
110+at6 :: forall r x a b c d e f z. r -> (f x -> r) -> C7 a b c d e f z x -> r
111+at6 b f y = case y of
112+ Coproduct (Right (Coproduct (Right (Coproduct (Right (Coproduct (Right (Coproduct (Right (Coproduct (Left r))))))))))) -> f r
113+ _ -> b
114+
115+at7 :: forall r x a b c d e f g z. r -> (g x -> r) -> C8 a b c d e f g z x -> r
116+at7 b f y = case y of
117+ Coproduct (Right (Coproduct (Right (Coproduct (Right (Coproduct (Right (Coproduct (Right (Coproduct (Right (Coproduct (Left r))))))))))))) -> f r
118+ _ -> b
119+
120+at8 :: forall r x a b c d e f g h z. r -> (h x -> r) -> C9 a b c d e f g h z x -> r
121+at8 b f y = case y of
122+ Coproduct (Right (Coproduct (Right (Coproduct (Right (Coproduct (Right (Coproduct (Right (Coproduct (Right (Coproduct (Right (Coproduct (Left r))))))))))))))) -> f r
123+ _ -> b
124+
125+at9 :: forall r x a b c d e f g h i z. r -> (i x -> r) -> C10 a b c d e f g h i z x -> r
126+at9 b f y = case y of
127+ Coproduct (Right (Coproduct (Right (Coproduct (Right (Coproduct (Right (Coproduct (Right (Coproduct (Right (Coproduct (Right (Coproduct (Right (Coproduct (Left r))))))))))))))))) -> f r
128+ _ -> b
129+
130+at10 :: forall r x a b c d e f g h i j z. r -> (j x -> r) -> C11 a b c d e f g h i j z x -> r
131+at10 b f y = case y of
132+ Coproduct (Right (Coproduct (Right (Coproduct (Right (Coproduct (Right (Coproduct (Right (Coproduct (Right (Coproduct (Right (Coproduct (Right (Coproduct (Right (Coproduct (Left r))))))))))))))))))) -> f r
133+ _ -> b
134+
135+coproduct1 :: forall a. Coproduct1 a ~> a
136+coproduct1 y = case y of
137+ Coproduct (Left r) -> r
138+ Coproduct (Right _1) -> absurd (unwrap _1)
139+
140+coproduct2 :: forall r x a b. (a x -> r) -> (b x -> r) -> Coproduct2 a b x -> r
141+coproduct2 a b y = case y of
142+ Coproduct (Left r) -> a r
143+ Coproduct (Right _1) -> case _1 of
144+ Coproduct (Left r) -> b r
145+ Coproduct (Right _2) -> absurd (unwrap _2)
146+
147+coproduct3 :: forall r x a b c. (a x -> r) -> (b x -> r) -> (c x -> r) -> Coproduct3 a b c x -> r
148+coproduct3 a b c y = case y of
149+ Coproduct (Left r) -> a r
150+ Coproduct (Right _1) -> case _1 of
151+ Coproduct (Left r) -> b r
152+ Coproduct (Right _2) -> case _2 of
153+ Coproduct (Left r) -> c r
154+ Coproduct (Right _3) -> absurd (unwrap _3)
155+
156+coproduct4 :: forall r x a b c d. (a x -> r) -> (b x -> r) -> (c x -> r) -> (d x -> r) -> Coproduct4 a b c d x -> r
157+coproduct4 a b c d y = case y of
158+ Coproduct (Left r) -> a r
159+ Coproduct (Right _1) -> case _1 of
160+ Coproduct (Left r) -> b r
161+ Coproduct (Right _2) -> case _2 of
162+ Coproduct (Left r) -> c r
163+ Coproduct (Right _3) -> case _3 of
164+ Coproduct (Left r) -> d r
165+ Coproduct (Right _4) -> absurd (unwrap _4)
166+
167+coproduct5 :: forall r x a b c d e. (a x -> r) -> (b x -> r) -> (c x -> r) -> (d x -> r) -> (e x -> r) -> Coproduct5 a b c d e x -> r
168+coproduct5 a b c d e y = case y of
169+ Coproduct (Left r) -> a r
170+ Coproduct (Right _1) -> case _1 of
171+ Coproduct (Left r) -> b r
172+ Coproduct (Right _2) -> case _2 of
173+ Coproduct (Left r) -> c r
174+ Coproduct (Right _3) -> case _3 of
175+ Coproduct (Left r) -> d r
176+ Coproduct (Right _4) -> case _4 of
177+ Coproduct (Left r) -> e r
178+ Coproduct (Right _5) -> absurd (unwrap _5)
179+
180+coproduct6 :: forall r x a b c d e f. (a x -> r) -> (b x -> r) -> (c x -> r) -> (d x -> r) -> (e x -> r) -> (f x -> r) -> Coproduct6 a b c d e f x -> r
181+coproduct6 a b c d e f y = case y of
182+ Coproduct (Left r) -> a r
183+ Coproduct (Right _1) -> case _1 of
184+ Coproduct (Left r) -> b r
185+ Coproduct (Right _2) -> case _2 of
186+ Coproduct (Left r) -> c r
187+ Coproduct (Right _3) -> case _3 of
188+ Coproduct (Left r) -> d r
189+ Coproduct (Right _4) -> case _4 of
190+ Coproduct (Left r) -> e r
191+ Coproduct (Right _5) -> case _5 of
192+ Coproduct (Left r) -> f r
193+ Coproduct (Right _6) -> absurd (unwrap _6)
194+
195+coproduct7 :: forall r x a b c d e f g. (a x -> r) -> (b x -> r) -> (c x -> r) -> (d x -> r) -> (e x -> r) -> (f x -> r) -> (g x -> r) -> Coproduct7 a b c d e f g x -> r
196+coproduct7 a b c d e f g y = case y of
197+ Coproduct (Left r) -> a r
198+ Coproduct (Right _1) -> case _1 of
199+ Coproduct (Left r) -> b r
200+ Coproduct (Right _2) -> case _2 of
201+ Coproduct (Left r) -> c r
202+ Coproduct (Right _3) -> case _3 of
203+ Coproduct (Left r) -> d r
204+ Coproduct (Right _4) -> case _4 of
205+ Coproduct (Left r) -> e r
206+ Coproduct (Right _5) -> case _5 of
207+ Coproduct (Left r) -> f r
208+ Coproduct (Right _6) -> case _6 of
209+ Coproduct (Left r) -> g r
210+ Coproduct (Right _7) -> absurd (unwrap _7)
211+
212+coproduct8 :: forall r x a b c d e f g h. (a x -> r) -> (b x -> r) -> (c x -> r) -> (d x -> r) -> (e x -> r) -> (f x -> r) -> (g x -> r) -> (h x -> r) -> Coproduct8 a b c d e f g h x -> r
213+coproduct8 a b c d e f g h y = case y of
214+ Coproduct (Left r) -> a r
215+ Coproduct (Right _1) -> case _1 of
216+ Coproduct (Left r) -> b r
217+ Coproduct (Right _2) -> case _2 of
218+ Coproduct (Left r) -> c r
219+ Coproduct (Right _3) -> case _3 of
220+ Coproduct (Left r) -> d r
221+ Coproduct (Right _4) -> case _4 of
222+ Coproduct (Left r) -> e r
223+ Coproduct (Right _5) -> case _5 of
224+ Coproduct (Left r) -> f r
225+ Coproduct (Right _6) -> case _6 of
226+ Coproduct (Left r) -> g r
227+ Coproduct (Right _7) -> case _7 of
228+ Coproduct (Left r) -> h r
229+ Coproduct (Right _8) -> absurd (unwrap _8)
230+
231+coproduct9 :: forall r x a b c d e f g h i. (a x -> r) -> (b x -> r) -> (c x -> r) -> (d x -> r) -> (e x -> r) -> (f x -> r) -> (g x -> r) -> (h x -> r) -> (i x -> r) -> Coproduct9 a b c d e f g h i x -> r
232+coproduct9 a b c d e f g h i y = case y of
233+ Coproduct (Left r) -> a r
234+ Coproduct (Right _1) -> case _1 of
235+ Coproduct (Left r) -> b r
236+ Coproduct (Right _2) -> case _2 of
237+ Coproduct (Left r) -> c r
238+ Coproduct (Right _3) -> case _3 of
239+ Coproduct (Left r) -> d r
240+ Coproduct (Right _4) -> case _4 of
241+ Coproduct (Left r) -> e r
242+ Coproduct (Right _5) -> case _5 of
243+ Coproduct (Left r) -> f r
244+ Coproduct (Right _6) -> case _6 of
245+ Coproduct (Left r) -> g r
246+ Coproduct (Right _7) -> case _7 of
247+ Coproduct (Left r) -> h r
248+ Coproduct (Right _8) -> case _8 of
249+ Coproduct (Left r) -> i r
250+ Coproduct (Right _9) -> absurd (unwrap _9)
251+
252+coproduct10 :: forall r x a b c d e f g h i j. (a x -> r) -> (b x -> r) -> (c x -> r) -> (d x -> r) -> (e x -> r) -> (f x -> r) -> (g x -> r) -> (h x -> r) -> (i x -> r) -> (j x -> r) -> Coproduct10 a b c d e f g h i j x -> r
253+coproduct10 a b c d e f g h i j y = case y of
254+ Coproduct (Left r) -> a r
255+ Coproduct (Right _1) -> case _1 of
256+ Coproduct (Left r) -> b r
257+ Coproduct (Right _2) -> case _2 of
258+ Coproduct (Left r) -> c r
259+ Coproduct (Right _3) -> case _3 of
260+ Coproduct (Left r) -> d r
261+ Coproduct (Right _4) -> case _4 of
262+ Coproduct (Left r) -> e r
263+ Coproduct (Right _5) -> case _5 of
264+ Coproduct (Left r) -> f r
265+ Coproduct (Right _6) -> case _6 of
266+ Coproduct (Left r) -> g r
267+ Coproduct (Right _7) -> case _7 of
268+ Coproduct (Left r) -> h r
269+ Coproduct (Right _8) -> case _8 of
270+ Coproduct (Left r) -> i r
271+ Coproduct (Right _9) -> case _9 of
272+ Coproduct (Left r) -> j r
273+ Coproduct (Right _10) -> absurd (unwrap _10)
.spago/p/functors-5.0.0/src/Data/Functor/Costar.pursnew file+66
@@ -0,0 +1,66 @@
1+module Data.Functor.Costar where
2+
3+import Prelude
4+
5+import Control.Comonad (class Comonad, extract)
6+import Control.Extend (class Extend, (=<=))
7+import Data.Bifunctor (class Bifunctor)
8+import Data.Distributive (class Distributive, distribute)
9+import Data.Functor.Contravariant (class Contravariant, cmap)
10+import Data.Functor.Invariant (class Invariant, imapF)
11+import Data.Newtype (class Newtype)
12+import Data.Profunctor (class Profunctor, lcmap)
13+import Data.Profunctor.Closed (class Closed)
14+import Data.Profunctor.Strong (class Strong)
15+import Data.Tuple (Tuple(..), fst, snd)
16+
17+-- | `Costar` turns a `Functor` into a `Profunctor` "backwards".
18+-- |
19+-- | `Costar f` is also the co-Kleisli category for `f`.
20+newtype Costar :: (Type -> Type) -> Type -> Type -> Type
21+newtype Costar f b a = Costar (f b -> a)
22+
23+derive instance newtypeCostar :: Newtype (Costar f a b) _
24+
25+instance semigroupoidCostar :: Extend f => Semigroupoid (Costar f) where
26+ compose (Costar f) (Costar g) = Costar (f =<= g)
27+
28+instance categoryCostar :: Comonad f => Category (Costar f) where
29+ identity = Costar extract
30+
31+instance functorCostar :: Functor (Costar f a) where
32+ map f (Costar g) = Costar (f <<< g)
33+
34+instance invariantCostar :: Invariant (Costar f a) where
35+ imap = imapF
36+
37+instance applyCostar :: Apply (Costar f a) where
38+ apply (Costar f) (Costar g) = Costar \a -> f a (g a)
39+
40+instance applicativeCostar :: Applicative (Costar f a) where
41+ pure a = Costar \_ -> a
42+
43+instance bindCostar :: Bind (Costar f a) where
44+ bind (Costar m) f = Costar \x -> case f (m x) of Costar g -> g x
45+
46+instance monadCostar :: Monad (Costar f a)
47+
48+instance distributiveCostar :: Distributive (Costar f a) where
49+ distribute f = Costar \a -> map (\(Costar g) -> g a) f
50+ collect f = distribute <<< map f
51+
52+instance bifunctorCostar :: Contravariant f => Bifunctor (Costar f) where
53+ bimap f g (Costar h) = Costar (cmap f >>> h >>> g)
54+
55+instance profunctorCostar :: Functor f => Profunctor (Costar f) where
56+ dimap f g (Costar h) = Costar (map f >>> h >>> g)
57+
58+instance strongCostar :: Comonad f => Strong (Costar f) where
59+ first (Costar f) = Costar \x -> Tuple (f (map fst x)) (snd (extract x))
60+ second (Costar f) = Costar \x -> Tuple (fst (extract x)) (f (map snd x))
61+
62+instance closedCostar :: Functor f => Closed (Costar f) where
63+ closed (Costar f) = Costar \g x -> f (map (_ $ x) g)
64+
65+hoistCostar :: forall f g a b. (g ~> f) -> Costar f a b -> Costar g a b
66+hoistCostar f (Costar g) = Costar (lcmap f g)
.spago/p/functors-5.0.0/src/Data/Functor/Flip.pursnew file+44
@@ -0,0 +1,44 @@
1+module Data.Functor.Flip where
2+
3+import Prelude
4+
5+import Control.Biapplicative (class Biapplicative, bipure)
6+import Control.Biapply (class Biapply, (<<*>>))
7+import Data.Bifunctor (class Bifunctor, bimap, lmap)
8+import Data.Functor.Contravariant (class Contravariant)
9+import Data.Newtype (class Newtype)
10+import Data.Profunctor (class Profunctor, lcmap)
11+
12+-- | Flips the order of the type arguments of a `Bifunctor`.
13+newtype Flip :: forall k1 k2. (k1 -> k2 -> Type) -> k2 -> k1 -> Type
14+newtype Flip p a b = Flip (p b a)
15+
16+derive instance newtypeFlip :: Newtype (Flip p a b) _
17+
18+derive newtype instance eqFlip :: Eq (p b a) => Eq (Flip p a b)
19+
20+derive newtype instance ordFlip :: Ord (p b a) => Ord (Flip p a b)
21+
22+instance showFlip :: Show (p a b) => Show (Flip p b a) where
23+ show (Flip x) = "(Flip " <> show x <> ")"
24+
25+instance functorFlip :: Bifunctor p => Functor (Flip p a) where
26+ map f (Flip a) = Flip (lmap f a)
27+
28+instance bifunctorFlip :: Bifunctor p => Bifunctor (Flip p) where
29+ bimap f g (Flip a) = Flip (bimap g f a)
30+
31+instance biapplyFlip :: Biapply p => Biapply (Flip p) where
32+ biapply (Flip fg) (Flip xy) = Flip (fg <<*>> xy)
33+
34+instance biapplicativeFlip :: Biapplicative p => Biapplicative (Flip p) where
35+ bipure a b = Flip (bipure b a)
36+
37+instance contravariantFlip :: Profunctor p => Contravariant (Flip p b) where
38+ cmap f (Flip a) = Flip (lcmap f a)
39+
40+instance semigroupoidFlip :: Semigroupoid p => Semigroupoid (Flip p) where
41+ compose (Flip a) (Flip b) = Flip $ compose b a
42+
43+instance categoryFlip :: Category p => Category (Flip p) where
44+ identity = Flip identity
.spago/p/functors-5.0.0/src/Data/Functor/Joker.pursnew file+60
@@ -0,0 +1,60 @@
1+module Data.Functor.Joker where
2+
3+import Prelude
4+
5+import Control.Biapplicative (class Biapplicative)
6+import Control.Biapply (class Biapply)
7+import Data.Bifunctor (class Bifunctor)
8+import Data.Either (Either(..))
9+import Data.Newtype (class Newtype, un)
10+import Data.Profunctor (class Profunctor)
11+import Data.Profunctor.Choice (class Choice)
12+
13+-- | This advanced type's usage and its relation to `Clown` is best understood
14+-- | by reading through "Clowns to the Left, Jokers to the Right (Functional
15+-- | Pearl)"
16+-- | https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.475.6134&rep=rep1&type=pdf
17+newtype Joker :: (Type -> Type) -> Type -> Type -> Type
18+newtype Joker g a b = Joker (g b)
19+
20+derive instance newtypeJoker :: Newtype (Joker f a b) _
21+
22+derive newtype instance eqJoker :: Eq (f b) => Eq (Joker f a b)
23+
24+derive newtype instance ordJoker :: Ord (f b) => Ord (Joker f a b)
25+
26+instance showJoker :: Show (f b) => Show (Joker f a b) where
27+ show (Joker x) = "(Joker " <> show x <> ")"
28+
29+instance functorJoker :: Functor f => Functor (Joker f a) where
30+ map f (Joker a) = Joker (map f a)
31+
32+instance applyJoker :: Apply f => Apply (Joker f a) where
33+ apply (Joker f) (Joker g) = Joker $ apply f g
34+
35+instance applicativeJoker :: Applicative f => Applicative (Joker f a) where
36+ pure = Joker <<< pure
37+
38+instance bindJoker :: Bind f => Bind (Joker f a) where
39+ bind (Joker ma) amb = Joker $ ma >>= (amb >>> un Joker)
40+
41+instance monadJoker :: Monad m => Monad (Joker m a)
42+
43+instance bifunctorJoker :: Functor g => Bifunctor (Joker g) where
44+ bimap _ g (Joker a) = Joker (map g a)
45+
46+instance biapplyJoker :: Apply g => Biapply (Joker g) where
47+ biapply (Joker fg) (Joker xy) = Joker (fg <*> xy)
48+
49+instance biapplicativeJoker :: Applicative g => Biapplicative (Joker g) where
50+ bipure _ b = Joker (pure b)
51+
52+instance profunctorJoker :: Functor f => Profunctor (Joker f) where
53+ dimap _ g (Joker a) = Joker (map g a)
54+
55+instance choiceJoker :: Functor f => Choice (Joker f) where
56+ left (Joker f) = Joker $ map Left f
57+ right (Joker f) = Joker $ map Right f
58+
59+hoistJoker :: forall f g a b. (f ~> g) -> Joker f a b -> Joker g a b
60+hoistJoker f (Joker a) = Joker (f a)
.spago/p/functors-5.0.0/src/Data/Functor/Product.pursnew file+60
@@ -0,0 +1,60 @@
1+module Data.Functor.Product where
2+
3+import Prelude
4+
5+import Data.Bifunctor (bimap)
6+import Data.Eq (class Eq1, eq1)
7+import Data.Newtype (class Newtype, unwrap)
8+import Data.Ord (class Ord1, compare1)
9+import Data.Tuple (Tuple(..), fst, snd)
10+
11+-- | `Product f g` is the product of the two functors `f` and `g`.
12+newtype Product :: forall k. (k -> Type) -> (k -> Type) -> k -> Type
13+newtype Product f g a = Product (Tuple (f a) (g a))
14+
15+-- | Create a product.
16+product :: forall f g a. f a -> g a -> Product f g a
17+product fa ga = Product (Tuple fa ga)
18+
19+bihoistProduct
20+ :: forall f g h i
21+ . (f ~> h)
22+ -> (g ~> i)
23+ -> Product f g
24+ ~> Product h i
25+bihoistProduct natF natG (Product e) = Product (bimap natF natG e)
26+
27+derive instance newtypeProduct :: Newtype (Product f g a) _
28+
29+instance eqProduct :: (Eq1 f, Eq1 g, Eq a) => Eq (Product f g a) where
30+ eq = eq1
31+
32+instance eq1Product :: (Eq1 f, Eq1 g) => Eq1 (Product f g) where
33+ eq1 (Product (Tuple l1 r1)) (Product (Tuple l2 r2)) = eq1 l1 l2 && eq1 r1 r2
34+
35+instance ordProduct :: (Ord1 f, Ord1 g, Ord a) => Ord (Product f g a) where
36+ compare = compare1
37+
38+instance ord1Product :: (Ord1 f, Ord1 g) => Ord1 (Product f g) where
39+ compare1 (Product (Tuple l1 r1)) (Product (Tuple l2 r2)) =
40+ case compare1 l1 l2 of
41+ EQ -> compare1 r1 r2
42+ o -> o
43+
44+instance showProduct :: (Show (f a), Show (g a)) => Show (Product f g a) where
45+ show (Product (Tuple fa ga)) = "(product " <> show fa <> " " <> show ga <> ")"
46+
47+instance functorProduct :: (Functor f, Functor g) => Functor (Product f g) where
48+ map f (Product fga) = Product (bimap (map f) (map f) fga)
49+
50+instance applyProduct :: (Apply f, Apply g) => Apply (Product f g) where
51+ apply (Product (Tuple f g)) (Product (Tuple a b)) = product (apply f a) (apply g b)
52+
53+instance applicativeProduct :: (Applicative f, Applicative g) => Applicative (Product f g) where
54+ pure a = product (pure a) (pure a)
55+
56+instance bindProduct :: (Bind f, Bind g) => Bind (Product f g) where
57+ bind (Product (Tuple fa ga)) f =
58+ product (fa >>= fst <<< unwrap <<< f) (ga >>= snd <<< unwrap <<< f)
59+
60+instance monadProduct :: (Monad f, Monad g) => Monad (Product f g)
.spago/p/functors-5.0.0/src/Data/Functor/Product/Nested.pursnew file+112
@@ -0,0 +1,112 @@
1+module Data.Functor.Product.Nested where
2+
3+import Prelude
4+
5+import Data.Const (Const(..))
6+import Data.Functor.Product (Product(..), product)
7+import Data.Tuple (Tuple(..))
8+
9+type Product1 :: forall k. (k -> Type) -> k -> Type
10+type Product1 a = T2 a (Const Unit)
11+type Product2 :: forall k. (k -> Type) -> (k -> Type) -> k -> Type
12+type Product2 a b = T3 a b (Const Unit)
13+type Product3 :: forall k. (k -> Type) -> (k -> Type) -> (k -> Type) -> k -> Type
14+type Product3 a b c = T4 a b c (Const Unit)
15+type Product4 :: forall k. (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> k -> Type
16+type Product4 a b c d = T5 a b c d (Const Unit)
17+type Product5 :: forall k. (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> k -> Type
18+type Product5 a b c d e= T6 a b c d e (Const Unit)
19+type Product6 :: forall k. (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> k -> Type
20+type Product6 a b c d e f = T7 a b c d e f (Const Unit)
21+type Product7 :: forall k. (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> k -> Type
22+type Product7 a b c d e f g = T8 a b c d e f g (Const Unit)
23+type Product8 :: forall k. (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> k -> Type
24+type Product8 a b c d e f g h = T9 a b c d e f g h (Const Unit)
25+type Product9 :: forall k. (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> k -> Type
26+type Product9 a b c d e f g h i = T10 a b c d e f g h i (Const Unit)
27+type Product10 :: forall k. (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> k -> Type
28+type Product10 a b c d e f g h i j = T11 a b c d e f g h i j (Const Unit)
29+
30+type T2 :: forall k. (k -> Type) -> (k -> Type) -> k -> Type
31+type T2 a z = Product a z
32+type T3 :: forall k. (k -> Type) -> (k -> Type) -> (k -> Type) -> k -> Type
33+type T3 a b z = Product a (T2 b z)
34+type T4 :: forall k. (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> k -> Type
35+type T4 a b c z = Product a (T3 b c z)
36+type T5 :: forall k. (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> k -> Type
37+type T5 a b c d z = Product a (T4 b c d z)
38+type T6 :: forall k. (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> k -> Type
39+type T6 a b c d e z = Product a (T5 b c d e z)
40+type T7 :: forall k. (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> k -> Type
41+type T7 a b c d e f z = Product a (T6 b c d e f z)
42+type T8 :: forall k. (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> k -> Type
43+type T8 a b c d e f g z = Product a (T7 b c d e f g z)
44+type T9 :: forall k. (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> k -> Type
45+type T9 a b c d e f g h z = Product a (T8 b c d e f g h z)
46+type T10 :: forall k. (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> k -> Type
47+type T10 a b c d e f g h i z = Product a (T9 b c d e f g h i z)
48+type T11 :: forall k. (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> (k -> Type) -> k -> Type
49+type T11 a b c d e f g h i j z = Product a (T10 b c d e f g h i j z)
50+
51+infixr 6 product as </\>
52+infixr 6 type Product as </\>
53+
54+product1 :: forall a. a ~> Product1 a
55+product1 a = a </\> Const unit
56+
57+product2 :: forall a b x. a x -> b x -> Product2 a b x
58+product2 a b = a </\> b </\> Const unit
59+
60+product3 :: forall a b c x. a x -> b x -> c x -> Product3 a b c x
61+product3 a b c = a </\> b </\> c </\> Const unit
62+
63+product4 :: forall a b c d x. a x -> b x -> c x -> d x -> Product4 a b c d x
64+product4 a b c d = a </\> b </\> c </\> d </\> Const unit
65+
66+product5 :: forall a b c d e x. a x -> b x -> c x -> d x -> e x -> Product5 a b c d e x
67+product5 a b c d e = a </\> b </\> c </\> d </\> e </\> Const unit
68+
69+product6 :: forall a b c d e f x. a x -> b x -> c x -> d x -> e x -> f x -> Product6 a b c d e f x
70+product6 a b c d e f = a </\> b </\> c </\> d </\> e </\> f </\> Const unit
71+
72+product7 :: forall a b c d e f g x. a x -> b x -> c x -> d x -> e x -> f x -> g x -> Product7 a b c d e f g x
73+product7 a b c d e f g = a </\> b </\> c </\> d </\> e </\> f </\> g </\> Const unit
74+
75+product8 :: forall a b c d e f g h x. a x -> b x -> c x -> d x -> e x -> f x -> g x -> h x -> Product8 a b c d e f g h x
76+product8 a b c d e f g h = a </\> b </\> c </\> d </\> e </\> f </\> g </\> h </\> Const unit
77+
78+product9 :: forall a b c d e f g h i x. a x -> b x -> c x -> d x -> e x -> f x -> g x -> h x -> i x -> Product9 a b c d e f g h i x
79+product9 a b c d e f g h i = a </\> b </\> c </\> d </\> e </\> f </\> g </\> h </\> i </\> Const unit
80+
81+product10 :: forall a b c d e f g h i j x. a x -> b x -> c x -> d x -> e x -> f x -> g x -> h x -> i x -> j x -> Product10 a b c d e f g h i j x
82+product10 a b c d e f g h i j = a </\> b </\> c </\> d </\> e </\> f </\> g </\> h </\> i </\> j </\> Const unit
83+
84+get1 :: forall a z. T2 a z ~> a
85+get1 (Product (Tuple a _)) = a
86+
87+get2 :: forall a b z. T3 a b z ~> b
88+get2 (Product (Tuple _ (Product (Tuple b _)))) = b
89+
90+get3 :: forall a b c z. T4 a b c z ~> c
91+get3 (Product (Tuple _ (Product (Tuple _ (Product (Tuple c _)))))) = c
92+
93+get4 :: forall a b c d z. T5 a b c d z ~> d
94+get4 (Product (Tuple _ (Product (Tuple _ (Product (Tuple _ (Product (Tuple d _)))))))) = d
95+
96+get5 :: forall a b c d e z. T6 a b c d e z ~> e
97+get5 (Product (Tuple _ (Product (Tuple _ (Product (Tuple _ (Product (Tuple _ (Product (Tuple e _)))))))))) = e
98+
99+get6 :: forall a b c d e f z. T7 a b c d e f z ~> f
100+get6 (Product (Tuple _ (Product (Tuple _ (Product (Tuple _ (Product (Tuple _ (Product (Tuple _ (Product (Tuple f _)))))))))))) = f
101+
102+get7 :: forall a b c d e f g z. T8 a b c d e f g z ~> g
103+get7 (Product (Tuple _ (Product (Tuple _ (Product (Tuple _ (Product (Tuple _ (Product (Tuple _ (Product (Tuple _ (Product (Tuple g _)))))))))))))) = g
104+
105+get8 :: forall a b c d e f g h z. T9 a b c d e f g h z ~> h
106+get8 (Product (Tuple _ (Product (Tuple _ (Product (Tuple _ (Product (Tuple _ (Product (Tuple _ (Product (Tuple _ (Product (Tuple _ (Product (Tuple h _)))))))))))))))) = h
107+
108+get9 :: forall a b c d e f g h i z. T10 a b c d e f g h i z ~> i
109+get9 (Product (Tuple _ (Product (Tuple _ (Product (Tuple _ (Product (Tuple _ (Product (Tuple _ (Product (Tuple _ (Product (Tuple _ (Product (Tuple _ (Product (Tuple i _)))))))))))))))))) = i
110+
111+get10 :: forall a b c d e f g h i j z. T11 a b c d e f g h i j z ~> j
112+get10 (Product (Tuple _ (Product (Tuple _ (Product (Tuple _ (Product (Tuple _ (Product (Tuple _ (Product (Tuple _ (Product (Tuple _ (Product (Tuple _ (Product (Tuple _ (Product (Tuple j _)))))))))))))))))))) = j
.spago/p/functors-5.0.0/src/Data/Functor/Product2.pursnew file+40
@@ -0,0 +1,40 @@
1+module Data.Functor.Product2 where
2+
3+import Prelude
4+
5+import Control.Biapplicative (class Biapplicative, bipure)
6+import Control.Biapply (class Biapply, biapply)
7+import Data.Bifunctor (class Bifunctor, bimap)
8+import Data.Profunctor (class Profunctor, dimap)
9+
10+-- | The product of two types that both take two type parameters (e.g. `Either`,
11+-- | `Tuple, etc.) where both type parameters are the same.
12+-- |
13+-- | ```purescript
14+-- | Product2 (Tuple 4 true) (Right false) :: Product2 Tuple Either Int Boolean
15+-- | Product2 (Tuple 4 true) (Left 8) :: Product2 Tuple Either Int Boolean
16+-- | ```
17+data Product2 :: (Type -> Type -> Type) -> (Type -> Type -> Type) -> Type -> Type -> Type
18+data Product2 f g a b = Product2 (f a b) (g a b)
19+
20+derive instance eqProduct2 :: (Eq (f a b), Eq (g a b)) => Eq (Product2 f g a b)
21+
22+derive instance ordProduct2 :: (Ord (f a b), Ord (g a b)) => Ord (Product2 f g a b)
23+
24+instance showProduct2 :: (Show (f a b), Show (g a b)) => Show (Product2 f g a b) where
25+ show (Product2 x y) = "(Product2 " <> show x <> " " <> show y <> ")"
26+
27+instance functorProduct2 :: (Functor (f a), Functor (g a)) => Functor (Product2 f g a) where
28+ map f (Product2 x y) = Product2 (map f x) (map f y)
29+
30+instance bifunctorProduct2 :: (Bifunctor f, Bifunctor g) => Bifunctor (Product2 f g) where
31+ bimap f g (Product2 x y) = Product2 (bimap f g x) (bimap f g y)
32+
33+instance biapplyProduct2 :: (Biapply f, Biapply g) => Biapply (Product2 f g) where
34+ biapply (Product2 w x) (Product2 y z) = Product2 (biapply w y) (biapply x z)
35+
36+instance biapplicativeProduct2 :: (Biapplicative f, Biapplicative g) => Biapplicative (Product2 f g) where
37+ bipure a b = Product2 (bipure a b) (bipure a b)
38+
39+instance profunctorProduct2 :: (Profunctor f, Profunctor g) => Profunctor (Product2 f g) where
40+ dimap f g (Product2 x y) = Product2 (dimap f g x) (dimap f g y)
.spago/p/gen-4.0.0/LICENSEnew file+26
@@ -0,0 +1,26 @@
1+Copyright 2018 PureScript
2+
3+Redistribution and use in source and binary forms, with or without modification,
4+are permitted provided that the following conditions are met:
5+
6+1. Redistributions of source code must retain the above copyright notice, this
7+list of conditions and the following disclaimer.
8+
9+2. Redistributions in binary form must reproduce the above copyright notice,
10+this list of conditions and the following disclaimer in the documentation and/or
11+other materials provided with the distribution.
12+
13+3. Neither the name of the copyright holder nor the names of its contributors
14+may be used to endorse or promote products derived from this software without
15+specific prior written permission.
16+
17+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
21+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.spago/p/gen-4.0.0/README.mdnew file+19
@@ -0,0 +1,19 @@
1+# purescript-gen
2+
3+[](https://github.com/purescript/purescript-gen/releases)
4+[](https://github.com/purescript/purescript-gen/actions?query=workflow%3ACI+branch%3Amaster)
5+[](https://pursuit.purescript.org/packages/purescript-gen)
6+
7+A type class for random generator implementations.
8+
9+Note that this library only provides the `MonadGen` type class; it does not provide any implementations of it. The intention is that libraries may depend on `purescript-gen` in order to provide functions for random generation of any data types they define while also keeping their dependency footprints minimal, and not tying users to any specific random generation library (since any library implementing random generation of values should be able to implement the `MonadGen` interface).
10+
11+## Installation
12+
13+```
14+spago install gen
15+```
16+
17+## Documentation
18+
19+Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-gen).
.spago/p/gen-4.0.0/bower.jsonnew file+37
@@ -0,0 +1,37 @@
1+{
2+ "name": "purescript-gen",
3+ "homepage": "https://github.com/purescript/purescript-gen",
4+ "license": "BSD-3-Clause",
5+ "repository": {
6+ "type": "git",
7+ "url": "https://github.com/purescript/purescript-gen.git"
8+ },
9+ "ignore": [
10+ "**/.*",
11+ "bower_components",
12+ "node_modules",
13+ "output",
14+ "test",
15+ "bower.json",
16+ "package.json"
17+ ],
18+ "dependencies": {
19+ "purescript-either": "^6.0.0",
20+ "purescript-foldable-traversable": "^6.0.0",
21+ "purescript-identity": "^6.0.0",
22+ "purescript-maybe": "^6.0.0",
23+ "purescript-newtype": "^5.0.0",
24+ "purescript-nonempty": "^7.0.0",
25+ "purescript-prelude": "^6.0.0",
26+ "purescript-tailrec": "^6.0.0",
27+ "purescript-tuples": "^7.0.0",
28+ "purescript-unfoldable": "^6.0.0"
29+ },
30+ "devDependencies": {
31+ "purescript-arrays": "^7.0.0",
32+ "purescript-assert": "^6.0.0",
33+ "purescript-console": "^6.0.0",
34+ "purescript-lcg": "^4.0.0",
35+ "purescript-transformers": "^6.0.0"
36+ }
37+}
.spago/p/gen-4.0.0/package.jsonnew file+14
@@ -0,0 +1,14 @@
1+{
2+ "private": true,
3+ "scripts": {
4+ "clean": "rimraf output && rimraf .pulp-cache",
5+ "build": "pulp build -- --censor-lib --strict",
6+ "test": "pulp test"
7+ },
8+ "devDependencies": {
9+ "eslint": "^7.15.0",
10+ "pulp": "16.0.0-0",
11+ "purescript-psa": "^0.8.2",
12+ "rimraf": "^3.0.2"
13+ }
14+}
.spago/p/gen-4.0.0/purs.jsonnew file+22
@@ -0,0 +1,22 @@
1+{
2+ "name": "gen",
3+ "version": "4.0.0",
4+ "license": "BSD-3-Clause",
5+ "location": {
6+ "githubOwner": "purescript",
7+ "githubRepo": "purescript-gen"
8+ },
9+ "ref": "v4.0.0",
10+ "dependencies": {
11+ "either": ">=6.0.0 <7.0.0",
12+ "foldable-traversable": ">=6.0.0 <7.0.0",
13+ "identity": ">=6.0.0 <7.0.0",
14+ "maybe": ">=6.0.0 <7.0.0",
15+ "newtype": ">=5.0.0 <6.0.0",
16+ "nonempty": ">=7.0.0 <8.0.0",
17+ "prelude": ">=6.0.0 <7.0.0",
18+ "tailrec": ">=6.0.0 <7.0.0",
19+ "tuples": ">=7.0.0 <8.0.0",
20+ "unfoldable": ">=6.0.0 <7.0.0"
21+ }
22+}
.spago/p/gen-4.0.0/src/Control/Monad/Gen.pursnew file+132
@@ -0,0 +1,132 @@
1+module Control.Monad.Gen
2+ ( module Control.Monad.Gen.Class
3+ , choose
4+ , oneOf
5+ , frequency
6+ , elements
7+ , unfoldable
8+ , suchThat
9+ , filtered
10+ ) where
11+
12+import Prelude
13+
14+import Control.Monad.Gen.Class (class MonadGen, Size, chooseBool, chooseFloat, chooseInt, resize, sized)
15+import Control.Monad.Rec.Class (class MonadRec, Step(..), tailRecM)
16+import Data.Foldable (foldMap, foldr, length)
17+import Data.Maybe (Maybe(..))
18+import Data.Monoid.Additive (Additive(..))
19+import Data.Newtype (alaF, un)
20+import Data.Semigroup.Foldable (class Foldable1, foldMap1)
21+import Data.Semigroup.Last (Last(..))
22+import Data.Tuple (Tuple(..), fst, snd)
23+import Data.Unfoldable (class Unfoldable, unfoldr)
24+
25+data LL a = Cons a (LL a) | Nil
26+
27+-- | Creates a generator that outputs a value chosen from one of two existing
28+-- | existing generators with even probability.
29+choose :: forall m a. MonadGen m => m a -> m a -> m a
30+choose genA genB = chooseBool >>= if _ then genA else genB
31+
32+-- | Creates a generator that outputs a value chosen from a selection of
33+-- | existing generators with uniform probability.
34+oneOf :: forall m f a. MonadGen m => Foldable1 f => f (m a) -> m a
35+oneOf xs = do
36+ n <- chooseInt 0 (length xs - 1)
37+ fromIndex n xs
38+
39+newtype FreqSemigroup a = FreqSemigroup (Number -> Tuple (Maybe Number) a)
40+
41+freqSemigroup :: forall a. Tuple Number a -> FreqSemigroup a
42+freqSemigroup (Tuple weight x) =
43+ FreqSemigroup \pos ->
44+ if pos >= weight
45+ then Tuple (Just (pos - weight)) x
46+ else Tuple Nothing x
47+
48+getFreqVal :: forall a. FreqSemigroup a -> Number -> a
49+getFreqVal (FreqSemigroup f) = snd <<< f
50+
51+instance semigroupFreqSemigroup :: Semigroup (FreqSemigroup a) where
52+ append (FreqSemigroup f) (FreqSemigroup g) =
53+ FreqSemigroup \pos ->
54+ case f pos of
55+ Tuple (Just pos') _ -> g pos'
56+ result -> result
57+
58+-- | Creates a generator that outputs a value chosen from a selection of
59+-- | existing generators, where the selection has weight values for the
60+-- | probability of choice for each generator. The probability values will be
61+-- | normalised.
62+frequency
63+ :: forall m f a
64+ . MonadGen m
65+ => Foldable1 f
66+ => f (Tuple Number (m a))
67+ -> m a
68+frequency xs =
69+ let total = alaF Additive foldMap fst xs
70+ in chooseFloat 0.0 total >>= getFreqVal (foldMap1 freqSemigroup xs)
71+
72+-- | Creates a generator that outputs a value chosen from a selection with
73+-- | uniform probability.
74+elements :: forall m f a. MonadGen m => Foldable1 f => f a -> m a
75+elements xs = do
76+ n <- chooseInt 0 (length xs - 1)
77+ pure $ fromIndex n xs
78+
79+-- | Creates a generator that produces unfoldable structures based on an
80+-- | existing generator for the elements.
81+-- |
82+-- | The size of the unfoldable will be determined by the current size state
83+-- | for the generator. To generate an unfoldable structure of a particular
84+-- | size, use the `resize` function from the `MonadGen` class first.
85+unfoldable
86+ :: forall m f a
87+ . MonadRec m
88+ => MonadGen m
89+ => Unfoldable f
90+ => m a
91+ -> m (f a)
92+unfoldable gen = unfoldr unfold <$> sized (tailRecM loopGen <<< Tuple Nil)
93+ where
94+ loopGen :: Tuple (LL a) Int -> m (Step (Tuple (LL a) Int) (LL a))
95+ loopGen (Tuple acc n)
96+ | n <= 0 =
97+ pure $ Done acc
98+ | otherwise = do
99+ x <- gen
100+ pure $ Loop (Tuple (Cons x acc) (n - 1))
101+ unfold :: LL a -> Maybe (Tuple a (LL a))
102+ unfold = case _ of
103+ Nil -> Nothing
104+ Cons x xs -> Just (Tuple x xs)
105+
106+-- | Creates a generator that repeatedly run another generator until its output
107+-- | matches a given predicate. This will never halt if the predicate always
108+-- | fails.
109+suchThat :: forall m a. MonadRec m => MonadGen m => m a -> (a -> Boolean) -> m a
110+suchThat gen pred = filtered $ gen <#> \a -> if pred a then Just a else Nothing
111+
112+-- | Creates a generator that repeatedly run another generator until it produces
113+-- | `Just` node. This will never halt if the input generator always produces `Nothing`.
114+filtered :: forall m a. MonadRec m => MonadGen m => m (Maybe a) -> m a
115+filtered gen = tailRecM go unit
116+ where
117+ go :: Unit -> m (Step Unit a)
118+ go _ = gen <#> \a -> case a of
119+ Nothing -> Loop unit
120+ Just a' -> Done a'
121+
122+-- | Internal: get the Foldable element at index i.
123+-- | If the index is <= 0, return the first element.
124+-- | If it's >= length, return the last.
125+fromIndex :: forall f a. Foldable1 f => Int -> f a -> a
126+fromIndex i xs = go i (foldr Cons Nil xs)
127+ where
128+ go _ (Cons a Nil) = a
129+ go j (Cons a _) | j <= 0 = a
130+ go j (Cons _ as) = go (j - 1) as
131+ -- next case is "impossible", but serves as proof of non-emptyness
132+ go _ Nil = un Last (foldMap1 Last xs)
.spago/p/gen-4.0.0/src/Control/Monad/Gen/Class.pursnew file+29
@@ -0,0 +1,29 @@
1+module Control.Monad.Gen.Class where
2+
3+import Prelude
4+
5+-- | A class for random generator implementations.
6+-- |
7+-- | Instances should provide implementations for the generation functions
8+-- | that return choices with uniform probability.
9+-- |
10+-- | See also `Gen` in `purescript-quickcheck`, which implements this
11+-- | type class.
12+class Monad m <= MonadGen m where
13+
14+ -- | Chooses an integer in the specified (inclusive) range.
15+ chooseInt :: Int -> Int -> m Int
16+
17+ -- | Chooses an floating point number in the specified (inclusive) range.
18+ chooseFloat :: Number -> Number -> m Number
19+
20+ -- | Chooses a random boolean value.
21+ chooseBool :: m Boolean
22+
23+ -- | Modifies the size state for a random generator.
24+ resize :: forall a. (Size -> Size) -> m a -> m a
25+
26+ -- | Runs a generator, passing in the current size state.
27+ sized :: forall a. (Size -> m a) -> m a
28+
29+type Size = Int
.spago/p/gen-4.0.0/src/Control/Monad/Gen/Common.pursnew file+67
@@ -0,0 +1,67 @@
1+module Control.Monad.Gen.Common where
2+
3+import Prelude
4+
5+import Control.Apply (lift2)
6+import Control.Monad.Gen (class MonadGen, chooseFloat, resize, unfoldable)
7+import Control.Monad.Rec.Class (class MonadRec)
8+import Data.Either (Either(..))
9+import Data.Identity (Identity(..))
10+import Data.Maybe (Maybe(..))
11+import Data.NonEmpty (NonEmpty, (:|))
12+import Data.Tuple (Tuple(..))
13+import Data.Unfoldable (class Unfoldable)
14+
15+-- | Creates a generator that outputs `Either` values, choosing a value from a
16+-- | `Left` or the `Right` with even probability.
17+genEither :: forall m a b. MonadGen m => m a -> m b -> m (Either a b)
18+genEither = genEither' 0.5
19+
20+-- | Creates a generator that outputs `Either` values, choosing a value from a
21+-- | `Left` or the `Right` with adjustable bias. As the bias value increases,
22+-- | the chance of returning a `Left` value rises. A bias ≤ 0.0 will always
23+-- | return `Right`, a bias ≥ 1.0 will always return `Left`.
24+genEither' :: forall m a b. MonadGen m => Number -> m a -> m b -> m (Either a b)
25+genEither' bias genA genB = do
26+ n <- chooseFloat 0.0 1.0
27+ if n < bias then Left <$> genA else Right <$> genB
28+
29+-- | Creates a generator that outputs `Identity` values, choosing a value from
30+-- | another generator for the inner value.
31+genIdentity :: forall m a. Functor m => m a -> m (Identity a)
32+genIdentity = map Identity
33+
34+-- | Creates a generator that outputs `Maybe` values, choosing a value from
35+-- | another generator for the inner value. The generator has a 75% chance of
36+-- | returning a `Just` over a `Nothing`.
37+genMaybe :: forall m a. MonadGen m => m a -> m (Maybe a)
38+genMaybe = genMaybe' 0.75
39+
40+-- | Creates a generator that outputs `Maybe` values, choosing a value from
41+-- | another generator for the inner value, with an adjustable bias for how
42+-- | often `Just` is returned vs `Nothing`. A bias ≤ 0.0 will always
43+-- | return `Nothing`, a bias ≥ 1.0 will always return `Just`.
44+genMaybe' :: forall m a. MonadGen m => Number -> m a -> m (Maybe a)
45+genMaybe' bias gen = do
46+ n <- chooseFloat 0.0 1.0
47+ if n < bias then Just <$> gen else pure Nothing
48+
49+-- | Creates a generator that outputs `Tuple` values, choosing values from a
50+-- | pair of generators for each slot in the tuple.
51+genTuple :: forall m a b. Apply m => m a -> m b -> m (Tuple a b)
52+genTuple = lift2 Tuple
53+
54+-- | Creates a generator that outputs `NonEmpty` values, choosing values from a
55+-- | generator for each of the items.
56+-- |
57+-- | The size of the value will be determined by the current size state
58+-- | for the generator. To generate a value of a particular size, use the
59+-- | `resize` function from the `MonadGen` class first.
60+genNonEmpty
61+ :: forall m a f
62+ . MonadRec m
63+ => MonadGen m
64+ => Unfoldable f
65+ => m a
66+ -> m (NonEmpty f a)
67+genNonEmpty gen = (:|) <$> gen <*> resize (max 0 <<< (_ - 1)) (unfoldable gen)
.spago/p/heterogeneous-0.7.0/LICENSEnew file+20
@@ -0,0 +1,20 @@
1+The MIT License (MIT)
2+
3+Copyright (c) 2018 Nathan Faubion
4+
5+Permission is hereby granted, free of charge, to any person obtaining a copy of
6+this software and associated documentation files (the "Software"), to deal in
7+the Software without restriction, including without limitation the rights to
8+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+the Software, and to permit persons to whom the Software is furnished to do so,
10+subject to the following conditions:
11+
12+The above copyright notice and this permission notice shall be included in all
13+copies or substantial portions of the Software.
14+
15+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
.spago/p/heterogeneous-0.7.0/README.mdnew file+276
@@ -0,0 +1,276 @@
1+# purescript-heterogeneous
2+
3+[](https://github.com/natefaubion/purescript-heterogeneous/releases)
4+[](https://github.com/natefaubion/purescript-heterogeneous/actions?query=workflow%3ACI+branch%3Amaster)
5+
6+Maps and folds for heterogeneous data types.
7+
8+## Why?
9+
10+PureScript has a very rich type-system which lets us explicitly describe the
11+shape of our data in fine detail. For example, Records and row-types let us
12+write ergonomic, polymorphic, structurally-typed data. However, writing generic
13+operations over such data types often involves a lot of tedious, constraint-level
14+tricks. This library provides a framework which separates the traversal and
15+summary logic for heterogeneous data types, like `Functor` and `Foldable` do for
16+homogeneous types, so we can reduce the boilerplate and tricks while sharing
17+implementations.
18+
19+## How to use this library
20+
21+This library exports several classes for both indexed and unindexed folds and maps.
22+
23+* `class HMap` and `hmap`
24+* `class HMapWithIndex` and `hmapWithIndex`
25+* `class HFoldl` and `hfoldl`
26+* `class HFoldlWithIndex` and `hfoldlWithIndex`
27+
28+These are similar to their homogeneous counterparts. In fact, the folds and maps we
29+write for heterogeneous types can be reused for homogeneous data via the `App f a`
30+newtype. That is, the following are identical:
31+
32+```purescript
33+map f [1, 2, 3]
34+```
35+```purescript
36+hmap f (App [1, 2, 3])
37+```
38+
39+Normal functions aren't enough for a lot of the things we need to do though, so
40+dispatching these is slightly different as we'll need to use PureScript's constraint
41+system.
42+
43+The following examples will operate over `Record` types, since it is the most
44+ubiquitous heterogeneous data type in PureScript.
45+
46+### Example: Mapping over a homogeneous Record
47+
48+Records aren't ever actually homogeneous to the type system, but sometimes all the
49+values end up being the same type. Mapping over an apparently homogeneous `Record`
50+is as simple as using a normal (monomorphic) function.
51+
52+```purescript
53+hmap (add 1 >>> show) { a: 1, b: 2, c: 3 }
54+```
55+```
56+{ a: "2", b: "3", c: "4" }
57+```
58+
59+### Example: Mapping over a heterogeneous Record
60+
61+In the previous example, we can generalize our mapping function:
62+
63+```purescript
64+addOneAndShow :: forall n. Semiring n => Show n => n -> String
65+addOneAndShow = add one >>> show
66+```
67+
68+However, we won't be able to dispatch this without giving it a monomorphic type
69+signature which fixes it to a homogeneous `Record` like before. We want to be able to
70+instantiate these dictionaries for each member individually. To do that, we first
71+need a data type to represent our mapping function:
72+
73+```purescript
74+data AddOneAndShow = AddOneAndShow
75+```
76+
77+With this we can define an instance of `Mapping`, which we can use with `hmap`.
78+
79+```purescript
80+instance addOneAndShow ::
81+ (Semiring n, Show n) =>
82+ Mapping AddOneAndShow n String where
83+ mapping AddOneAndShow = add one >>> show
84+```
85+
86+Then instead of passing a function to `hmap`, we pass in our data type.
87+
88+```purescript
89+hmap AddOneAndShow { a: 1, b: 2.0, c: { x: 12, y: 42 } }
90+```
91+```
92+{ a: "2", b: "3.0", c: "{ x: 13, y: 43 }" }
93+```
94+
95+### Example: Mapping over a heterogeneous Record with additional arguments
96+
97+With normal functions, we can use partial application to thread in additional
98+context for our mapping function. We can do the same here by adding arguments
99+to our mapping data type.
100+
101+Say we want to implement a `Record` zip operation. That is, we want to map over
102+a record, and for each field we want to look up a corresponding function in
103+_another_ record and apply it to the value.
104+
105+First we need to define a data type for our zip mapping, but we want it to hold
106+the record of functions:
107+
108+```purescript
109+newtype ZipProps fns = ZipProps { | fns }
110+```
111+
112+If we use `MappingWithIndex` instead of `Mapping` we can utilize the field name
113+as well via `Proxy`.
114+
115+```purescript
116+instance zipProps ::
117+ (IsSymbol sym, Row.Cons sym (a -> b) x fns) =>
118+ MappingWithIndex (ZipProps fns) (Proxy sym) a b where
119+ mappingWithIndex (ZipProps fns) prop = Record.get prop fns
120+```
121+
122+```purescript
123+let
124+ zipRecord = hmapWithIndex <<< ZipProps
125+in
126+ { a: add 1
127+ , b: Tuple "bar"
128+ , c: \a -> not a
129+ }
130+ `zipRecord`
131+ { a: 12
132+ , b: 42.0
133+ , c: true
134+ }
135+```
136+```
137+{ a: 13, b: (Tuple "bar" 42.0), c: false }
138+```
139+
140+### Example: Folding over a homogeneous Record
141+
142+Much like with `hmap`, we can fold over homogeneous records using normal functions.
143+
144+```purescript
145+hfoldl (add :: Int -> Int -> Int) 0 { a: 12, b: 42, c: 100 }
146+```
147+```
148+154
149+```
150+
151+The homogeneous case needs a monomorphic function, so we've specialized the type of
152+`add` with a type signature.
153+
154+### Example: Folding over a heterogeneous Record
155+
156+In this example we will implement an alternative `Show` instance using String
157+concatenation instead of building an intermediate data structure. First, the
158+data type for our fold function:
159+
160+```purescript
161+data ShowProps = ShowProps
162+```
163+
164+We need to follow the same steps as we did with `hmap` and `hmapWithIndex`,
165+except we will implement `Folding` or `FoldingWithIndex`.
166+
167+```purescript
168+instance showProps ::
169+ (Show a, IsSymbol sym) =>
170+ FoldingWithIndex ShowProps (Proxy sym) String a String where
171+ foldingWithIndex ShowProps prop str a =
172+ pre <> reflectSymbol prop <> ": " <> show a
173+ where
174+ pre | str == "" = ""
175+ | otherwise = str <> ", "
176+```
177+
178+Then we can write a wrapper, which adds the curly-braces:
179+
180+```purescript
181+showRecord :: forall r.
182+ HFoldlWithIndex ShowProps String { | r } String =>
183+ { | r } ->
184+ String
185+showRecord r =
186+ "{ " <> hfoldlWithIndex ShowProps "" r <> " }"
187+```
188+
189+```purescript
190+showRecord { a: "foo" , b: 42 , c: false }
191+```
192+```
193+"{ a: \"foo\", b: 42, c: false }"
194+```
195+
196+### Example: Variadic arguments
197+
198+With typeclasses and return-type polymorphism, we can emulate variadic functions
199+which take an arbitrary number of arguments. These arguments form a
200+heterogeneous list, so we can fold over them like with `HFoldl`.
201+
202+In this example we will implement a basic interpolation function which appends
203+strings and automatically `show`s other types. First, like the previous example,
204+we define the data type for our fold function:
205+
206+```purescript
207+data Interp = Interp
208+```
209+
210+Next, we'll implement a `Folding` instance:
211+
212+```purescript
213+instance Folding Interp String String String where
214+ folding _ acc a = acc <> a
215+
216+else instance Show a => Folding Interp String a String where
217+ folding _ acc a = acc <> show a
218+```
219+
220+We also need to implement an instance of `Resulting`. With `hfoldl`s, we have
221+a concrete heterogeneous data type, so we can do this after the fact in a
222+wrapper function. With variadic functions, however, don't know how many
223+arguments the user will apply, so we need some extra machinery to potentially
224+do a final "clean up" on the accumulator to get something that the user wants.
225+
226+In this case we can use the accumulator as-is, so `identity` is appropriate:
227+
228+```purescript
229+instance Resulting Interp String String where
230+ resulting _ = identity
231+```
232+
233+In some cases, a `TypeEquality` rather than `identity` may help with type
234+inference, however.
235+
236+Finally, we can wrap a call to `variadic` with our initial accumulator:
237+
238+```purescript
239+interp :: forall args. Variadic Interp String args => args
240+interp = variadic Interp ""
241+```
242+
243+```purescript
244+interp "foo" 42 "baz" false :: String
245+```
246+```
247+"foo42bazfalse"
248+```
249+
250+## Helping type inference along
251+
252+The compiler will not always be able to infer all types for the maps and folds
253+we write for heterogeneous types. That's because it will attempt to determine
254+an output from any combination of folding function, accumulator, and input (for
255+folds) or mapping function and input (for maps). This ensures that multiple
256+mapping and folding operations can be supported for the same underlying input,
257+but has the downside that the compiler will not infer these types.
258+
259+You will need to provide annotations for any folding, mapping, accumulator, and
260+input types that are not determined in some other way.
261+
262+For example, this sample `showWithIndex` function for showing a heterogeneous
263+list requires an annotation for the accumulator type:
264+
265+```purescript
266+showWithIndex :: forall hlist.
267+ HFoldlWithIndex ShowWithIndex (Array (Tuple Int String)) hlist (Array (Tuple Int String)) =>
268+ hlist ->
269+ Array (Tuple Int String)
270+showWithIndex =
271+ hfoldlWithIndex ShowWithIndex ([] :: Array (Tuple Int String))
272+```
273+
274+## Documentation
275+
276+- Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-heterogeneous).
.spago/p/heterogeneous-0.7.0/package.jsonnew file+11
@@ -0,0 +1,11 @@
1+{
2+ "private": true,
3+ "devDependencies": {
4+ "purescript": "^0.15.15",
5+ "spago": "^0.93.44"
6+ },
7+ "scripts": {
8+ "install": "spago install",
9+ "build": "spago build"
10+ }
11+}
.spago/p/heterogeneous-0.7.0/purs.jsonnew file+20
@@ -0,0 +1,20 @@
1+{
2+ "name": "heterogeneous",
3+ "version": "0.7.0",
4+ "license": "MIT",
5+ "description": "Maps and fold for heterogeneous data types.",
6+ "location": {
7+ "githubOwner": "natefaubion",
8+ "githubRepo": "purescript-heterogeneous"
9+ },
10+ "ref": "v0.7.0",
11+ "dependencies": {
12+ "either": ">=6.0.0 <7.0.0",
13+ "foldable-traversable": ">=6.0.0 <7.0.0",
14+ "functors": ">=5.0.0 <6.0.0",
15+ "prelude": ">=6.0.0 <7.0.0",
16+ "record": ">=4.0.0 <5.0.0",
17+ "tuples": ">=7.0.0 <8.0.0",
18+ "variant": ">=8.0.0 <9.0.0"
19+ }
20+}
.spago/p/heterogeneous-0.7.0/spago.yamlnew file+24
@@ -0,0 +1,24 @@
1+package:
2+ name: heterogeneous
3+ description: Maps and fold for heterogeneous data types.
4+ publish:
5+ version: 0.7.0
6+ license: MIT
7+ location:
8+ githubOwner: natefaubion
9+ githubRepo: purescript-heterogeneous
10+ dependencies:
11+ - either: ">=6.0.0 <7.0.0"
12+ - foldable-traversable: ">=6.0.0 <7.0.0"
13+ - functors: ">=5.0.0 <6.0.0"
14+ - prelude: ">=6.0.0 <7.0.0"
15+ - record: ">=4.0.0 <5.0.0"
16+ - tuples: ">=7.0.0 <8.0.0"
17+ - variant: ">=8.0.0 <9.0.0"
18+ test:
19+ main: Test.Main
20+ dependencies:
21+ - bifunctors
22+ - maybe
23+ - type-equality
24+workspace: {}
.spago/p/heterogeneous-0.7.0/src/Heterogeneous/Folding.pursnew file+224
@@ -0,0 +1,224 @@
1+module Heterogeneous.Folding where
2+
3+import Prelude
4+
5+import Data.Either (Either(..))
6+import Data.Foldable (class Foldable, foldl)
7+import Data.FoldableWithIndex (class FoldableWithIndex, foldlWithIndex)
8+import Data.Functor.App (App(..))
9+import Data.Functor.Variant (VariantF)
10+import Data.Functor.Variant as VariantF
11+import Data.Symbol (class IsSymbol)
12+import Data.Tuple (Tuple(..))
13+import Data.Variant (Variant)
14+import Data.Variant as Variant
15+import Prim.Row as Row
16+import Prim.RowList (RowList)
17+import Prim.RowList as RL
18+import Record as Record
19+import Type.Proxy (Proxy(..))
20+
21+class Folding f x y z | f x y -> z where
22+ folding :: f -> x -> y -> z
23+
24+instance functionFolding :: Folding (x -> y -> x) x y x where
25+ folding f = f
26+
27+class FoldingWithIndex f i x y z | f i x y -> z where
28+ foldingWithIndex :: f -> i -> x -> y -> z
29+
30+instance functionFoldingWithIndex :: FoldingWithIndex (i -> x -> y -> x) i x y x where
31+ foldingWithIndex f = f
32+
33+class HFoldl f x a b | f x a -> b where
34+ hfoldl :: f -> x -> a -> b
35+
36+class HFoldlWithIndex f x a b | f x a -> b where
37+ hfoldlWithIndex :: f -> x -> a -> b
38+
39+newtype ConstFolding f = ConstFolding f
40+
41+instance constFolding ::
42+ ( Folding f x y z
43+ ) =>
44+ FoldingWithIndex (ConstFolding f) i x y z
45+ where
46+ foldingWithIndex (ConstFolding f) _ = folding f
47+
48+instance hfoldlApp ::
49+ ( Foldable g
50+ , Folding f x y x
51+ ) =>
52+ HFoldl f x (App g y) x
53+ where
54+ hfoldl f x (App g) =
55+ foldl (folding f) x g
56+
57+instance hfoldlWithIndexApp ::
58+ ( FoldableWithIndex i g
59+ , FoldingWithIndex f i x y x
60+ ) =>
61+ HFoldlWithIndex f x (App g y) x
62+ where
63+ hfoldlWithIndex f x (App g) =
64+ foldlWithIndex (foldingWithIndex f) x g
65+
66+instance hfoldlRowList ::
67+ ( HFoldlWithIndex (ConstFolding f) x (Proxy rl) b
68+ ) =>
69+ HFoldl f x (Proxy rl) b
70+ where
71+ hfoldl f =
72+ hfoldlWithIndex (ConstFolding f)
73+
74+instance hfoldlWithIndexRowListCons ::
75+ ( FoldingWithIndex f (Proxy sym) x (Proxy y) z
76+ , HFoldlWithIndex f z (Proxy rl) b
77+ ) =>
78+ HFoldlWithIndex f x (Proxy (RL.Cons sym y rl)) b
79+ where
80+ hfoldlWithIndex f x _ =
81+ hfoldlWithIndex f
82+ (foldingWithIndex f (Proxy :: Proxy sym) x (Proxy :: Proxy y))
83+ (Proxy :: Proxy rl)
84+
85+instance hfoldlWithIndexRowListNil ::
86+ HFoldlWithIndex f x (Proxy RL.Nil) x
87+ where
88+ hfoldlWithIndex _ x _ = x
89+
90+instance hfoldlRecord ::
91+ ( RL.RowToList r rl
92+ , FoldlRecord (ConstFolding f) x rl r b
93+ ) =>
94+ HFoldl f x { | r } b
95+ where
96+ hfoldl f x =
97+ foldlRecordRowList (ConstFolding f) x (Proxy :: Proxy rl)
98+
99+instance hfoldlRecordWithIndex ::
100+ ( RL.RowToList r rl
101+ , FoldlRecord f x rl r b
102+ ) =>
103+ HFoldlWithIndex f x { | r } b
104+ where
105+ hfoldlWithIndex f x =
106+ foldlRecordRowList f x (Proxy :: Proxy rl)
107+
108+class FoldlRecord f x (rl :: RowList Type) (r :: Row Type) b | f x rl -> b, rl -> r where
109+ foldlRecordRowList :: forall proxy. f -> x -> proxy rl -> { | r } -> b
110+
111+instance foldlRecordCons ::
112+ ( IsSymbol sym
113+ , Row.Cons sym a r' r
114+ , FoldingWithIndex f (Proxy sym) x a z
115+ , FoldlRecord f z rl r b
116+ ) =>
117+ FoldlRecord f x (RL.Cons sym a rl) r b
118+ where
119+ foldlRecordRowList f x _ r =
120+ foldlRecordRowList f
121+ (foldingWithIndex f prop x (Record.get prop r)) (Proxy :: Proxy rl)
122+ r
123+ where
124+ prop = Proxy :: Proxy sym
125+
126+instance foldlRecordNil ::
127+ FoldlRecord f x RL.Nil r x
128+ where
129+ foldlRecordRowList _ x _ _ = x
130+
131+instance hfoldlTuple ::
132+ ( Folding f x a y
133+ , Folding f y b z
134+ ) =>
135+ HFoldl f x (Tuple a b) z
136+ where
137+ hfoldl f x (Tuple a b) =
138+ folding f (folding f x a) b
139+
140+instance hfoldlEither ::
141+ ( Folding f x a y
142+ , Folding f x b y
143+ ) =>
144+ HFoldl f x (Either a b) y
145+ where
146+ hfoldl f x = case _ of
147+ Left a -> folding f x a
148+ Right b -> folding f x b
149+
150+instance hfoldlVariant ::
151+ ( RL.RowToList r rl
152+ , FoldlVariant (ConstFolding f) x rl r y
153+ ) =>
154+ HFoldl f x (Variant r) y
155+ where
156+ hfoldl =
157+ foldlVariantRowList (Proxy :: Proxy rl) <<< ConstFolding
158+
159+instance hfoldlVariantWithIndex ::
160+ ( RL.RowToList r rl
161+ , FoldlVariant f x rl r y
162+ ) =>
163+ HFoldlWithIndex f x (Variant r) y
164+ where
165+ hfoldlWithIndex =
166+ foldlVariantRowList (Proxy :: Proxy rl)
167+
168+class FoldlVariant f x (rl :: RowList Type) (r :: Row Type) b | f x rl -> b, rl -> r where
169+ foldlVariantRowList :: forall proxy. proxy rl -> f -> x -> Variant r -> b
170+
171+instance foldlVariantCons ::
172+ ( IsSymbol sym
173+ , Row.Cons sym a r1 r2
174+ , FoldingWithIndex f (Proxy sym) x a y
175+ , FoldlVariant f x rest r1 y
176+ ) =>
177+ FoldlVariant f x (RL.Cons sym a rest) r2 y
178+ where
179+ foldlVariantRowList _ f x =
180+ foldlVariantRowList (Proxy :: Proxy rest) f x
181+ # Variant.on label (foldingWithIndex f label x)
182+ where
183+ label = Proxy :: Proxy sym
184+
185+instance foldlVariantNil :: FoldlVariant f x RL.Nil () y where
186+ foldlVariantRowList _ _ _ = Variant.case_
187+
188+instance hfoldlVariantF ::
189+ ( RL.RowToList r rl
190+ , FoldlVariantF (ConstFolding f) x rl r z y
191+ ) =>
192+ HFoldl f x (VariantF r z) y
193+ where
194+ hfoldl =
195+ foldlVariantFRowList (Proxy :: Proxy rl) <<< ConstFolding
196+
197+instance hfoldlVariantFWithIndex ::
198+ ( RL.RowToList r rl
199+ , FoldlVariantF f x rl r z y
200+ ) =>
201+ HFoldlWithIndex f x (VariantF r z) y
202+ where
203+ hfoldlWithIndex =
204+ foldlVariantFRowList (Proxy :: Proxy rl)
205+
206+class FoldlVariantF f x (rl :: RowList (Type -> Type)) (r :: Row (Type -> Type)) z y | f x rl z -> r y where
207+ foldlVariantFRowList :: forall proxy. proxy rl -> f -> x -> VariantF r z -> y
208+
209+instance foldlVariantFCons ::
210+ ( IsSymbol sym
211+ , Row.Cons sym a r1 r2
212+ , FoldingWithIndex f (Proxy sym) x (a z) y
213+ , FoldlVariantF f x rest r1 z y
214+ ) =>
215+ FoldlVariantF f x (RL.Cons sym a rest) r2 z y
216+ where
217+ foldlVariantFRowList _ f x =
218+ foldlVariantFRowList (Proxy :: Proxy rest) f x
219+ # VariantF.on label (foldingWithIndex f label x)
220+ where
221+ label = Proxy :: Proxy sym
222+
223+instance foldlVariantFNil :: FoldlVariantF f x RL.Nil () z y where
224+ foldlVariantFRowList _ _ _ = VariantF.case_
.spago/p/heterogeneous-0.7.0/src/Heterogeneous/Mapping.pursnew file+200
@@ -0,0 +1,200 @@
1+module Heterogeneous.Mapping where
2+
3+import Prelude
4+
5+import Data.Either (Either(..))
6+import Data.Functor.App (App(..))
7+import Data.Functor.Variant (VariantF)
8+import Data.Functor.Variant as VariantF
9+import Data.FunctorWithIndex (class FunctorWithIndex, mapWithIndex)
10+import Data.Symbol (class IsSymbol)
11+import Data.Tuple (Tuple(..))
12+import Data.Variant (Variant)
13+import Data.Variant as Variant
14+import Prim.Row as Row
15+import Prim.RowList (RowList)
16+import Prim.RowList as RL
17+import Record.Builder (Builder)
18+import Record.Builder as Builder
19+import Type.Proxy (Proxy(..))
20+
21+class Mapping f a b | f a -> b where
22+ mapping :: f -> a -> b
23+
24+class MappingWithIndex f i a b | f i a -> b where
25+ mappingWithIndex :: f -> i -> a -> b
26+
27+instance mappingFunction :: Mapping (a -> b) a b where
28+ mapping k = k
29+
30+newtype ConstMapping f = ConstMapping f
31+
32+instance constMapping ::
33+ Mapping f a b =>
34+ MappingWithIndex (ConstMapping f) ix a b
35+ where
36+ mappingWithIndex (ConstMapping f) _ = mapping f
37+
38+class HMap f a b | f a -> b where
39+ hmap :: f -> a -> b
40+
41+class HMapWithIndex f a b | f a -> b where
42+ hmapWithIndex :: f -> a -> b
43+
44+instance hmapApp ::
45+ ( Functor f
46+ , Mapping fn a b
47+ ) =>
48+ HMap fn (App f a) (App f b)
49+ where
50+ hmap f (App a) =
51+ App (mapping f <$> a)
52+
53+instance hmapWithIndexApp ::
54+ ( FunctorWithIndex i f
55+ , MappingWithIndex fn i a b
56+ ) =>
57+ HMapWithIndex fn (App f a) (App f b)
58+ where
59+ hmapWithIndex f (App a) =
60+ App (mapWithIndex (mappingWithIndex f) a)
61+
62+instance hmapRecord ::
63+ ( RL.RowToList rin rl
64+ , MapRecordWithIndex rl (ConstMapping fn) rin rout
65+ ) =>
66+ HMap fn { | rin } { | rout }
67+ where
68+ hmap =
69+ Builder.build
70+ <<< mapRecordWithIndexBuilder (Proxy :: Proxy rl)
71+ <<< ConstMapping
72+
73+instance hmapWithIndexRecord ::
74+ ( RL.RowToList rin rl
75+ , MapRecordWithIndex rl fn rin rout
76+ ) =>
77+ HMapWithIndex fn { | rin } { | rout }
78+ where
79+ hmapWithIndex =
80+ Builder.build
81+ <<< mapRecordWithIndexBuilder (Proxy :: Proxy rl)
82+
83+class MapRecordWithIndex (xs :: RowList Type) f (as :: Row Type) (bs :: Row Type) | xs f -> bs, xs -> as where
84+ mapRecordWithIndexBuilder :: forall proxy. proxy xs -> f -> Builder { | as } { | bs }
85+
86+instance mapRecordWithIndexCons ::
87+ ( IsSymbol sym
88+ , MappingWithIndex f (Proxy sym) a b
89+ , MapRecordWithIndex rest f as bs'
90+ , Row.Cons sym a bx bs'
91+ , Row.Cons sym b bx bs
92+ ) =>
93+ MapRecordWithIndex (RL.Cons sym a rest) f as bs
94+ where
95+ mapRecordWithIndexBuilder _ f =
96+ Builder.modify prop (mappingWithIndex f prop)
97+ <<< mapRecordWithIndexBuilder (Proxy :: Proxy rest) f
98+ where
99+ prop = Proxy :: Proxy sym
100+
101+instance mapRecordWithIndexNil :: MapRecordWithIndex RL.Nil fn as as where
102+ mapRecordWithIndexBuilder _ _ = identity
103+
104+instance hmapTuple ::
105+ ( Mapping fn a a'
106+ , Mapping fn b b'
107+ ) =>
108+ HMap fn (Tuple a b) (Tuple a' b')
109+ where
110+ hmap fn (Tuple a b) =
111+ Tuple (mapping fn a) (mapping fn b)
112+
113+instance hmapEither ::
114+ ( Mapping fn a a'
115+ , Mapping fn b b'
116+ ) =>
117+ HMap fn (Either a b) (Either a' b')
118+ where
119+ hmap fn = case _ of
120+ Left a -> Left (mapping fn a)
121+ Right b -> Right (mapping fn b)
122+
123+instance hmapVariant ::
124+ ( RL.RowToList rin rl
125+ , MapVariantWithIndex rl (ConstMapping fn) rin rout
126+ ) =>
127+ HMap fn (Variant rin) (Variant rout)
128+ where
129+ hmap =
130+ mapVariantWithIndex (Proxy :: Proxy rl) <<< ConstMapping
131+
132+instance hmapWithIndexVariant ::
133+ ( RL.RowToList rin rl
134+ , MapVariantWithIndex rl fn rin rout
135+ ) =>
136+ HMapWithIndex fn (Variant rin) (Variant rout)
137+ where
138+ hmapWithIndex =
139+ mapVariantWithIndex (Proxy :: Proxy rl)
140+
141+class MapVariantWithIndex (xs :: RowList Type) f (as :: Row Type) (bs :: Row Type) | xs f -> bs, xs -> as where
142+ mapVariantWithIndex :: forall proxy. proxy xs -> f -> Variant as -> Variant bs
143+
144+instance mapVariantWithIndexCons ::
145+ ( IsSymbol sym
146+ , Row.Cons sym a r1 r2
147+ , Row.Cons sym b r3 r4
148+ , MappingWithIndex fn (Proxy sym) a b
149+ , MapVariantWithIndex rest fn r1 r4
150+ ) =>
151+ MapVariantWithIndex (RL.Cons sym a rest) fn r2 r4
152+ where
153+ mapVariantWithIndex _ fn =
154+ mapVariantWithIndex (Proxy :: Proxy rest) fn
155+ # Variant.on label (Variant.inj label <<< mappingWithIndex fn label)
156+ where
157+ label = Proxy :: Proxy sym
158+
159+instance mapVariantWithIndexNil :: MapVariantWithIndex RL.Nil fn () r where
160+ mapVariantWithIndex _ _ = Variant.case_
161+
162+instance hmapVariantF ::
163+ ( RL.RowToList rin rl
164+ , MapVariantFWithIndex rl (ConstMapping fn) rin rout x y
165+ ) =>
166+ HMap fn (VariantF rin x) (VariantF rout y)
167+ where
168+ hmap =
169+ mapVariantFWithIndex (Proxy :: Proxy rl) <<< ConstMapping
170+
171+instance hmapWithIndexVariantF ::
172+ ( RL.RowToList rin rl
173+ , MapVariantFWithIndex rl fn rin rout x y
174+ ) =>
175+ HMapWithIndex fn (VariantF rin x) (VariantF rout y)
176+ where
177+ hmapWithIndex =
178+ mapVariantFWithIndex (Proxy :: Proxy rl)
179+
180+class MapVariantFWithIndex (xs :: RowList (Type -> Type)) f (as :: Row (Type -> Type)) (bs :: Row (Type -> Type)) x y | xs f x -> as bs y where
181+ mapVariantFWithIndex :: forall proxy. proxy xs -> f -> VariantF as x -> VariantF bs y
182+
183+instance mapVariantFWithIndexCons ::
184+ ( IsSymbol sym
185+ , Row.Cons sym a r1 r2
186+ , Row.Cons sym b r3 r4
187+ , MappingWithIndex fn (Proxy sym) (a x) (b y)
188+ , MapVariantFWithIndex rest fn r1 r4 x y
189+ , Functor b
190+ ) =>
191+ MapVariantFWithIndex (RL.Cons sym a rest) fn r2 r4 x y
192+ where
193+ mapVariantFWithIndex _ fn =
194+ mapVariantFWithIndex (Proxy :: Proxy rest) fn
195+ # VariantF.on label (VariantF.inj label <<< mappingWithIndex fn label)
196+ where
197+ label = Proxy :: Proxy sym
198+
199+instance mapVariantFWithIndexNil :: MapVariantFWithIndex RL.Nil fn () r x y where
200+ mapVariantFWithIndex _ _ = VariantF.case_
.spago/p/heterogeneous-0.7.0/src/Heterogeneous/Variadic.pursnew file+55
@@ -0,0 +1,55 @@
1+module Heterogeneous.Variadic where
2+
3+import Heterogeneous.Folding (class Folding, class FoldingWithIndex, folding, foldingWithIndex)
4+import Prim.Int (class Add)
5+import Type.Proxy (Proxy(..))
6+
7+class Variadic f acc args where
8+ variadic :: f -> acc -> args
9+
10+instance variadicArg ::
11+ ( Folding f acc x acc'
12+ , Variadic f acc' xs
13+ ) =>
14+ Variadic f acc (x -> xs) where
15+ variadic f acc x =
16+ variadic f (folding f acc x)
17+
18+else instance variadicResult ::
19+ ( Resulting f acc x
20+ ) =>
21+ Variadic f acc x where
22+ variadic = resulting
23+
24+class Resulting f acc x where
25+ resulting :: f -> acc -> x
26+
27+class VariadicWithIndex f acc args where
28+ variadicWithIndex :: f -> acc -> args
29+
30+instance variadicWithIndexInit ::
31+ ( VariadicWithIndexAt f 0 acc args
32+ ) =>
33+ VariadicWithIndex f acc args where
34+ variadicWithIndex f = variadicWithIndexAt f (Proxy :: _ 0)
35+
36+class VariadicWithIndexAt f (ix :: Int) acc args where
37+ variadicWithIndexAt :: f -> Proxy ix -> acc -> args
38+
39+instance variadicWithIndexArg ::
40+ ( FoldingWithIndex f (Proxy ix) acc x acc'
41+ , VariadicWithIndexAt f ix' acc' xs
42+ , Add ix 1 ix'
43+ ) =>
44+ VariadicWithIndexAt f ix acc (x -> xs) where
45+ variadicWithIndexAt f ix acc x =
46+ variadicWithIndexAt f (Proxy :: _ ix') (foldingWithIndex f ix acc x)
47+
48+else instance variadicWithIndexResult ::
49+ ( ResultingWithLength f (Proxy n) acc x
50+ ) =>
51+ VariadicWithIndexAt f n acc x where
52+ variadicWithIndexAt = resultingWithLength
53+
54+class ResultingWithLength f n acc x where
55+ resultingWithLength :: f -> n -> acc -> x
.spago/p/identity-6.0.0/LICENSEnew file+26
@@ -0,0 +1,26 @@
1+Copyright 2018 PureScript
2+
3+Redistribution and use in source and binary forms, with or without modification,
4+are permitted provided that the following conditions are met:
5+
6+1. Redistributions of source code must retain the above copyright notice, this
7+list of conditions and the following disclaimer.
8+
9+2. Redistributions in binary form must reproduce the above copyright notice,
10+this list of conditions and the following disclaimer in the documentation and/or
11+other materials provided with the distribution.
12+
13+3. Neither the name of the copyright holder nor the names of its contributors
14+may be used to endorse or promote products derived from this software without
15+specific prior written permission.
16+
17+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
21+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.spago/p/identity-6.0.0/README.mdnew file+17
@@ -0,0 +1,17 @@
1+# purescript-identity
2+
3+[](https://github.com/purescript/purescript-identity/releases)
4+[](https://github.com/purescript/purescript-identity/actions?query=workflow%3ACI+branch%3Amaster)
5+[](https://pursuit.purescript.org/packages/purescript-identity)
6+
7+Identity value.
8+
9+## Installation
10+
11+```
12+spago install identity
13+```
14+
15+## Documentation
16+
17+Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-identity).
.spago/p/identity-6.0.0/bower.jsonnew file+28
@@ -0,0 +1,28 @@
1+{
2+ "name": "purescript-identity",
3+ "homepage": "https://github.com/purescript/purescript-identity",
4+ "authors": [
5+ "Gary Burgess <gary.burgess@gmail.com>",
6+ "Hardy Jones <jones3.hardy@gmail.com>"
7+ ],
8+ "license": "BSD-3-Clause",
9+ "repository": {
10+ "type": "git",
11+ "url": "https://github.com/purescript/purescript-identity.git"
12+ },
13+ "ignore": [
14+ "**/.*",
15+ "bower_components",
16+ "node_modules",
17+ "output",
18+ "test",
19+ "bower.json",
20+ "package.json"
21+ ],
22+ "dependencies": {
23+ "purescript-control": "^6.0.0",
24+ "purescript-invariant": "^6.0.0",
25+ "purescript-newtype": "^5.0.0",
26+ "purescript-prelude": "^6.0.0"
27+ }
28+}
.spago/p/identity-6.0.0/package.jsonnew file+12
@@ -0,0 +1,12 @@
1+{
2+ "private": true,
3+ "scripts": {
4+ "clean": "rimraf output && rimraf .pulp-cache",
5+ "build": "pulp build -- --censor-lib --strict"
6+ },
7+ "devDependencies": {
8+ "pulp": "16.0.0-0",
9+ "purescript-psa": "^0.8.2",
10+ "rimraf": "^3.0.2"
11+ }
12+}
.spago/p/identity-6.0.0/purs.jsonnew file+16
@@ -0,0 +1,16 @@
1+{
2+ "name": "identity",
3+ "version": "6.0.0",
4+ "license": "BSD-3-Clause",
5+ "location": {
6+ "githubOwner": "purescript",
7+ "githubRepo": "purescript-identity"
8+ },
9+ "ref": "v6.0.0",
10+ "dependencies": {
11+ "control": ">=6.0.0 <7.0.0",
12+ "invariant": ">=6.0.0 <7.0.0",
13+ "newtype": ">=5.0.0 <6.0.0",
14+ "prelude": ">=6.0.0 <7.0.0"
15+ }
16+}
.spago/p/identity-6.0.0/src/Data/Identity.pursnew file+72
@@ -0,0 +1,72 @@
1+module Data.Identity where
2+
3+import Prelude
4+
5+import Control.Alt (class Alt)
6+import Control.Comonad (class Comonad)
7+import Control.Extend (class Extend)
8+import Control.Lazy (class Lazy)
9+import Data.Eq (class Eq1)
10+import Data.Functor.Invariant (class Invariant, imapF)
11+import Data.Newtype (class Newtype)
12+import Data.Ord (class Ord1)
13+
14+newtype Identity a = Identity a
15+
16+derive instance newtypeIdentity :: Newtype (Identity a) _
17+
18+derive newtype instance eqIdentity :: Eq a => Eq (Identity a)
19+
20+derive newtype instance ordIdentity :: Ord a => Ord (Identity a)
21+
22+derive newtype instance boundedIdentity :: Bounded a => Bounded (Identity a)
23+
24+derive newtype instance heytingAlgebraIdentity :: HeytingAlgebra a => HeytingAlgebra (Identity a)
25+
26+derive newtype instance booleanAlgebraIdentity :: BooleanAlgebra a => BooleanAlgebra (Identity a)
27+
28+derive newtype instance semigroupIdentity :: Semigroup a => Semigroup (Identity a)
29+
30+derive newtype instance monoidIdentity :: Monoid a => Monoid (Identity a)
31+
32+derive newtype instance semiringIdentity :: Semiring a => Semiring (Identity a)
33+
34+derive newtype instance euclideanRingIdentity :: EuclideanRing a => EuclideanRing (Identity a)
35+
36+derive newtype instance ringIdentity :: Ring a => Ring (Identity a)
37+
38+derive newtype instance commutativeRingIdentity :: CommutativeRing a => CommutativeRing (Identity a)
39+
40+derive newtype instance lazyIdentity :: Lazy a => Lazy (Identity a)
41+
42+instance showIdentity :: Show a => Show (Identity a) where
43+ show (Identity x) = "(Identity " <> show x <> ")"
44+
45+derive instance eq1Identity :: Eq1 Identity
46+
47+derive instance ord1Identity :: Ord1 Identity
48+
49+derive instance functorIdentity :: Functor Identity
50+
51+instance invariantIdentity :: Invariant Identity where
52+ imap = imapF
53+
54+instance altIdentity :: Alt Identity where
55+ alt x _ = x
56+
57+instance applyIdentity :: Apply Identity where
58+ apply (Identity f) (Identity x) = Identity (f x)
59+
60+instance applicativeIdentity :: Applicative Identity where
61+ pure = Identity
62+
63+instance bindIdentity :: Bind Identity where
64+ bind (Identity m) f = f m
65+
66+instance monadIdentity :: Monad Identity
67+
68+instance extendIdentity :: Extend Identity where
69+ extend f m = Identity (f m)
70+
71+instance comonadIdentity :: Comonad Identity where
72+ extract (Identity x) = x
.spago/p/indexed-monad-3.0.0/LICENSEnew file+20
@@ -0,0 +1,20 @@
1+The MIT License (MIT)
2+
3+Copyright (c) 2017 Gary Burgess
4+
5+Permission is hereby granted, free of charge, to any person obtaining a copy of
6+this software and associated documentation files (the "Software"), to deal in
7+the Software without restriction, including without limitation the rights to
8+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+the Software, and to permit persons to whom the Software is furnished to do so,
10+subject to the following conditions:
11+
12+The above copyright notice and this permission notice shall be included in all
13+copies or substantial portions of the Software.
14+
15+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
.spago/p/indexed-monad-3.0.0/README.mdnew file+20
@@ -0,0 +1,20 @@
1+# purescript-indexed-monad
2+
3+[](https://github.com/garyb/purescript-indexed-monad/releases)
4+
5+
6+Indexed monads in PureScript.
7+
8+## Installation
9+
10+```
11+bower install purescript-indexed-monad
12+```
13+
14+## Documentation
15+
16+Module documentation is [published on Pursuit](https://pursuit.purescript.org/packages/purescript-indexed-monad)
17+
18+## Examples
19+
20+[@justinwoo](https://github.com/justinwoo) has written a [blog post on Qiita](http://qiita.com/kimagure/items/a0ee7313e8c7690bf3f5) and put up a [demo repo](https://github.com/justinwoo/hamburger-builder-demo) modeling hamburger building with this package.
.spago/p/indexed-monad-3.0.0/bower.jsonnew file+21
@@ -0,0 +1,21 @@
1+{
2+ "name": "purescript-indexed-monad",
3+ "homepage": "https://github.com/garyb/purescript-indexed-monad",
4+ "license": "MIT",
5+ "repository": {
6+ "type": "git",
7+ "url": "https://github.com/garyb/purescript-indexed-monad.git"
8+ },
9+ "ignore": [
10+ "**/.*",
11+ "bower_components",
12+ "node_modules",
13+ "output",
14+ "bower.json",
15+ "package.json"
16+ ],
17+ "dependencies": {
18+ "purescript-control": "^6.0.0",
19+ "purescript-newtype": "^5.0.0"
20+ }
21+}
.spago/p/indexed-monad-3.0.0/package.jsonnew file+13
@@ -0,0 +1,13 @@
1+{
2+ "private": true,
3+ "scripts": {
4+ "clean": "rimraf output && rimraf .pulp-cache",
5+ "build": "pulp build -- --censor-lib --strict"
6+ },
7+ "devDependencies": {
8+ "pulp": "^16.0.2",
9+ "purescript": "^0.15.7",
10+ "purescript-psa": "^0.8.2",
11+ "rimraf": "^4.1.2"
12+ }
13+}
.spago/p/indexed-monad-3.0.0/purs.jsonnew file+14
@@ -0,0 +1,14 @@
1+{
2+ "name": "indexed-monad",
3+ "version": "3.0.0",
4+ "license": "MIT",
5+ "location": {
6+ "githubOwner": "garyb",
7+ "githubRepo": "purescript-indexed-monad"
8+ },
9+ "ref": "v3.0.0",
10+ "dependencies": {
11+ "newtype": ">=5.0.0 <6.0.0",
12+ "prelude": ">=6.0.0 <7.0.0"
13+ }
14+}
.spago/p/indexed-monad-3.0.0/src/Control/Applicative/Indexed.pursnew file+22
@@ -0,0 +1,22 @@
1+module Control.Applicative.Indexed
2+ ( class IxApplicative
3+ , ipure
4+ , iwhen
5+ , iunless
6+ , module Control.Apply.Indexed
7+ ) where
8+
9+import Prelude (Unit, unit)
10+import Control.Apply.Indexed
11+
12+class IxApplicative ∷ ∀ ix. (ix → ix → Type → Type) → Constraint
13+class IxApply m ⇐ IxApplicative m where
14+ ipure ∷ ∀ a x. a → m x x a
15+
16+iwhen ∷ ∀ m x. IxApplicative m ⇒ Boolean → m x x Unit → m x x Unit
17+iwhen true m = m
18+iwhen false _ = ipure unit
19+
20+iunless ∷ ∀ m x. IxApplicative m ⇒ Boolean → m x x Unit → m x x Unit
21+iunless false m = m
22+iunless true _ = ipure unit
.spago/p/indexed-monad-3.0.0/src/Control/Apply/Indexed.pursnew file+24
@@ -0,0 +1,24 @@
1+module Control.Apply.Indexed
2+ ( class IxApply
3+ , iapply
4+ , iapplyFirst, (<*:)
5+ , iapplySecond, (:*>)
6+ , module Data.Functor.Indexed
7+ ) where
8+
9+import Prelude (const, identity)
10+import Data.Functor.Indexed
11+
12+class IxApply ∷ ∀ ix. (ix → ix → Type → Type) → Constraint
13+class IxFunctor m ⇐ IxApply m where
14+ iapply ∷ ∀ a b x y z. m x y (a → b) → m y z a → m x z b
15+
16+iapplyFirst ∷ ∀ m a b x y z. IxApply m ⇒ m x y a → m y z b → m x z a
17+iapplyFirst a b = const `imap` a `iapply` b
18+
19+infixl 4 iapplyFirst as <*:
20+
21+iapplySecond ∷ ∀ m a b x y z. IxApply m => m x y a -> m y z b -> m x z b
22+iapplySecond a b = const identity `imap` a `iapply` b
23+
24+infixl 4 iapplySecond as :*>
.spago/p/indexed-monad-3.0.0/src/Control/Bind/Indexed.pursnew file+44
@@ -0,0 +1,44 @@
1+module Control.Bind.Indexed
2+ ( class IxBind
3+ , ibind, (:>>=)
4+ , ibindFlipped, (=<<:)
5+ , composeiKleisli, (:>=>)
6+ , composeiKleisliFlipped, (<=<:)
7+ , class IxDiscard
8+ , idiscard
9+ , ijoin
10+ , module Control.Apply.Indexed
11+ ) where
12+
13+import Prelude (flip, identity, Unit)
14+import Control.Apply.Indexed
15+
16+class IxBind ∷ ∀ ix. (ix → ix → Type → Type) → Constraint
17+class IxApply m ⇐ IxBind m where
18+ ibind ∷ ∀ a b x y z. m x y a → (a → m y z b) → m x z b
19+
20+infixl 1 ibind as :>>=
21+
22+ibindFlipped ∷ ∀ m a b x y z. IxBind m ⇒ (a → m y z b) → m x y a → m x z b
23+ibindFlipped = flip ibind
24+
25+infixr 1 ibindFlipped as =<<:
26+
27+ijoin ∷ forall m z y x a. IxBind m => m x y (m y z a) -> m x z a
28+ijoin m = m :>>= identity
29+
30+composeiKleisli ∷ ∀ m a b c x y z. IxBind m ⇒ (a → m x y b) → (b → m y z c) → a → m x z c
31+composeiKleisli f g a = f a :>>= g
32+
33+infixr 1 composeiKleisli as :>=>
34+
35+composeiKleisliFlipped ∷ ∀ m a b c x y z. IxBind m ⇒ (b → m y z c) → (a → m x y b) → a → m x z c
36+composeiKleisliFlipped f g a = f =<<: g a
37+
38+infixr 1 composeiKleisliFlipped as <=<:
39+
40+class IxDiscard a where
41+ idiscard ∷ ∀ k f b (x :: k) (y :: k) (z :: k). IxBind f ⇒ f x y a → (a → f y z b) → f x z b
42+
43+instance ixDiscardUnit :: IxDiscard Unit where
44+ idiscard = ibind
.spago/p/indexed-monad-3.0.0/src/Control/Monad/Indexed.pursnew file+34
@@ -0,0 +1,34 @@
1+module Control.Monad.Indexed
2+ ( class IxMonad
3+ , iap
4+ , iwhenM
5+ , iunlessM
6+ , module Control.Applicative.Indexed
7+ , module Control.Apply.Indexed
8+ , module Control.Bind.Indexed
9+ , module Data.Functor.Indexed
10+ ) where
11+
12+import Prelude
13+
14+import Control.Applicative.Indexed (class IxApplicative, ipure, iwhen, iunless)
15+import Control.Apply.Indexed (class IxApply, iapply, iapplyFirst, iapplySecond, (:*>), (<*:))
16+import Control.Bind.Indexed (class IxBind, ibind, (:>>=), ibindFlipped, (=<<:), composeiKleisli, (:>=>), composeiKleisliFlipped, (<=<:))
17+import Data.Functor.Indexed (class IxFunctor, imap, ivoid, ivoidLeft, ivoidRight, (:$>), (<$:))
18+
19+class IxMonad ∷ ∀ ix. (ix → ix → Type → Type) → Constraint
20+class (IxApplicative m, IxBind m) ⇐ IxMonad m
21+
22+iap ∷ ∀ m a b x y z. IxMonad m ⇒ m x y (a → b) → m y z a → m x z b
23+iap f a = do
24+ f' ← f
25+ a' ← a
26+ ipure (f' a')
27+ where
28+ bind = ibind
29+
30+iwhenM ∷ ∀ m x y. IxMonad m ⇒ m x y Boolean → m y y Unit → m x y Unit
31+iwhenM mb m = mb :>>= \b → iwhen b m
32+
33+iunlessM ∷ ∀ m x y. IxMonad m ⇒ m x y Boolean → m y y Unit → m x y Unit
34+iunlessM mb m = mb :>>= \b → iunless b m
.spago/p/indexed-monad-3.0.0/src/Control/Monad/Qualified.pursnew file+43
@@ -0,0 +1,43 @@
1+-- | Use this module to rebind `do`/`ado` notation via Qualified Do/Ado.
2+-- |
3+-- | For example, here's how one would rebind do notation.
4+-- | ```purescript
5+-- | import Control.Monad.Indexed.Qualified as Ix
6+-- |
7+-- | f = Ix.do -- remaps do notation to use `ibind` and `idiscard`
8+-- | x <- foo
9+-- | bar
10+-- | I.pure y
11+-- | ```
12+-- |
13+-- | For example, here's how one would rebind ado notation.
14+-- | ```purescript
15+-- | import Control.Monad.Indexed.Qualified as Ix
16+-- |
17+-- | g = Ix.ado -- remaps do notation to use `iapply` and `imap`
18+-- | x <- foo
19+-- | y <- bar
20+-- | in x + y
21+-- | ```
22+module Control.Monad.Indexed.Qualified where
23+
24+import Data.Functor.Indexed (class IxFunctor, imap)
25+import Control.Apply.Indexed (class IxApply, iapply)
26+import Control.Applicative.Indexed (class IxApplicative, ipure)
27+import Control.Bind.Indexed (class IxBind, ibind, class IxDiscard, idiscard)
28+import Control.Monad.Indexed (class IxMonad)
29+
30+map ∷ ∀ f a b x y. IxFunctor f => (a → b) → f x y a → f x y b
31+map = imap
32+
33+apply ∷ ∀ m a b x y z. IxApply m => m x y (a → b) → m y z a → m x z b
34+apply = iapply
35+
36+pure ∷ ∀ m a x. IxApplicative m => a → m x x a
37+pure = ipure
38+
39+bind ∷ ∀ m a b x y z. IxMonad m => m x y a → (a → m y z b) → m x z b
40+bind = ibind
41+
42+discard ∷ ∀ m a b x y z. IxBind m => IxDiscard a => m x y a → (a → m y z b) → m x z b
43+discard = idiscard
.spago/p/indexed-monad-3.0.0/src/Data/Functor/Indexed.pursnew file+20
@@ -0,0 +1,20 @@
1+module Data.Functor.Indexed where
2+
3+import Prelude
4+
5+class IxFunctor ∷ ∀ ix. (ix → ix → Type → Type) → Constraint
6+class IxFunctor f where
7+ imap ∷ ∀ a b x y. (a → b) → f x y a → f x y b
8+
9+ivoid ∷ ∀ f a x y. IxFunctor f ⇒ f x y a → f x y Unit
10+ivoid = imap (const unit)
11+
12+ivoidRight ∷ ∀ f a b x y. IxFunctor f ⇒ a → f x y b → f x y a
13+ivoidRight x = imap (const x)
14+
15+infixl 4 ivoidRight as <$:
16+
17+ivoidLeft ∷ ∀ f a b x y. IxFunctor f ⇒ f x y a → b → f x y b
18+ivoidLeft f x = imap (const x) f
19+
20+infixl 4 ivoidLeft as :$>
.spago/p/indexed-monad-3.0.0/src/Data/Indexed.pursnew file+42
@@ -0,0 +1,42 @@
1+module Data.Indexed where
2+
3+import Prelude
4+
5+import Data.Eq (class Eq1)
6+import Data.Newtype (class Newtype)
7+import Data.Ord (class Ord1)
8+import Control.Monad.Indexed (class IxApplicative, class IxApply, class IxBind, class IxFunctor, class IxMonad)
9+
10+newtype Indexed ∷ ∀ ix. (Type → Type) → ix → ix → Type → Type
11+newtype Indexed m x y a = Indexed (m a)
12+
13+derive instance newtypeIndexed ∷ Newtype (Indexed m i o a) _
14+
15+derive newtype instance eqIndexed ∷ Eq (m a) ⇒ Eq (Indexed m i o a)
16+derive newtype instance eq1Indexed ∷ Eq1 m ⇒ Eq1 (Indexed m i o)
17+
18+derive newtype instance ordIndexed ∷ Ord (m a) ⇒ Ord (Indexed m i o a)
19+derive newtype instance ord1Indexed ∷ Ord1 m ⇒ Ord1 (Indexed m i o)
20+
21+instance showIndexed ∷ Show (m a) ⇒ Show (Indexed m i o a) where
22+ show (Indexed ma) = "(Indexed " <> show ma <> ")"
23+
24+derive newtype instance functorIndexed :: Functor m ⇒ Functor (Indexed m x x)
25+derive newtype instance applyIndexed :: Apply m ⇒ Apply (Indexed m x x)
26+derive newtype instance applicativeIndexed :: Applicative m ⇒ Applicative (Indexed m x x)
27+derive newtype instance bindIndexed :: Bind m ⇒ Bind (Indexed m x x)
28+derive newtype instance monadIndexed :: Monad m ⇒ Monad (Indexed m x x)
29+
30+instance ixFunctorIndexed ∷ Functor m ⇒ IxFunctor (Indexed m) where
31+ imap f (Indexed ma) = Indexed (map f ma)
32+
33+instance ixApplyIndexed ∷ Apply m ⇒ IxApply (Indexed m) where
34+ iapply (Indexed mf) (Indexed ma) = Indexed (apply mf ma)
35+
36+instance ixApplicativeIndexed ∷ Applicative m ⇒ IxApplicative (Indexed m) where
37+ ipure = Indexed <<< pure
38+
39+instance ixBindIndexed ∷ Bind m ⇒ IxBind (Indexed m) where
40+ ibind (Indexed ma) f = Indexed $ ma >>= \a → case f a of Indexed mb → mb
41+
42+instance ixMonadIndexed ∷ Monad m ⇒ IxMonad (Indexed m)
.spago/p/integers-6.0.0/LICENSEnew file+26
@@ -0,0 +1,26 @@
1+Copyright 2018 PureScript
2+
3+Redistribution and use in source and binary forms, with or without modification,
4+are permitted provided that the following conditions are met:
5+
6+1. Redistributions of source code must retain the above copyright notice, this
7+list of conditions and the following disclaimer.
8+
9+2. Redistributions in binary form must reproduce the above copyright notice,
10+this list of conditions and the following disclaimer in the documentation and/or
11+other materials provided with the distribution.
12+
13+3. Neither the name of the copyright holder nor the names of its contributors
14+may be used to endorse or promote products derived from this software without
15+specific prior written permission.
16+
17+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
21+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.spago/p/integers-6.0.0/README.mdnew file+17
@@ -0,0 +1,17 @@
1+# purescript-integers
2+
3+[](https://github.com/purescript/purescript-integers/releases)
4+[](https://github.com/purescript/purescript-integers/actions?query=workflow%3ACI+branch%3Amaster)
5+[](https://pursuit.purescript.org/packages/purescript-integers)
6+
7+Functions and bitwise operators for the `Int` numeric type.
8+
9+## Installation
10+
11+```
12+spago install integers
13+```
14+
15+## Documentation
16+
17+Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-integers).
.spago/p/integers-6.0.0/bower.jsonnew file+28
@@ -0,0 +1,28 @@
1+{
2+ "name": "purescript-integers",
3+ "homepage": "https://github.com/purescript/purescript-integers",
4+ "license": "BSD-3-Clause",
5+ "repository": {
6+ "type": "git",
7+ "url": "https://github.com/purescript/purescript-integers.git"
8+ },
9+ "ignore": [
10+ "**/.*",
11+ "bower_components",
12+ "node_modules",
13+ "output",
14+ "test",
15+ "bower.json",
16+ "package.json"
17+ ],
18+ "dependencies": {
19+ "purescript-maybe": "^6.0.0",
20+ "purescript-numbers": "^9.0.0",
21+ "purescript-prelude": "^6.0.0"
22+ },
23+ "devDependencies": {
24+ "purescript-assert": "^6.0.0",
25+ "purescript-console": "^6.0.0",
26+ "purescript-partial": "^4.0.0"
27+ }
28+}
.spago/p/integers-6.0.0/package.jsonnew file+14
@@ -0,0 +1,14 @@
1+{
2+ "private": true,
3+ "scripts": {
4+ "clean": "rimraf output && rimraf .pulp-cache",
5+ "build": "eslint src && pulp build -- --censor-lib --strict",
6+ "test": "pulp test"
7+ },
8+ "devDependencies": {
9+ "eslint": "^7.15.0",
10+ "pulp": "16.0.0-0",
11+ "purescript-psa": "^0.8.2",
12+ "rimraf": "^3.0.2"
13+ }
14+}
.spago/p/integers-6.0.0/purs.jsonnew file+15
@@ -0,0 +1,15 @@
1+{
2+ "name": "integers",
3+ "version": "6.0.0",
4+ "license": "BSD-3-Clause",
5+ "location": {
6+ "githubOwner": "purescript",
7+ "githubRepo": "purescript-integers"
8+ },
9+ "ref": "v6.0.0",
10+ "dependencies": {
11+ "maybe": ">=6.0.0 <7.0.0",
12+ "numbers": ">=9.0.0 <10.0.0",
13+ "prelude": ">=6.0.0 <7.0.0"
14+ }
15+}
.spago/p/integers-6.0.0/src/Data/Int.jsnew file+65
@@ -0,0 +1,65 @@
1+export const fromNumberImpl = function (just) {
2+ return function (nothing) {
3+ return function (n) {
4+ /* jshint bitwise: false */
5+ return (n | 0) === n ? just(n) : nothing;
6+ };
7+ };
8+};
9+
10+export const toNumber = function (n) {
11+ return n;
12+};
13+
14+export const fromStringAsImpl = function (just) {
15+ return function (nothing) {
16+ return function (radix) {
17+ var digits;
18+ if (radix < 11) {
19+ digits = "[0-" + (radix - 1).toString() + "]";
20+ } else if (radix === 11) {
21+ digits = "[0-9a]";
22+ } else {
23+ digits = "[0-9a-" + String.fromCharCode(86 + radix) + "]";
24+ }
25+ var pattern = new RegExp("^[\\+\\-]?" + digits + "+$", "i");
26+
27+ return function (s) {
28+ /* jshint bitwise: false */
29+ if (pattern.test(s)) {
30+ var i = parseInt(s, radix);
31+ return (i | 0) === i ? just(i) : nothing;
32+ } else {
33+ return nothing;
34+ }
35+ };
36+ };
37+ };
38+};
39+
40+export const toStringAs = function (radix) {
41+ return function (i) {
42+ return i.toString(radix);
43+ };
44+};
45+
46+
47+export const quot = function (x) {
48+ return function (y) {
49+ /* jshint bitwise: false */
50+ return x / y | 0;
51+ };
52+};
53+
54+export const rem = function (x) {
55+ return function (y) {
56+ return x % y;
57+ };
58+};
59+
60+export const pow = function (x) {
61+ return function (y) {
62+ /* jshint bitwise: false */
63+ return Math.pow(x,y) | 0;
64+ };
65+};
.spago/p/integers-6.0.0/src/Data/Int.pursnew file+257
@@ -0,0 +1,257 @@
1+module Data.Int
2+ ( fromNumber
3+ , ceil
4+ , floor
5+ , trunc
6+ , round
7+ , toNumber
8+ , fromString
9+ , Radix
10+ , radix
11+ , binary
12+ , octal
13+ , decimal
14+ , hexadecimal
15+ , base36
16+ , fromStringAs
17+ , toStringAs
18+ , Parity(..)
19+ , parity
20+ , even
21+ , odd
22+ , quot
23+ , rem
24+ , pow
25+ ) where
26+
27+import Prelude
28+
29+import Data.Int.Bits ((.&.))
30+import Data.Maybe (Maybe(..), fromMaybe)
31+import Data.Number (isFinite)
32+import Data.Number as Number
33+
34+-- | Creates an `Int` from a `Number` value. The number must already be an
35+-- | integer and fall within the valid range of values for the `Int` type
36+-- | otherwise `Nothing` is returned.
37+fromNumber :: Number -> Maybe Int
38+fromNumber = fromNumberImpl Just Nothing
39+
40+foreign import fromNumberImpl
41+ :: (forall a. a -> Maybe a)
42+ -> (forall a. Maybe a)
43+ -> Number
44+ -> Maybe Int
45+
46+-- | Convert a `Number` to an `Int`, by taking the closest integer equal to or
47+-- | less than the argument. Values outside the `Int` range are clamped, `NaN`
48+-- | and `Infinity` values return 0.
49+floor :: Number -> Int
50+floor = unsafeClamp <<< Number.floor
51+
52+-- | Convert a `Number` to an `Int`, by taking the closest integer equal to or
53+-- | greater than the argument. Values outside the `Int` range are clamped,
54+-- | `NaN` and `Infinity` values return 0.
55+ceil :: Number -> Int
56+ceil = unsafeClamp <<< Number.ceil
57+
58+-- | Convert a `Number` to an `Int`, by dropping the decimal.
59+-- | Values outside the `Int` range are clamped, `NaN` and `Infinity`
60+-- | values return 0.
61+trunc :: Number -> Int
62+trunc = unsafeClamp <<< Number.trunc
63+
64+-- | Convert a `Number` to an `Int`, by taking the nearest integer to the
65+-- | argument. Values outside the `Int` range are clamped, `NaN` and `Infinity`
66+-- | values return 0.
67+round :: Number -> Int
68+round = unsafeClamp <<< Number.round
69+
70+-- | Convert an integral `Number` to an `Int`, by clamping to the `Int` range.
71+-- | This function will return 0 if the input is `NaN` or an `Infinity`.
72+unsafeClamp :: Number -> Int
73+unsafeClamp x
74+ | not (isFinite x) = 0
75+ | x >= toNumber top = top
76+ | x <= toNumber bottom = bottom
77+ | otherwise = fromMaybe 0 (fromNumber x)
78+
79+-- | Converts an `Int` value back into a `Number`. Any `Int` is a valid `Number`
80+-- | so there is no loss of precision with this function.
81+foreign import toNumber :: Int -> Number
82+
83+-- | Reads an `Int` from a `String` value. The number must parse as an integer
84+-- | and fall within the valid range of values for the `Int` type, otherwise
85+-- | `Nothing` is returned.
86+fromString :: String -> Maybe Int
87+fromString = fromStringAs (Radix 10)
88+
89+-- | A type for describing whether an integer is even or odd.
90+-- |
91+-- | The `Ord` instance considers `Even` to be less than `Odd`.
92+-- |
93+-- | The `Semiring` instance allows you to ask about the parity of the results
94+-- | of arithmetical operations, given only the parities of the inputs. For
95+-- | example, the sum of an odd number and an even number is odd, so
96+-- | `Odd + Even == Odd`. This also works for multiplication, eg. the product
97+-- | of two odd numbers is odd, and therefore `Odd * Odd == Odd`.
98+-- |
99+-- | More generally, we have that
100+-- |
101+-- | ```purescript
102+-- | parity x + parity y == parity (x + y)
103+-- | parity x * parity y == parity (x * y)
104+-- | ```
105+-- |
106+-- | for any integers `x`, `y`. (A mathematician would say that `parity` is a
107+-- | *ring homomorphism*.)
108+-- |
109+-- | After defining addition and multiplication on `Parity` in this way, the
110+-- | `Semiring` laws now force us to choose `zero = Even` and `one = Odd`.
111+-- | This `Semiring` instance actually turns out to be a `Field`.
112+data Parity = Even | Odd
113+
114+derive instance eqParity :: Eq Parity
115+derive instance ordParity :: Ord Parity
116+
117+instance showParity :: Show Parity where
118+ show Even = "Even"
119+ show Odd = "Odd"
120+
121+instance boundedParity :: Bounded Parity where
122+ bottom = Even
123+ top = Odd
124+
125+instance semiringParity :: Semiring Parity where
126+ zero = Even
127+ add x y = if x == y then Even else Odd
128+ one = Odd
129+ mul Odd Odd = Odd
130+ mul _ _ = Even
131+
132+instance ringParity :: Ring Parity where
133+ sub = add
134+
135+instance commutativeRingParity :: CommutativeRing Parity
136+
137+instance euclideanRingParity :: EuclideanRing Parity where
138+ degree Even = 0
139+ degree Odd = 1
140+ div x _ = x
141+ mod _ _ = Even
142+
143+instance divisionRingParity :: DivisionRing Parity where
144+ recip = identity
145+
146+-- | Returns whether an `Int` is `Even` or `Odd`.
147+-- |
148+-- | ``` purescript
149+-- | parity 0 == Even
150+-- | parity 1 == Odd
151+-- | ```
152+parity :: Int -> Parity
153+parity n = if even n then Even else Odd
154+
155+-- | Returns whether an `Int` is an even number.
156+-- |
157+-- | ``` purescript
158+-- | even 0 == true
159+-- | even 1 == false
160+-- | ```
161+even :: Int -> Boolean
162+even x = x .&. 1 == 0
163+
164+-- | The negation of `even`.
165+-- |
166+-- | ``` purescript
167+-- | odd 0 == false
168+-- | odd 1 == true
169+-- | ```
170+odd :: Int -> Boolean
171+odd x = x .&. 1 /= 0
172+
173+-- | The number of unique digits (including zero) used to represent integers in
174+-- | a specific base.
175+newtype Radix = Radix Int
176+
177+-- | The base-2 system.
178+binary :: Radix
179+binary = Radix 2
180+
181+-- | The base-8 system.
182+octal :: Radix
183+octal = Radix 8
184+
185+-- | The base-10 system.
186+decimal :: Radix
187+decimal = Radix 10
188+
189+-- | The base-16 system.
190+hexadecimal :: Radix
191+hexadecimal = Radix 16
192+
193+-- | The base-36 system.
194+base36 :: Radix
195+base36 = Radix 36
196+
197+-- | Create a `Radix` from a number between 2 and 36.
198+radix :: Int -> Maybe Radix
199+radix n | n >= 2 && n <= 36 = Just (Radix n)
200+ | otherwise = Nothing
201+
202+-- | Like `fromString`, but the integer can be specified in a different base.
203+-- |
204+-- | Example:
205+-- | ``` purs
206+-- | fromStringAs binary "100" == Just 4
207+-- | fromStringAs hexadecimal "ff" == Just 255
208+-- | ```
209+fromStringAs :: Radix -> String -> Maybe Int
210+fromStringAs = fromStringAsImpl Just Nothing
211+
212+-- | The `quot` function provides _truncating_ integer division (see the
213+-- | documentation for the `EuclideanRing` class). It is identical to `div` in
214+-- | the `EuclideanRing Int` instance if the dividend is positive, but will be
215+-- | slightly different if the dividend is negative. For example:
216+-- |
217+-- | ```purescript
218+-- | div 2 3 == 0
219+-- | quot 2 3 == 0
220+-- |
221+-- | div (-2) 3 == (-1)
222+-- | quot (-2) 3 == 0
223+-- |
224+-- | div 2 (-3) == 0
225+-- | quot 2 (-3) == 0
226+-- | ```
227+foreign import quot :: Int -> Int -> Int
228+
229+-- | The `rem` function provides the remainder after _truncating_ integer
230+-- | division (see the documentation for the `EuclideanRing` class). It is
231+-- | identical to `mod` in the `EuclideanRing Int` instance if the dividend is
232+-- | positive, but will be slightly different if the dividend is negative. For
233+-- | example:
234+-- |
235+-- | ```purescript
236+-- | mod 2 3 == 2
237+-- | rem 2 3 == 2
238+-- |
239+-- | mod (-2) 3 == 1
240+-- | rem (-2) 3 == (-2)
241+-- |
242+-- | mod 2 (-3) == 2
243+-- | rem 2 (-3) == 2
244+-- | ```
245+foreign import rem :: Int -> Int -> Int
246+
247+-- | Raise an Int to the power of another Int.
248+foreign import pow :: Int -> Int -> Int
249+
250+foreign import fromStringAsImpl
251+ :: (forall a. a -> Maybe a)
252+ -> (forall a. Maybe a)
253+ -> Radix
254+ -> String
255+ -> Maybe Int
256+
257+foreign import toStringAs :: Radix -> Int -> String
.spago/p/integers-6.0.0/src/Data/Int/Bits.jsnew file+48
@@ -0,0 +1,48 @@
1+// module Data.Int.Bits
2+
3+export const and = function (n1) {
4+ return function (n2) {
5+ /* jshint bitwise: false */
6+ return n1 & n2;
7+ };
8+};
9+
10+export const or = function (n1) {
11+ return function (n2) {
12+ /* jshint bitwise: false */
13+ return n1 | n2;
14+ };
15+};
16+
17+export const xor = function (n1) {
18+ return function (n2) {
19+ /* jshint bitwise: false */
20+ return n1 ^ n2;
21+ };
22+};
23+
24+export const shl = function (n1) {
25+ return function (n2) {
26+ /* jshint bitwise: false */
27+ return n1 << n2;
28+ };
29+};
30+
31+export const shr = function (n1) {
32+ return function (n2) {
33+ /* jshint bitwise: false */
34+ return n1 >> n2;
35+ };
36+};
37+
38+export const zshr = function (n1) {
39+ return function (n2) {
40+ /* jshint bitwise: false */
41+ return n1 >>> n2;
42+ };
43+};
44+
45+export const complement = function (n) {
46+ /* jshint bitwise: false */
47+ return ~n;
48+};
.spago/p/integers-6.0.0/src/Data/Int/Bits.pursnew file+37
@@ -0,0 +1,37 @@
1+-- | This module defines bitwise operations for the `Int` type.
2+module Data.Int.Bits
3+ ( and, (.&.)
4+ , or, (.|.)
5+ , xor, (.^.)
6+ , shl
7+ , shr
8+ , zshr
9+ , complement
10+ ) where
11+
12+-- | Bitwise AND.
13+foreign import and :: Int -> Int -> Int
14+
15+infixl 10 and as .&.
16+
17+-- | Bitwise OR.
18+foreign import or :: Int -> Int -> Int
19+
20+infixl 10 or as .|.
21+
22+-- | Bitwise XOR.
23+foreign import xor :: Int -> Int -> Int
24+
25+infixl 10 xor as .^.
26+
27+-- | Bitwise shift left.
28+foreign import shl :: Int -> Int -> Int
29+
30+-- | Bitwise shift right.
31+foreign import shr :: Int -> Int -> Int
32+
33+-- | Bitwise zero-fill shift right.
34+foreign import zshr :: Int -> Int -> Int
35+
36+-- | Bitwise NOT.
37+foreign import complement :: Int -> Int
.spago/p/invariant-6.0.0/LICENSEnew file+26
@@ -0,0 +1,26 @@
1+Copyright 2018 PureScript
2+
3+Redistribution and use in source and binary forms, with or without modification,
4+are permitted provided that the following conditions are met:
5+
6+1. Redistributions of source code must retain the above copyright notice, this
7+list of conditions and the following disclaimer.
8+
9+2. Redistributions in binary form must reproduce the above copyright notice,
10+this list of conditions and the following disclaimer in the documentation and/or
11+other materials provided with the distribution.
12+
13+3. Neither the name of the copyright holder nor the names of its contributors
14+may be used to endorse or promote products derived from this software without
15+specific prior written permission.
16+
17+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
21+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.spago/p/invariant-6.0.0/README.mdnew file+17
@@ -0,0 +1,17 @@
1+# purescript-invariant
2+
3+[](https://github.com/purescript/purescript-invariant/releases)
4+[](https://github.com/purescript/purescript-invariant/actions?query=workflow%3ACI+branch%3Amaster)
5+[](https://pursuit.purescript.org/packages/purescript-invariant)
6+
7+Invariant functors.
8+
9+## Installation
10+
11+```
12+spago install invariant
13+```
14+
15+## Documentation
16+
17+Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-invariant).
.spago/p/invariant-6.0.0/bower.jsonnew file+22
@@ -0,0 +1,22 @@
1+{
2+ "name": "purescript-invariant",
3+ "homepage": "https://github.com/purescript/purescript-invariant",
4+ "license": "BSD-3-Clause",
5+ "repository": {
6+ "type": "git",
7+ "url": "https://github.com/purescript/purescript-invariant.git"
8+ },
9+ "ignore": [
10+ "**/.*",
11+ "bower_components",
12+ "node_modules",
13+ "output",
14+ "test",
15+ "bower.json",
16+ "package.json"
17+ ],
18+ "dependencies": {
19+ "purescript-control": "^6.0.0",
20+ "purescript-prelude": "^6.0.0"
21+ }
22+}
.spago/p/invariant-6.0.0/package.jsonnew file+12
@@ -0,0 +1,12 @@
1+{
2+ "private": true,
3+ "scripts": {
4+ "clean": "rimraf output && rimraf .pulp-cache",
5+ "build": "pulp build -- --censor-lib --strict"
6+ },
7+ "devDependencies": {
8+ "pulp": "16.0.0-0",
9+ "purescript-psa": "^0.8.2",
10+ "rimraf": "^3.0.2"
11+ }
12+}
.spago/p/invariant-6.0.0/purs.jsonnew file+14
@@ -0,0 +1,14 @@
1+{
2+ "name": "invariant",
3+ "version": "6.0.0",
4+ "license": "BSD-3-Clause",
5+ "location": {
6+ "githubOwner": "purescript",
7+ "githubRepo": "purescript-invariant"
8+ },
9+ "ref": "v6.0.0",
10+ "dependencies": {
11+ "control": ">=6.0.0 <7.0.0",
12+ "prelude": ">=6.0.0 <7.0.0"
13+ }
14+}
.spago/p/invariant-6.0.0/src/Data/Functor/Invariant.pursnew file+57
@@ -0,0 +1,57 @@
1+module Data.Functor.Invariant where
2+
3+import Control.Semigroupoid ((<<<))
4+import Data.Functor (class Functor, map)
5+import Data.Monoid.Additive (Additive(..))
6+import Data.Monoid.Conj (Conj(..))
7+import Data.Monoid.Disj (Disj(..))
8+import Data.Monoid.Dual (Dual(..))
9+import Data.Monoid.Endo (Endo(..))
10+import Data.Monoid.Multiplicative (Multiplicative(..))
11+import Data.Monoid.Alternate (Alternate(..))
12+
13+-- | A type of functor that can be used to adapt the type of a wrapped function
14+-- | where the parameterised type occurs in both the positive and negative
15+-- | position, for example, `F (a -> a)`.
16+-- |
17+-- | An `Invariant` instance should satisfy the following laws:
18+-- |
19+-- | - Identity: `imap id id = id`
20+-- | - Composition: `imap g1 g2 <<< imap f1 f2 = imap (g1 <<< f1) (f2 <<< g2)`
21+-- |
22+class Invariant :: (Type -> Type) -> Constraint
23+class Invariant f where
24+ imap :: forall a b. (a -> b) -> (b -> a) -> f a -> f b
25+
26+instance invariantFn :: Invariant ((->) a) where
27+ imap = imapF
28+
29+instance invariantArray :: Invariant Array where
30+ imap = imapF
31+
32+instance invariantAdditive :: Invariant Additive where
33+ imap f _ (Additive x) = Additive (f x)
34+
35+instance invariantConj :: Invariant Conj where
36+ imap f _ (Conj x) = Conj (f x)
37+
38+instance invariantDisj :: Invariant Disj where
39+ imap f _ (Disj x) = Disj (f x)
40+
41+instance invariantDual :: Invariant Dual where
42+ imap f _ (Dual x) = Dual (f x)
43+
44+instance invariantEndo :: Invariant (Endo Function) where
45+ imap ab ba (Endo f) = Endo (ab <<< f <<< ba)
46+
47+instance invariantMultiplicative :: Invariant Multiplicative where
48+ imap f _ (Multiplicative x) = Multiplicative (f x)
49+
50+instance invariantAlternate :: Invariant f => Invariant (Alternate f) where
51+ imap f g (Alternate x) = Alternate (imap f g x)
52+
53+-- | As all `Functor`s are also trivially `Invariant`, this function can be
54+-- | used as the `imap` implementation for any types that has an existing
55+-- | `Functor` instance.
56+imapF :: forall f a b. Functor f => (a -> b) -> (b -> a) -> f a -> f b
57+imapF f _ = map f
.spago/p/js-date-8.0.0/LICENSEnew file+20
@@ -0,0 +1,20 @@
1+The MIT License (MIT)
2+
3+Copyright (c) 2014 PureScript
4+
5+Permission is hereby granted, free of charge, to any person obtaining a copy of
6+this software and associated documentation files (the "Software"), to deal in
7+the Software without restriction, including without limitation the rights to
8+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+the Software, and to permit persons to whom the Software is furnished to do so,
10+subject to the following conditions:
11+
12+The above copyright notice and this permission notice shall be included in all
13+copies or substantial portions of the Software.
14+
15+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
.spago/p/js-date-8.0.0/README.mdnew file+44
@@ -0,0 +1,44 @@
1+# JS Date
2+
3+[](https://github.com/purescript-contrib/purescript-js-date/actions?query=workflow%3ACI+branch%3Amain)
4+[](https://github.com/purescript-contrib/purescript-js-date/releases)
5+[](https://pursuit.purescript.org/packages/purescript-js-date)
6+[](https://github.com/garyb)
7+
8+JavaScript's native date type and corresponding functions.
9+
10+This library provides the `JSDate` type and associated functions for interop purposes with JavaScript, but for working with dates in PureScript it is recommended that `DateTime` representation is used - `DateTime` offers greater type safety, a more PureScript-friendly interface, and has a `Generic` instance. There is a `toDateTime` provided for this conversion.
11+
12+## Installation
13+
14+Install `js-date` with [Spago](https://github.com/purescript/spago):
15+
16+```sh
17+spago install js-date
18+```
19+
20+## Quick start
21+
22+The quick start hasn't been written yet (contributions are welcome!). The quick start covers a common, minimal use case for the library, whereas longer examples and tutorials are kept in the [docs directory](./docs).
23+
24+## Documentation
25+
26+`js-date` documentation is stored in a few places:
27+
28+1. Module documentation is [published on Pursuit](https://pursuit.purescript.org/packages/purescript-js-date).
29+2. Usage examples can be found in [the test suite](./test).
30+
31+If you get stuck, there are several ways to get help:
32+
33+- [Open an issue](https://github.com/purescript-contrib/purescript-js-date/issues) if you have encountered a bug or problem.
34+- Ask general questions on the [PureScript Discourse](https://discourse.purescript.org) forum or the [PureScript Discord](https://purescript.org/chat) chat.
35+
36+## Contributing
37+
38+You can contribute to `js-date` in several ways:
39+
40+1. If you encounter a problem or have a question, please [open an issue](https://github.com/purescript-contrib/purescript-js-date/issues). We'll do our best to work with you to resolve or answer it.
41+
42+2. If you would like to contribute code, tests, or documentation, please [read the contributor guide](./CONTRIBUTING.md). It's a short, helpful introduction to contributing to this library, including development instructions.
43+
44+3. If you have written a library, tutorial, guide, or other resource based on this package, please share it on the [PureScript Discourse](https://discourse.purescript.org)! Writing libraries and learning resources are a great way to help this library succeed.
.spago/p/js-date-8.0.0/bower.jsonnew file+29
@@ -0,0 +1,29 @@
1+{
2+ "name": "purescript-js-date",
3+ "homepage": "https://github.com/purescript-contrib/purescript-js-date",
4+ "description": "PureScript library for native JavaScript `Date` values",
5+ "license": "MIT",
6+ "repository": {
7+ "type": "git",
8+ "url": "https://github.com/purescript-contrib/purescript-js-date.git"
9+ },
10+ "ignore": [
11+ "**/.*",
12+ "bower_components",
13+ "node_modules",
14+ "output",
15+ "bower.json",
16+ "package.json"
17+ ],
18+ "dependencies": {
19+ "purescript-datetime": "^6.0.0",
20+ "purescript-effect": "^4.0.0",
21+ "purescript-foreign": "^7.0.0",
22+ "purescript-integers": "^6.0.0"
23+ },
24+ "devDependencies": {
25+ "purescript-assert": "^6.0.0",
26+ "purescript-console": "^6.0.0",
27+ "purescript-numbers": "^9.0.0"
28+ }
29+}
.spago/p/js-date-8.0.0/package.jsonnew file+10
@@ -0,0 +1,10 @@
1+{
2+ "private": true,
3+ "scripts": {
4+ "build": "eslint src && spago build --purs-args '--censor-lib --strict'",
5+ "test": "spago test --no-install"
6+ },
7+ "devDependencies": {
8+ "eslint": "^7.6.0"
9+ }
10+}
.spago/p/js-date-8.0.0/packages.dhallnew file+4
@@ -0,0 +1,4 @@
1+let upstream =
2+ https://raw.githubusercontent.com/purescript/package-sets/prepare-0.15/src/packages.dhall
3+
4+in upstream
.spago/p/js-date-8.0.0/purs.jsonnew file+21
@@ -0,0 +1,21 @@
1+{
2+ "name": "js-date",
3+ "version": "8.0.0",
4+ "license": "MIT",
5+ "description": "PureScript library for native JavaScript `Date` values",
6+ "location": {
7+ "githubOwner": "purescript-contrib",
8+ "githubRepo": "purescript-js-date"
9+ },
10+ "ref": "v8.0.0",
11+ "dependencies": {
12+ "datetime": ">=6.0.0 <7.0.0",
13+ "effect": ">=4.0.0 <5.0.0",
14+ "enums": ">=6.0.0 <7.0.0",
15+ "foreign": ">=7.0.0 <8.0.0",
16+ "functions": ">=6.0.0 <7.0.0",
17+ "integers": ">=6.0.0 <7.0.0",
18+ "maybe": ">=6.0.0 <7.0.0",
19+ "prelude": ">=6.0.0 <7.0.0"
20+ }
21+}
.spago/p/js-date-8.0.0/spago.dhallnew file+20
@@ -0,0 +1,20 @@
1+{ name = "js-date"
2+, dependencies =
3+ [ "assert"
4+ , "console"
5+ , "datetime"
6+ , "effect"
7+ , "either"
8+ , "enums"
9+ , "foreign"
10+ , "functions"
11+ , "integers"
12+ , "maybe"
13+ , "numbers"
14+ , "partial"
15+ , "prelude"
16+ , "transformers"
17+ ]
18+, packages = ./packages.dhall
19+, sources = [ "src/**/*.purs", "test/**/*.purs" ]
20+}
.spago/p/js-date-8.0.0/src/Data/JSDate.jsnew file+83
@@ -0,0 +1,83 @@
1+// global exports
2+var createDate = function(y, m, d, h, mi, s, ms) {
3+ var date = new Date(Date.UTC(y, m, d, h, mi, s, ms));
4+ if (y >= 0 && y < 100) {
5+ date.setUTCFullYear(y);
6+ }
7+ return date;
8+};
9+
10+var createLocalDate = function(y, m, d, h, mi, s, ms) {
11+ var date = new Date(y, m, d, h, mi, s, ms);
12+ if (y >= 0 && y < 100) {
13+ date.setFullYear(y);
14+ }
15+ return date;
16+};
17+
18+export function now() {
19+ return new Date();
20+}
21+
22+export function isValid(date) {
23+ return !isNaN(date.getTime());
24+}
25+
26+export function toInstantImpl(just) {
27+ return function(nothing) {
28+ return function(date) {
29+ var t = date.getTime();
30+ return isNaN(t) ? nothing : just(t);
31+ };
32+ };
33+}
34+
35+export function fromInstant(instant) {
36+ return new Date(instant);
37+}
38+
39+export function jsdate(parts) {
40+ return createDate(
41+ parts.year,
42+ parts.month,
43+ parts.day,
44+ parts.hour,
45+ parts.minute,
46+ parts.second,
47+ parts.millisecond
48+ );
49+}
50+
51+export function jsdateLocal(parts) {
52+ return function() {
53+ return createLocalDate(
54+ parts.year,
55+ parts.month,
56+ parts.day,
57+ parts.hour,
58+ parts.minute,
59+ parts.second,
60+ parts.millisecond
61+ );
62+ };
63+}
64+
65+export function dateMethod(method, date) {
66+ return date[method]();
67+}
68+
69+export function dateMethodEff(method, date) {
70+ return function() {
71+ return date[method]();
72+ };
73+}
74+
75+export function parse(dateString) {
76+ return function() {
77+ return new Date(dateString);
78+ };
79+}
80+
81+export function fromTime(time) {
82+ return new Date(time);
83+}
.spago/p/js-date-8.0.0/src/Data/JSDate.pursnew file+272
@@ -0,0 +1,272 @@
1+-- | A module providing a type and operations for the native JavaScript `Date`
2+-- | object.
3+-- |
4+-- | The `JSDate` type and associated functions are provided for interop
5+-- | purposes with JavaScript, but for working with dates in PureScript it is
6+-- | recommended that `DateTime` representation is used instead - `DateTime`
7+-- | offers greater type safety, a more PureScript-friendly interface, and has
8+-- | a `Generic` instance.
9+module Data.JSDate
10+ ( JSDate
11+ , readDate
12+ , isValid
13+ , fromDateTime
14+ , toDateTime
15+ , toDate
16+ , fromInstant
17+ , toInstant
18+ , jsdate
19+ , jsdateLocal
20+ , now
21+ , parse
22+ , getTime
23+ , getUTCDate
24+ , getUTCDay
25+ , getUTCFullYear
26+ , getUTCHours
27+ , getUTCMilliseconds
28+ , getUTCMinutes
29+ , getUTCMonth
30+ , getUTCSeconds
31+ , getDate
32+ , getDay
33+ , getFullYear
34+ , getHours
35+ , getMilliseconds
36+ , getMinutes
37+ , getMonth
38+ , getSeconds
39+ , getTimezoneOffset
40+ , toDateString
41+ , toISOString
42+ , toString
43+ , toTimeString
44+ , toUTCString
45+ , fromTime
46+ ) where
47+
48+import Prelude
49+
50+import Data.Date as Date
51+import Data.DateTime (DateTime(..), Date)
52+import Data.DateTime as DateTime
53+import Data.DateTime.Instant (Instant)
54+import Data.DateTime.Instant as Instant
55+import Data.Enum (fromEnum)
56+import Data.Function.Uncurried (Fn2, runFn2)
57+import Data.Int (toNumber)
58+import Data.Maybe (Maybe(..))
59+import Data.Time as Time
60+import Data.Time.Duration (Milliseconds(..))
61+import Effect (Effect)
62+import Foreign (F, Foreign, unsafeReadTagged)
63+
64+-- | The type of JavaScript `Date` objects.
65+foreign import data JSDate :: Type
66+
67+instance eqJSDate :: Eq JSDate where
68+ eq a b = getTime a == getTime b
69+
70+instance ordJSDate :: Ord JSDate where
71+ compare a b = getTime a `compare` getTime b
72+
73+instance showJSDate :: Show JSDate where
74+ show a = "(fromTime " <> show (getTime a) <> ")"
75+
76+-- | Attempts to read a `Foreign` value as a `JSDate`.
77+readDate :: Foreign -> F JSDate
78+readDate = unsafeReadTagged "Date"
79+
80+-- | Checks whether a date value is valid. When a date is invalid, the majority
81+-- | of the functions return `NaN`, `"Invalid Date"`, or throw an exception.
82+foreign import isValid :: JSDate -> Boolean
83+
84+-- | Converts a `DateTime` value into a native JavaScript date object. The
85+-- | resulting date value is guaranteed to be valid.
86+fromDateTime :: DateTime -> JSDate
87+fromDateTime (DateTime d t) = jsdate
88+ { year: toNumber (fromEnum (Date.year d))
89+ , month: toNumber (fromEnum (Date.month d) - 1)
90+ , day: toNumber (fromEnum (Date.day d))
91+ , hour: toNumber (fromEnum (Time.hour t))
92+ , minute: toNumber (fromEnum (Time.minute t))
93+ , second: toNumber (fromEnum (Time.second t))
94+ , millisecond: toNumber (fromEnum (Time.millisecond t))
95+ }
96+
97+-- | Attempts to construct a `DateTime` value for a `JSDate`. `Nothing` is
98+-- | returned only when the date value is an invalid date.
99+toDateTime :: JSDate -> Maybe DateTime
100+toDateTime = map Instant.toDateTime <$> toInstant
101+
102+-- | Attempts to construct a `Date` value for a `JSDate`, ignoring any time
103+-- | component of the `JSDate`. `Nothing` is returned only when the date value
104+-- | is an invalid date.
105+toDate :: JSDate -> Maybe Date
106+toDate = map DateTime.date <$> toDateTime
107+
108+-- | Creates a `JSDate` from an `Instant` value.
109+foreign import fromInstant :: Instant -> JSDate
110+
111+-- | Attempts to construct an `Instant` for a `JSDate`. `Nothing` is returned
112+-- | only when the date value is an invalid date.
113+toInstant :: JSDate -> Maybe Instant
114+toInstant = Instant.instant <<< Milliseconds <=< toInstantImpl Just Nothing
115+
116+foreign import toInstantImpl
117+ :: (forall a. a -> Maybe a)
118+ -> (forall a. Maybe a)
119+ -> JSDate
120+ -> Maybe Number
121+
122+-- | Constructs a new `JSDate` from UTC component values. If any of the values
123+-- | are `NaN` the resulting date will be invalid.
124+foreign import jsdate
125+ :: { year :: Number
126+ , month :: Number
127+ , day :: Number
128+ , hour :: Number
129+ , minute :: Number
130+ , second :: Number
131+ , millisecond :: Number
132+ }
133+ -> JSDate
134+
135+-- | Constructs a new `JSDate` from component values using the current machine's
136+-- | locale. If any of the values are `NaN` the resulting date will be invalid.
137+foreign import jsdateLocal
138+ :: { year :: Number
139+ , month :: Number
140+ , day :: Number
141+ , hour :: Number
142+ , minute :: Number
143+ , second :: Number
144+ , millisecond :: Number
145+ }
146+ -> Effect JSDate
147+
148+foreign import dateMethodEff :: forall a. Fn2 String JSDate (Effect a)
149+foreign import dateMethod :: forall a. Fn2 String JSDate a
150+
151+-- | Attempts to parse a date from a string. The behavior of this function is
152+-- | implementation specific until ES5, so may not always have the same
153+-- | behavior for a given string. For this reason, it is **strongly** encouraged
154+-- | that you avoid this function if at all possible.
155+-- |
156+-- | If you must use it, the RFC2822 and ISO8601 date string formats should
157+-- | parse consistently.
158+-- |
159+-- | This function is effectful because if no time zone is specified in the
160+-- | string the current locale's time zone will be used instead.
161+foreign import parse :: String -> Effect JSDate
162+
163+-- | Gets a `JSDate` value for the date and time according to the current
164+-- | machine's clock.
165+-- |
166+-- | Unless a `JSDate` is required specifically, consider using the functions in
167+-- | `Effect.Now` instead.
168+foreign import now :: Effect JSDate
169+
170+-- | Returns the date as a number of milliseconds since 1970-01-01 00:00:00 UTC.
171+getTime :: JSDate -> Number
172+getTime dt = runFn2 dateMethod "getTime" dt
173+
174+-- | Returns the day of the month for a date, according to UTC.
175+getUTCDate :: JSDate -> Number
176+getUTCDate dt = runFn2 dateMethod "getUTCDate" dt
177+
178+-- | Returns the day of the week for a date, according to UTC.
179+getUTCDay :: JSDate -> Number
180+getUTCDay dt = runFn2 dateMethod "getUTCDay" dt
181+
182+-- | Returns the year for a date, according to UTC.
183+getUTCFullYear :: JSDate -> Number
184+getUTCFullYear dt = runFn2 dateMethod "getUTCFullYear" dt
185+
186+-- | Returns the hours for a date, according to UTC.
187+getUTCHours :: JSDate -> Number
188+getUTCHours dt = runFn2 dateMethod "getUTCHours" dt
189+
190+-- | Returns the milliseconds for a date, according to UTC.
191+getUTCMilliseconds :: JSDate -> Number
192+getUTCMilliseconds dt = runFn2 dateMethod "getUTCMilliseconds" dt
193+
194+-- | Returns the minutes for a date, according to UTC.
195+getUTCMinutes :: JSDate -> Number
196+getUTCMinutes dt = runFn2 dateMethod "getUTCMinutes" dt
197+
198+-- | Returns the month for a date, according to UTC.
199+getUTCMonth :: JSDate -> Number
200+getUTCMonth dt = runFn2 dateMethod "getUTCMonth" dt
201+
202+-- | Returns the seconds for a date, according to UTC.
203+getUTCSeconds :: JSDate -> Number
204+getUTCSeconds dt = runFn2 dateMethod "getUTCSeconds" dt
205+
206+-- | Returns the day of the month for a date, according to the current
207+-- | machine's date/time locale.
208+getDate :: JSDate -> Effect Number
209+getDate dt = runFn2 dateMethodEff "getDate" dt
210+
211+-- | Returns the day of the week for a date, according to the current
212+-- | machine's date/time locale.
213+getDay :: JSDate -> Effect Number
214+getDay dt = runFn2 dateMethodEff "getDay" dt
215+
216+-- | Returns the year for a date, according to the current machine's date/time
217+-- | locale.
218+getFullYear :: JSDate -> Effect Number
219+getFullYear dt = runFn2 dateMethodEff "getFullYear" dt
220+
221+-- | Returns the hour for a date, according to the current machine's date/time
222+-- | locale.
223+getHours :: JSDate -> Effect Number
224+getHours dt = runFn2 dateMethodEff "getHours" dt
225+
226+-- | Returns the milliseconds for a date, according to the current machine's
227+-- | date/time locale.
228+getMilliseconds :: JSDate -> Effect Number
229+getMilliseconds dt = runFn2 dateMethodEff "getMilliseconds" dt
230+
231+-- | Returns the minutes for a date, according to the current machine's
232+-- | date/time locale.
233+getMinutes :: JSDate -> Effect Number
234+getMinutes dt = runFn2 dateMethodEff "getMinutes" dt
235+
236+-- | Returns the month for a date, according to the current machine's
237+-- | date/time locale.
238+getMonth :: JSDate -> Effect Number
239+getMonth dt = runFn2 dateMethodEff "getMonth" dt
240+
241+-- | Returns the seconds for a date, according to the current machine's
242+-- | date/time locale.
243+getSeconds :: JSDate -> Effect Number
244+getSeconds dt = runFn2 dateMethodEff "getSeconds" dt
245+
246+-- | Returns the time-zone offset for a date, according to the current machine's
247+-- | date/time locale.
248+getTimezoneOffset :: JSDate -> Effect Number
249+getTimezoneOffset dt = runFn2 dateMethodEff "getTimezoneOffset" dt
250+
251+-- | Returns the date portion of a date value as a human-readable string.
252+toDateString :: JSDate -> String
253+toDateString dt = runFn2 dateMethod "toDateString" dt
254+
255+-- | Converts a date value to an ISO 8601 Extended format date string.
256+toISOString :: JSDate -> Effect String
257+toISOString dt = runFn2 dateMethodEff "toISOString" dt
258+
259+-- | Returns a string representing for a date value.
260+toString :: JSDate -> String
261+toString dt = runFn2 dateMethod "toString" dt
262+
263+-- | Returns the time portion of a date value as a human-readable string.
264+toTimeString :: JSDate -> String
265+toTimeString dt = runFn2 dateMethod "toTimeString" dt
266+
267+-- | Returns the date as a string using the UTC timezone.
268+toUTCString :: JSDate -> String
269+toUTCString dt = runFn2 dateMethod "toUTCString" dt
270+
271+-- | Returns the date at a number of milliseconds since 1970-01-01 00:00:00 UTC.
272+foreign import fromTime :: Number -> JSDate
.spago/p/lazy-6.0.0/LICENSEnew file+26
@@ -0,0 +1,26 @@
1+Copyright 2018 PureScript
2+
3+Redistribution and use in source and binary forms, with or without modification,
4+are permitted provided that the following conditions are met:
5+
6+1. Redistributions of source code must retain the above copyright notice, this
7+list of conditions and the following disclaimer.
8+
9+2. Redistributions in binary form must reproduce the above copyright notice,
10+this list of conditions and the following disclaimer in the documentation and/or
11+other materials provided with the distribution.
12+
13+3. Neither the name of the copyright holder nor the names of its contributors
14+may be used to endorse or promote products derived from this software without
15+specific prior written permission.
16+
17+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
21+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.spago/p/lazy-6.0.0/README.mdnew file+17
@@ -0,0 +1,17 @@
1+# purescript-lazy
2+
3+[](https://github.com/purescript/purescript-lazy/releases)
4+[](https://github.com/purescript/purescript-lazy/actions?query=workflow%3ACI+branch%3Amaster)
5+[](https://pursuit.purescript.org/packages/purescript-lazy)
6+
7+Call-by-need values.
8+
9+## Installation
10+
11+```
12+spago install lazy
13+```
14+
15+## Documentation
16+
17+Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-lazy).
.spago/p/lazy-6.0.0/bower.jsonnew file+28
@@ -0,0 +1,28 @@
1+{
2+ "name": "purescript-lazy",
3+ "homepage": "https://github.com/purescript/purescript-lazy",
4+ "authors": [
5+ "Phil Freeman <paf31@cantab.net>",
6+ "Gary Burgess <gary.burgess@gmail.com>",
7+ "John A. De Goes <john@degoes.net>"
8+ ],
9+ "license": "BSD-3-Clause",
10+ "repository": {
11+ "type": "git",
12+ "url": "https://github.com/purescript/purescript-lazy.git"
13+ },
14+ "ignore": [
15+ "**/.*",
16+ "bower_components",
17+ "node_modules",
18+ "output",
19+ "bower.json",
20+ "package.json"
21+ ],
22+ "dependencies": {
23+ "purescript-control": "^6.0.0",
24+ "purescript-foldable-traversable": "^6.0.0",
25+ "purescript-invariant": "^6.0.0",
26+ "purescript-prelude": "^6.0.0"
27+ }
28+}
.spago/p/lazy-6.0.0/package.jsonnew file+13
@@ -0,0 +1,13 @@
1+{
2+ "private": true,
3+ "scripts": {
4+ "clean": "rimraf output && rimraf .pulp-cache",
5+ "build": "eslint src && pulp build -- --censor-lib --strict"
6+ },
7+ "devDependencies": {
8+ "eslint": "^7.15.0",
9+ "pulp": "16.0.0-0",
10+ "purescript-psa": "^0.8.2",
11+ "rimraf": "^3.0.2"
12+ }
13+}
.spago/p/lazy-6.0.0/purs.jsonnew file+16
@@ -0,0 +1,16 @@
1+{
2+ "name": "lazy",
3+ "version": "6.0.0",
4+ "license": "BSD-3-Clause",
5+ "location": {
6+ "githubOwner": "purescript",
7+ "githubRepo": "purescript-lazy"
8+ },
9+ "ref": "v6.0.0",
10+ "dependencies": {
11+ "control": ">=6.0.0 <7.0.0",
12+ "foldable-traversable": ">=6.0.0 <7.0.0",
13+ "invariant": ">=6.0.0 <7.0.0",
14+ "prelude": ">=6.0.0 <7.0.0"
15+ }
16+}
.spago/p/lazy-6.0.0/src/Data/Lazy.jsnew file+14
@@ -0,0 +1,14 @@
1+export const defer = function (thunk) {
2+ var v = null;
3+ return function() {
4+ if (thunk === undefined) return v;
5+
6+ v = thunk();
7+ thunk = undefined; // eslint-disable-line no-param-reassign
8+ return v;
9+ };
10+};
11+
12+export const force = function (l) {
13+ return l();
14+};
.spago/p/lazy-6.0.0/src/Data/Lazy.pursnew file+142
@@ -0,0 +1,142 @@
1+module Data.Lazy where
2+
3+import Prelude
4+
5+import Control.Comonad (class Comonad)
6+import Control.Extend (class Extend)
7+import Control.Lazy as CL
8+import Data.Eq (class Eq1)
9+import Data.Foldable (class Foldable, foldMap, foldl, foldr)
10+import Data.FoldableWithIndex (class FoldableWithIndex)
11+import Data.Functor.Invariant (class Invariant, imapF)
12+import Data.FunctorWithIndex (class FunctorWithIndex)
13+import Data.HeytingAlgebra (implies, ff, tt)
14+import Data.Ord (class Ord1)
15+import Data.Semigroup.Foldable (class Foldable1)
16+import Data.Semigroup.Traversable (class Traversable1)
17+import Data.Traversable (class Traversable, traverse)
18+import Data.TraversableWithIndex (class TraversableWithIndex)
19+
20+-- | `Lazy a` represents lazily-computed values of type `a`.
21+-- |
22+-- | A lazy value is computed at most once - the result is saved
23+-- | after the first computation, and subsequent attempts to read
24+-- | the value simply return the saved value.
25+-- |
26+-- | `Lazy` values can be created with `defer`, or by using the provided
27+-- | type class instances.
28+-- |
29+-- | `Lazy` values can be evaluated by using the `force` function.
30+foreign import data Lazy :: Type -> Type
31+
32+type role Lazy representational
33+
34+-- | Defer a computation, creating a `Lazy` value.
35+foreign import defer :: forall a. (Unit -> a) -> Lazy a
36+
37+-- | Force evaluation of a `Lazy` value.
38+foreign import force :: forall a. Lazy a -> a
39+
40+instance semiringLazy :: Semiring a => Semiring (Lazy a) where
41+ add a b = defer \_ -> force a + force b
42+ zero = defer \_ -> zero
43+ mul a b = defer \_ -> force a * force b
44+ one = defer \_ -> one
45+
46+instance ringLazy :: Ring a => Ring (Lazy a) where
47+ sub a b = defer \_ -> force a - force b
48+
49+instance commutativeRingLazy :: CommutativeRing a => CommutativeRing (Lazy a)
50+
51+instance euclideanRingLazy :: EuclideanRing a => EuclideanRing (Lazy a) where
52+ degree = degree <<< force
53+ div a b = defer \_ -> force a / force b
54+ mod a b = defer \_ -> force a `mod` force b
55+
56+instance eqLazy :: Eq a => Eq (Lazy a) where
57+ eq x y = (force x) == (force y)
58+
59+derive instance eq1Lazy :: Eq1 Lazy
60+
61+instance ordLazy :: Ord a => Ord (Lazy a) where
62+ compare x y = compare (force x) (force y)
63+
64+derive instance ord1Lazy :: Ord1 Lazy
65+
66+instance boundedLazy :: Bounded a => Bounded (Lazy a) where
67+ top = defer \_ -> top
68+ bottom = defer \_ -> bottom
69+
70+instance semigroupLazy :: Semigroup a => Semigroup (Lazy a) where
71+ append a b = defer \_ -> force a <> force b
72+
73+instance monoidLazy :: Monoid a => Monoid (Lazy a) where
74+ mempty = defer \_ -> mempty
75+
76+instance heytingAlgebraLazy :: HeytingAlgebra a => HeytingAlgebra (Lazy a) where
77+ ff = defer \_ -> ff
78+ tt = defer \_ -> tt
79+ implies a b = implies <$> a <*> b
80+ conj a b = conj <$> a <*> b
81+ disj a b = disj <$> a <*> b
82+ not a = not <$> a
83+
84+instance booleanAlgebraLazy :: BooleanAlgebra a => BooleanAlgebra (Lazy a)
85+
86+instance functorLazy :: Functor Lazy where
87+ map f l = defer \_ -> f (force l)
88+
89+instance functorWithIndexLazy :: FunctorWithIndex Unit Lazy where
90+ mapWithIndex f = map $ f unit
91+
92+instance foldableLazy :: Foldable Lazy where
93+ foldr f z l = f (force l) z
94+ foldl f z l = f z (force l)
95+ foldMap f l = f (force l)
96+
97+instance foldableWithIndexLazy :: FoldableWithIndex Unit Lazy where
98+ foldrWithIndex f = foldr $ f unit
99+ foldlWithIndex f = foldl $ f unit
100+ foldMapWithIndex f = foldMap $ f unit
101+
102+instance foldable1Lazy :: Foldable1 Lazy where
103+ foldMap1 f l = f (force l)
104+ foldr1 _ l = force l
105+ foldl1 _ l = force l
106+
107+instance traversableLazy :: Traversable Lazy where
108+ traverse f l = defer <<< const <$> f (force l)
109+ sequence l = defer <<< const <$> force l
110+
111+instance traversableWithIndexLazy :: TraversableWithIndex Unit Lazy where
112+ traverseWithIndex f = traverse $ f unit
113+
114+instance traversable1Lazy :: Traversable1 Lazy where
115+ traverse1 f l = defer <<< const <$> f (force l)
116+ sequence1 l = defer <<< const <$> force l
117+
118+instance invariantLazy :: Invariant Lazy where
119+ imap = imapF
120+
121+instance applyLazy :: Apply Lazy where
122+ apply f x = defer \_ -> force f (force x)
123+
124+instance applicativeLazy :: Applicative Lazy where
125+ pure a = defer \_ -> a
126+
127+instance bindLazy :: Bind Lazy where
128+ bind l f = defer \_ -> force $ f (force l)
129+
130+instance monadLazy :: Monad Lazy
131+
132+instance extendLazy :: Extend Lazy where
133+ extend f x = defer \_ -> f x
134+
135+instance comonadLazy :: Comonad Lazy where
136+ extract = force
137+
138+instance showLazy :: Show a => Show (Lazy a) where
139+ show x = "(defer \\_ -> " <> show (force x) <> ")"
140+
141+instance lazyLazy :: CL.Lazy (Lazy a) where
142+ defer f = defer \_ -> force (f unit)
.spago/p/lists-7.0.0/LICENSEnew file+26
@@ -0,0 +1,26 @@
1+Copyright 2018 PureScript
2+
3+Redistribution and use in source and binary forms, with or without modification,
4+are permitted provided that the following conditions are met:
5+
6+1. Redistributions of source code must retain the above copyright notice, this
7+list of conditions and the following disclaimer.
8+
9+2. Redistributions in binary form must reproduce the above copyright notice,
10+this list of conditions and the following disclaimer in the documentation and/or
11+other materials provided with the distribution.
12+
13+3. Neither the name of the copyright holder nor the names of its contributors
14+may be used to endorse or promote products derived from this software without
15+specific prior written permission.
16+
17+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
21+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.spago/p/lists-7.0.0/LICENSE-GHC.mdnew file+32
@@ -0,0 +1,32 @@
1+The Glasgow Haskell Compiler License
2+
3+Copyright 2002, The University Court of the University of Glasgow.
4+All rights reserved.
5+
6+Redistribution and use in source and binary forms, with or without
7+modification, are permitted provided that the following conditions are met:
8+
9+- Redistributions of source code must retain the above copyright notice,
10+this list of conditions and the following disclaimer.
11+
12+- Redistributions in binary form must reproduce the above copyright notice,
13+this list of conditions and the following disclaimer in the documentation
14+and/or other materials provided with the distribution.
15+
16+- Neither name of the University nor the names of its contributors may be
17+used to endorse or promote products derived from this software without
18+specific prior written permission.
19+
20+THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
21+GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
22+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
23+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
24+UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
25+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
31+DAMAGE.
32+
.spago/p/lists-7.0.0/README.mdnew file+25
@@ -0,0 +1,25 @@
1+# purescript-lists
2+
3+[](https://github.com/purescript/purescript-lists/releases)
4+[](https://github.com/purescript/purescript-lists/actions?query=workflow%3ACI+branch%3Amaster)
5+[](https://pursuit.purescript.org/packages/purescript-lists)
6+
7+This library defines strict and lazy linked lists, and associated helper functions and type class instances.
8+
9+_Note_: This module is an improvement over `Data.Array` when working with immutable lists of data in a purely-functional setting, but does not have good random-access performance.
10+
11+## Installation
12+
13+```
14+spago install lists
15+```
16+
17+## Licensing
18+
19+Some of this code is derived from GHC's standard libraries (`base`);
20+according to its terms, we have included GHC's license in the file
21+`LICENSE-GHC.md`.
22+
23+## Documentation
24+
25+Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-lists).
.spago/p/lists-7.0.0/bower.jsonnew file+41
@@ -0,0 +1,41 @@
1+{
2+ "name": "purescript-lists",
3+ "homepage": "https://github.com/purescript/purescript-lists",
4+ "authors": [
5+ "Phil Freeman <paf31@cantab.net>"
6+ ],
7+ "license": "BSD-3-Clause",
8+ "repository": {
9+ "type": "git",
10+ "url": "https://github.com/purescript/purescript-lists.git"
11+ },
12+ "ignore": [
13+ "**/.*",
14+ "bower_components",
15+ "node_modules",
16+ "output",
17+ "test",
18+ "bower.json",
19+ "package.json"
20+ ],
21+ "dependencies": {
22+ "purescript-bifunctors": "^6.0.0",
23+ "purescript-control": "^6.0.0",
24+ "purescript-foldable-traversable": "^6.0.0",
25+ "purescript-lazy": "^6.0.0",
26+ "purescript-maybe": "^6.0.0",
27+ "purescript-newtype": "^5.0.0",
28+ "purescript-nonempty": "^7.0.0",
29+ "purescript-partial": "^4.0.0",
30+ "purescript-prelude": "^6.0.0",
31+ "purescript-tailrec": "^6.0.0",
32+ "purescript-tuples": "^7.0.0",
33+ "purescript-unfoldable": "^6.0.0"
34+ },
35+ "devDependencies": {
36+ "purescript-arrays": "^7.0.0",
37+ "purescript-assert": "^6.0.0",
38+ "purescript-console": "^6.0.0",
39+ "purescript-minibench": "^4.0.0"
40+ }
41+}
.spago/p/lists-7.0.0/package.jsonnew file+16
@@ -0,0 +1,16 @@
1+{
2+ "private": true,
3+ "scripts": {
4+ "clean": "rimraf output && rimraf .pulp-cache",
5+ "build": "pulp build -- --censor-lib --strict",
6+ "test": "pulp test",
7+ "bench:build": "purs compile 'bench/**/*.purs' 'src/**/*.purs' 'bower_components/*/src/**/*.purs'",
8+ "bench:run": "node --expose-gc -e 'require(\"./output/Bench.Main/index.js\").main()'",
9+ "bench": "npm run bench:build && npm run bench:run"
10+ },
11+ "devDependencies": {
12+ "pulp": "16.0.0-0",
13+ "purescript-psa": "^0.8.2",
14+ "rimraf": "^3.0.2"
15+ }
16+}
.spago/p/lists-7.0.0/purs.jsonnew file+24
@@ -0,0 +1,24 @@
1+{
2+ "name": "lists",
3+ "version": "7.0.0",
4+ "license": "BSD-3-Clause",
5+ "location": {
6+ "githubOwner": "purescript",
7+ "githubRepo": "purescript-lists"
8+ },
9+ "ref": "v7.0.0",
10+ "dependencies": {
11+ "bifunctors": ">=6.0.0 <7.0.0",
12+ "control": ">=6.0.0 <7.0.0",
13+ "foldable-traversable": ">=6.0.0 <7.0.0",
14+ "lazy": ">=6.0.0 <7.0.0",
15+ "maybe": ">=6.0.0 <7.0.0",
16+ "newtype": ">=5.0.0 <6.0.0",
17+ "nonempty": ">=7.0.0 <8.0.0",
18+ "partial": ">=4.0.0 <5.0.0",
19+ "prelude": ">=6.0.0 <7.0.0",
20+ "tailrec": ">=6.0.0 <7.0.0",
21+ "tuples": ">=7.0.0 <8.0.0",
22+ "unfoldable": ">=6.0.0 <7.0.0"
23+ }
24+}
.spago/p/lists-7.0.0/src/Data/List.pursnew file+826
This diff is too big to show here.
.spago/p/lists-7.0.0/src/Data/List/Internal.pursnew file+63
This diff is too big to show here.
.spago/p/lists-7.0.0/src/Data/List/Lazy.pursnew file+780
This diff is too big to show here.
.spago/p/lists-7.0.0/src/Data/List/Lazy/NonEmpty.pursnew file+88
This diff is too big to show here.
.spago/p/lists-7.0.0/src/Data/List/Lazy/Types.pursnew file+295
This diff is too big to show here.
.spago/p/lists-7.0.0/src/Data/List/NonEmpty.pursnew file+307
This diff is too big to show here.
.spago/p/lists-7.0.0/src/Data/List/Partial.pursnew file+30
This diff is too big to show here.
.spago/p/lists-7.0.0/src/Data/List/Types.pursnew file+264
This diff is too big to show here.
.spago/p/lists-7.0.0/src/Data/List/ZipList.pursnew file+66
This diff is too big to show here.
.spago/p/literals-1.0.2/LICENSEnew file+21
This diff is too big to show here.
.spago/p/literals-1.0.2/README.mdnew file+12
This diff is too big to show here.
.spago/p/literals-1.0.2/bower.jsonnew file+27
This diff is too big to show here.
.spago/p/literals-1.0.2/packages.dhallnew file+127
This diff is too big to show here.
.spago/p/literals-1.0.2/purs.jsonnew file+19
This diff is too big to show here.
.spago/p/literals-1.0.2/spago.dhallnew file+17
This diff is too big to show here.
.spago/p/literals-1.0.2/src/Literals.pursnew file+13
This diff is too big to show here.
.spago/p/literals-1.0.2/src/Literals/Boolean.pursnew file+17
This diff is too big to show here.
.spago/p/literals-1.0.2/src/Literals/Int.pursnew file+54
This diff is too big to show here.
.spago/p/literals-1.0.2/src/Literals/Literal.pursnew file+15
This diff is too big to show here.
.spago/p/literals-1.0.2/src/Literals/Null.jsnew file+1
This diff is too big to show here.
.spago/p/literals-1.0.2/src/Literals/Null.pursnew file+17
This diff is too big to show here.
.spago/p/literals-1.0.2/src/Literals/Number.pursnew file+45
This diff is too big to show here.
.spago/p/literals-1.0.2/src/Literals/String.pursnew file+14
This diff is too big to show here.
.spago/p/literals-1.0.2/src/Literals/Undefined.jsnew file+1
This diff is too big to show here.
.spago/p/literals-1.0.2/src/Literals/Undefined.pursnew file+19
This diff is too big to show here.
.spago/p/maybe-6.0.0/LICENSEnew file+26
This diff is too big to show here.
.spago/p/maybe-6.0.0/README.mdnew file+17
This diff is too big to show here.
.spago/p/maybe-6.0.0/bower.jsonnew file+24
This diff is too big to show here.
.spago/p/maybe-6.0.0/package.jsonnew file+12
This diff is too big to show here.
.spago/p/maybe-6.0.0/purs.jsonnew file+16
This diff is too big to show here.
.spago/p/maybe-6.0.0/src/Data/Maybe.pursnew file+312
This diff is too big to show here.
.spago/p/maybe-6.0.0/src/Data/Maybe/First.pursnew file+68
This diff is too big to show here.
.spago/p/maybe-6.0.0/src/Data/Maybe/Last.pursnew file+67
This diff is too big to show here.
.spago/p/media-types-6.0.0/LICENSEnew file+20
This diff is too big to show here.
.spago/p/media-types-6.0.0/README.mdnew file+43
This diff is too big to show here.
.spago/p/media-types-6.0.0/bower.jsonnew file+23
This diff is too big to show here.
.spago/p/media-types-6.0.0/packages.dhallnew file+4
This diff is too big to show here.
.spago/p/media-types-6.0.0/purs.jsonnew file+15
This diff is too big to show here.
.spago/p/media-types-6.0.0/spago.dhallnew file+5
This diff is too big to show here.
.spago/p/media-types-6.0.0/src/Data/MediaType.pursnew file+18
This diff is too big to show here.
.spago/p/media-types-6.0.0/src/Data/MediaType/Common.pursnew file+59
This diff is too big to show here.
.spago/p/newtype-5.0.0/LICENSEnew file+26
This diff is too big to show here.
.spago/p/newtype-5.0.0/README.mdnew file+19
This diff is too big to show here.
.spago/p/newtype-5.0.0/bower.jsonnew file+23
This diff is too big to show here.
.spago/p/newtype-5.0.0/package.jsonnew file+12
This diff is too big to show here.
.spago/p/newtype-5.0.0/purs.jsonnew file+15
This diff is too big to show here.
.spago/p/newtype-5.0.0/src/Data/Newtype.pursnew file+308
This diff is too big to show here.
.spago/p/nonempty-7.0.0/LICENSEnew file+26
This diff is too big to show here.
.spago/p/nonempty-7.0.0/README.mdnew file+17
This diff is too big to show here.
.spago/p/nonempty-7.0.0/bower.jsonnew file+30
This diff is too big to show here.
.spago/p/nonempty-7.0.0/package.jsonnew file+13
This diff is too big to show here.
.spago/p/nonempty-7.0.0/purs.jsonnew file+18
This diff is too big to show here.
.spago/p/nonempty-7.0.0/src/Data/NonEmpty.pursnew file+174
This diff is too big to show here.
.spago/p/now-6.0.0/LICENSEnew file+20
This diff is too big to show here.
.spago/p/now-6.0.0/README.mdnew file+79
This diff is too big to show here.
.spago/p/now-6.0.0/bower.jsonnew file+31
This diff is too big to show here.
.spago/p/now-6.0.0/package.jsonnew file+10
This diff is too big to show here.
.spago/p/now-6.0.0/packages.dhallnew file+4
This diff is too big to show here.
.spago/p/now-6.0.0/purs.jsonnew file+16
This diff is too big to show here.
.spago/p/now-6.0.0/spago.dhallnew file+15
This diff is too big to show here.
.spago/p/now-6.0.0/src/Effect/Now.jsnew file+8
This diff is too big to show here.
.spago/p/now-6.0.0/src/Effect/Now.pursnew file+34
This diff is too big to show here.
.spago/p/nullable-6.0.0/LICENSEnew file+20
This diff is too big to show here.
.spago/p/nullable-6.0.0/README.mdnew file+109
This diff is too big to show here.
.spago/p/nullable-6.0.0/bower.jsonnew file+29
This diff is too big to show here.
.spago/p/nullable-6.0.0/package.jsonnew file+10
This diff is too big to show here.
.spago/p/nullable-6.0.0/packages.dhallnew file+4
This diff is too big to show here.
.spago/p/nullable-6.0.0/purs.jsonnew file+16
This diff is too big to show here.
.spago/p/nullable-6.0.0/spago.dhallnew file+11
This diff is too big to show here.
.spago/p/nullable-6.0.0/src/Data/Nullable.jsnew file+12
This diff is too big to show here.
.spago/p/nullable-6.0.0/src/Data/Nullable.pursnew file+79
This diff is too big to show here.
.spago/p/numbers-9.0.1/LICENSEnew file+26
This diff is too big to show here.
.spago/p/numbers-9.0.1/README.mdnew file+35
This diff is too big to show here.
.spago/p/numbers-9.0.1/bower.jsonnew file+26
This diff is too big to show here.
.spago/p/numbers-9.0.1/package.jsonnew file+13
This diff is too big to show here.
.spago/p/numbers-9.0.1/purs.jsonnew file+16
This diff is too big to show here.
.spago/p/numbers-9.0.1/src/Data/Number.jsnew file+80
This diff is too big to show here.
.spago/p/numbers-9.0.1/src/Data/Number.pursnew file+363
This diff is too big to show here.
.spago/p/numbers-9.0.1/src/Data/Number/Approximate.pursnew file+95
This diff is too big to show here.
.spago/p/numbers-9.0.1/src/Data/Number/Format.jsnew file+12
This diff is too big to show here.
.spago/p/numbers-9.0.1/src/Data/Number/Format.pursnew file+76
This diff is too big to show here.
.spago/p/ordered-collections-3.2.0/LICENSEnew file+26
This diff is too big to show here.
.spago/p/ordered-collections-3.2.0/README.mdnew file+19
This diff is too big to show here.
.spago/p/ordered-collections-3.2.0/bower.jsonnew file+37
This diff is too big to show here.
.spago/p/ordered-collections-3.2.0/package.jsonnew file+16
This diff is too big to show here.
.spago/p/ordered-collections-3.2.0/purs.jsonnew file+26
This diff is too big to show here.
.spago/p/ordered-collections-3.2.0/src/Data/Map.pursnew file+65
This diff is too big to show here.
.spago/p/ordered-collections-3.2.0/src/Data/Map/Gen.pursnew file+24
This diff is too big to show here.
.spago/p/ordered-collections-3.2.0/src/Data/Map/Internal.pursnew file+988
This diff is too big to show here.
.spago/p/ordered-collections-3.2.0/src/Data/Set.pursnew file+188
This diff is too big to show here.
.spago/p/ordered-collections-3.2.0/src/Data/Set/NonEmpty.pursnew file+163
This diff is too big to show here.
.spago/p/orders-6.0.0/LICENSEnew file+26
This diff is too big to show here.
.spago/p/orders-6.0.0/README.mdnew file+17
This diff is too big to show here.
.spago/p/orders-6.0.0/bower.jsonnew file+26
This diff is too big to show here.
.spago/p/orders-6.0.0/package.jsonnew file+13
This diff is too big to show here.
.spago/p/orders-6.0.0/purs.jsonnew file+14
This diff is too big to show here.
.spago/p/orders-6.0.0/src/Data/Ord/Down.pursnew file+26
This diff is too big to show here.
.spago/p/orders-6.0.0/src/Data/Ord/Max.pursnew file+29
This diff is too big to show here.
.spago/p/orders-6.0.0/src/Data/Ord/Min.pursnew file+29
This diff is too big to show here.
.spago/p/parallel-7.0.0/LICENSEnew file+26
This diff is too big to show here.
.spago/p/parallel-7.0.0/README.mdnew file+17
This diff is too big to show here.
.spago/p/parallel-7.0.0/bower.jsonnew file+34
This diff is too big to show here.
.spago/p/parallel-7.0.0/package.jsonnew file+13
This diff is too big to show here.
.spago/p/parallel-7.0.0/purs.jsonnew file+23
This diff is too big to show here.
.spago/p/parallel-7.0.0/src/Control/Parallel.pursnew file+90
This diff is too big to show here.
.spago/p/parallel-7.0.0/src/Control/Parallel/Class.pursnew file+123
This diff is too big to show here.
.spago/p/partial-4.0.0/LICENSEnew file+26
This diff is too big to show here.
.spago/p/partial-4.0.0/README.mdnew file+225
This diff is too big to show here.
.spago/p/partial-4.0.0/bower.jsonnew file+19
This diff is too big to show here.
.spago/p/partial-4.0.0/package.jsonnew file+14
This diff is too big to show here.
.spago/p/partial-4.0.0/purs.jsonnew file+12
This diff is too big to show here.
.spago/p/partial-4.0.0/src/Partial.jsnew file+5
This diff is too big to show here.
.spago/p/partial-4.0.0/src/Partial.pursnew file+15
This diff is too big to show here.
.spago/p/partial-4.0.0/src/Partial/Unsafe.jsnew file+5
This diff is too big to show here.
.spago/p/partial-4.0.0/src/Partial/Unsafe.pursnew file+24
This diff is too big to show here.
.spago/p/prelude-6.0.2/LICENSEnew file+26
This diff is too big to show here.
.spago/p/prelude-6.0.2/README.mdnew file+17
This diff is too big to show here.
.spago/p/prelude-6.0.2/bower.jsonnew file+19
This diff is too big to show here.
.spago/p/prelude-6.0.2/package.jsonnew file+14
This diff is too big to show here.
.spago/p/prelude-6.0.2/purs.jsonnew file+12
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Control/Applicative.pursnew file+70
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Control/Apply.jsnew file+15
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Control/Apply.pursnew file+104
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Control/Bind.jsnew file+21
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Control/Bind.pursnew file+150
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Control/Category.pursnew file+22
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Control/Monad.pursnew file+86
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Control/Semigroupoid.pursnew file+25
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Boolean.pursnew file+10
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/BooleanAlgebra.pursnew file+43
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Bounded.jsnew file+8
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Bounded.pursnew file+105
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Bounded/Generic.pursnew file+56
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/CommutativeRing.pursnew file+44
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/DivisionRing.pursnew file+55
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Eq.jsnew file+23
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Eq.pursnew file+115
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Eq/Generic.pursnew file+35
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/EuclideanRing.jsnew file+26
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/EuclideanRing.pursnew file+100
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Field.pursnew file+41
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Function.pursnew file+120
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Functor.jsnew file+10
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Functor.pursnew file+106
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Generic/Rep.pursnew file+62
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/HeytingAlgebra.jsnew file+15
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/HeytingAlgebra.pursnew file+171
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/HeytingAlgebra/Generic.pursnew file+70
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Monoid.pursnew file+120
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Monoid/Additive.pursnew file+44
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Monoid/Conj.pursnew file+51
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Monoid/Disj.pursnew file+51
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Monoid/Dual.pursnew file+44
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Monoid/Endo.pursnew file+30
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Monoid/Generic.pursnew file+27
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Monoid/Multiplicative.pursnew file+44
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/NaturalTransformation.pursnew file+20
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Ord.jsnew file+43
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Ord.pursnew file+264
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Ord/Generic.pursnew file+39
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Ordering.pursnew file+36
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Reflectable.jsnew file+5
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Reflectable.pursnew file+57
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Ring.jsnew file+12
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Ring.pursnew file+78
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Ring/Generic.pursnew file+24
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Semigroup.jsnew file+13
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Semigroup.pursnew file+84
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Semigroup/First.pursnew file+40
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Semigroup/Generic.pursnew file+31
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Semigroup/Last.pursnew file+40
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Semiring.jsnew file+25
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Semiring.pursnew file+140
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Semiring/Generic.pursnew file+51
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Show.jsnew file+59
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Show.pursnew file+97
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Show/Generic.jsnew file+5
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Show/Generic.pursnew file+57
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Symbol.jsnew file+6
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Symbol.pursnew file+24
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Unit.jsnew file+1
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Unit.pursnew file+14
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Data/Void.pursnew file+34
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Prelude.pursnew file+70
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Record/Unsafe.jsnew file+38
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Record/Unsafe.pursnew file+27
This diff is too big to show here.
.spago/p/prelude-6.0.2/src/Type/Proxy.pursnew file+53
This diff is too big to show here.
.spago/p/profunctor-6.0.1/LICENSEnew file+26
This diff is too big to show here.
.spago/p/profunctor-6.0.1/README.mdnew file+17
This diff is too big to show here.
.spago/p/profunctor-6.0.1/bower.jsonnew file+33
This diff is too big to show here.
.spago/p/profunctor-6.0.1/package.jsonnew file+12
This diff is too big to show here.
.spago/p/profunctor-6.0.1/purs.jsonnew file+20
This diff is too big to show here.
.spago/p/profunctor-6.0.1/src/Data/Profunctor.pursnew file+44
This diff is too big to show here.
.spago/p/profunctor-6.0.1/src/Data/Profunctor/Choice.pursnew file+83
This diff is too big to show here.
.spago/p/profunctor-6.0.1/src/Data/Profunctor/Closed.pursnew file+12
This diff is too big to show here.
.spago/p/profunctor-6.0.1/src/Data/Profunctor/Cochoice.pursnew file+9
This diff is too big to show here.
.spago/p/profunctor-6.0.1/src/Data/Profunctor/Costrong.pursnew file+9
This diff is too big to show here.
.spago/p/profunctor-6.0.1/src/Data/Profunctor/Join.pursnew file+28
This diff is too big to show here.
.spago/p/profunctor-6.0.1/src/Data/Profunctor/Split.pursnew file+39
This diff is too big to show here.
.spago/p/profunctor-6.0.1/src/Data/Profunctor/Star.pursnew file+80
This diff is too big to show here.
.spago/p/profunctor-6.0.1/src/Data/Profunctor/Strong.pursnew file+80
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/LICENSEnew file+22
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/README.mdnew file+69
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/bower.jsonnew file+41
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/packages.dhallnew file+4
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/purs.jsonnew file+33
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/spago.dhallnew file+30
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens.pursnew file+35
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/AffineTraversal.pursnew file+52
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/At.pursnew file+64
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/Common.pursnew file+42
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/Fold.pursnew file+326
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/Fold/Partial.pursnew file+33
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/Getter.pursnew file+59
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/Grate.pursnew file+45
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/Index.pursnew file+114
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/Indexed.pursnew file+65
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/Internal/Bazaar.pursnew file+32
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/Internal/Exchange.pursnew file+15
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/Internal/Focusing.pursnew file+21
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/Internal/Forget.pursnew file+45
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/Internal/Grating.pursnew file+17
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/Internal/Indexed.pursnew file+37
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/Internal/Market.pursnew file+24
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/Internal/Re.pursnew file+35
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/Internal/Shop.pursnew file+20
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/Internal/Stall.pursnew file+54
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/Internal/Tagged.pursnew file+54
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/Internal/Wander.pursnew file+26
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/Internal/Zipping.pursnew file+15
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/Iso.pursnew file+103
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/Iso/Newtype.pursnew file+19
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/Lens.pursnew file+101
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/Lens/Product.pursnew file+16
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/Lens/Tuple.pursnew file+17
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/Lens/Unit.pursnew file+15
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/Lens/Void.pursnew file+9
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/Prism.pursnew file+201
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/Prism/Coproduct.pursnew file+16
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/Prism/Either.pursnew file+17
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/Prism/Maybe.pursnew file+15
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/Record.pursnew file+29
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/Setter.pursnew file+144
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/Traversal.pursnew file+152
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/Types.pursnew file+207
This diff is too big to show here.
.spago/p/profunctor-lenses-8.0.0/src/Data/Lens/Zoom.pursnew file+21
This diff is too big to show here.
.spago/p/react-basic-17.0.0/LICENSEnew file+201
This diff is too big to show here.
.spago/p/react-basic-17.0.0/README.mdnew file+51
This diff is too big to show here.
.spago/p/react-basic-17.0.0/bower.jsonnew file+21
This diff is too big to show here.
.spago/p/react-basic-17.0.0/package.jsonnew file+35
This diff is too big to show here.
.spago/p/react-basic-17.0.0/packages.dhallnew file+5
This diff is too big to show here.
.spago/p/react-basic-17.0.0/purs.jsonnew file+15
This diff is too big to show here.
.spago/p/react-basic-17.0.0/spago.dhallnew file+11
This diff is too big to show here.
.spago/p/react-basic-17.0.0/src/React/Basic.jsnew file+39
This diff is too big to show here.
.spago/p/react-basic-17.0.0/src/React/Basic.pursnew file+105
This diff is too big to show here.
.spago/p/react-basic-17.0.0/src/React/Basic/Events.pursnew file+123
This diff is too big to show here.
.spago/p/react-basic-17.0.0/src/React/Basic/StrictMode.jsnew file+2
This diff is too big to show here.
.spago/p/react-basic-17.0.0/src/React/Basic/StrictMode.pursnew file+11
This diff is too big to show here.
.spago/p/react-basic-dom-7.0.0/LICENSEnew file+201
This diff is too big to show here.
.spago/p/react-basic-dom-7.0.0/README.mdnew file+38
This diff is too big to show here.
.spago/p/react-basic-dom-7.0.0/bower.jsonnew file+32
This diff is too big to show here.
.spago/p/react-basic-dom-7.0.0/package.jsonnew file+37
This diff is too big to show here.
.spago/p/react-basic-dom-7.0.0/packages.dhallnew file+5
This diff is too big to show here.
.spago/p/react-basic-dom-7.0.0/purs.jsonnew file+26
This diff is too big to show here.
.spago/p/react-basic-dom-7.0.0/spago.dhallnew file+26
This diff is too big to show here.
.spago/p/react-basic-dom-7.0.0/src/React/Basic/DOM.jsnew file+25
This diff is too big to show here.
.spago/p/react-basic-dom-7.0.0/src/React/Basic/DOM.pursnew file+115
This diff is too big to show here.
.spago/p/react-basic-dom-7.0.0/src/React/Basic/DOM/Client.jsnew file+11
This diff is too big to show here.
.spago/p/react-basic-dom-7.0.0/src/React/Basic/DOM/Client.pursnew file+23
This diff is too big to show here.
.spago/p/react-basic-dom-7.0.0/src/React/Basic/DOM/Components/GlobalEvents.jsnew file+95
This diff is too big to show here.
.spago/p/react-basic-dom-7.0.0/src/React/Basic/DOM/Components/GlobalEvents.pursnew file+116
This diff is too big to show here.
.spago/p/react-basic-dom-7.0.0/src/React/Basic/DOM/Components/Ref.jsnew file+41
This diff is too big to show here.
.spago/p/react-basic-dom-7.0.0/src/React/Basic/DOM/Components/Ref.pursnew file+39
This diff is too big to show here.
.spago/p/react-basic-dom-7.0.0/src/React/Basic/DOM/Events.jsnew file+5
This diff is too big to show here.
.spago/p/react-basic-dom-7.0.0/src/React/Basic/DOM/Events.pursnew file+211
This diff is too big to show here.
.spago/p/react-basic-dom-7.0.0/src/React/Basic/DOM/Generated.pursnew file+18371
This diff is too big to show here.
.spago/p/react-basic-dom-7.0.0/src/React/Basic/DOM/Internal.jsnew file+34
This diff is too big to show here.
.spago/p/react-basic-dom-7.0.0/src/React/Basic/DOM/Internal.pursnew file+80
This diff is too big to show here.
.spago/p/react-basic-dom-7.0.0/src/React/Basic/DOM/SVG.pursnew file+5771
This diff is too big to show here.
.spago/p/react-basic-dom-7.0.0/src/React/Basic/DOM/Server.jsnew file+1
This diff is too big to show here.
.spago/p/react-basic-dom-7.0.0/src/React/Basic/DOM/Server.pursnew file+26
This diff is too big to show here.
.spago/p/react-basic-dom-7.0.0/src/React/Basic/DOM/Simplified/Generated.pursnew file+17017
This diff is too big to show here.
.spago/p/react-basic-dom-7.0.0/src/React/Basic/DOM/Simplified/ToJSX.pursnew file+66
This diff is too big to show here.
.spago/p/react-basic-hooks-9.0.0/LICENSEnew file+201
This diff is too big to show here.
.spago/p/react-basic-hooks-9.0.0/README.mdnew file+172
This diff is too big to show here.
.spago/p/react-basic-hooks-9.0.0/bower.jsonnew file+51
This diff is too big to show here.
.spago/p/react-basic-hooks-9.0.0/package.jsonnew file+44
This diff is too big to show here.
.spago/p/react-basic-hooks-9.0.0/packages.dhallnew file+31
This diff is too big to show here.
.spago/p/react-basic-hooks-9.0.0/purs.jsonnew file+38
This diff is too big to show here.
.spago/p/react-basic-hooks-9.0.0/spago.dhallnew file+38
This diff is too big to show here.
.spago/p/react-basic-hooks-9.0.0/src/React/Basic/Hooks.jsnew file+144
This diff is too big to show here.
.spago/p/react-basic-hooks-9.0.0/src/React/Basic/Hooks.pursnew file+721
This diff is too big to show here.
.spago/p/react-basic-hooks-9.0.0/src/React/Basic/Hooks/Aff.jsnew file+34
This diff is too big to show here.
.spago/p/react-basic-hooks-9.0.0/src/React/Basic/Hooks/Aff.pursnew file+270
This diff is too big to show here.
.spago/p/react-basic-hooks-9.0.0/src/React/Basic/Hooks/ErrorBoundary.jsnew file+21
This diff is too big to show here.
.spago/p/react-basic-hooks-9.0.0/src/React/Basic/Hooks/ErrorBoundary.pursnew file+41
This diff is too big to show here.
.spago/p/react-basic-hooks-9.0.0/src/React/Basic/Hooks/Internal.pursnew file+196
This diff is too big to show here.
.spago/p/react-basic-hooks-9.0.0/src/React/Basic/Hooks/ResetToken.pursnew file+40
This diff is too big to show here.
.spago/p/react-basic-hooks-9.0.0/src/React/Basic/Hooks/Suspense.jsnew file+3
This diff is too big to show here.
.spago/p/react-basic-hooks-9.0.0/src/React/Basic/Hooks/Suspense.pursnew file+58
This diff is too big to show here.
.spago/p/react-basic-hooks-9.0.0/src/React/Basic/Hooks/Suspense/Store.pursnew file+126
This diff is too big to show here.
.spago/p/record-4.0.0/LICENSEnew file+26
This diff is too big to show here.
.spago/p/record-4.0.0/README.mdnew file+59
This diff is too big to show here.
.spago/p/record-4.0.0/bower.jsonnew file+27
This diff is too big to show here.
.spago/p/record-4.0.0/package.jsonnew file+14
This diff is too big to show here.
.spago/p/record-4.0.0/purs.jsonnew file+16
This diff is too big to show here.
.spago/p/record-4.0.0/src/Record.pursnew file+242
This diff is too big to show here.
.spago/p/record-4.0.0/src/Record/Builder.jsnew file+44
This diff is too big to show here.
.spago/p/record-4.0.0/src/Record/Builder.pursnew file+157
This diff is too big to show here.
.spago/p/record-4.0.0/src/Record/Unsafe/Union.jsnew file+14
This diff is too big to show here.
.spago/p/record-4.0.0/src/Record/Unsafe/Union.pursnew file+8
This diff is too big to show here.
.spago/p/refs-6.0.0/LICENSEnew file+26
This diff is too big to show here.
.spago/p/refs-6.0.0/README.mdnew file+49
This diff is too big to show here.
.spago/p/refs-6.0.0/bower.jsonnew file+25
This diff is too big to show here.
.spago/p/refs-6.0.0/package.jsonnew file+14
This diff is too big to show here.
.spago/p/refs-6.0.0/purs.jsonnew file+14
This diff is too big to show here.
.spago/p/refs-6.0.0/src/Effect/Ref.jsnew file+37
This diff is too big to show here.
.spago/p/refs-6.0.0/src/Effect/Ref.pursnew file+73
This diff is too big to show here.
.spago/p/safe-coerce-2.0.0/LICENSEnew file+26
This diff is too big to show here.
.spago/p/safe-coerce-2.0.0/README.mdnew file+13
This diff is too big to show here.
.spago/p/safe-coerce-2.0.0/bower.jsonnew file+25
This diff is too big to show here.
.spago/p/safe-coerce-2.0.0/package.jsonnew file+13
This diff is too big to show here.
.spago/p/safe-coerce-2.0.0/purs.jsonnew file+13
This diff is too big to show here.
.spago/p/safe-coerce-2.0.0/src/Safe/Coerce.pursnew file+27
This diff is too big to show here.
.spago/p/st-6.2.0/LICENSEnew file+26
This diff is too big to show here.
.spago/p/st-6.2.0/README.mdnew file+17
This diff is too big to show here.
.spago/p/st-6.2.0/bower.jsonnew file+28
This diff is too big to show here.
.spago/p/st-6.2.0/package.jsonnew file+14
This diff is too big to show here.
.spago/p/st-6.2.0/purs.jsonnew file+18
This diff is too big to show here.
.spago/p/st-6.2.0/src/Control/Monad/ST.pursnew file+3
This diff is too big to show here.
.spago/p/st-6.2.0/src/Control/Monad/ST/Class.pursnew file+17
This diff is too big to show here.
.spago/p/st-6.2.0/src/Control/Monad/ST/Global.pursnew file+18
This diff is too big to show here.
.spago/p/st-6.2.0/src/Control/Monad/ST/Internal.jsnew file+90
This diff is too big to show here.
.spago/p/st-6.2.0/src/Control/Monad/ST/Internal.pursnew file+136
This diff is too big to show here.
.spago/p/st-6.2.0/src/Control/Monad/ST/Ref.pursnew file+3
This diff is too big to show here.
.spago/p/st-6.2.0/src/Control/Monad/ST/Uncurried.jsnew file+229
This diff is too big to show here.
.spago/p/st-6.2.0/src/Control/Monad/ST/Uncurried.pursnew file+101
This diff is too big to show here.
.spago/p/strings-6.0.1/LICENSEnew file+26
This diff is too big to show here.
.spago/p/strings-6.0.1/README.mdnew file+17
This diff is too big to show here.
.spago/p/strings-6.0.1/bower.jsonnew file+41
This diff is too big to show here.
.spago/p/strings-6.0.1/package.jsonnew file+18
This diff is too big to show here.
.spago/p/strings-6.0.1/purs.jsonnew file+28
This diff is too big to show here.
.spago/p/strings-6.0.1/src/Data/Char.pursnew file+16
This diff is too big to show here.
.spago/p/strings-6.0.1/src/Data/Char/Gen.pursnew file+35
This diff is too big to show here.
.spago/p/strings-6.0.1/src/Data/String.pursnew file+10
This diff is too big to show here.
.spago/p/strings-6.0.1/src/Data/String/CaseInsensitive.pursnew file+22
This diff is too big to show here.
.spago/p/strings-6.0.1/src/Data/String/CodePoints.jsnew file+107
This diff is too big to show here.
.spago/p/strings-6.0.1/src/Data/String/CodePoints.pursnew file+436
This diff is too big to show here.
.spago/p/strings-6.0.1/src/Data/String/CodeUnits.jsnew file+116
This diff is too big to show here.
.spago/p/strings-6.0.1/src/Data/String/CodeUnits.pursnew file+332
This diff is too big to show here.
.spago/p/strings-6.0.1/src/Data/String/Common.jsnew file+52
This diff is too big to show here.
.spago/p/strings-6.0.1/src/Data/String/Common.pursnew file+96
This diff is too big to show here.
.spago/p/strings-6.0.1/src/Data/String/Gen.pursnew file+43
This diff is too big to show here.
.spago/p/strings-6.0.1/src/Data/String/NonEmpty.pursnew file+9
This diff is too big to show here.
.spago/p/strings-6.0.1/src/Data/String/NonEmpty/CaseInsensitive.pursnew file+22
This diff is too big to show here.
.spago/p/strings-6.0.1/src/Data/String/NonEmpty/CodePoints.pursnew file+138
This diff is too big to show here.
.spago/p/strings-6.0.1/src/Data/String/NonEmpty/CodeUnits.pursnew file+308
This diff is too big to show here.
.spago/p/strings-6.0.1/src/Data/String/NonEmpty/Internal.pursnew file+232
This diff is too big to show here.
.spago/p/strings-6.0.1/src/Data/String/Pattern.pursnew file+33
This diff is too big to show here.
.spago/p/strings-6.0.1/src/Data/String/Regex.jsnew file+103
This diff is too big to show here.
.spago/p/strings-6.0.1/src/Data/String/Regex.pursnew file+131
This diff is too big to show here.
.spago/p/strings-6.0.1/src/Data/String/Regex/Flags.pursnew file+129
This diff is too big to show here.
.spago/p/strings-6.0.1/src/Data/String/Regex/Unsafe.pursnew file+14
This diff is too big to show here.
.spago/p/strings-6.0.1/src/Data/String/Unsafe.jsnew file+11
This diff is too big to show here.
.spago/p/strings-6.0.1/src/Data/String/Unsafe.pursnew file+15
This diff is too big to show here.
.spago/p/tailrec-6.1.0/LICENSEnew file+26
This diff is too big to show here.
.spago/p/tailrec-6.1.0/README.mdnew file+69
This diff is too big to show here.
.spago/p/tailrec-6.1.0/bower.jsonnew file+35
This diff is too big to show here.
.spago/p/tailrec-6.1.0/package.jsonnew file+13
This diff is too big to show here.
.spago/p/tailrec-6.1.0/purs.jsonnew file+20
This diff is too big to show here.
.spago/p/tailrec-6.1.0/src/Control/Monad/Rec/Class.pursnew file+191
This diff is too big to show here.
.spago/p/transformers-6.1.0/LICENSEnew file+26
This diff is too big to show here.
.spago/p/transformers-6.1.0/README.mdnew file+17
This diff is too big to show here.
.spago/p/transformers-6.1.0/bower.jsonnew file+46
This diff is too big to show here.
.spago/p/transformers-6.1.0/package.jsonnew file+13
This diff is too big to show here.
.spago/p/transformers-6.1.0/purs.jsonnew file+27
This diff is too big to show here.
.spago/p/transformers-6.1.0/src/Control/Comonad/Env.pursnew file+40
This diff is too big to show here.
.spago/p/transformers-6.1.0/src/Control/Comonad/Env/Class.pursnew file+62
This diff is too big to show here.
.spago/p/transformers-6.1.0/src/Control/Comonad/Env/Trans.pursnew file+71
This diff is too big to show here.
.spago/p/transformers-6.1.0/src/Control/Comonad/Store.pursnew file+30
This diff is too big to show here.
.spago/p/transformers-6.1.0/src/Control/Comonad/Store/Class.pursnew file+64
This diff is too big to show here.
.spago/p/transformers-6.1.0/src/Control/Comonad/Store/Trans.pursnew file+38
This diff is too big to show here.
.spago/p/transformers-6.1.0/src/Control/Comonad/Traced.pursnew file+29
This diff is too big to show here.
.spago/p/transformers-6.1.0/src/Control/Comonad/Traced/Class.pursnew file+72
This diff is too big to show here.
.spago/p/transformers-6.1.0/src/Control/Comonad/Traced/Trans.pursnew file+36
This diff is too big to show here.
.spago/p/transformers-6.1.0/src/Control/Comonad/Trans/Class.pursnew file+27
This diff is too big to show here.
.spago/p/transformers-6.1.0/src/Control/Monad/Cont.pursnew file+39
This diff is too big to show here.
.spago/p/transformers-6.1.0/src/Control/Monad/Cont/Class.pursnew file+27
This diff is too big to show here.
.spago/p/transformers-6.1.0/src/Control/Monad/Cont/Trans.pursnew file+81
This diff is too big to show here.
.spago/p/transformers-6.1.0/src/Control/Monad/Error/Class.pursnew file+112
This diff is too big to show here.
.spago/p/transformers-6.1.0/src/Control/Monad/Except.pursnew file+47
This diff is too big to show here.
.spago/p/transformers-6.1.0/src/Control/Monad/Except/Trans.pursnew file+146
This diff is too big to show here.
.spago/p/transformers-6.1.0/src/Control/Monad/Identity/Trans.pursnew file+79
This diff is too big to show here.
.spago/p/transformers-6.1.0/src/Control/Monad/List/Trans.pursnew file+331
This diff is too big to show here.
.spago/p/transformers-6.1.0/src/Control/Monad/Maybe/Trans.pursnew file+131
This diff is too big to show here.
.spago/p/transformers-6.1.0/src/Control/Monad/RWS.pursnew file+54
This diff is too big to show here.
.spago/p/transformers-6.1.0/src/Control/Monad/RWS/Trans.pursnew file+143
This diff is too big to show here.
.spago/p/transformers-6.1.0/src/Control/Monad/Reader.pursnew file+34
This diff is too big to show here.
.spago/p/transformers-6.1.0/src/Control/Monad/Reader/Class.pursnew file+42
This diff is too big to show here.
.spago/p/transformers-6.1.0/src/Control/Monad/Reader/Trans.pursnew file+125
This diff is too big to show here.
.spago/p/transformers-6.1.0/src/Control/Monad/State.pursnew file+45
This diff is too big to show here.
.spago/p/transformers-6.1.0/src/Control/Monad/State/Class.pursnew file+45
This diff is too big to show here.
.spago/p/transformers-6.1.0/src/Control/Monad/State/Trans.pursnew file+147
This diff is too big to show here.
.spago/p/transformers-6.1.0/src/Control/Monad/Trans/Class.pursnew file+23
This diff is too big to show here.
.spago/p/transformers-6.1.0/src/Control/Monad/Writer.pursnew file+40
This diff is too big to show here.
.spago/p/transformers-6.1.0/src/Control/Monad/Writer/Class.pursnew file+51
This diff is too big to show here.
.spago/p/transformers-6.1.0/src/Control/Monad/Writer/Trans.pursnew file+135
This diff is too big to show here.
.spago/p/tuples-7.0.0/LICENSEnew file+26
This diff is too big to show here.
.spago/p/tuples-7.0.0/README.mdnew file+17
This diff is too big to show here.
.spago/p/tuples-7.0.0/bower.jsonnew file+23
This diff is too big to show here.
.spago/p/tuples-7.0.0/package.jsonnew file+12
This diff is too big to show here.
.spago/p/tuples-7.0.0/purs.jsonnew file+15
This diff is too big to show here.
.spago/p/tuples-7.0.0/src/Data/Tuple.pursnew file+135
This diff is too big to show here.
.spago/p/tuples-7.0.0/src/Data/Tuple/Nested.pursnew file+294
This diff is too big to show here.
.spago/p/type-equality-4.0.1/LICENSEnew file+26
This diff is too big to show here.
.spago/p/type-equality-4.0.1/README.mdnew file+17
This diff is too big to show here.
.spago/p/type-equality-4.0.1/bower.jsonnew file+22
This diff is too big to show here.
.spago/p/type-equality-4.0.1/package.jsonnew file+13
This diff is too big to show here.
.spago/p/type-equality-4.0.1/purs.jsonnew file+11
This diff is too big to show here.
.spago/p/type-equality-4.0.1/src/Type/Equality.pursnew file+35
This diff is too big to show here.
.spago/p/typelevel-prelude-7.0.0/LICENSEnew file+26
This diff is too big to show here.
.spago/p/typelevel-prelude-7.0.0/README.mdnew file+17
This diff is too big to show here.
.spago/p/typelevel-prelude-7.0.0/bower.jsonnew file+22
This diff is too big to show here.
.spago/p/typelevel-prelude-7.0.0/package.jsonnew file+12
This diff is too big to show here.
.spago/p/typelevel-prelude-7.0.0/purs.jsonnew file+15
This diff is too big to show here.
.spago/p/typelevel-prelude-7.0.0/src/Type/Data/Boolean.pursnew file+66
This diff is too big to show here.
.spago/p/typelevel-prelude-7.0.0/src/Type/Data/Ordering.pursnew file+69
This diff is too big to show here.
.spago/p/typelevel-prelude-7.0.0/src/Type/Data/Symbol.pursnew file+35
This diff is too big to show here.
.spago/p/typelevel-prelude-7.0.0/src/Type/Function.pursnew file+23
This diff is too big to show here.
.spago/p/typelevel-prelude-7.0.0/src/Type/Prelude.pursnew file+17
This diff is too big to show here.
.spago/p/typelevel-prelude-7.0.0/src/Type/Row.pursnew file+22
This diff is too big to show here.
.spago/p/typelevel-prelude-7.0.0/src/Type/Row/Homogeneous.pursnew file+23
This diff is too big to show here.
.spago/p/typelevel-prelude-7.0.0/src/Type/RowList.pursnew file+82
This diff is too big to show here.
.spago/p/unfoldable-6.0.0/LICENSEnew file+26
This diff is too big to show here.
.spago/p/unfoldable-6.0.0/README.mdnew file+17
This diff is too big to show here.
.spago/p/unfoldable-6.0.0/bower.jsonnew file+30
This diff is too big to show here.
.spago/p/unfoldable-6.0.0/package.jsonnew file+14
This diff is too big to show here.
.spago/p/unfoldable-6.0.0/purs.jsonnew file+17
This diff is too big to show here.
.spago/p/unfoldable-6.0.0/src/Data/Unfoldable.jsnew file+21
This diff is too big to show here.
.spago/p/unfoldable-6.0.0/src/Data/Unfoldable.pursnew file+103
This diff is too big to show here.
.spago/p/unfoldable-6.0.0/src/Data/Unfoldable1.jsnew file+21
This diff is too big to show here.
.spago/p/unfoldable-6.0.0/src/Data/Unfoldable1.pursnew file+131
This diff is too big to show here.
.spago/p/unsafe-coerce-6.0.0/LICENSEnew file+26
This diff is too big to show here.
.spago/p/unsafe-coerce-6.0.0/README.mdnew file+19
This diff is too big to show here.
.spago/p/unsafe-coerce-6.0.0/bower.jsonnew file+21
This diff is too big to show here.
.spago/p/unsafe-coerce-6.0.0/package.jsonnew file+14
This diff is too big to show here.
.spago/p/unsafe-coerce-6.0.0/purs.jsonnew file+11
This diff is too big to show here.
.spago/p/unsafe-coerce-6.0.0/src/Unsafe/Coerce.jsnew file+5
This diff is too big to show here.
.spago/p/unsafe-coerce-6.0.0/src/Unsafe/Coerce.pursnew file+27
This diff is too big to show here.
.spago/p/unsafe-reference-5.0.0/LICENSEnew file+20
This diff is too big to show here.
.spago/p/unsafe-reference-5.0.0/README.mdnew file+43
This diff is too big to show here.
.spago/p/unsafe-reference-5.0.0/bower.jsonnew file+27
This diff is too big to show here.
.spago/p/unsafe-reference-5.0.0/package.jsonnew file+10
This diff is too big to show here.
.spago/p/unsafe-reference-5.0.0/packages.dhallnew file+4
This diff is too big to show here.
.spago/p/unsafe-reference-5.0.0/purs.jsonnew file+14
This diff is too big to show here.
.spago/p/unsafe-reference-5.0.0/spago.dhallnew file+6
This diff is too big to show here.
.spago/p/unsafe-reference-5.0.0/src/Unsafe/Reference.jsnew file+5
This diff is too big to show here.
.spago/p/unsafe-reference-5.0.0/src/Unsafe/Reference.pursnew file+32
This diff is too big to show here.
.spago/p/untagged-union-1.0.0/LICENSEnew file+21
This diff is too big to show here.
.spago/p/untagged-union-1.0.0/README.mdnew file+149
This diff is too big to show here.
.spago/p/untagged-union-1.0.0/bower.jsonnew file+30
This diff is too big to show here.
.spago/p/untagged-union-1.0.0/packages.dhallnew file+9
This diff is too big to show here.
.spago/p/untagged-union-1.0.0/purs.jsonnew file+21
This diff is too big to show here.
.spago/p/untagged-union-1.0.0/spago.dhallnew file+20
This diff is too big to show here.
.spago/p/untagged-union-1.0.0/src/Untagged/Castable.pursnew file+42
This diff is too big to show here.
.spago/p/untagged-union-1.0.0/src/Untagged/TypeCheck.jsnew file+9
This diff is too big to show here.
.spago/p/untagged-union-1.0.0/src/Untagged/TypeCheck.pursnew file+97
This diff is too big to show here.
.spago/p/untagged-union-1.0.0/src/Untagged/Union.pursnew file+146
This diff is too big to show here.
.spago/p/variant-8.0.0/LICENSEnew file+22
This diff is too big to show here.
.spago/p/variant-8.0.0/README.mdnew file+197
This diff is too big to show here.
.spago/p/variant-8.0.0/bower.jsonnew file+39
This diff is too big to show here.
.spago/p/variant-8.0.0/package.jsonnew file+11
This diff is too big to show here.
.spago/p/variant-8.0.0/packages.dhallnew file+5
This diff is too big to show here.
.spago/p/variant-8.0.0/purs.jsonnew file+22
This diff is too big to show here.
.spago/p/variant-8.0.0/spago.dhallnew file+32
This diff is too big to show here.
.spago/p/variant-8.0.0/src/Data/Functor/Variant.pursnew file+536
This diff is too big to show here.
.spago/p/variant-8.0.0/src/Data/Variant.pursnew file+554
This diff is too big to show here.
.spago/p/variant-8.0.0/src/Data/Variant/Internal.pursnew file+340
This diff is too big to show here.
.spago/p/web-dom-6.0.0/LICENSEnew file+21
This diff is too big to show here.
.spago/p/web-dom-6.0.0/README.mdnew file+17
This diff is too big to show here.
.spago/p/web-dom-6.0.0/bower.jsonnew file+20
This diff is too big to show here.
.spago/p/web-dom-6.0.0/package.jsonnew file+13
This diff is too big to show here.
.spago/p/web-dom-6.0.0/purs.jsonnew file+20
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM.pursnew file+19
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/CharacterData.jsnew file+61
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/CharacterData.pursnew file+52
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/ChildNode.jsnew file+5
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/ChildNode.pursnew file+10
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/Comment.pursnew file+42
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/DOMTokenList.jsnew file+49
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/DOMTokenList.pursnew file+32
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/Document.jsnew file+112
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/Document.pursnew file+122
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/DocumentFragment.pursnew file+42
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/DocumentType.jsnew file+9
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/DocumentType.pursnew file+32
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/Element.jsnew file+210
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/Element.pursnew file+181
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/HTMLCollection.jsnew file+27
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/HTMLCollection.pursnew file+35
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/Internal/Types.pursnew file+7
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/MutationObserver.jsnew file+29
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/MutationObserver.pursnew file+46
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/MutationRecord.jsnew file+53
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/MutationRecord.pursnew file+70
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/Node.jsnew file+153
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/Node.pursnew file+189
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/NodeList.jsnew file+19
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/NodeList.pursnew file+27
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/NodeType.pursnew file+80
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/NonDocumentTypeChildNode.jsnew file+11
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/NonDocumentTypeChildNode.pursnew file+26
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/NonElementParentNode.jsnew file+7
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/NonElementParentNode.pursnew file+20
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/ParentNode.jsnew file+28
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/ParentNode.pursnew file+56
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/ProcessingInstruction.jsnew file+5
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/ProcessingInstruction.pursnew file+45
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/ShadowRoot.jsnew file+9
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/ShadowRoot.pursnew file+35
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/Text.jsnew file+13
This diff is too big to show here.
.spago/p/web-dom-6.0.0/src/Web/DOM/Text.pursnew file+47
This diff is too big to show here.
.spago/p/web-events-4.0.0/LICENSEnew file+21
This diff is too big to show here.
.spago/p/web-events-4.0.0/README.mdnew file+17
This diff is too big to show here.
.spago/p/web-events-4.0.0/bower.jsonnew file+23
This diff is too big to show here.
.spago/p/web-events-4.0.0/package.jsonnew file+13
This diff is too big to show here.
.spago/p/web-events-4.0.0/purs.jsonnew file+22
This diff is too big to show here.
.spago/p/web-events-4.0.0/src/Web/Event/CustomEvent.jsnew file+18
This diff is too big to show here.
.spago/p/web-events-4.0.0/src/Web/Event/CustomEvent.pursnew file+46
This diff is too big to show here.
.spago/p/web-events-4.0.0/src/Web/Event/Event.jsnew file+51
This diff is too big to show here.
.spago/p/web-events-4.0.0/src/Web/Event/Event.pursnew file+81
This diff is too big to show here.
.spago/p/web-events-4.0.0/src/Web/Event/EventPhase.pursnew file+44
This diff is too big to show here.
.spago/p/web-events-4.0.0/src/Web/Event/EventTarget.jsnew file+51
This diff is too big to show here.
.spago/p/web-events-4.0.0/src/Web/Event/EventTarget.pursnew file+70
This diff is too big to show here.
.spago/p/web-events-4.0.0/src/Web/Event/Internal/Types.pursnew file+7
This diff is too big to show here.
.spago/p/web-events-4.0.0/src/Web/Internal/FFI.jsnew file+20
This diff is too big to show here.
.spago/p/web-events-4.0.0/src/Web/Internal/FFI.pursnew file+17
This diff is too big to show here.
.spago/p/web-file-4.0.0/LICENSEnew file+21
This diff is too big to show here.
.spago/p/web-file-4.0.0/README.mdnew file+17
This diff is too big to show here.
.spago/p/web-file-4.0.0/bower.jsonnew file+22
This diff is too big to show here.
.spago/p/web-file-4.0.0/package.jsonnew file+13
This diff is too big to show here.
.spago/p/web-file-4.0.0/purs.jsonnew file+27
This diff is too big to show here.
.spago/p/web-file-4.0.0/src/Web/File/Blob.jsnew file+19
This diff is too big to show here.
.spago/p/web-file-4.0.0/src/Web/File/Blob.pursnew file+85
This diff is too big to show here.
.spago/p/web-file-4.0.0/src/Web/File/File.jsnew file+2
This diff is too big to show here.
.spago/p/web-file-4.0.0/src/Web/File/File.pursnew file+27
This diff is too big to show here.
.spago/p/web-file-4.0.0/src/Web/File/FileList.jsnew file+7
This diff is too big to show here.
.spago/p/web-file-4.0.0/src/Web/File/FileList.pursnew file+29
This diff is too big to show here.
.spago/p/web-file-4.0.0/src/Web/File/FileReader.jsnew file+51
This diff is too big to show here.
.spago/p/web-file-4.0.0/src/Web/File/FileReader.pursnew file+54
This diff is too big to show here.
.spago/p/web-file-4.0.0/src/Web/File/FileReader/ReadyState.pursnew file+46
This diff is too big to show here.
.spago/p/web-file-4.0.0/src/Web/File/URL.jsnew file+11
This diff is too big to show here.
.spago/p/web-file-4.0.0/src/Web/File/URL.pursnew file+18
This diff is too big to show here.
.spago/p/web-html-4.1.1/LICENSEnew file+21
This diff is too big to show here.
.spago/p/web-html-4.1.1/README.mdnew file+17
This diff is too big to show here.
.spago/p/web-html-4.1.1/bower.jsonnew file+23
This diff is too big to show here.
.spago/p/web-html-4.1.1/package.jsonnew file+14
This diff is too big to show here.
.spago/p/web-html-4.1.1/purs.jsonnew file+27
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML.jsnew file+4
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML.pursnew file+77
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/Common.pursnew file+30
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/Event/BeforeUnloadEvent.jsnew file+13
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/Event/BeforeUnloadEvent.pursnew file+21
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/Event/BeforeUnloadEvent/EventTypes.pursnew file+6
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/Event/DataTransfer.jsnew file+55
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/Event/DataTransfer.pursnew file+101
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/Event/DataTransfer/DataTransferItem.jsnew file+23
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/Event/DataTransfer/DataTransferItem.pursnew file+64
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/Event/DragEvent.jsnew file+3
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/Event/DragEvent.pursnew file+17
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/Event/DragEvent/EventTypes.pursnew file+27
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/Event/ErrorEvent.jsnew file+15
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/Event/ErrorEvent.pursnew file+22
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/Event/EventTypes.pursnew file+102
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/Event/HashChangeEvent.jsnew file+7
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/Event/HashChangeEvent.pursnew file+18
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/Event/HashChangeEvent/EventTypes.pursnew file+6
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/Event/PageTransitionEvent.jsnew file+3
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/Event/PageTransitionEvent.pursnew file+16
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/Event/PageTransitionEvent/EventTypes.pursnew file+9
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/Event/PopStateEvent.jsnew file+3
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/Event/PopStateEvent.pursnew file+17
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/Event/PopStateEvent/EventTypes.pursnew file+6
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/Event/TrackEvent.pursnew file+16
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/Event/TrackEvent/EventTypes.pursnew file+9
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLAnchorElement.jsnew file+117
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLAnchorElement.pursnew file+82
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLAreaElement.jsnew file+133
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLAreaElement.pursnew file+81
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLAudioElement.jsnew file+9
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLAudioElement.pursnew file+86
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLBRElement.pursnew file+52
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLBaseElement.jsnew file+29
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLBaseElement.pursnew file+60
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLBodyElement.pursnew file+52
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLButtonElement.jsnew file+223
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLButtonElement.pursnew file+152
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLCanvasElement.jsnew file+29
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLCanvasElement.pursnew file+68
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLDListElement.pursnew file+52
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLDataElement.jsnew file+13
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLDataElement.pursnew file+57
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLDataListElement.jsnew file+5
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLDataListElement.pursnew file+56
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLDialogElement.jsnew file+53
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLDialogElement.pursnew file+92
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLDivElement.pursnew file+52
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLDocument.jsnew file+39
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLDocument.pursnew file+126
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLDocument/ReadyState.pursnew file+32
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLDocument/VisibilityState.pursnew file+28
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLElement.jsnew file+194
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLElement.pursnew file+133
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLEmbedElement.jsnew file+61
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLEmbedElement.pursnew file+66
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLFieldSetElement.jsnew file+103
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLFieldSetElement.pursnew file+115
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLFormElement.jsnew file+181
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLFormElement.pursnew file+93
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLHRElement.pursnew file+52
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLHeadElement.pursnew file+52
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLHeadingElement.pursnew file+52
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLHtmlElement.pursnew file+52
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLHyperlinkElementUtils.jsnew file+165
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLHyperlinkElementUtils.pursnew file+39
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLIFrameElement.jsnew file+91
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLIFrameElement.pursnew file+112
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLImageElement.jsnew file+215
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLImageElement.pursnew file+179
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLImageElement/CORSMode.pursnew file+32
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLImageElement/DecodingHint.pursnew file+36
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLImageElement/Laziness.pursnew file+32
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLInputElement.jsnew file+727
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLInputElement.pursnew file+340
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLKeygenElement.jsnew file+151
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLKeygenElement.pursnew file+130
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLLIElement.jsnew file+13
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLLIElement.pursnew file+57
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLLabelElement.jsnew file+29
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLLabelElement.pursnew file+90
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLLegendElement.jsnew file+5
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLLegendElement.pursnew file+79
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLLinkElement.jsnew file+133
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLLinkElement.pursnew file+85
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLMapElement.jsnew file+29
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLMapElement.pursnew file+62
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLMediaElement.jsnew file+295
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLMediaElement.pursnew file+204
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLMediaElement/CanPlayType.pursnew file+32
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLMediaElement/NetworkState.pursnew file+51
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLMediaElement/ReadyState.pursnew file+55
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLMetaElement.jsnew file+45
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLMetaElement.pursnew file+63
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLMeterElement.jsnew file+101
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLMeterElement.pursnew file+75
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLModElement.jsnew file+29
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLModElement.pursnew file+60
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLOListElement.jsnew file+45
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLOListElement.pursnew file+63
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLObjectElement.jsnew file+167
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLObjectElement.pursnew file+142
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLOptGroupElement.jsnew file+29
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLOptGroupElement.pursnew file+60
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLOptionElement.jsnew file+109
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLOptionElement.pursnew file+114
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLOutputElement.jsnew file+119
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLOutputElement.pursnew file+122
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLParagraphElement.pursnew file+52
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLParamElement.jsnew file+29
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLParamElement.pursnew file+60
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLPreElement.pursnew file+52
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLProgressElement.jsnew file+45
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLProgressElement.pursnew file+65
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLQuoteElement.jsnew file+13
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLQuoteElement.pursnew file+57
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLScriptElement.jsnew file+109
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLScriptElement.pursnew file+75
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLSelectElement.jsnew file+223
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLSelectElement.pursnew file+163
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLSourceElement.jsnew file+45
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLSourceElement.pursnew file+65
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLSpanElement.pursnew file+52
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLStyleElement.jsnew file+29
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLStyleElement.pursnew file+60
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLTableCaptionElement.pursnew file+52
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLTableCellElement.jsnew file+37
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLTableCellElement.pursnew file+64
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLTableColElement.jsnew file+13
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLTableColElement.pursnew file+57
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLTableDataCellElement.pursnew file+59
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLTableElement.jsnew file+153
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLTableElement.pursnew file+149
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLTableHeaderCellElement.jsnew file+29
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLTableHeaderCellElement.pursnew file+67
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLTableRowElement.jsnew file+41
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLTableRowElement.pursnew file+93
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLTableSectionElement.jsnew file+25
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLTableSectionElement.pursnew file+88
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLTemplateElement.jsnew file+5
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLTemplateElement.pursnew file+56
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLTextAreaElement.jsnew file+403
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLTextAreaElement.pursnew file+217
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLTimeElement.jsnew file+13
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLTimeElement.pursnew file+57
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLTitleElement.jsnew file+13
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLTitleElement.pursnew file+58
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLTrackElement.jsnew file+84
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLTrackElement.pursnew file+108
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLTrackElement/ReadyState.pursnew file+51
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLUListElement.pursnew file+52
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLVideoElement.jsnew file+63
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/HTMLVideoElement.pursnew file+74
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/History.jsnew file+49
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/History.pursnew file+34
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/Location.jsnew file+169
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/Location.pursnew file+62
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/Navigator.jsnew file+29
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/Navigator.pursnew file+15
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/SelectionMode.pursnew file+36
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/ValidityState.jsnew file+3
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/ValidityState.pursnew file+54
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/Window.jsnew file+239
This diff is too big to show here.
.spago/p/web-html-4.1.1/src/Web/HTML/Window.pursnew file+154
This diff is too big to show here.
.spago/p/web-storage-5.0.0/LICENSEnew file+21
This diff is too big to show here.
.spago/p/web-storage-5.0.0/README.mdnew file+17
This diff is too big to show here.
.spago/p/web-storage-5.0.0/bower.jsonnew file+21
This diff is too big to show here.
.spago/p/web-storage-5.0.0/package.jsonnew file+13
This diff is too big to show here.
.spago/p/web-storage-5.0.0/purs.jsonnew file+18
This diff is too big to show here.
.spago/p/web-storage-5.0.0/src/Web/Storage/Event/StorageEvent.jsnew file+19
This diff is too big to show here.
.spago/p/web-storage-5.0.0/src/Web/Storage/Event/StorageEvent.pursnew file+49
This diff is too big to show here.
.spago/p/web-storage-5.0.0/src/Web/Storage/Storage.jsnew file+45
This diff is too big to show here.
.spago/p/web-storage-5.0.0/src/Web/Storage/Storage.pursnew file+70
This diff is too big to show here.
bun.locknew file+204
This diff is too big to show here.
node_modules/.bin/cross-envnew file+1
This diff is too big to show here.
node_modules/.bin/cross-env-shellnew file+1
This diff is too big to show here.
node_modules/.bin/loose-envifynew file+1
This diff is too big to show here.
node_modules/.bin/node-whichnew file+1
This diff is too big to show here.
node_modules/@babel/runtime/LICENSEnew file+22
This diff is too big to show here.
node_modules/@babel/runtime/README.mdnew file+19
This diff is too big to show here.
node_modules/@babel/runtime/helpers/AwaitValue.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/OverloadYield.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.jsnew file+9
This diff is too big to show here.
node_modules/@babel/runtime/helpers/applyDecs.jsnew file+236
This diff is too big to show here.
node_modules/@babel/runtime/helpers/applyDecs2203.jsnew file+184
This diff is too big to show here.
node_modules/@babel/runtime/helpers/applyDecs2203R.jsnew file+191
This diff is too big to show here.
node_modules/@babel/runtime/helpers/applyDecs2301.jsnew file+222
This diff is too big to show here.
node_modules/@babel/runtime/helpers/applyDecs2305.jsnew file+133
This diff is too big to show here.
node_modules/@babel/runtime/helpers/applyDecs2311.jsnew file+124
This diff is too big to show here.
node_modules/@babel/runtime/helpers/arrayLikeToArray.jsnew file+6
This diff is too big to show here.
node_modules/@babel/runtime/helpers/arrayWithHoles.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/arrayWithoutHoles.jsnew file+5
This diff is too big to show here.
node_modules/@babel/runtime/helpers/assertClassBrand.jsnew file+5
This diff is too big to show here.
node_modules/@babel/runtime/helpers/assertThisInitialized.jsnew file+5
This diff is too big to show here.
node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.jsnew file+24
This diff is too big to show here.
node_modules/@babel/runtime/helpers/asyncIterator.jsnew file+45
This diff is too big to show here.
node_modules/@babel/runtime/helpers/asyncToGenerator.jsnew file+26
This diff is too big to show here.
node_modules/@babel/runtime/helpers/awaitAsyncGenerator.jsnew file+5
This diff is too big to show here.
node_modules/@babel/runtime/helpers/callSuper.jsnew file+7
This diff is too big to show here.
node_modules/@babel/runtime/helpers/checkInRHS.jsnew file+6
This diff is too big to show here.
node_modules/@babel/runtime/helpers/checkPrivateRedeclaration.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/classApplyDescriptorDestructureSet.jsnew file+10
This diff is too big to show here.
node_modules/@babel/runtime/helpers/classApplyDescriptorGet.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/classApplyDescriptorSet.jsnew file+7
This diff is too big to show here.
node_modules/@babel/runtime/helpers/classCallCheck.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/classCheckPrivateStaticAccess.jsnew file+5
This diff is too big to show here.
node_modules/@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.jsnew file+5
This diff is too big to show here.
node_modules/@babel/runtime/helpers/classNameTDZError.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/classPrivateFieldDestructureSet.jsnew file+7
This diff is too big to show here.
node_modules/@babel/runtime/helpers/classPrivateFieldGet.jsnew file+7
This diff is too big to show here.
node_modules/@babel/runtime/helpers/classPrivateFieldGet2.jsnew file+5
This diff is too big to show here.
node_modules/@babel/runtime/helpers/classPrivateFieldInitSpec.jsnew file+5
This diff is too big to show here.
node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.jsnew file+5
This diff is too big to show here.
node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.jsnew file+5
This diff is too big to show here.
node_modules/@babel/runtime/helpers/classPrivateFieldSet.jsnew file+7
This diff is too big to show here.
node_modules/@babel/runtime/helpers/classPrivateFieldSet2.jsnew file+5
This diff is too big to show here.
node_modules/@babel/runtime/helpers/classPrivateGetter.jsnew file+5
This diff is too big to show here.
node_modules/@babel/runtime/helpers/classPrivateMethodGet.jsnew file+5
This diff is too big to show here.
node_modules/@babel/runtime/helpers/classPrivateMethodInitSpec.jsnew file+5
This diff is too big to show here.
node_modules/@babel/runtime/helpers/classPrivateMethodSet.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/classPrivateSetter.jsnew file+5
This diff is too big to show here.
node_modules/@babel/runtime/helpers/classStaticPrivateFieldDestructureSet.jsnew file+7
This diff is too big to show here.
node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.jsnew file+7
This diff is too big to show here.
node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.jsnew file+7
This diff is too big to show here.
node_modules/@babel/runtime/helpers/classStaticPrivateMethodGet.jsnew file+5
This diff is too big to show here.
node_modules/@babel/runtime/helpers/classStaticPrivateMethodSet.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/construct.jsnew file+10
This diff is too big to show here.
node_modules/@babel/runtime/helpers/createClass.jsnew file+13
This diff is too big to show here.
node_modules/@babel/runtime/helpers/createForOfIteratorHelper.jsnew file+50
This diff is too big to show here.
node_modules/@babel/runtime/helpers/createForOfIteratorHelperLoose.jsnew file+19
This diff is too big to show here.
node_modules/@babel/runtime/helpers/createSuper.jsnew file+16
This diff is too big to show here.
node_modules/@babel/runtime/helpers/decorate.jsnew file+250
This diff is too big to show here.
node_modules/@babel/runtime/helpers/defaults.jsnew file+9
This diff is too big to show here.
node_modules/@babel/runtime/helpers/defineAccessor.jsnew file+8
This diff is too big to show here.
node_modules/@babel/runtime/helpers/defineEnumerableProperties.jsnew file+12
This diff is too big to show here.
node_modules/@babel/runtime/helpers/defineProperty.jsnew file+10
This diff is too big to show here.
node_modules/@babel/runtime/helpers/dispose.jsnew file+28
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/AwaitValue.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/OverloadYield.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.jsnew file+9
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/applyDecs.jsnew file+236
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/applyDecs2203.jsnew file+184
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/applyDecs2203R.jsnew file+191
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/applyDecs2301.jsnew file+222
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/applyDecs2305.jsnew file+133
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/applyDecs2311.jsnew file+124
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.jsnew file+6
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/arrayWithHoles.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.jsnew file+5
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/assertClassBrand.jsnew file+5
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/assertThisInitialized.jsnew file+5
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/asyncGeneratorDelegate.jsnew file+24
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/asyncIterator.jsnew file+45
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/asyncToGenerator.jsnew file+26
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.jsnew file+5
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/callSuper.jsnew file+7
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/checkInRHS.jsnew file+6
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/classApplyDescriptorDestructureSet.jsnew file+10
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.jsnew file+7
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/classCallCheck.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticAccess.jsnew file+5
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticFieldDescriptor.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.jsnew file+5
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/classNameTDZError.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/classPrivateFieldDestructureSet.jsnew file+7
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.jsnew file+7
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet2.jsnew file+5
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/classPrivateFieldInitSpec.jsnew file+5
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseBase.jsnew file+5
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseKey.jsnew file+5
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.jsnew file+7
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet2.jsnew file+5
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/classPrivateGetter.jsnew file+5
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.jsnew file+5
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/classPrivateMethodInitSpec.jsnew file+5
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/classPrivateMethodSet.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/classPrivateSetter.jsnew file+5
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldDestructureSet.jsnew file+7
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecGet.jsnew file+7
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecSet.jsnew file+7
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodGet.jsnew file+5
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodSet.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/construct.jsnew file+10
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/createClass.jsnew file+13
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.jsnew file+50
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelperLoose.jsnew file+19
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/createSuper.jsnew file+16
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/decorate.jsnew file+250
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/defaults.jsnew file+9
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/defineAccessor.jsnew file+8
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/defineEnumerableProperties.jsnew file+12
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/defineProperty.jsnew file+10
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/dispose.jsnew file+28
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/extends.jsnew file+10
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/get.jsnew file+11
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/getPrototypeOf.jsnew file+6
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/identity.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/importDeferProxy.jsnew file+27
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/inherits.jsnew file+14
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/inheritsLoose.jsnew file+5
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.jsnew file+9
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/initializerWarningHelper.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/instanceof.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/interopRequireDefault.jsnew file+6
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/interopRequireWildcard.jsnew file+22
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/isNativeFunction.jsnew file+8
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.jsnew file+9
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/iterableToArray.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.jsnew file+28
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/jsx.jsnew file+22
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/maybeArrayLike.jsnew file+9
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/newArrowCheck.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/nonIterableRest.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/nonIterableSpread.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/nullishReceiverError.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/objectSpread.jsnew file+14
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/objectSpread2.jsnew file+23
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.jsnew file+13
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.jsnew file+10
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/package.jsonnew file+3
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.jsnew file+8
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/readOnlyError.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/regenerator.jsnew file+89
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/regeneratorAsync.jsnew file+8
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/regeneratorAsyncGen.jsnew file+6
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/regeneratorAsyncIterator.jsnew file+33
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/regeneratorDefine.jsnew file+22
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/regeneratorKeys.jsnew file+10
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.jsnew file+77
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/regeneratorValues.jsnew file+19
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/set.jsnew file+22
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/setFunctionName.jsnew file+12
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/setPrototypeOf.jsnew file+6
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/skipFirstGeneratorNext.jsnew file+7
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/slicedToArray.jsnew file+8
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/superPropBase.jsnew file+6
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/superPropGet.jsnew file+9
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/superPropSet.jsnew file+6
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.jsnew file+8
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/tdz.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/temporalRef.jsnew file+6
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/temporalUndefined.jsnew file+2
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/toArray.jsnew file+8
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/toConsumableArray.jsnew file+8
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/toPrimitive.jsnew file+12
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/toPropertyKey.jsnew file+7
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/toSetter.jsnew file+10
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/tsRewriteRelativeImportExtensions.jsnew file+6
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/typeof.jsnew file+10
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.jsnew file+9
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/using.jsnew file+12
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/usingCtx.jsnew file+59
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.jsnew file+56
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.jsnew file+27
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/wrapRegExp.jsnew file+52
This diff is too big to show here.
node_modules/@babel/runtime/helpers/esm/writeOnlyError.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/extends.jsnew file+10
This diff is too big to show here.
node_modules/@babel/runtime/helpers/get.jsnew file+11
This diff is too big to show here.
node_modules/@babel/runtime/helpers/getPrototypeOf.jsnew file+6
This diff is too big to show here.
node_modules/@babel/runtime/helpers/identity.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/importDeferProxy.jsnew file+27
This diff is too big to show here.
node_modules/@babel/runtime/helpers/inherits.jsnew file+14
This diff is too big to show here.
node_modules/@babel/runtime/helpers/inheritsLoose.jsnew file+5
This diff is too big to show here.
node_modules/@babel/runtime/helpers/initializerDefineProperty.jsnew file+9
This diff is too big to show here.
node_modules/@babel/runtime/helpers/initializerWarningHelper.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/instanceof.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/interopRequireDefault.jsnew file+6
This diff is too big to show here.
node_modules/@babel/runtime/helpers/interopRequireWildcard.jsnew file+22
This diff is too big to show here.
node_modules/@babel/runtime/helpers/isNativeFunction.jsnew file+8
This diff is too big to show here.
node_modules/@babel/runtime/helpers/isNativeReflectConstruct.jsnew file+9
This diff is too big to show here.
node_modules/@babel/runtime/helpers/iterableToArray.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/iterableToArrayLimit.jsnew file+28
This diff is too big to show here.
node_modules/@babel/runtime/helpers/jsx.jsnew file+22
This diff is too big to show here.
node_modules/@babel/runtime/helpers/maybeArrayLike.jsnew file+9
This diff is too big to show here.
node_modules/@babel/runtime/helpers/newArrowCheck.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/nonIterableRest.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/nonIterableSpread.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/nullishReceiverError.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/objectDestructuringEmpty.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/objectSpread.jsnew file+14
This diff is too big to show here.
node_modules/@babel/runtime/helpers/objectSpread2.jsnew file+23
This diff is too big to show here.
node_modules/@babel/runtime/helpers/objectWithoutProperties.jsnew file+13
This diff is too big to show here.
node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.jsnew file+10
This diff is too big to show here.
node_modules/@babel/runtime/helpers/possibleConstructorReturn.jsnew file+8
This diff is too big to show here.
node_modules/@babel/runtime/helpers/readOnlyError.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/regenerator.jsnew file+89
This diff is too big to show here.
node_modules/@babel/runtime/helpers/regeneratorAsync.jsnew file+8
This diff is too big to show here.
node_modules/@babel/runtime/helpers/regeneratorAsyncGen.jsnew file+6
This diff is too big to show here.
node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.jsnew file+33
This diff is too big to show here.
node_modules/@babel/runtime/helpers/regeneratorDefine.jsnew file+22
This diff is too big to show here.
node_modules/@babel/runtime/helpers/regeneratorKeys.jsnew file+10
This diff is too big to show here.
node_modules/@babel/runtime/helpers/regeneratorRuntime.jsnew file+77
This diff is too big to show here.
node_modules/@babel/runtime/helpers/regeneratorValues.jsnew file+19
This diff is too big to show here.
node_modules/@babel/runtime/helpers/set.jsnew file+22
This diff is too big to show here.
node_modules/@babel/runtime/helpers/setFunctionName.jsnew file+12
This diff is too big to show here.
node_modules/@babel/runtime/helpers/setPrototypeOf.jsnew file+6
This diff is too big to show here.
node_modules/@babel/runtime/helpers/skipFirstGeneratorNext.jsnew file+7
This diff is too big to show here.
node_modules/@babel/runtime/helpers/slicedToArray.jsnew file+8
This diff is too big to show here.
node_modules/@babel/runtime/helpers/superPropBase.jsnew file+6
This diff is too big to show here.
node_modules/@babel/runtime/helpers/superPropGet.jsnew file+9
This diff is too big to show here.
node_modules/@babel/runtime/helpers/superPropSet.jsnew file+6
This diff is too big to show here.
node_modules/@babel/runtime/helpers/taggedTemplateLiteral.jsnew file+8
This diff is too big to show here.
node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/tdz.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/helpers/temporalRef.jsnew file+6
This diff is too big to show here.
node_modules/@babel/runtime/helpers/temporalUndefined.jsnew file+2
This diff is too big to show here.
node_modules/@babel/runtime/helpers/toArray.jsnew file+8
This diff is too big to show here.
node_modules/@babel/runtime/helpers/toConsumableArray.jsnew file+8
This diff is too big to show here.
node_modules/@babel/runtime/helpers/toPrimitive.jsnew file+12
This diff is too big to show here.
node_modules/@babel/runtime/helpers/toPropertyKey.jsnew file+7
This diff is too big to show here.
node_modules/@babel/runtime/helpers/toSetter.jsnew file+10
This diff is too big to show here.
node_modules/@babel/runtime/helpers/tsRewriteRelativeImportExtensions.jsnew file+6
This diff is too big to show here.
node_modules/@babel/runtime/helpers/typeof.jsnew file+10
This diff is too big to show here.
node_modules/@babel/runtime/helpers/unsupportedIterableToArray.jsnew file+9
This diff is too big to show here.
node_modules/@babel/runtime/helpers/using.jsnew file+12
This diff is too big to show here.
node_modules/@babel/runtime/helpers/usingCtx.jsnew file+59
This diff is too big to show here.
node_modules/@babel/runtime/helpers/wrapAsyncGenerator.jsnew file+56
This diff is too big to show here.
node_modules/@babel/runtime/helpers/wrapNativeSuper.jsnew file+27
This diff is too big to show here.
node_modules/@babel/runtime/helpers/wrapRegExp.jsnew file+52
This diff is too big to show here.
node_modules/@babel/runtime/helpers/writeOnlyError.jsnew file+4
This diff is too big to show here.
node_modules/@babel/runtime/package.jsonnew file+1107
This diff is too big to show here.
node_modules/@babel/runtime/regenerator/index.jsnew file+15
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/LICENSEnew file+201
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/README.mdnew file+33
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/coarena.d.tsnew file+15
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/control/character_controller.d.tsnew file+188
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/control/index.d.tsnew file+2
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/control/ray_cast_vehicle_controller.d.tsnew file+252
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/dynamics/ccd_solver.d.tsnew file+15
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/dynamics/coefficient_combine_rule.d.tsnew file+13
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/dynamics/impulse_joint.d.tsnew file+259
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/dynamics/impulse_joint_set.d.tsnew file+79
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/dynamics/index.d.tsnew file+10
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/dynamics/integration_parameters.d.tsnew file+66
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/dynamics/island_manager.d.tsnew file+24
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/dynamics/multibody_joint.d.tsnew file+42
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/dynamics/multibody_joint_set.d.tsnew file+76
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/dynamics/rigid_body.d.tsnew file+710
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/dynamics/rigid_body_set.d.tsnew file+78
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/exports.d.tsnew file+7
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/geometry/broad_phase.d.tsnew file+15
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/geometry/collider.d.tsnew file+763
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/geometry/collider_set.d.tsnew file+72
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/geometry/contact.d.tsnew file+31
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/geometry/feature.d.tsnew file+6
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/geometry/index.d.tsnew file+11
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/geometry/interaction_groups.d.tsnew file+18
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/geometry/narrow_phase.d.tsnew file+71
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/geometry/point.d.tsnew file+47
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/geometry/ray.d.tsnew file+97
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/geometry/shape.d.tsnew file+489
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/geometry/toi.d.tsnew file+46
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/init.d.tsnew file+5
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/math.d.tsnew file+94
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/package.jsonnew file+30
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/pipeline/debug_render_pipeline.d.tsnew file+39
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/pipeline/event_queue.d.tsnew file+101
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/pipeline/index.d.tsnew file+7
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/pipeline/physics_hooks.d.tsnew file+39
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/pipeline/physics_pipeline.d.tsnew file+12
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/pipeline/query_pipeline.d.tsnew file+190
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/pipeline/serialization_pipeline.d.tsnew file+37
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/pipeline/world.d.tsnew file+423
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/rapier.cjs.js.mapnew file+1
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/rapier.d.tsnew file+3
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/rapier.es.js.mapnew file+1
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/rapier_wasm3d.d.tsnew file+3497
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/rapier_wasm3d.jsnew file+5733
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/rapier_wasm3d_bg.wasm.d.tsnew file+495
This diff is too big to show here.
node_modules/@dimforge/rapier3d-compat/raw.d.tsnew file+1
This diff is too big to show here.
node_modules/@mediapipe/tasks-vision/README.mdnew file+223
This diff is too big to show here.
node_modules/@mediapipe/tasks-vision/package.jsonnew file+20
This diff is too big to show here.
node_modules/@mediapipe/tasks-vision/vision.d.tsnew file+2878
This diff is too big to show here.
node_modules/@mediapipe/tasks-vision/vision_bundle.cjsnew file+2
This diff is too big to show here.
node_modules/@mediapipe/tasks-vision/vision_bundle.cjs.mapnew file+1
This diff is too big to show here.
node_modules/@mediapipe/tasks-vision/vision_bundle.mjsnew file+2
This diff is too big to show here.
node_modules/@mediapipe/tasks-vision/vision_bundle.mjs.mapnew file+1
This diff is too big to show here.
node_modules/@mediapipe/tasks-vision/wasm/vision_wasm_internal.jsnew file+20
This diff is too big to show here.
node_modules/@mediapipe/tasks-vision/wasm/vision_wasm_nosimd_internal.jsnew file+20
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/CHANGELOG.mdnew file+186
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/CODE_OF_CONDUCT.mdnew file+128
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/CONTRIBUTING.mdnew file+130
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/LICENSEnew file+21
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/README.mdnew file+371
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/Loader-CKVwvejH.jsnew file+5
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/Loader-DLI-_JDP.jsnew file+424
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/QuadRenderer-Bj1xl_EK.jsnew file+310
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/QuadRenderer-BoQMkXLf.jsnew file+5
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/_commonjsHelpers-CDmClQiF.jsnew file+5
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/_commonjsHelpers-v3qvwW2J.jsnew file+12
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/compress-C-X439Jm.jsnew file+92
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/compress-DY-CSunh.jsnew file+5
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/core/QuadRenderer.d.tsnew file+153
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/core/get-data-texture.d.tsnew file+14
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/core/index.d.tsnew file+3
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/core/types.d.tsnew file+93
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/decode.d.tsnew file+1
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/decode.jsnew file+574
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/decode.min.jsnew file+5
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/decode.umd.cjsnew file+1307
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/decode.umd.min.cjsnew file+5
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/decode.webgpu.jsnew file+814
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/decode.webgpu.min.jsnew file+5
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/decode.webgpu.umd.cjsnew file+1244
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/decode.webgpu.umd.min.cjsnew file+5
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/decode/index.d.tsnew file+1
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/decode/shared/Loader.d.tsnew file+59
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/decode/shared/decode.d.tsnew file+24
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/decode/shared/errors/GainMapNotFoundError.d.tsnew file+2
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/decode/shared/errors/XMPMetadataNotFoundError.d.tsnew file+2
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/decode/shared/extract.d.tsnew file+25
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/decode/shared/index.d.tsnew file+8
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/decode/shared/types.d.tsnew file+43
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/decode/shared/utils/MPFExtractor.d.tsnew file+21
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/decode/shared/utils/extractXMP.d.tsnew file+2
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/decode/shared/utils/get-html-image-from-blob.d.tsnew file+7
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/decode/webgl/decode.d.tsnew file+60
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/decode/webgl/index.d.tsnew file+8
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/decode/webgl/loaders/GainMapLoader.d.tsnew file+68
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/decode/webgl/loaders/HDRJPGLoader.d.tsnew file+64
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/decode/webgl/loaders/LoaderBaseWebGL.d.tsnew file+20
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/decode/webgl/materials/GainMapDecoderMaterial.d.tsnew file+70
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/decode/webgpu/core/QuadRenderer.d.tsnew file+153
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/decode/webgpu/decode.d.tsnew file+60
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/decode/webgpu/index.d.tsnew file+8
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/decode/webgpu/loaders/GainMapLoader.d.tsnew file+69
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/decode/webgpu/loaders/HDRJPGLoader.d.tsnew file+65
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/decode/webgpu/loaders/LoaderBaseWebGPU.d.tsnew file+20
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/decode/webgpu/materials/GainMapDecoderMaterial.d.tsnew file+78
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/encode.d.tsnew file+1
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/encode.jsnew file+917
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/encode.min.jsnew file+5
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/encode.umd.cjsnew file+1316
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/encode.umd.min.cjsnew file+5
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/encode/compress.d.tsnew file+12
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/encode/encode-and-compress.d.tsnew file+61
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/encode/encode.d.tsnew file+61
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/encode/find-texture-min-max.d.tsnew file+15
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/encode/get-gainmap.d.tsnew file+13
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/encode/get-sdr-rendition.d.tsnew file+17
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/encode/index.d.tsnew file+10
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/encode/materials/GainMapEncoderMaterial.d.tsnew file+70
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/encode/materials/SDRMaterial.d.tsnew file+35
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/encode/types.d.tsnew file+177
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/libultrahdr.d.tsnew file+1
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/libultrahdr.jsnew file+650
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/libultrahdr.min.jsnew file+5
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/libultrahdr.umd.cjsnew file+658
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/libultrahdr.umd.min.cjsnew file+5
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/libultrahdr/encode-jpeg-metadata.d.tsnew file+84
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/libultrahdr/jpeg-assembler.d.tsnew file+41
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/libultrahdr/jpeg-markers.d.tsnew file+47
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/libultrahdr/mpf-generator.d.tsnew file+20
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/libultrahdr/xmp-generator.d.tsnew file+33
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/third-party.txtnew file+301
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/worker-interface.d.tsnew file+26
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/worker-interface.jsnew file+512
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/worker-interface.min.jsnew file+5
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/worker-interface.umd.cjsnew file+525
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/worker-interface.umd.min.cjsnew file+5
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/worker-types.d.tsnew file+24
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/worker.d.tsnew file+1
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/worker.jsnew file+142
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/worker.min.jsnew file+5
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/worker.umd.cjsnew file+236
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/dist/worker.umd.min.cjsnew file+5
This diff is too big to show here.
node_modules/@monogrid/gainmap-js/package.jsonnew file+167
This diff is too big to show here.
node_modules/@radix-ui/react-icons/LICENSEnew file+21
This diff is too big to show here.
node_modules/@radix-ui/react-icons/README.mdnew file+50
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/AccessibilityIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ActivityLogIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/AlignBaselineIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/AlignBottomIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/AlignCenterHorizontallyIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/AlignCenterVerticallyIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/AlignLeftIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/AlignRightIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/AlignTopIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/AllSidesIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/AngleIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ArchiveIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ArrowBottomLeftIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ArrowBottomRightIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ArrowDownIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ArrowLeftIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ArrowRightIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ArrowTopLeftIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ArrowTopRightIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ArrowUpIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/AspectRatioIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/AvatarIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/BackpackIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/BadgeIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/BarChartIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/BellIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/BlendingModeIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/BookmarkFilledIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/BookmarkIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/BorderAllIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/BorderBottomIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/BorderDashedIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/BorderDottedIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/BorderLeftIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/BorderNoneIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/BorderRightIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/BorderSolidIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/BorderSplitIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/BorderStyleIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/BorderTopIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/BorderWidthIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/BoxIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/BoxModelIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ButtonIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/CalendarIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/CameraIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/CardStackIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/CardStackMinusIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/CardStackPlusIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/CaretDownIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/CaretLeftIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/CaretRightIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/CaretSortIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/CaretUpIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ChatBubbleIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/CheckCircledIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/CheckIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/CheckboxIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ChevronDownIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ChevronLeftIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ChevronRightIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ChevronUpIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/CircleBackslashIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/CircleIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ClipboardCopyIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ClipboardIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ClockIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/CodeIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/CodeSandboxLogoIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ColorWheelIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ColumnSpacingIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ColumnsIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/CommitIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/Component1Icon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/Component2Icon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ComponentBooleanIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ComponentInstanceIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ComponentNoneIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ComponentPlaceholderIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ContainerIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/CookieIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/CopyIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/CornerBottomLeftIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/CornerBottomRightIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/CornerTopLeftIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/CornerTopRightIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/CornersIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/CountdownTimerIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/CounterClockwiseClockIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/CropIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/Cross1Icon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/Cross2Icon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/CrossCircledIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/Crosshair1Icon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/Crosshair2Icon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/CrumpledPaperIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/CubeIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/CursorArrowIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/CursorTextIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/DashIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/DashboardIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/DesktopIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/DimensionsIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/DiscIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/DiscordLogoIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/DividerHorizontalIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/DividerVerticalIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/DotFilledIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/DotIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/DotsHorizontalIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/DotsVerticalIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/DoubleArrowDownIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/DoubleArrowLeftIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/DoubleArrowRightIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/DoubleArrowUpIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/DownloadIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/DragHandleDots1Icon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/DragHandleDots2Icon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/DragHandleHorizontalIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/DragHandleVerticalIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/DrawingPinFilledIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/DrawingPinIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/DropdownMenuIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/EnterFullScreenIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/EnterIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/EnvelopeClosedIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/EnvelopeOpenIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/EraserIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ExclamationTriangleIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ExitFullScreenIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ExitIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ExternalLinkIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/EyeClosedIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/EyeNoneIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/EyeOpenIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/FaceIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/FigmaLogoIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/FileIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/FileMinusIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/FilePlusIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/FileTextIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/FontBoldIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/FontFamilyIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/FontItalicIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/FontRomanIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/FontSizeIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/FontStyleIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/FrameIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/FramerLogoIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/GearIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/GitHubLogoIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/GlobeIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/GridIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/GroupIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/Half1Icon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/Half2Icon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/HamburgerMenuIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/HandIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/HeadingIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/HeartFilledIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/HeartIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/HeightIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/HobbyKnifeIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/HomeIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/IconJarLogoIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/IdCardIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ImageIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/InfoCircledIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/InputIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/InstagramLogoIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/KeyboardIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/LapTimerIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/LaptopIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/LayersIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/LayoutIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/LetterCaseCapitalizeIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/LetterCaseLowercaseIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/LetterCaseToggleIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/LetterCaseUppercaseIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/LetterSpacingIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/LightningBoltIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/LineHeightIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/Link1Icon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/Link2Icon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/LinkBreak1Icon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/LinkBreak2Icon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/LinkNone1Icon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/LinkNone2Icon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/LinkedInLogoIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ListBulletIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/LockClosedIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/LockOpen1Icon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/LockOpen2Icon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/LoopIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/MagicWandIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/MagnifyingGlassIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/MarginIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/MaskOffIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/MaskOnIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/MinusCircledIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/MinusIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/MixIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/MixerHorizontalIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/MixerVerticalIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/MobileIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ModulzLogoIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/MoonIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/MoveIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/NotionLogoIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/OpacityIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/OpenInNewWindowIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/OverlineIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/PaddingIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/PaperPlaneIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/PauseIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/Pencil1Icon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/Pencil2Icon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/PersonIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/PieChartIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/PilcrowIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/PinBottomIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/PinLeftIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/PinRightIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/PinTopIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/PlayIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/PlusCircledIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/PlusIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/QuestionMarkCircledIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/QuestionMarkIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/QuoteIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/RadiobuttonIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ReaderIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ReloadIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ResetIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ResumeIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/RocketIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/RotateCounterClockwiseIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/RowSpacingIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/RowsIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/RulerHorizontalIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/RulerSquareIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ScissorsIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/SectionIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/SewingPinFilledIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/SewingPinIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ShadowIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ShadowInnerIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ShadowNoneIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ShadowOuterIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/Share1Icon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/Share2Icon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ShuffleIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/SizeIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/SketchLogoIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/SlashIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/SliderIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/SpaceBetweenHorizontallyIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/SpaceBetweenVerticallyIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/SpaceEvenlyHorizontallyIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/SpaceEvenlyVerticallyIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/SpeakerLoudIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/SpeakerModerateIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/SpeakerOffIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/SpeakerQuietIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/SquareIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/StackIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/StarFilledIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/StarIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/StitchesLogoIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/StopIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/StopwatchIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/StretchHorizontallyIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/StretchVerticallyIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/StrikethroughIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/SunIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/SwitchIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/SymbolIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/TableIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/TargetIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/TextAlignBottomIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/TextAlignCenterIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/TextAlignJustifyIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/TextAlignLeftIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/TextAlignMiddleIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/TextAlignRightIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/TextAlignTopIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/TextIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/TextNoneIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ThickArrowDownIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ThickArrowLeftIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ThickArrowRightIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ThickArrowUpIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/TimerIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/TokensIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/TrackNextIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/TrackPreviousIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/TransformIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/TransparencyGridIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/TrashIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/TriangleDownIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/TriangleLeftIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/TriangleRightIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/TriangleUpIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/TwitterLogoIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/UnderlineIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/UpdateIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/UploadIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ValueIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ValueNoneIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/VercelLogoIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/VideoIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ViewGridIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ViewHorizontalIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ViewNoneIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ViewVerticalIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/WidthIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ZoomInIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/ZoomOutIcon.d.tsnew file+4
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/index.d.tsnew file+318
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/index.jsnew file+8
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/react-icons.cjs.development.js+8801
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/react-icons.cjs.development.js.map+1
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/react-icons.cjs.production.min.js+2
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/react-icons.cjs.production.min.js.map+1
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/react-icons.esm.js+8480
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/react-icons.esm.js.map+1
This diff is too big to show here.
node_modules/@radix-ui/react-icons/dist/types.d.ts+5
This diff is too big to show here.
node_modules/@radix-ui/react-icons/index.js+5
This diff is too big to show here.
node_modules/@radix-ui/react-icons/manifest.json+324
This diff is too big to show here.
node_modules/@radix-ui/react-icons/package.json+40
This diff is too big to show here.
node_modules/@react-spring/animated/LICENSE+21
This diff is too big to show here.
node_modules/@react-spring/animated/README.md+3
This diff is too big to show here.
node_modules/@react-spring/animated/dist/cjs/index.js+6
This diff is too big to show here.
node_modules/@react-spring/animated/dist/cjs/react-spring_animated.development.cjs+375
This diff is too big to show here.
node_modules/@react-spring/animated/dist/cjs/react-spring_animated.development.cjs.map+1
This diff is too big to show here.
node_modules/@react-spring/animated/dist/cjs/react-spring_animated.production.min.cjs+2
This diff is too big to show here.
node_modules/@react-spring/animated/dist/cjs/react-spring_animated.production.min.cjs.map+1
This diff is too big to show here.
node_modules/@react-spring/animated/dist/react-spring_animated.legacy-esm.js+356
This diff is too big to show here.
node_modules/@react-spring/animated/dist/react-spring_animated.legacy-esm.js.map+1
This diff is too big to show here.
node_modules/@react-spring/animated/dist/react-spring_animated.modern.d.ts+109
This diff is too big to show here.
node_modules/@react-spring/animated/dist/react-spring_animated.modern.development.mjs+356
This diff is too big to show here.
node_modules/@react-spring/animated/dist/react-spring_animated.modern.development.mjs.map+1
This diff is too big to show here.
node_modules/@react-spring/animated/dist/react-spring_animated.modern.mjs+356
This diff is too big to show here.
node_modules/@react-spring/animated/dist/react-spring_animated.modern.mjs.map+1
This diff is too big to show here.
node_modules/@react-spring/animated/dist/react-spring_animated.modern.production.min.mjs+2
This diff is too big to show here.
node_modules/@react-spring/animated/dist/react-spring_animated.modern.production.min.mjs.map+1
This diff is too big to show here.
node_modules/@react-spring/animated/package.json+53
This diff is too big to show here.
node_modules/@react-spring/core/LICENSE+21
This diff is too big to show here.
node_modules/@react-spring/core/README.md+3
This diff is too big to show here.
node_modules/@react-spring/core/dist/cjs/index.js+6
This diff is too big to show here.
node_modules/@react-spring/core/dist/cjs/react-spring_core.development.cjs+2460
This diff is too big to show here.
node_modules/@react-spring/core/dist/cjs/react-spring_core.development.cjs.map+1
This diff is too big to show here.
node_modules/@react-spring/core/dist/cjs/react-spring_core.production.min.cjs+2
This diff is too big to show here.
node_modules/@react-spring/core/dist/cjs/react-spring_core.production.min.cjs.map+1
This diff is too big to show here.
node_modules/@react-spring/core/dist/react-spring_core.legacy-esm.js+2522
This diff is too big to show here.
node_modules/@react-spring/core/dist/react-spring_core.legacy-esm.js.map+1
This diff is too big to show here.
node_modules/@react-spring/core/dist/react-spring_core.modern.d.ts+1322
This diff is too big to show here.
node_modules/@react-spring/core/dist/react-spring_core.modern.development.mjs+2522
This diff is too big to show here.
node_modules/@react-spring/core/dist/react-spring_core.modern.development.mjs.map+1
This diff is too big to show here.
node_modules/@react-spring/core/dist/react-spring_core.modern.mjs+2522
This diff is too big to show here.
node_modules/@react-spring/core/dist/react-spring_core.modern.mjs.map+1
This diff is too big to show here.
node_modules/@react-spring/core/dist/react-spring_core.modern.production.min.mjs+2
This diff is too big to show here.
node_modules/@react-spring/core/dist/react-spring_core.modern.production.min.mjs.map+1
This diff is too big to show here.
node_modules/@react-spring/core/package.json+57
This diff is too big to show here.
node_modules/@react-spring/rafz/LICENSE+21
This diff is too big to show here.
node_modules/@react-spring/rafz/README.md+97
This diff is too big to show here.
node_modules/@react-spring/rafz/dist/cjs/index.js+6
This diff is too big to show here.
node_modules/@react-spring/rafz/dist/cjs/react-spring_rafz.development.cjs+204
This diff is too big to show here.
node_modules/@react-spring/rafz/dist/cjs/react-spring_rafz.development.cjs.map+1
This diff is too big to show here.
node_modules/@react-spring/rafz/dist/cjs/react-spring_rafz.production.min.cjs+2
This diff is too big to show here.
node_modules/@react-spring/rafz/dist/cjs/react-spring_rafz.production.min.cjs.map+1
This diff is too big to show here.
node_modules/@react-spring/rafz/dist/react-spring_rafz.legacy-esm.js+183
This diff is too big to show here.
node_modules/@react-spring/rafz/dist/react-spring_rafz.legacy-esm.js.map+1
This diff is too big to show here.
node_modules/@react-spring/rafz/dist/react-spring_rafz.modern.d.ts+108
This diff is too big to show here.
node_modules/@react-spring/rafz/dist/react-spring_rafz.modern.development.mjs+183
This diff is too big to show here.
node_modules/@react-spring/rafz/dist/react-spring_rafz.modern.development.mjs.map+1
This diff is too big to show here.
node_modules/@react-spring/rafz/dist/react-spring_rafz.modern.mjs+183
This diff is too big to show here.
node_modules/@react-spring/rafz/dist/react-spring_rafz.modern.mjs.map+1
This diff is too big to show here.
node_modules/@react-spring/rafz/dist/react-spring_rafz.modern.production.min.mjs+2
This diff is too big to show here.
node_modules/@react-spring/rafz/dist/react-spring_rafz.modern.production.min.mjs.map+1
This diff is too big to show here.
node_modules/@react-spring/rafz/package.json+43
This diff is too big to show here.
node_modules/@react-spring/shared/LICENSE+21
This diff is too big to show here.
node_modules/@react-spring/shared/README.md+14
This diff is too big to show here.
node_modules/@react-spring/shared/dist/cjs/index.js+6
This diff is too big to show here.
node_modules/@react-spring/shared/dist/cjs/react-spring_shared.development.cjs+1171
This diff is too big to show here.
node_modules/@react-spring/shared/dist/cjs/react-spring_shared.development.cjs.map+1
This diff is too big to show here.
node_modules/@react-spring/shared/dist/cjs/react-spring_shared.production.min.cjs+2
This diff is too big to show here.
node_modules/@react-spring/shared/dist/cjs/react-spring_shared.production.min.cjs.map+1
This diff is too big to show here.
node_modules/@react-spring/shared/dist/react-spring_shared.legacy-esm.js+1154
This diff is too big to show here.
node_modules/@react-spring/shared/dist/react-spring_shared.legacy-esm.js.map+1
This diff is too big to show here.
node_modules/@react-spring/shared/dist/react-spring_shared.modern.d.ts+490
This diff is too big to show here.
node_modules/@react-spring/shared/dist/react-spring_shared.modern.development.mjs+1154
This diff is too big to show here.
node_modules/@react-spring/shared/dist/react-spring_shared.modern.development.mjs.map+1
This diff is too big to show here.
node_modules/@react-spring/shared/dist/react-spring_shared.modern.mjs+1154
This diff is too big to show here.
node_modules/@react-spring/shared/dist/react-spring_shared.modern.mjs.map+1
This diff is too big to show here.
node_modules/@react-spring/shared/dist/react-spring_shared.modern.production.min.mjs+2
This diff is too big to show here.
node_modules/@react-spring/shared/dist/react-spring_shared.modern.production.min.mjs.map+1
This diff is too big to show here.
node_modules/@react-spring/shared/package.json+53
This diff is too big to show here.
node_modules/@react-spring/three/LICENSE+21
This diff is too big to show here.
node_modules/@react-spring/three/README.md+3
This diff is too big to show here.
node_modules/@react-spring/three/dist/cjs/index.js+6
This diff is too big to show here.
node_modules/@react-spring/three/dist/cjs/react-spring_three.development.cjs+65
This diff is too big to show here.
node_modules/@react-spring/three/dist/cjs/react-spring_three.development.cjs.map+1
This diff is too big to show here.
node_modules/@react-spring/three/dist/cjs/react-spring_three.production.min.cjs+2
This diff is too big to show here.
node_modules/@react-spring/three/dist/cjs/react-spring_three.production.min.cjs.map+1
This diff is too big to show here.
node_modules/@react-spring/three/dist/react-spring_three.legacy-esm.js+33
This diff is too big to show here.
node_modules/@react-spring/three/dist/react-spring_three.legacy-esm.js.map+1
This diff is too big to show here.
node_modules/@react-spring/three/dist/react-spring_three.modern.d.ts+34
This diff is too big to show here.
node_modules/@react-spring/three/dist/react-spring_three.modern.development.mjs+33
This diff is too big to show here.
node_modules/@react-spring/three/dist/react-spring_three.modern.development.mjs.map+1
This diff is too big to show here.
node_modules/@react-spring/three/dist/react-spring_three.modern.mjs+33
This diff is too big to show here.
node_modules/@react-spring/three/dist/react-spring_three.modern.mjs.map+1
This diff is too big to show here.
node_modules/@react-spring/three/dist/react-spring_three.modern.production.min.mjs+2
This diff is too big to show here.
node_modules/@react-spring/three/dist/react-spring_three.modern.production.min.mjs.map+1
This diff is too big to show here.
node_modules/@react-spring/three/package.json+56
This diff is too big to show here.
node_modules/@react-spring/types/LICENSE+21
This diff is too big to show here.
node_modules/@react-spring/types/dist/cjs/index.js+6
This diff is too big to show here.
node_modules/@react-spring/types/dist/cjs/react-spring_types.development.cjs+30
This diff is too big to show here.
node_modules/@react-spring/types/dist/cjs/react-spring_types.development.cjs.map+1
This diff is too big to show here.
node_modules/@react-spring/types/dist/cjs/react-spring_types.production.min.cjs+2
This diff is too big to show here.
node_modules/@react-spring/types/dist/cjs/react-spring_types.production.min.cjs.map+1
This diff is too big to show here.
node_modules/@react-spring/types/dist/react-spring_types.legacy-esm.js+7
This diff is too big to show here.
node_modules/@react-spring/types/dist/react-spring_types.legacy-esm.js.map+1
This diff is too big to show here.
node_modules/@react-spring/types/dist/react-spring_types.modern.d.ts+168
This diff is too big to show here.
node_modules/@react-spring/types/dist/react-spring_types.modern.development.mjs+7
This diff is too big to show here.
node_modules/@react-spring/types/dist/react-spring_types.modern.development.mjs.map+1
This diff is too big to show here.
node_modules/@react-spring/types/dist/react-spring_types.modern.mjs+7
This diff is too big to show here.
node_modules/@react-spring/types/dist/react-spring_types.modern.mjs.map+1
This diff is too big to show here.
node_modules/@react-spring/types/dist/react-spring_types.modern.production.min.mjs+2
This diff is too big to show here.
node_modules/@react-spring/types/dist/react-spring_types.modern.production.min.mjs.map+1
This diff is too big to show here.
node_modules/@react-spring/types/package.json+46
This diff is too big to show here.
node_modules/@react-three/drei/LICENSE+21
This diff is too big to show here.
node_modules/@react-three/drei/README.md+852
This diff is too big to show here.
node_modules/@react-three/drei/core/AccumulativeShadows.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/AccumulativeShadows.d.ts+61
This diff is too big to show here.
node_modules/@react-three/drei/core/AccumulativeShadows.js+310
This diff is too big to show here.
node_modules/@react-three/drei/core/AdaptiveDpr.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/AdaptiveDpr.d.ts+3
This diff is too big to show here.
node_modules/@react-three/drei/core/AdaptiveDpr.js+28
This diff is too big to show here.
node_modules/@react-three/drei/core/AdaptiveEvents.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/AdaptiveEvents.d.ts+1
This diff is too big to show here.
node_modules/@react-three/drei/core/AdaptiveEvents.js+20
This diff is too big to show here.
node_modules/@react-three/drei/core/ArcballControls.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/ArcballControls.d.ts+15
This diff is too big to show here.
node_modules/@react-three/drei/core/ArcballControls.js+67
This diff is too big to show here.
node_modules/@react-three/drei/core/AsciiRenderer.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/AsciiRenderer.d.ts+12
This diff is too big to show here.
node_modules/@react-three/drei/core/AsciiRenderer.js+66
This diff is too big to show here.
node_modules/@react-three/drei/core/BBAnchor.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/BBAnchor.d.ts+7
This diff is too big to show here.
node_modules/@react-three/drei/core/BBAnchor.js+37
This diff is too big to show here.
node_modules/@react-three/drei/core/Backdrop.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Backdrop.d.ts+14
This diff is too big to show here.
node_modules/@react-three/drei/core/Backdrop.js+33
This diff is too big to show here.
node_modules/@react-three/drei/core/BakeShadows.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/BakeShadows.d.ts+1
This diff is too big to show here.
node_modules/@react-three/drei/core/BakeShadows.js+16
This diff is too big to show here.
node_modules/@react-three/drei/core/Billboard.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Billboard.d.ts+9
This diff is too big to show here.
node_modules/@react-three/drei/core/Billboard.js+53
This diff is too big to show here.
node_modules/@react-three/drei/core/Bounds.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Bounds.d.ts+35
This diff is too big to show here.
node_modules/@react-three/drei/core/Bounds.js+254
This diff is too big to show here.
node_modules/@react-three/drei/core/Bvh.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Bvh.d.ts+18
This diff is too big to show here.
node_modules/@react-three/drei/core/Bvh.js+92
This diff is too big to show here.
node_modules/@react-three/drei/core/CameraControls.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/CameraControls.d.ts+22
This diff is too big to show here.
node_modules/@react-three/drei/core/CameraControls.js+106
This diff is too big to show here.
node_modules/@react-three/drei/core/CameraShake.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/CameraShake.d.ts+17
This diff is too big to show here.
node_modules/@react-three/drei/core/CameraShake.js+57
This diff is too big to show here.
node_modules/@react-three/drei/core/CatmullRomLine.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/CatmullRomLine.d.ts+11
This diff is too big to show here.
node_modules/@react-three/drei/core/CatmullRomLine.js+42
This diff is too big to show here.
node_modules/@react-three/drei/core/Caustics.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Caustics.d.ts+35
This diff is too big to show here.
node_modules/@react-three/drei/core/Caustics.js+388
This diff is too big to show here.
node_modules/@react-three/drei/core/Center.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Center.d.ts+31
This diff is too big to show here.
node_modules/@react-three/drei/core/Center.js+67
This diff is too big to show here.
node_modules/@react-three/drei/core/Clone.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Clone.d.ts+15
This diff is too big to show here.
node_modules/@react-three/drei/core/Clone.js+100
This diff is too big to show here.
node_modules/@react-three/drei/core/Cloud.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Cloud.d.ts+59
This diff is too big to show here.
node_modules/@react-three/drei/core/Cloud.js+231
This diff is too big to show here.
node_modules/@react-three/drei/core/ComputedAttribute.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/ComputedAttribute.d.ts+9
This diff is too big to show here.
node_modules/@react-three/drei/core/ComputedAttribute.js+33
This diff is too big to show here.
node_modules/@react-three/drei/core/ContactShadows.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/ContactShadows.d.ts+17
This diff is too big to show here.
node_modules/@react-three/drei/core/ContactShadows.js+114
This diff is too big to show here.
node_modules/@react-three/drei/core/CubeCamera.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/CubeCamera.d.ts+21
This diff is too big to show here.
node_modules/@react-three/drei/core/CubeCamera.js+86
This diff is too big to show here.
node_modules/@react-three/drei/core/CubeTexture.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/CubeTexture.d.ts+15
This diff is too big to show here.
node_modules/@react-three/drei/core/CubeTexture.js+30
This diff is too big to show here.
node_modules/@react-three/drei/core/CubicBezierLine.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/CubicBezierLine.d.ts+13
This diff is too big to show here.
node_modules/@react-three/drei/core/CubicBezierLine.js+28
This diff is too big to show here.
node_modules/@react-three/drei/core/CurveModifier.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/CurveModifier.d.ts+10
This diff is too big to show here.
node_modules/@react-three/drei/core/CurveModifier.js+27
This diff is too big to show here.
node_modules/@react-three/drei/core/Decal.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Decal.d.ts+16
This diff is too big to show here.
node_modules/@react-three/drei/core/Decal.js+129
This diff is too big to show here.
node_modules/@react-three/drei/core/Detailed.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Detailed.d.ts+10
This diff is too big to show here.
node_modules/@react-three/drei/core/Detailed.js+33
This diff is too big to show here.
node_modules/@react-three/drei/core/DetectGPU.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/DetectGPU.d.ts+8
This diff is too big to show here.
node_modules/@react-three/drei/core/DetectGPU.js+14
This diff is too big to show here.
node_modules/@react-three/drei/core/DeviceOrientationControls.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/DeviceOrientationControls.d.ts+10
This diff is too big to show here.
node_modules/@react-three/drei/core/DeviceOrientationControls.js+51
This diff is too big to show here.
node_modules/@react-three/drei/core/Edges.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Edges.d.ts+13
This diff is too big to show here.
node_modules/@react-three/drei/core/Edges.js+38
This diff is too big to show here.
node_modules/@react-three/drei/core/Effects.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Effects.d.ts+29
This diff is too big to show here.
node_modules/@react-three/drei/core/Effects.js+91
This diff is too big to show here.
node_modules/@react-three/drei/core/Environment.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Environment.d.ts+39
This diff is too big to show here.
node_modules/@react-three/drei/core/Environment.js+189
This diff is too big to show here.
node_modules/@react-three/drei/core/Example.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Example.d.ts+13
This diff is too big to show here.
node_modules/@react-three/drei/core/Example.js+46
This diff is too big to show here.
node_modules/@react-three/drei/core/Fbo.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Fbo.d.ts+28
This diff is too big to show here.
node_modules/@react-three/drei/core/Fbo.js+55
This diff is too big to show here.
node_modules/@react-three/drei/core/Fbx.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Fbx.d.ts+11
This diff is too big to show here.
node_modules/@react-three/drei/core/Fbx.js+23
This diff is too big to show here.
node_modules/@react-three/drei/core/FirstPersonControls.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/FirstPersonControls.d.ts+8
This diff is too big to show here.
node_modules/@react-three/drei/core/FirstPersonControls.js+38
This diff is too big to show here.
node_modules/@react-three/drei/core/Fisheye.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Fisheye.d.ts+9
This diff is too big to show here.
node_modules/@react-three/drei/core/Fisheye.js+95
This diff is too big to show here.
node_modules/@react-three/drei/core/Float.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Float.d.ts+13
This diff is too big to show here.
node_modules/@react-three/drei/core/Float.js+37
This diff is too big to show here.
node_modules/@react-three/drei/core/FlyControls.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/FlyControls.d.ts+10
This diff is too big to show here.
node_modules/@react-three/drei/core/FlyControls.js+55
This diff is too big to show here.
node_modules/@react-three/drei/core/GizmoHelper.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/GizmoHelper.d.ts+15
This diff is too big to show here.
node_modules/@react-three/drei/core/GizmoHelper.js+116
This diff is too big to show here.
node_modules/@react-three/drei/core/GizmoViewcube.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/GizmoViewcube.d.ts+14
This diff is too big to show here.
node_modules/@react-three/drei/core/GizmoViewcube.js+133
This diff is too big to show here.
node_modules/@react-three/drei/core/GizmoViewport.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/GizmoViewport.d.ts+16
This diff is too big to show here.
node_modules/@react-three/drei/core/GizmoViewport.js+140
This diff is too big to show here.
node_modules/@react-three/drei/core/Gltf.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Gltf.d.ts+23
This diff is too big to show here.
node_modules/@react-three/drei/core/Gltf.js+52
This diff is too big to show here.
node_modules/@react-three/drei/core/GradientTexture.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/GradientTexture.d.ts+18
This diff is too big to show here.
node_modules/@react-three/drei/core/GradientTexture.js+56
This diff is too big to show here.
node_modules/@react-three/drei/core/Grid.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Grid.d.ts+27
This diff is too big to show here.
node_modules/@react-three/drei/core/Grid.js+142
This diff is too big to show here.
node_modules/@react-three/drei/core/Helper.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Helper.d.ts+16
This diff is too big to show here.
node_modules/@react-three/drei/core/Helper.js+47
This diff is too big to show here.
node_modules/@react-three/drei/core/Hud.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Hud.d.ts+7
This diff is too big to show here.
node_modules/@react-three/drei/core/Hud.js+55
This diff is too big to show here.
node_modules/@react-three/drei/core/Image.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Image.d.ts+40
This diff is too big to show here.
node_modules/@react-three/drei/core/Image.js+161
This diff is too big to show here.
node_modules/@react-three/drei/core/Instances.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Instances.d.ts+72
This diff is too big to show here.
node_modules/@react-three/drei/core/Instances.js+279
This diff is too big to show here.
node_modules/@react-three/drei/core/Ktx2.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Ktx2.d.ts+14
This diff is too big to show here.
node_modules/@react-three/drei/core/Ktx2.js+48
This diff is too big to show here.
node_modules/@react-three/drei/core/Lightformer.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Lightformer.d.ts+15
This diff is too big to show here.
node_modules/@react-three/drei/core/Lightformer.js+63
This diff is too big to show here.
node_modules/@react-three/drei/core/Line.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Line.d.ts+13
This diff is too big to show here.
node_modules/@react-three/drei/core/Line.js+73
This diff is too big to show here.
node_modules/@react-three/drei/core/MapControls.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/MapControls.d.ts+14
This diff is too big to show here.
node_modules/@react-three/drei/core/MapControls.js+63
This diff is too big to show here.
node_modules/@react-three/drei/core/MarchingCubes.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/MarchingCubes.d.ts+24
This diff is too big to show here.
node_modules/@react-three/drei/core/MarchingCubes.js+78
This diff is too big to show here.
node_modules/@react-three/drei/core/Mask.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Mask.d.ts+17
This diff is too big to show here.
node_modules/@react-three/drei/core/Mask.js+42
This diff is too big to show here.
node_modules/@react-three/drei/core/MatcapTexture.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/MatcapTexture.d.ts+9
This diff is too big to show here.
node_modules/@react-three/drei/core/MatcapTexture.js+51
This diff is too big to show here.
node_modules/@react-three/drei/core/MeshDiscardMaterial.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/MeshDiscardMaterial.d.ts+11
This diff is too big to show here.
node_modules/@react-three/drei/core/MeshDiscardMaterial.js+15
This diff is too big to show here.
node_modules/@react-three/drei/core/MeshDistortMaterial.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/MeshDistortMaterial.d.ts+41
This diff is too big to show here.
node_modules/@react-three/drei/core/MeshDistortMaterial.js+72
This diff is too big to show here.
node_modules/@react-three/drei/core/MeshPortalMaterial.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/MeshPortalMaterial.d.ts+28
This diff is too big to show here.
node_modules/@react-three/drei/core/MeshPortalMaterial.js+467
This diff is too big to show here.
node_modules/@react-three/drei/core/MeshReflectorMaterial.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/MeshReflectorMaterial.d.ts+27
This diff is too big to show here.
node_modules/@react-three/drei/core/MeshReflectorMaterial.js+180
This diff is too big to show here.
node_modules/@react-three/drei/core/MeshRefractionMaterial.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/MeshRefractionMaterial.d.ts+22
This diff is too big to show here.
node_modules/@react-three/drei/core/MeshRefractionMaterial.js+73
This diff is too big to show here.
node_modules/@react-three/drei/core/MeshTransmissionMaterial.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/MeshTransmissionMaterial.d.ts+35
This diff is too big to show here.
node_modules/@react-three/drei/core/MeshTransmissionMaterial.js+401
This diff is too big to show here.
node_modules/@react-three/drei/core/MeshWobbleMaterial.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/MeshWobbleMaterial.d.ts+38
This diff is too big to show here.
node_modules/@react-three/drei/core/MeshWobbleMaterial.js+60
This diff is too big to show here.
node_modules/@react-three/drei/core/MotionPathControls.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/MotionPathControls.d.ts+32
This diff is too big to show here.
node_modules/@react-three/drei/core/MotionPathControls.js+120
This diff is too big to show here.
node_modules/@react-three/drei/core/MultiMaterial.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/MultiMaterial.d.ts+2
This diff is too big to show here.
node_modules/@react-three/drei/core/MultiMaterial.js+30
This diff is too big to show here.
node_modules/@react-three/drei/core/NormalTexture.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/NormalTexture.d.ts+14
This diff is too big to show here.
node_modules/@react-three/drei/core/NormalTexture.js+42
This diff is too big to show here.
node_modules/@react-three/drei/core/OrbitControls.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/OrbitControls.d.ts+22
This diff is too big to show here.
node_modules/@react-three/drei/core/OrbitControls.js+79
This diff is too big to show here.
node_modules/@react-three/drei/core/OrthographicCamera.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/OrthographicCamera.d.ts+14
This diff is too big to show here.
node_modules/@react-three/drei/core/OrthographicCamera.js+76
This diff is too big to show here.
node_modules/@react-three/drei/core/Outlines.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Outlines.d.ts+18
This diff is too big to show here.
node_modules/@react-three/drei/core/Outlines.js+166
This diff is too big to show here.
node_modules/@react-three/drei/core/PerformanceMonitor.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/PerformanceMonitor.d.ts+36
This diff is too big to show here.
node_modules/@react-three/drei/core/PerformanceMonitor.js+116
This diff is too big to show here.
node_modules/@react-three/drei/core/PerspectiveCamera.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/PerspectiveCamera.d.ts+14
This diff is too big to show here.
node_modules/@react-three/drei/core/PerspectiveCamera.js+72
This diff is too big to show here.
node_modules/@react-three/drei/core/PointMaterial.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/PointMaterial.d.ts+16
This diff is too big to show here.
node_modules/@react-three/drei/core/PointMaterial.js+36
This diff is too big to show here.
node_modules/@react-three/drei/core/PointerLockControls.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/PointerLockControls.d.ts+15
This diff is too big to show here.
node_modules/@react-three/drei/core/PointerLockControls.js+89
This diff is too big to show here.
node_modules/@react-three/drei/core/Points.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Points.d.ts+34
This diff is too big to show here.
node_modules/@react-three/drei/core/Points.js+212
This diff is too big to show here.
node_modules/@react-three/drei/core/PositionalAudio.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/PositionalAudio.d.ts+9
This diff is too big to show here.
node_modules/@react-three/drei/core/PositionalAudio.js+46
This diff is too big to show here.
node_modules/@react-three/drei/core/Preload.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Preload.d.ts+8
This diff is too big to show here.
node_modules/@react-three/drei/core/Preload.js+44
This diff is too big to show here.
node_modules/@react-three/drei/core/Progress.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Progress.d.ts+14
This diff is too big to show here.
node_modules/@react-three/drei/core/Progress.js+55
This diff is too big to show here.
node_modules/@react-three/drei/core/QuadraticBezierLine.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/QuadraticBezierLine.d.ts+16
This diff is too big to show here.
node_modules/@react-three/drei/core/QuadraticBezierLine.js+42
This diff is too big to show here.
node_modules/@react-three/drei/core/Reflector.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Reflector.d.ts+30
This diff is too big to show here.
node_modules/@react-three/drei/core/Reflector.js+180
This diff is too big to show here.
node_modules/@react-three/drei/core/RenderCubeTexture.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/RenderCubeTexture.d.ts+30
This diff is too big to show here.
node_modules/@react-three/drei/core/RenderCubeTexture.js+96
This diff is too big to show here.
node_modules/@react-three/drei/core/RenderTexture.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/RenderTexture.d.ts+18
This diff is too big to show here.
node_modules/@react-three/drei/core/RenderTexture.js+104
This diff is too big to show here.
node_modules/@react-three/drei/core/Resize.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Resize.d.ts+10
This diff is too big to show here.
node_modules/@react-three/drei/core/Resize.js+39
This diff is too big to show here.
node_modules/@react-three/drei/core/RoundedBox.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/RoundedBox.d.ts+12
This diff is too big to show here.
node_modules/@react-three/drei/core/RoundedBox.js+51
This diff is too big to show here.
node_modules/@react-three/drei/core/Sampler.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Sampler.d.ts+28
This diff is too big to show here.
node_modules/@react-three/drei/core/Sampler.js+75
This diff is too big to show here.
node_modules/@react-three/drei/core/ScreenQuad.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/ScreenQuad.d.ts+5
This diff is too big to show here.
node_modules/@react-three/drei/core/ScreenQuad.js+25
This diff is too big to show here.
node_modules/@react-three/drei/core/ScreenSizer.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/ScreenSizer.d.ts+7
This diff is too big to show here.
node_modules/@react-three/drei/core/ScreenSizer.js+39
This diff is too big to show here.
node_modules/@react-three/drei/core/ScreenSpace.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/ScreenSpace.d.ts+6
This diff is too big to show here.
node_modules/@react-three/drei/core/ScreenSpace.js+25
This diff is too big to show here.
node_modules/@react-three/drei/core/Segments.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Segments.d.ts+31
This diff is too big to show here.
node_modules/@react-three/drei/core/Segments.js+96
This diff is too big to show here.
node_modules/@react-three/drei/core/Shadow.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Shadow.d.ts+12
This diff is too big to show here.
node_modules/@react-three/drei/core/Shadow.js+42
This diff is too big to show here.
node_modules/@react-three/drei/core/ShadowAlpha.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/ShadowAlpha.d.ts+8
This diff is too big to show here.
node_modules/@react-three/drei/core/ShadowAlpha.js+108
This diff is too big to show here.
node_modules/@react-three/drei/core/Sky.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Sky.d.ts+17
This diff is too big to show here.
node_modules/@react-three/drei/core/Sky.js+39
This diff is too big to show here.
node_modules/@react-three/drei/core/Sparkles.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Sparkles.d.ts+28
This diff is too big to show here.
node_modules/@react-three/drei/core/Sparkles.js+161
This diff is too big to show here.
node_modules/@react-three/drei/core/Splat.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Splat.d.ts+58
This diff is too big to show here.
node_modules/@react-three/drei/core/Splat.js+506
This diff is too big to show here.
node_modules/@react-three/drei/core/SpotLight.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/SpotLight.d.ts+26
This diff is too big to show here.
node_modules/@react-three/drei/core/SpotLight.js+223
This diff is too big to show here.
node_modules/@react-three/drei/core/SpriteAnimator.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/SpriteAnimator.d.ts+55
This diff is too big to show here.
node_modules/@react-three/drei/core/SpriteAnimator.js+413
This diff is too big to show here.
node_modules/@react-three/drei/core/Stage.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Stage.d.ts+26
This diff is too big to show here.
node_modules/@react-three/drei/core/Stage.js+133
This diff is too big to show here.
node_modules/@react-three/drei/core/Stars.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Stars.d.ts+24
This diff is too big to show here.
node_modules/@react-three/drei/core/Stars.js+100
This diff is too big to show here.
node_modules/@react-three/drei/core/Stats.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Stats.d.ts+8
This diff is too big to show here.
node_modules/@react-three/drei/core/Stats.js+32
This diff is too big to show here.
node_modules/@react-three/drei/core/StatsGl.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/StatsGl.d.ts+14
This diff is too big to show here.
node_modules/@react-three/drei/core/StatsGl.js+44
This diff is too big to show here.
node_modules/@react-three/drei/core/Svg.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Svg.d.ts+13
This diff is too big to show here.
node_modules/@react-three/drei/core/Svg.js+62
This diff is too big to show here.
node_modules/@react-three/drei/core/Text.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Text.d.ts+39
This diff is too big to show here.
node_modules/@react-three/drei/core/Text.js+57
This diff is too big to show here.
node_modules/@react-three/drei/core/Text3D.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Text3D.d.ts+23
This diff is too big to show here.
node_modules/@react-three/drei/core/Text3D.js+74
This diff is too big to show here.
node_modules/@react-three/drei/core/Texture.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Texture.d.ts+20
This diff is too big to show here.
node_modules/@react-three/drei/core/Texture.js+60
This diff is too big to show here.
node_modules/@react-three/drei/core/TrackballControls.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/TrackballControls.d.ts+15
This diff is too big to show here.
node_modules/@react-three/drei/core/TrackballControls.js+72
This diff is too big to show here.
node_modules/@react-three/drei/core/Trail.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Trail.d.ts+21
This diff is too big to show here.
node_modules/@react-three/drei/core/Trail.js+150
This diff is too big to show here.
node_modules/@react-three/drei/core/TrailTexture.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/TrailTexture.d.ts+18
This diff is too big to show here.
node_modules/@react-three/drei/core/TrailTexture.js+159
This diff is too big to show here.
node_modules/@react-three/drei/core/TransformControls.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/TransformControls.d.ts+28
This diff is too big to show here.
node_modules/@react-three/drei/core/TransformControls.js+115
This diff is too big to show here.
node_modules/@react-three/drei/core/VideoTexture.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/VideoTexture.d.ts+26
This diff is too big to show here.
node_modules/@react-three/drei/core/VideoTexture.js+111
This diff is too big to show here.
node_modules/@react-three/drei/core/Wireframe.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/Wireframe.d.ts+17
This diff is too big to show here.
node_modules/@react-three/drei/core/Wireframe.js+157
This diff is too big to show here.
node_modules/@react-three/drei/core/calculateScaleFactor.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/calculateScaleFactor.d.ts+3
This diff is too big to show here.
node_modules/@react-three/drei/core/calculateScaleFactor.js+31
This diff is too big to show here.
node_modules/@react-three/drei/core/index.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/index.d.ts+123
This diff is too big to show here.
node_modules/@react-three/drei/core/index.js+152
This diff is too big to show here.
node_modules/@react-three/drei/core/meshBounds.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/meshBounds.d.ts+2
This diff is too big to show here.
node_modules/@react-three/drei/core/meshBounds.js+28
This diff is too big to show here.
node_modules/@react-three/drei/core/shaderMaterial.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/shaderMaterial.d.ts+7
This diff is too big to show here.
node_modules/@react-three/drei/core/shaderMaterial.js+40
This diff is too big to show here.
node_modules/@react-three/drei/core/shapes.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/shapes.d.ts+25
This diff is too big to show here.
node_modules/@react-three/drei/core/shapes.js+65
This diff is too big to show here.
node_modules/@react-three/drei/core/softShadows.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/softShadows.d.ts+7
This diff is too big to show here.
node_modules/@react-three/drei/core/softShadows.js+158
This diff is too big to show here.
node_modules/@react-three/drei/core/useAnimations.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/useAnimations.d.ts+13
This diff is too big to show here.
node_modules/@react-three/drei/core/useAnimations.js+52
This diff is too big to show here.
node_modules/@react-three/drei/core/useAspect.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/useAspect.d.ts+1
This diff is too big to show here.
node_modules/@react-three/drei/core/useAspect.js+10
This diff is too big to show here.
node_modules/@react-three/drei/core/useBoxProjectedEnv.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/useBoxProjectedEnv.d.ts+19
This diff is too big to show here.
node_modules/@react-three/drei/core/useBoxProjectedEnv.js+95
This diff is too big to show here.
node_modules/@react-three/drei/core/useCamera.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/useCamera.d.ts+3
This diff is too big to show here.
node_modules/@react-three/drei/core/useCamera.js+26
This diff is too big to show here.
node_modules/@react-three/drei/core/useContextBridge.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/useContextBridge.d.ts+4
This diff is too big to show here.
node_modules/@react-three/drei/core/useContextBridge.js+20
This diff is too big to show here.
node_modules/@react-three/drei/core/useDepthBuffer.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/useDepthBuffer.d.ts+6
This diff is too big to show here.
node_modules/@react-three/drei/core/useDepthBuffer.js+38
This diff is too big to show here.
node_modules/@react-three/drei/core/useEnvironment.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/useEnvironment.d.ts+18
This diff is too big to show here.
node_modules/@react-three/drei/core/useEnvironment.js+158
This diff is too big to show here.
node_modules/@react-three/drei/core/useFont.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/useFont.d.ts+24
This diff is too big to show here.
node_modules/@react-three/drei/core/useFont.js+24
This diff is too big to show here.
node_modules/@react-three/drei/core/useIntersect.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/useIntersect.d.ts+3
This diff is too big to show here.
node_modules/@react-three/drei/core/useIntersect.js+36
This diff is too big to show here.
node_modules/@react-three/drei/core/useSpriteLoader.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/core/useSpriteLoader.d.ts+57
This diff is too big to show here.
node_modules/@react-three/drei/core/useSpriteLoader.js+402
This diff is too big to show here.
node_modules/@react-three/drei/helpers/constants.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/helpers/constants.d.ts+1
This diff is too big to show here.
node_modules/@react-three/drei/helpers/constants.js+6
This diff is too big to show here.
node_modules/@react-three/drei/helpers/deprecated.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/helpers/deprecated.d.ts+8
This diff is too big to show here.
node_modules/@react-three/drei/helpers/deprecated.js+20
This diff is too big to show here.
node_modules/@react-three/drei/helpers/environment-assets.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/helpers/environment-assets.d.ts+13
This diff is too big to show here.
node_modules/@react-three/drei/helpers/environment-assets.js+14
This diff is too big to show here.
node_modules/@react-three/drei/helpers/glsl/DefaultSpotlightShadowShadows.glsl.js+3
This diff is too big to show here.
node_modules/@react-three/drei/helpers/glsl/distort.vert.glsl.js+3
This diff is too big to show here.
node_modules/@react-three/drei/helpers/ts-utils.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/helpers/ts-utils.d.ts+3
This diff is too big to show here.
node_modules/@react-three/drei/helpers/ts-utils.js+1
This diff is too big to show here.
node_modules/@react-three/drei/helpers/useEffectfulState.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/helpers/useEffectfulState.d.ts+4
This diff is too big to show here.
node_modules/@react-three/drei/helpers/useEffectfulState.js+17
This diff is too big to show here.
node_modules/@react-three/drei/index.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/index.d.ts+1
This diff is too big to show here.
node_modules/@react-three/drei/index.js+139
This diff is too big to show here.
node_modules/@react-three/drei/materials/BlurPass.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/materials/BlurPass.d.ts+23
This diff is too big to show here.
node_modules/@react-three/drei/materials/BlurPass.js+73
This diff is too big to show here.
node_modules/@react-three/drei/materials/ConvolutionMaterial.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/materials/ConvolutionMaterial.d.ts+7
This diff is too big to show here.
node_modules/@react-three/drei/materials/ConvolutionMaterial.js+97
This diff is too big to show here.
node_modules/@react-three/drei/materials/DiscardMaterial.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/materials/DiscardMaterial.d.ts+3
This diff is too big to show here.
node_modules/@react-three/drei/materials/DiscardMaterial.js+5
This diff is too big to show here.
node_modules/@react-three/drei/materials/MeshReflectorMaterial.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/materials/MeshReflectorMaterial.d.ts+66
This diff is too big to show here.
node_modules/@react-three/drei/materials/MeshReflectorMaterial.js+256
This diff is too big to show here.
node_modules/@react-three/drei/materials/MeshRefractionMaterial.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/materials/MeshRefractionMaterial.d.ts+4
This diff is too big to show here.
node_modules/@react-three/drei/materials/MeshRefractionMaterial.js+163
This diff is too big to show here.
node_modules/@react-three/drei/materials/SpotLightMaterial.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/materials/SpotLightMaterial.d.ts+4
This diff is too big to show here.
node_modules/@react-three/drei/materials/SpotLightMaterial.js+115
This diff is too big to show here.
node_modules/@react-three/drei/materials/WireframeMaterial.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/materials/WireframeMaterial.d.ts+48
This diff is too big to show here.
node_modules/@react-three/drei/materials/WireframeMaterial.js+217
This diff is too big to show here.
node_modules/@react-three/drei/native/index.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/native/index.d.ts+1
This diff is too big to show here.
node_modules/@react-three/drei/native/index.js+152
This diff is too big to show here.
node_modules/@react-three/drei/package.json+68
This diff is too big to show here.
node_modules/@react-three/drei/web/CycleRaycast.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/web/CycleRaycast.d.ts+10
This diff is too big to show here.
node_modules/@react-three/drei/web/CycleRaycast.js+93
This diff is too big to show here.
node_modules/@react-three/drei/web/DragControls.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/web/DragControls.d.ts+17
This diff is too big to show here.
node_modules/@react-three/drei/web/DragControls.js+127
This diff is too big to show here.
node_modules/@react-three/drei/web/FaceControls.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/web/FaceControls.d.ts+29
This diff is too big to show here.
node_modules/@react-three/drei/web/FaceControls.js+236
This diff is too big to show here.
node_modules/@react-three/drei/web/FaceLandmarker.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/web/FaceLandmarker.d.ts+15
This diff is too big to show here.
node_modules/@react-three/drei/web/FaceLandmarker.js+49
This diff is too big to show here.
node_modules/@react-three/drei/web/Facemesh.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/web/Facemesh.d.ts+117
This diff is too big to show here.
node_modules/@react-three/drei/web/Facemesh.js+4538
This diff is too big to show here.
node_modules/@react-three/drei/web/Html.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/web/Html.d.ts+34
This diff is too big to show here.
node_modules/@react-three/drei/web/Html.js+375
This diff is too big to show here.
node_modules/@react-three/drei/web/KeyboardControls.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/web/KeyboardControls.d.ts+37
This diff is too big to show here.
node_modules/@react-three/drei/web/KeyboardControls.js+104
This diff is too big to show here.
node_modules/@react-three/drei/web/Loader.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/web/Loader.d.ts+12
This diff is too big to show here.
node_modules/@react-three/drei/web/Loader.js+101
This diff is too big to show here.
node_modules/@react-three/drei/web/PresentationControls.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/web/PresentationControls.d.ts+17
This diff is too big to show here.
node_modules/@react-three/drei/web/PresentationControls.js+87
This diff is too big to show here.
node_modules/@react-three/drei/web/ScreenVideoTexture.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/web/ScreenVideoTexture.d.ts+17
This diff is too big to show here.
node_modules/@react-three/drei/web/ScreenVideoTexture.js+30
This diff is too big to show here.
node_modules/@react-three/drei/web/ScrollControls.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/web/ScrollControls.d.ts+45
This diff is too big to show here.
node_modules/@react-three/drei/web/ScrollControls.js+237
This diff is too big to show here.
node_modules/@react-three/drei/web/Select.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/web/Select.d.ts+14
This diff is too big to show here.
node_modules/@react-three/drei/web/Select.js+167
This diff is too big to show here.
node_modules/@react-three/drei/web/View.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/web/View.d.ts+36
This diff is too big to show here.
node_modules/@react-three/drei/web/View.js+289
This diff is too big to show here.
node_modules/@react-three/drei/web/WebcamVideoTexture.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/web/WebcamVideoTexture.d.ts+17
This diff is too big to show here.
node_modules/@react-three/drei/web/WebcamVideoTexture.js+33
This diff is too big to show here.
node_modules/@react-three/drei/web/index.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/web/index.d.ts+17
This diff is too big to show here.
node_modules/@react-three/drei/web/index.js+179
This diff is too big to show here.
node_modules/@react-three/drei/web/pivotControls/AxisArrow.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/web/pivotControls/AxisArrow.d.ts+7
This diff is too big to show here.
node_modules/@react-three/drei/web/pivotControls/AxisArrow.js+194
This diff is too big to show here.
node_modules/@react-three/drei/web/pivotControls/AxisRotator.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/web/pivotControls/AxisRotator.d.ts+7
This diff is too big to show here.
node_modules/@react-three/drei/web/pivotControls/AxisRotator.js+220
This diff is too big to show here.
node_modules/@react-three/drei/web/pivotControls/PlaneSlider.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/web/pivotControls/PlaneSlider.d.ts+7
This diff is too big to show here.
node_modules/@react-three/drei/web/pivotControls/PlaneSlider.js+201
This diff is too big to show here.
node_modules/@react-three/drei/web/pivotControls/ScalingSphere.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/web/pivotControls/ScalingSphere.d.ts+7
This diff is too big to show here.
node_modules/@react-three/drei/web/pivotControls/ScalingSphere.js+192
This diff is too big to show here.
node_modules/@react-three/drei/web/pivotControls/context.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/web/pivotControls/context.d.ts+32
This diff is too big to show here.
node_modules/@react-three/drei/web/pivotControls/context.js+5
This diff is too big to show here.
node_modules/@react-three/drei/web/pivotControls/index.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/web/pivotControls/index.d.ts+39
This diff is too big to show here.
node_modules/@react-three/drei/web/pivotControls/index.js+211
This diff is too big to show here.
node_modules/@react-three/drei/web/useCursor.cjs.js+1
This diff is too big to show here.
node_modules/@react-three/drei/web/useCursor.d.ts+1
This diff is too big to show here.
node_modules/@react-three/drei/web/useCursor.js+12
This diff is too big to show here.
node_modules/@react-three/fiber/CHANGELOG.md+1094
This diff is too big to show here.
node_modules/@react-three/fiber/dist/declarations/src/core/events.d.ts+93
This diff is too big to show here.
node_modules/@react-three/fiber/dist/declarations/src/core/hooks.d.ts+57
This diff is too big to show here.
node_modules/@react-three/fiber/dist/declarations/src/core/index.d.ts+94
This diff is too big to show here.
node_modules/@react-three/fiber/dist/declarations/src/core/loop.d.ts+38
This diff is too big to show here.
node_modules/@react-three/fiber/dist/declarations/src/core/renderer.d.ts+58
This diff is too big to show here.
node_modules/@react-three/fiber/dist/declarations/src/core/store.d.ts+138
This diff is too big to show here.
node_modules/@react-three/fiber/dist/declarations/src/core/utils.d.ts+134
This diff is too big to show here.
node_modules/@react-three/fiber/dist/declarations/src/index.d.ts+12
This diff is too big to show here.
node_modules/@react-three/fiber/dist/declarations/src/native.d.ts+13
This diff is too big to show here.
node_modules/@react-three/fiber/dist/declarations/src/native/Canvas.d.ts+14
This diff is too big to show here.
node_modules/@react-three/fiber/dist/declarations/src/native/events.d.ts+5
This diff is too big to show here.
node_modules/@react-three/fiber/dist/declarations/src/native/polyfills.d.ts+1
This diff is too big to show here.
node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts+398
This diff is too big to show here.
node_modules/@react-three/fiber/dist/declarations/src/web/Canvas.d.ts+24
This diff is too big to show here.
node_modules/@react-three/fiber/dist/declarations/src/web/events.d.ts+5
This diff is too big to show here.
node_modules/@react-three/fiber/dist/events-0e73ba93.cjs.prod.js+2408
This diff is too big to show here.
node_modules/@react-three/fiber/dist/events-776716bd.esm.js+2348
This diff is too big to show here.
node_modules/@react-three/fiber/dist/events-d0566a2e.cjs.dev.js+2408
This diff is too big to show here.
node_modules/@react-three/fiber/dist/react-three-fiber.cjs.d.ts+1
This diff is too big to show here.
node_modules/@react-three/fiber/dist/react-three-fiber.cjs.dev.js+221
This diff is too big to show here.
node_modules/@react-three/fiber/dist/react-three-fiber.cjs.js+7
This diff is too big to show here.
node_modules/@react-three/fiber/dist/react-three-fiber.cjs.prod.js+221
This diff is too big to show here.
node_modules/@react-three/fiber/dist/react-three-fiber.esm.js+164
This diff is too big to show here.
node_modules/@react-three/fiber/native/dist/react-three-fiber-native.cjs.d.ts+1
This diff is too big to show here.
node_modules/@react-three/fiber/native/dist/react-three-fiber-native.cjs.dev.js+554
This diff is too big to show here.
node_modules/@react-three/fiber/native/dist/react-three-fiber-native.cjs.js+7
This diff is too big to show here.
node_modules/@react-three/fiber/native/dist/react-three-fiber-native.cjs.prod.js+554
This diff is too big to show here.
node_modules/@react-three/fiber/native/dist/react-three-fiber-native.esm.js+499
This diff is too big to show here.
node_modules/@react-three/fiber/native/package.json+5
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/LICENSE+21
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/context.d.ts+27
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/context.js+73
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/esm/context.d.ts+27
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/esm/context.js+48
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/esm/context.mjs+48
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/esm/index.d.ts+3
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/esm/index.js+111
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/esm/index.mjs+111
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/esm/middleware.d.ts+5
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/esm/middleware.js+365
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/esm/middleware.mjs+365
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/esm/middleware/combine.d.ts+5
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/esm/middleware/devtools.d.ts+105
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/esm/middleware/persist.d.ts+107
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/esm/middleware/redux.d.ts+53
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/esm/middleware/subscribeWithSelector.d.ts+41
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/esm/react.d.ts+15
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/esm/shallow.d.ts+1
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/esm/shallow.js+20
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/esm/shallow.mjs+20
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/esm/vanilla.d.ts+40
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/esm/vanilla.js+39
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/esm/vanilla.mjs+39
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/index.d.ts+3
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/index.js+178
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/middleware.d.ts+5
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/middleware.js+466
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/middleware/combine.d.ts+5
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/middleware/devtools.d.ts+105
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/middleware/persist.d.ts+107
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/middleware/redux.d.ts+53
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/middleware/subscribeWithSelector.d.ts+41
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/package.json+78
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/react.d.ts+15
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/readme.md+632
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/shallow.d.ts+1
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/shallow.js+29
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/system/context.development.js+63
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/system/context.production.js+1
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/system/index.development.js+126
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/system/index.production.js+1
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/system/middleware.development.js+374
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/system/middleware.production.js+1
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/system/shallow.development.js+29
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/system/shallow.production.js+1
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/system/vanilla.development.js+48
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/system/vanilla.production.js+1
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/umd/context.development.js+77
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/umd/context.production.js+1
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/umd/index.development.js+182
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/umd/index.production.js+1
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/umd/middleware.development.js+472
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/umd/middleware.production.js+1
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/umd/shallow.development.js+35
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/umd/shallow.production.js+1
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/umd/vanilla.development.js+83
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/umd/vanilla.production.js+1
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/vanilla.d.ts+40
This diff is too big to show here.
node_modules/@react-three/fiber/node_modules/zustand/vanilla.js+77
This diff is too big to show here.
node_modules/@react-three/fiber/package.json+87
This diff is too big to show here.
node_modules/@react-three/fiber/readme.md+253
This diff is too big to show here.
node_modules/@react-three/postprocessing/LICENSE+21
This diff is too big to show here.
node_modules/@react-three/postprocessing/README.md+81
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/EffectComposer.cjs+137
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/EffectComposer.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/EffectComposer.d.ts+27
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/EffectComposer.js+137
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/EffectComposer.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/EffectComposer.test.d.ts+4
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/Selection.cjs+36
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/Selection.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/Selection.d.ts+16
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/Selection.js+36
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/Selection.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/compat.cjs+77
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/compat.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/compat.js+60
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/compat.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/ASCII.cjs+113
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/ASCII.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/ASCII.d.ts+18
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/ASCII.js+113
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/ASCII.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Autofocus.cjs+126
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Autofocus.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Autofocus.d.ts+22
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Autofocus.js+109
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Autofocus.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Bloom.cjs+9
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Bloom.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Bloom.d.ts+6
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Bloom.js+9
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Bloom.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/BrightnessContrast.cjs+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/BrightnessContrast.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/BrightnessContrast.d.ts+10
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/BrightnessContrast.js+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/BrightnessContrast.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/ChromaticAberration.cjs+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/ChromaticAberration.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/ChromaticAberration.d.ts+13
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/ChromaticAberration.js+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/ChromaticAberration.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/ColorAverage.cjs+11
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/ColorAverage.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/ColorAverage.d.ts+8
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/ColorAverage.js+11
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/ColorAverage.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/ColorDepth.cjs+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/ColorDepth.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/ColorDepth.d.ts+9
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/ColorDepth.js+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/ColorDepth.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Depth.cjs+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Depth.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Depth.d.ts+9
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Depth.js+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Depth.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/DepthOfField.cjs+74
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/DepthOfField.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/DepthOfField.d.ts+25
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/DepthOfField.js+74
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/DepthOfField.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/DotScreen.cjs+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/DotScreen.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/DotScreen.d.ts+10
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/DotScreen.js+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/DotScreen.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/FXAA.cjs+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/FXAA.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/FXAA.d.ts+8
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/FXAA.js+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/FXAA.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Glitch.cjs+31
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Glitch.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Glitch.d.ts+30
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Glitch.js+31
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Glitch.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/GodRays.cjs+15
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/GodRays.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/GodRays.d.ts+21
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/GodRays.js+15
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/GodRays.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Grid.cjs+18
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Grid.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Grid.d.ts+12
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Grid.js+18
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Grid.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/HueSaturation.cjs+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/HueSaturation.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/HueSaturation.d.ts+10
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/HueSaturation.js+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/HueSaturation.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/LUT.cjs+20
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/LUT.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/LUT.d.ts+9
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/LUT.js+20
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/LUT.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/LensFlare.cjs+573
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/LensFlare.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/LensFlare.d.ts+55
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/LensFlare.js+556
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/LensFlare.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/N8AO/BlueNoise.cjs+4
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/N8AO/BlueNoise.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/N8AO/BlueNoise.js+5
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/N8AO/BlueNoise.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/N8AO/DepthDownSample.cjs+183
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/N8AO/DepthDownSample.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/N8AO/DepthDownSample.js+166
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/N8AO/DepthDownSample.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/N8AO/EffectCompositer.cjs+278
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/N8AO/EffectCompositer.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/N8AO/EffectCompositer.js+261
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/N8AO/EffectCompositer.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/N8AO/EffectShader.cjs+236
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/N8AO/EffectShader.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/N8AO/EffectShader.js+219
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/N8AO/EffectShader.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/N8AO/FullScreenTriangle.cjs+59
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/N8AO/FullScreenTriangle.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/N8AO/FullScreenTriangle.js+42
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/N8AO/FullScreenTriangle.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/N8AO/N8AOPostPass.cjs+502
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/N8AO/N8AOPostPass.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/N8AO/N8AOPostPass.js+485
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/N8AO/N8AOPostPass.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/N8AO/PoissionBlur.cjs+186
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/N8AO/PoissionBlur.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/N8AO/PoissionBlur.js+169
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/N8AO/PoissionBlur.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/N8AO/index.cjs+60
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/N8AO/index.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/N8AO/index.d.ts+18
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/N8AO/index.js+60
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/N8AO/index.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Noise.cjs+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Noise.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Noise.d.ts+9
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Noise.js+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Noise.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Outline.cjs+100
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Outline.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Outline.d.ts+30
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Outline.js+100
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Outline.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Pixelation.cjs+11
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Pixelation.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Pixelation.d.ts+6
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Pixelation.js+11
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Pixelation.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Ramp.cjs+156
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Ramp.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Ramp.d.ts+88
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Ramp.js+156
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Ramp.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/SMAA.cjs+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/SMAA.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/SMAA.d.ts+10
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/SMAA.js+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/SMAA.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/SSAO.cjs+37
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/SSAO.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/SSAO.d.ts+30
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/SSAO.js+37
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/SSAO.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/SSR/index.cjs+33
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/SSR/index.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/SSR/index.d.ts+55
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/SSR/index.js+33
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/SSR/index.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/SSR/screen-space-reflections.cjs+1699
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/SSR/screen-space-reflections.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/SSR/screen-space-reflections.js+1699
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/SSR/screen-space-reflections.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/ScanlineEffect.cjs+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/ScanlineEffect.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/ScanlineEffect.d.ts+9
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/ScanlineEffect.js+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/ScanlineEffect.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/SelectiveBloom.cjs+104
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/SelectiveBloom.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/SelectiveBloom.d.ts+20
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/SelectiveBloom.js+104
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/SelectiveBloom.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Sepia.cjs+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Sepia.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Sepia.d.ts+9
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Sepia.js+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Sepia.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/ShockWave.cjs+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/ShockWave.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/ShockWave.d.ts+6
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/ShockWave.js+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/ShockWave.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Texture.cjs+21
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Texture.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Texture.d.ts+11
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Texture.js+21
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Texture.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/TiltShift.cjs+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/TiltShift.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/TiltShift.d.ts+17
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/TiltShift.js+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/TiltShift.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/TiltShift2.cjs+98
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/TiltShift2.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/TiltShift2.d.ts+30
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/TiltShift2.js+98
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/TiltShift2.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/ToneMapping.cjs+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/ToneMapping.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/ToneMapping.d.ts+19
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/ToneMapping.js+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/ToneMapping.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Vignette.cjs+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Vignette.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Vignette.d.ts+12
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Vignette.js+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Vignette.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Water.cjs+38
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Water.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Water.d.ts+15
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Water.js+38
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/effects/Water.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/index.cjs+89
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/index.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/index.d.ts+38
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/index.js+89
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/index.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/util.cjs+69
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/util.cjs.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/util.d.ts+13
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/util.js+52
This diff is too big to show here.
node_modules/@react-three/postprocessing/dist/util.js.map+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/CHANGELOG.md+87
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/buffer/dist/maath-buffer.cjs.d.ts+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/buffer/dist/maath-buffer.cjs.dev.js+26
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/buffer/dist/maath-buffer.cjs.js+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/buffer/dist/maath-buffer.cjs.prod.js+26
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/buffer/dist/maath-buffer.esm.js+9
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/buffer/package.json+4
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/buffer-b2fe132b.cjs.dev.js+244
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/buffer-d2a4726c.esm.js+232
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/buffer-fd4cab21.cjs.prod.js+244
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/classCallCheck-839aeb3a.cjs.prod.js+9
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/classCallCheck-9098b006.esm.js+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/classCallCheck-eaf0efc7.cjs.dev.js+9
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/declarations/src/buffer.d.ts+57
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/declarations/src/ctypes.d.ts+5
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/declarations/src/easing.d.ts+66
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/declarations/src/geometry.d.ts+6
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/declarations/src/index.d.ts+10
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/declarations/src/matrix.d.ts+57
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/declarations/src/misc.d.ts+95
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/declarations/src/random/index.d.ts+43
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/declarations/src/random/noise.d.ts+5
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/declarations/src/three.d.ts+14
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/declarations/src/triangle.d.ts+73
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/declarations/src/vector2.d.ts+23
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/declarations/src/vector3.d.ts+24
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/easing-3be59c6d.esm.js+238
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/easing-43650c2a.cjs.dev.js+252
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/easing-8604b40a.cjs.prod.js+252
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/geometry-4cd1adb9.cjs.prod.js+356
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/geometry-982366ff.esm.js+331
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/geometry-a03c19ff.cjs.dev.js+356
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/index-43782085.esm.js+583
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/index-9dabf709.cjs.dev.js+595
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/index-b0cdc00c.cjs.prod.js+595
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/isNativeReflectConstruct-5594d075.esm.js+23
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/isNativeReflectConstruct-9acebf01.cjs.prod.js+26
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/isNativeReflectConstruct-ddc4ebc1.cjs.dev.js+26
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/maath.cjs.d.ts+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/maath.cjs.dev.js+31
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/maath.cjs.js+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/maath.cjs.prod.js+31
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/maath.esm.js+14
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/matrix-baa530bf.esm.js+147
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/matrix-e0b2acc5.cjs.prod.js+154
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/matrix-fb190f60.cjs.dev.js+154
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/misc-2532a33c.cjs.dev.js+339
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/misc-7d870b3c.esm.js+314
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/misc-8dab750e.cjs.prod.js+339
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/objectSpread2-284232a6.esm.js+54
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/objectSpread2-2ccd0bad.cjs.prod.js+57
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/objectSpread2-32cd2c34.cjs.dev.js+57
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/three-225cfce4.cjs.prod.js+63
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/three-87cc244e.cjs.dev.js+63
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/three-eb2ad8c0.esm.js+59
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/triangle-33ffdfef.cjs.dev.js+333
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/triangle-9e5a8229.cjs.prod.js+333
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/triangle-b62b9067.esm.js+322
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/vector2-49e42f03.cjs.prod.js+76
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/vector2-d2bf51f1.esm.js+63
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/vector2-f44fd63e.cjs.dev.js+76
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/vector3-0a088b7f.esm.js+70
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/vector3-4bbdb053.cjs.prod.js+84
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/dist/vector3-5e723d1a.cjs.dev.js+84
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/easing/dist/maath-easing.cjs.d.ts+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/easing/dist/maath-easing.cjs.dev.js+25
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/easing/dist/maath-easing.cjs.js+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/easing/dist/maath-easing.cjs.prod.js+25
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/easing/dist/maath-easing.esm.js+6
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/easing/package.json+4
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/geometry/dist/maath-geometry.cjs.d.ts+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/geometry/dist/maath-geometry.cjs.dev.js+14
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/geometry/dist/maath-geometry.cjs.js+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/geometry/dist/maath-geometry.cjs.prod.js+14
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/geometry/dist/maath-geometry.esm.js+4
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/geometry/package.json+5
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/matrix/dist/maath-matrix.cjs.d.ts+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/matrix/dist/maath-matrix.cjs.dev.js+14
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/matrix/dist/maath-matrix.cjs.js+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/matrix/dist/maath-matrix.cjs.prod.js+14
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/matrix/dist/maath-matrix.esm.js+2
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/matrix/package.json+4
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/misc/dist/maath-misc.cjs.d.ts+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/misc/dist/maath-misc.cjs.dev.js+35
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/misc/dist/maath-misc.cjs.js+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/misc/dist/maath-misc.cjs.prod.js+35
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/misc/dist/maath-misc.esm.js+5
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/misc/package.json+4
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/package.json+31
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/random/dist/maath-random.cjs.d.ts+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/random/dist/maath-random.cjs.dev.js+25
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/random/dist/maath-random.cjs.js+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/random/dist/maath-random.cjs.prod.js+25
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/random/dist/maath-random.esm.js+8
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/random/package.json+4
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/three/dist/maath-three.cjs.d.ts+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/three/dist/maath-three.cjs.dev.js+11
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/three/dist/maath-three.cjs.js+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/three/dist/maath-three.cjs.prod.js+11
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/three/dist/maath-three.esm.js+2
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/three/package.json+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/triangle/dist/maath-triangle.cjs.d.ts+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/triangle/dist/maath-triangle.cjs.dev.js+18
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/triangle/dist/maath-triangle.cjs.js+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/triangle/dist/maath-triangle.cjs.prod.js+18
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/triangle/dist/maath-triangle.esm.js+4
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/triangle/package.json+4
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/vector2/dist/maath-vector2.cjs.d.ts+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/vector2/dist/maath-vector2.cjs.dev.js+19
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/vector2/dist/maath-vector2.cjs.js+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/vector2/dist/maath-vector2.cjs.prod.js+19
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/vector2/dist/maath-vector2.esm.js+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/vector2/package.json+4
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/vector3/dist/maath-vector3.cjs.d.ts+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/vector3/dist/maath-vector3.cjs.dev.js+20
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/vector3/dist/maath-vector3.cjs.js+7
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/vector3/dist/maath-vector3.cjs.prod.js+20
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/vector3/dist/maath-vector3.esm.js+1
This diff is too big to show here.
node_modules/@react-three/postprocessing/node_modules/maath/vector3/package.json+4
This diff is too big to show here.
node_modules/@react-three/postprocessing/package.json+96
This diff is too big to show here.
node_modules/@stitches/react/README.md+64
This diff is too big to show here.
node_modules/@stitches/react/dist/index.cjs+2
This diff is too big to show here.
node_modules/@stitches/react/dist/index.global.js+2
This diff is too big to show here.
node_modules/@stitches/react/dist/index.map+7
This diff is too big to show here.
node_modules/@stitches/react/dist/index.mjs+2
This diff is too big to show here.
node_modules/@stitches/react/package.json+94
This diff is too big to show here.
node_modules/@stitches/react/types/config.d.ts+210
This diff is too big to show here.
node_modules/@stitches/react/types/css-util.d.ts+119
This diff is too big to show here.
node_modules/@stitches/react/types/css.d.ts+9797
This diff is too big to show here.
node_modules/@stitches/react/types/index.d.ts+82
This diff is too big to show here.
node_modules/@stitches/react/types/stitches.d.ts+288
This diff is too big to show here.
node_modules/@stitches/react/types/styled-component.d.ts+163
This diff is too big to show here.
node_modules/@stitches/react/types/theme.d.ts+43
This diff is too big to show here.
node_modules/@stitches/react/types/util.d.ts+32
This diff is too big to show here.
node_modules/@tweenjs/tween.js/LICENSE+23
This diff is too big to show here.
node_modules/@tweenjs/tween.js/README.md+396
This diff is too big to show here.
node_modules/@tweenjs/tween.js/dist/tween.amd.js+895
This diff is too big to show here.
node_modules/@tweenjs/tween.js/dist/tween.cjs+893
This diff is too big to show here.
node_modules/@tweenjs/tween.js/dist/tween.d.ts+206
This diff is too big to show here.
node_modules/@tweenjs/tween.js/dist/tween.esm.js+876
This diff is too big to show here.
node_modules/@tweenjs/tween.js/dist/tween.umd.js+899
This diff is too big to show here.
node_modules/@tweenjs/tween.js/package.json+64
This diff is too big to show here.
node_modules/@types/draco3d/LICENSE+21
This diff is too big to show here.
node_modules/@types/draco3d/README.md+15
This diff is too big to show here.
node_modules/@types/draco3d/index.d.ts+267
This diff is too big to show here.
node_modules/@types/draco3d/package.json+30
This diff is too big to show here.
node_modules/@types/offscreencanvas/LICENSE+21
This diff is too big to show here.
node_modules/@types/offscreencanvas/README.md+15
This diff is too big to show here.
node_modules/@types/offscreencanvas/index.d.ts+208
This diff is too big to show here.
node_modules/@types/offscreencanvas/package.json+36
This diff is too big to show here.
node_modules/@types/react-reconciler/LICENSE+21
This diff is too big to show here.
node_modules/@types/react-reconciler/README.md+16
This diff is too big to show here.
node_modules/@types/react-reconciler/constants.d.ts+6
This diff is too big to show here.
node_modules/@types/react-reconciler/index.d.ts+1135
This diff is too big to show here.
node_modules/@types/react-reconciler/package.json+32
This diff is too big to show here.
node_modules/@types/react/LICENSE+21
This diff is too big to show here.
node_modules/@types/react/README.md+15
This diff is too big to show here.
node_modules/@types/react/canary.d.ts+129
This diff is too big to show here.
node_modules/@types/react/compiler-runtime.d.ts+4
This diff is too big to show here.
node_modules/@types/react/experimental.d.ts+184
This diff is too big to show here.
node_modules/@types/react/global.d.ts+166
This diff is too big to show here.
node_modules/@types/react/index.d.ts+4370
This diff is too big to show here.
node_modules/@types/react/jsx-dev-runtime.d.ts+45
This diff is too big to show here.
node_modules/@types/react/jsx-runtime.d.ts+36
This diff is too big to show here.
node_modules/@types/react/package.json+210
This diff is too big to show here.
node_modules/@types/react/ts5.0/canary.d.ts+129
This diff is too big to show here.
node_modules/@types/react/ts5.0/experimental.d.ts+184
This diff is too big to show here.
node_modules/@types/react/ts5.0/global.d.ts+166
This diff is too big to show here.
node_modules/@types/react/ts5.0/index.d.ts+4357
This diff is too big to show here.
node_modules/@types/react/ts5.0/jsx-dev-runtime.d.ts+44
This diff is too big to show here.
node_modules/@types/react/ts5.0/jsx-runtime.d.ts+35
This diff is too big to show here.
node_modules/@types/stats.js/LICENSE+21
This diff is too big to show here.
node_modules/@types/stats.js/README.md+60
This diff is too big to show here.
node_modules/@types/stats.js/index.d.ts+41
This diff is too big to show here.
node_modules/@types/stats.js/package.json+36
This diff is too big to show here.
node_modules/@types/three/LICENSE+21
This diff is too big to show here.
node_modules/@types/three/README.md+15
This diff is too big to show here.
node_modules/@types/three/build/three.core.d.ts+1
This diff is too big to show here.
node_modules/@types/three/build/three.core.min.d.ts+1
This diff is too big to show here.
node_modules/@types/three/build/three.d.cts+1
This diff is too big to show here.
node_modules/@types/three/build/three.module.d.ts+1
This diff is too big to show here.
node_modules/@types/three/build/three.module.min.d.ts+1
This diff is too big to show here.
node_modules/@types/three/build/three.tsl.d.ts+1
This diff is too big to show here.
node_modules/@types/three/build/three.tsl.min.d.ts+1
This diff is too big to show here.
node_modules/@types/three/build/three.webgpu.d.ts+1
This diff is too big to show here.
node_modules/@types/three/build/three.webgpu.min.d.ts+1
This diff is too big to show here.
node_modules/@types/three/build/three.webgpu.nodes.d.ts+1
This diff is too big to show here.
node_modules/@types/three/build/three.webgpu.nodes.min.d.ts+1
This diff is too big to show here.
node_modules/@types/three/examples/jsm/Addons.d.ts+293
This diff is too big to show here.
node_modules/@types/three/examples/jsm/animation/AnimationClipCreator.d.ts+12
This diff is too big to show here.
node_modules/@types/three/examples/jsm/animation/CCDIKSolver.d.ts+44
This diff is too big to show here.
node_modules/@types/three/examples/jsm/capabilities/WebGL.d.ts+6
This diff is too big to show here.
node_modules/@types/three/examples/jsm/capabilities/WebGPU.d.ts+7
This diff is too big to show here.
node_modules/@types/three/examples/jsm/controls/ArcballControls.d.ts+208
This diff is too big to show here.
node_modules/@types/three/examples/jsm/controls/DragControls.d.ts+81
This diff is too big to show here.
node_modules/@types/three/examples/jsm/controls/FirstPersonControls.d.ts+96
This diff is too big to show here.
node_modules/@types/three/examples/jsm/controls/FlyControls.d.ts+44
This diff is too big to show here.
node_modules/@types/three/examples/jsm/controls/MapControls.d.ts+21
This diff is too big to show here.
node_modules/@types/three/examples/jsm/controls/OrbitControls.d.ts+295
This diff is too big to show here.
node_modules/@types/three/examples/jsm/controls/PointerLockControls.d.ts+84
This diff is too big to show here.
node_modules/@types/three/examples/jsm/controls/TrackballControls.d.ts+142
This diff is too big to show here.
node_modules/@types/three/examples/jsm/controls/TransformControls.d.ts+332
This diff is too big to show here.
node_modules/@types/three/examples/jsm/csm/CSM.d.ts+55
This diff is too big to show here.
node_modules/@types/three/examples/jsm/csm/CSMFrustum.d.ts+25
This diff is too big to show here.
node_modules/@types/three/examples/jsm/csm/CSMHelper.d.ts+28
This diff is too big to show here.
node_modules/@types/three/examples/jsm/csm/CSMShader.d.ts+4
This diff is too big to show here.
node_modules/@types/three/examples/jsm/csm/CSMShadowNode.d.ts+44
This diff is too big to show here.
node_modules/@types/three/examples/jsm/curves/CurveExtras.d.ts+68
This diff is too big to show here.
node_modules/@types/three/examples/jsm/curves/NURBSCurve.d.ts+28
This diff is too big to show here.
node_modules/@types/three/examples/jsm/curves/NURBSSurface.d.ts+13
This diff is too big to show here.
node_modules/@types/three/examples/jsm/curves/NURBSUtils.d.ts+146
This diff is too big to show here.
node_modules/@types/three/examples/jsm/curves/NURBSVolume.d.ts+23
This diff is too big to show here.
node_modules/@types/three/examples/jsm/effects/AnaglyphEffect.d.ts+21
This diff is too big to show here.
node_modules/@types/three/examples/jsm/effects/AsciiEffect.d.ts+18
This diff is too big to show here.
node_modules/@types/three/examples/jsm/effects/OutlineEffect.d.ts+28
This diff is too big to show here.
node_modules/@types/three/examples/jsm/effects/ParallaxBarrierEffect.d.ts+11
This diff is too big to show here.
node_modules/@types/three/examples/jsm/effects/StereoEffect.d.ts+9
This diff is too big to show here.
node_modules/@types/three/examples/jsm/environments/ColorEnvironment.d.ts+9
This diff is too big to show here.
node_modules/@types/three/examples/jsm/environments/DebugEnvironment.d.ts+5
This diff is too big to show here.
node_modules/@types/three/examples/jsm/environments/RoomEnvironment.d.ts+6
This diff is too big to show here.
node_modules/@types/three/examples/jsm/exporters/DRACOExporter.d.ts+17
This diff is too big to show here.
node_modules/@types/three/examples/jsm/exporters/EXRExporter.d.ts+27
This diff is too big to show here.
node_modules/@types/three/examples/jsm/exporters/GLTFExporter.d.ts+156
This diff is too big to show here.
node_modules/@types/three/examples/jsm/exporters/KTX2Exporter.d.ts+7
This diff is too big to show here.
node_modules/@types/three/examples/jsm/exporters/OBJExporter.d.ts+7
This diff is too big to show here.
node_modules/@types/three/examples/jsm/exporters/PLYExporter.d.ts+30
This diff is too big to show here.
node_modules/@types/three/examples/jsm/exporters/STLExporter.d.ts+21
This diff is too big to show here.
node_modules/@types/three/examples/jsm/exporters/USDZExporter.d.ts+26
This diff is too big to show here.
node_modules/@types/three/examples/jsm/geometries/BoxLineGeometry.d.ts+12
This diff is too big to show here.
node_modules/@types/three/examples/jsm/geometries/ConvexGeometry.d.ts+5
This diff is too big to show here.
node_modules/@types/three/examples/jsm/geometries/DecalGeometry.d.ts+16
This diff is too big to show here.
node_modules/@types/three/examples/jsm/geometries/ParametricFunctions.d.ts+8
This diff is too big to show here.
node_modules/@types/three/examples/jsm/geometries/ParametricGeometry.d.ts+18
This diff is too big to show here.
node_modules/@types/three/examples/jsm/geometries/RoundedBoxGeometry.d.ts+5
This diff is too big to show here.
node_modules/@types/three/examples/jsm/geometries/TeapotGeometry.d.ts+37
This diff is too big to show here.
node_modules/@types/three/examples/jsm/geometries/TextGeometry.d.ts+89
This diff is too big to show here.
node_modules/@types/three/examples/jsm/gpgpu/BitonicSort.d.ts+21
This diff is too big to show here.
node_modules/@types/three/examples/jsm/helpers/AnimationPathHelper.d.ts+38
This diff is too big to show here.
node_modules/@types/three/examples/jsm/helpers/LightProbeGridHelper.d.ts+12
This diff is too big to show here.
node_modules/@types/three/examples/jsm/helpers/LightProbeHelper.d.ts+12
This diff is too big to show here.
node_modules/@types/three/examples/jsm/helpers/LightProbeHelperGPU.d.ts+12
This diff is too big to show here.
node_modules/@types/three/examples/jsm/helpers/OctreeHelper.d.ts+17
This diff is too big to show here.
node_modules/@types/three/examples/jsm/helpers/PositionalAudioHelper.d.ts+13
This diff is too big to show here.
node_modules/@types/three/examples/jsm/helpers/RapierHelper.d.ts+13
This diff is too big to show here.
node_modules/@types/three/examples/jsm/helpers/RectAreaLightHelper.d.ts+10
This diff is too big to show here.
node_modules/@types/three/examples/jsm/helpers/TextureHelper.d.ts+10
This diff is too big to show here.
node_modules/@types/three/examples/jsm/helpers/TextureHelperGPU.d.ts+10
This diff is too big to show here.
node_modules/@types/three/examples/jsm/helpers/VertexNormalsHelper.d.ts+14
This diff is too big to show here.
node_modules/@types/three/examples/jsm/helpers/VertexTangentsHelper.d.ts+12
This diff is too big to show here.
node_modules/@types/three/examples/jsm/helpers/ViewHelper.d.ts+20
This diff is too big to show here.
node_modules/@types/three/examples/jsm/inspector/Extension.d.ts+9
This diff is too big to show here.
node_modules/@types/three/examples/jsm/inspector/Inspector.d.ts+29
This diff is too big to show here.
node_modules/@types/three/examples/jsm/inspector/RendererInspector.d.ts+9
This diff is too big to show here.
node_modules/@types/three/examples/jsm/inspector/extensions/tsl-graph/TSLGraphEditor.d.ts+20
This diff is too big to show here.
node_modules/@types/three/examples/jsm/inspector/extensions/tsl-graph/TSLGraphLoader.d.ts+11
This diff is too big to show here.
node_modules/@types/three/examples/jsm/inspector/tabs/Parameters.d.ts+119
This diff is too big to show here.
node_modules/@types/three/examples/jsm/inspector/ui/Item.d.ts+5
This diff is too big to show here.
node_modules/@types/three/examples/jsm/inspector/ui/Tab.d.ts+7
This diff is too big to show here.
node_modules/@types/three/examples/jsm/inspector/ui/Values.d.ts+100
This diff is too big to show here.
node_modules/@types/three/examples/jsm/interaction/InteractionManager.d.ts+18
This diff is too big to show here.
node_modules/@types/three/examples/jsm/interactive/HTMLMesh.d.ts+13
This diff is too big to show here.
node_modules/@types/three/examples/jsm/interactive/InteractiveGroup.d.ts+28
This diff is too big to show here.
node_modules/@types/three/examples/jsm/interactive/SelectionBox.d.ts+16
This diff is too big to show here.
node_modules/@types/three/examples/jsm/interactive/SelectionHelper.d.ts+17
This diff is too big to show here.
node_modules/@types/three/examples/jsm/libs/fflate.module.d.ts+1
This diff is too big to show here.
node_modules/@types/three/examples/jsm/libs/lil-gui.module.min.d.ts+608
This diff is too big to show here.
node_modules/@types/three/examples/jsm/libs/meshopt_decoder.module.d.ts+1
This diff is too big to show here.
node_modules/@types/three/examples/jsm/libs/stats.module.d.ts+3
This diff is too big to show here.
node_modules/@types/three/examples/jsm/libs/tween.module.d.ts+2
This diff is too big to show here.
node_modules/@types/three/examples/jsm/lighting/DynamicLighting.d.ts+16
This diff is too big to show here.
node_modules/@types/three/examples/jsm/lighting/LightProbeGrid.d.ts+34
This diff is too big to show here.
node_modules/@types/three/examples/jsm/lighting/TiledLighting.d.ts+9
This diff is too big to show here.
node_modules/@types/three/examples/jsm/lights/LightProbeGenerator.d.ts+16
This diff is too big to show here.
node_modules/@types/three/examples/jsm/lights/RectAreaLightTexturesLib.d.ts+7
This diff is too big to show here.
node_modules/@types/three/examples/jsm/lights/RectAreaLightUniformsLib.d.ts+5
This diff is too big to show here.
node_modules/@types/three/examples/jsm/lines/Line2.d.ts+25
This diff is too big to show here.
node_modules/@types/three/examples/jsm/lines/LineGeometry.d.ts+27
This diff is too big to show here.
node_modules/@types/three/examples/jsm/lines/LineMaterial.d.ts+82
This diff is too big to show here.
node_modules/@types/three/examples/jsm/lines/LineSegments2.d.ts+39
This diff is too big to show here.
node_modules/@types/three/examples/jsm/lines/LineSegmentsGeometry.d.ts+53
This diff is too big to show here.
node_modules/@types/three/examples/jsm/lines/Wireframe.d.ts+14
This diff is too big to show here.
node_modules/@types/three/examples/jsm/lines/WireframeGeometry2.d.ts+8
This diff is too big to show here.
node_modules/@types/three/examples/jsm/lines/webgpu/Line2.d.ts+14
This diff is too big to show here.
node_modules/@types/three/examples/jsm/lines/webgpu/LineSegments2.d.ts+15
This diff is too big to show here.
node_modules/@types/three/examples/jsm/lines/webgpu/Wireframe.d.ts+13
This diff is too big to show here.
node_modules/@types/three/examples/jsm/loaders/3DMLoader.d.ts+10
This diff is too big to show here.
node_modules/@types/three/examples/jsm/loaders/3MFLoader.d.ts+9
This diff is too big to show here.
node_modules/@types/three/examples/jsm/loaders/AMFLoader.d.ts+7
This diff is too big to show here.
node_modules/@types/three/examples/jsm/loaders/BVHLoader.d.ts+14
This diff is too big to show here.
node_modules/@types/three/examples/jsm/loaders/ColladaLoader.d.ts+35
This diff is too big to show here.
node_modules/@types/three/examples/jsm/loaders/DDSLoader.d.ts+22
This diff is too big to show here.
node_modules/@types/three/examples/jsm/loaders/DRACOLoader.d.ts+25
This diff is too big to show here.
node_modules/@types/three/examples/jsm/loaders/EXRLoader.d.ts+34
This diff is too big to show here.
node_modules/@types/three/examples/jsm/loaders/FBXLoader.d.ts+7
This diff is too big to show here.
node_modules/@types/three/examples/jsm/loaders/FontLoader.d.ts+41
This diff is too big to show here.
node_modules/@types/three/examples/jsm/loaders/GCodeLoader.d.ts+8
This diff is too big to show here.
node_modules/@types/three/examples/jsm/loaders/GLTFLoader.d.ts+152
This diff is too big to show here.
node_modules/@types/three/examples/jsm/loaders/HDRCubeTextureLoader.d.ts+18
This diff is too big to show here.
node_modules/@types/three/examples/jsm/loaders/HDRLoader.d.ts+22
This diff is too big to show here.
node_modules/@types/three/examples/jsm/loaders/IESLoader.d.ts+5
This diff is too big to show here.
node_modules/@types/three/examples/jsm/loaders/KMZLoader.d.ts+9
This diff is too big to show here.
node_modules/@types/three/examples/jsm/loaders/KTX2Loader.d.ts+58
This diff is too big to show here.
node_modules/@types/three/examples/jsm/loaders/KTXLoader.d.ts+22
This diff is too big to show here.
node_modules/@types/three/examples/jsm/loaders/LDrawLoader.d.ts+38
This diff is too big to show here.
node_modules/@types/three/examples/jsm/loaders/LUT3dlLoader.d.ts+39
This diff is too big to show here.
node_modules/@types/three/examples/jsm/loaders/LUTCubeLoader.d.ts+42
This diff is too big to show here.
node_modules/@types/three/examples/jsm/loaders/LUTImageLoader.d.ts+18
This diff is too big to show here.
node_modules/@types/three/examples/jsm/loaders/LWOLoader.d.ts+19
This diff is too big to show here.
node_modules/@types/three/examples/jsm/loaders/LottieLoader.d.ts+18
This diff is too big to show here.
node_modules/@types/three/examples/jsm/loaders/MD2Loader.d.ts+7
This diff is too big to show here.
node_modules/@types/three/examples/jsm/loaders/MDDLoader.d.ts+12
This diff is too big to show here.
node_modules/@types/three/examples/jsm/loaders/MTLLoader.d.ts+95
This diff is too big to show here.
node_modules/@types/three/examples/jsm/loaders/MaterialXLoader.d.ts+5
This diff is too big to show here.
node_modules/@types/three/examples/jsm/loaders/NRRDLoader.d.ts+15
This diff is too big to show here.
node_modules/@types/three/examples/jsm/loaders/OBJLoader.d.ts+10
This diff is too big to show here.
node_modules/@types/three/examples/jsm/loaders/PCDLoader.d.ts+8
This diff is too big to show here.
node_modules/@types/three/examples/jsm/loaders/PDBLoader.d.ts+15
This diff is too big to show here.
node_modules/@types/three/examples/jsm/loaders/PLYLoader.d.ts+11
This diff is too big to show here.