git.iko.soy/rowtype-yoga/purescript-yoga-country
on main help sign in
Initial: Country ADT (ISO 3166-1) with BoundedEnum, property-based tests
commit70c17670ecb4328282fc1e065dfc33af253ce11f authorMark <mark.eibes@gmail.com> dateMon 2 Mar 2026, 20:47 (7 months ago)
7 files changed+3868
.gitignore+4 codegen.mjs+116 package.json+1 spago.lock+1876 spago.yaml+23 src/Data/Country.purs+1796 test/Test/Main.purs+52
.gitignorenew file+4
@@ -0,0 +1,4 @@
1+output/
2+.spago/
3+node_modules/
4+.psci_modules/
codegen.mjsnew file+116
@@ -0,0 +1,116 @@
1+// Generates src/Data/Country.purs from ISO 3166-1 alpha-2 codes
2+import { readFileSync } from "fs"
3+
4+const countries = JSON.parse(readFileSync("/tmp/countries.json", "utf8"))
5+ .sort((a, b) => a.alpha2.localeCompare(b.alpha2))
6+
7+// "Côte d'Ivoire" -> "CoteDIvoire"
8+// "Korea, Republic of" -> "KoreaRepublicOf"
9+const toConstructor = (name) =>
10+ name
11+ .normalize("NFD").replace(/[\u0300-\u036f]/g, "") // strip accents
12+ .replace(/[^a-zA-Z0-9 ]/g, " ") // non-alphanum -> space
13+ .split(/\s+/)
14+ .filter(Boolean)
15+ .map(w => w.charAt(0).toUpperCase() + w.slice(1).toLowerCase())
16+ .join("")
17+
18+// Deduplicate constructors (shouldn't happen but safety)
19+const seen = new Set()
20+const entries = countries.map(c => {
21+ let ctor = toConstructor(c.name)
22+ if (seen.has(ctor)) ctor = ctor + "_" + c.alpha2
23+ seen.add(ctor)
24+ return { ...c, ctor }
25+})
26+
27+const n = entries.length
28+const lines = []
29+
30+lines.push(`module Data.Country where`)
31+lines.push(``)
32+lines.push(`import Prelude`)
33+lines.push(``)
34+lines.push(`import Control.Monad.Except (throwError)`)
35+lines.push(`import Data.Enum (class Enum, class BoundedEnum, Cardinality(..), enumFromTo)`)
36+lines.push(`import Data.Maybe (Maybe(..))`)
37+lines.push(`import Foreign (ForeignError(..))`)
38+lines.push(`import Yoga.JSON (class ReadForeign, class WriteForeign, readImpl, writeImpl)`)
39+lines.push(``)
40+
41+// ADT
42+lines.push(`data Country`)
43+entries.forEach((e, i) => {
44+ const prefix = i === 0 ? " = " : " | "
45+ lines.push(`${prefix}${e.ctor}`)
46+})
47+lines.push(``)
48+lines.push(`derive instance Eq Country`)
49+lines.push(`derive instance Ord Country`)
50+lines.push(``)
51+lines.push(`instance Show Country where`)
52+lines.push(` show = toAlpha2`)
53+lines.push(``)
54+
55+// Bounded
56+lines.push(`instance Bounded Country where`)
57+lines.push(` bottom = ${entries[0].ctor}`)
58+lines.push(` top = ${entries[n - 1].ctor}`)
59+lines.push(``)
60+
61+// Enum
62+lines.push(`instance Enum Country where`)
63+lines.push(` succ = case _ of`)
64+entries.forEach((e, i) => {
65+ if (i < n - 1) lines.push(` ${e.ctor} -> Just ${entries[i + 1].ctor}`)
66+ else lines.push(` ${e.ctor} -> Nothing`)
67+})
68+lines.push(` pred = case _ of`)
69+entries.forEach((e, i) => {
70+ if (i === 0) lines.push(` ${e.ctor} -> Nothing`)
71+ else lines.push(` ${e.ctor} -> Just ${entries[i - 1].ctor}`)
72+})
73+lines.push(``)
74+
75+// BoundedEnum
76+lines.push(`instance BoundedEnum Country where`)
77+lines.push(` cardinality = Cardinality ${n}`)
78+lines.push(` toEnum = case _ of`)
79+entries.forEach((e, i) => lines.push(` ${i} -> Just ${e.ctor}`))
80+lines.push(` _ -> Nothing`)
81+lines.push(` fromEnum = case _ of`)
82+entries.forEach((e, i) => lines.push(` ${e.ctor} -> ${i}`))
83+lines.push(``)
84+
85+// toAlpha2
86+lines.push(`toAlpha2 :: Country -> String`)
87+lines.push(`toAlpha2 = case _ of`)
88+entries.forEach(e => lines.push(` ${e.ctor} -> "${e.alpha2}"`))
89+lines.push(``)
90+
91+// fromAlpha2
92+lines.push(`fromAlpha2 :: String -> Maybe Country`)
93+lines.push(`fromAlpha2 = case _ of`)
94+entries.forEach(e => lines.push(` "${e.alpha2}" -> Just ${e.ctor}`))
95+lines.push(` _ -> Nothing`)
96+lines.push(``)
97+
98+// allCountries
99+lines.push(`allCountries :: Array Country`)
100+lines.push(`allCountries = enumFromTo bottom top`)
101+lines.push(``)
102+
103+// ReadForeign / WriteForeign (serialise as alpha-2)
104+lines.push(`instance WriteForeign Country where`)
105+lines.push(` writeImpl = toAlpha2 >>> writeImpl`)
106+lines.push(``)
107+lines.push(`instance ReadForeign Country where`)
108+lines.push(` readImpl f = do`)
109+lines.push(` let parse s = case fromAlpha2 s of`)
110+lines.push(` Just c -> pure c`)
111+lines.push(` Nothing -> throwError $ pure $ ForeignError $ "Unknown country: " <> s`)
112+lines.push(` s <- readImpl f`)
113+lines.push(` parse s`)
114+lines.push(``)
115+
116+process.stdout.write(lines.join("\n") + "\n")
package.jsonnew file+1
@@ -0,0 +1 @@
1+{"dependencies": {}}
spago.locknew file+1876
@@ -0,0 +1,1876 @@
1+{
2+ "workspace": {
3+ "packages": {
4+ "iso3166": {
5+ "path": "./",
6+ "core": {
7+ "dependencies": [
8+ "control",
9+ "enums",
10+ "foreign",
11+ "maybe",
12+ "prelude",
13+ "yoga-json"
14+ ],
15+ "build_plan": [
16+ "arrays",
17+ "bifunctors",
18+ "catenable-lists",
19+ "const",
20+ "contravariant",
21+ "control",
22+ "datetime",
23+ "distributive",
24+ "effect",
25+ "either",
26+ "enums",
27+ "exceptions",
28+ "exists",
29+ "foldable-traversable",
30+ "foreign",
31+ "foreign-object",
32+ "free",
33+ "functions",
34+ "functors",
35+ "gen",
36+ "identity",
37+ "integers",
38+ "invariant",
39+ "js-bigints",
40+ "js-date",
41+ "lazy",
42+ "lists",
43+ "maybe",
44+ "newtype",
45+ "nonempty",
46+ "nullable",
47+ "numbers",
48+ "ordered-collections",
49+ "orders",
50+ "partial",
51+ "prelude",
52+ "profunctor",
53+ "record",
54+ "refs",
55+ "safe-coerce",
56+ "st",
57+ "strings",
58+ "tailrec",
59+ "transformers",
60+ "tuples",
61+ "type-equality",
62+ "typelevel-prelude",
63+ "unfoldable",
64+ "unsafe-coerce",
65+ "variant",
66+ "yoga-json",
67+ "yoga-tree"
68+ ]
69+ },
70+ "test": {
71+ "dependencies": [
72+ "aff",
73+ "arrays",
74+ "foldable-traversable",
75+ "quickcheck",
76+ "spec",
77+ "spec-discovery",
78+ "spec-quickcheck"
79+ ],
80+ "build_plan": [
81+ "aff",
82+ "ansi",
83+ "argonaut-codecs",
84+ "argonaut-core",
85+ "arraybuffer-types",
86+ "arrays",
87+ "avar",
88+ "bifunctors",
89+ "catenable-lists",
90+ "console",
91+ "const",
92+ "contravariant",
93+ "control",
94+ "datetime",
95+ "distributive",
96+ "effect",
97+ "either",
98+ "enums",
99+ "exceptions",
100+ "exists",
101+ "exitcodes",
102+ "foldable-traversable",
103+ "foreign",
104+ "foreign-object",
105+ "fork",
106+ "free",
107+ "functions",
108+ "functors",
109+ "gen",
110+ "identity",
111+ "integers",
112+ "invariant",
113+ "js-date",
114+ "lazy",
115+ "lcg",
116+ "lists",
117+ "maybe",
118+ "mmorph",
119+ "newtype",
120+ "node-buffer",
121+ "node-event-emitter",
122+ "node-fs",
123+ "node-path",
124+ "node-process",
125+ "node-streams",
126+ "nonempty",
127+ "now",
128+ "nullable",
129+ "numbers",
130+ "open-memoize",
131+ "optparse",
132+ "ordered-collections",
133+ "orders",
134+ "parallel",
135+ "partial",
136+ "pipes",
137+ "posix-types",
138+ "prelude",
139+ "profunctor",
140+ "quickcheck",
141+ "random",
142+ "record",
143+ "refs",
144+ "safe-coerce",
145+ "spec",
146+ "spec-discovery",
147+ "spec-node",
148+ "spec-quickcheck",
149+ "st",
150+ "strings",
151+ "tailrec",
152+ "transformers",
153+ "tuples",
154+ "type-equality",
155+ "typelevel-prelude",
156+ "unfoldable",
157+ "unsafe-coerce"
158+ ]
159+ }
160+ }
161+ },
162+ "package_set": {
163+ "address": {
164+ "registry": "61.2.0"
165+ },
166+ "compiler": ">=0.15.15 <0.16.0",
167+ "content": {
168+ "abc-parser": "2.0.1",
169+ "ace": "9.1.0",
170+ "address-rfc2821": "0.1.1",
171+ "aff": "8.0.0",
172+ "aff-bus": "6.0.0",
173+ "aff-coroutines": "9.0.0",
174+ "aff-promise": "4.0.0",
175+ "aff-retry": "2.0.0",
176+ "affjax": "13.0.0",
177+ "affjax-node": "1.0.0",
178+ "affjax-web": "1.0.0",
179+ "ansi": "7.0.0",
180+ "apexcharts": "0.5.0",
181+ "applicative-phases": "1.0.0",
182+ "argonaut": "9.0.0",
183+ "argonaut-aeson-generic": "0.4.1",
184+ "argonaut-codecs": "9.1.0",
185+ "argonaut-core": "7.0.0",
186+ "argonaut-generic": "8.0.0",
187+ "argonaut-traversals": "10.0.0",
188+ "argparse-basic": "2.0.0",
189+ "array-builder": "0.1.2",
190+ "array-search": "0.6.0",
191+ "arraybuffer": "13.2.0",
192+ "arraybuffer-builder": "3.1.0",
193+ "arraybuffer-types": "3.0.2",
194+ "arrays": "7.3.0",
195+ "arrays-extra": "0.6.1",
196+ "arrays-zipper": "2.0.1",
197+ "ask": "1.0.0",
198+ "assert": "6.0.0",
199+ "assert-multiple": "0.4.0",
200+ "avar": "5.0.0",
201+ "b64": "0.0.8",
202+ "barbies": "1.0.1",
203+ "barlow-lens": "0.9.0",
204+ "bifunctors": "6.0.0",
205+ "bigints": "7.0.1",
206+ "bolson": "0.3.9",
207+ "bookhound": "0.1.7",
208+ "bower-json": "3.0.0",
209+ "call-by-name": "4.0.1",
210+ "canvas": "6.0.0",
211+ "canvas-action": "9.0.0",
212+ "cartesian": "1.0.6",
213+ "catenable-lists": "7.0.0",
214+ "cbor-stream": "1.3.0",
215+ "chameleon": "1.0.0",
216+ "chameleon-halogen": "1.0.3",
217+ "chameleon-react-basic": "1.1.0",
218+ "chameleon-styled": "2.5.0",
219+ "chameleon-transformers": "1.0.0",
220+ "channel": "1.0.0",
221+ "checked-exceptions": "3.1.1",
222+ "choku": "1.0.2",
223+ "classless": "0.1.1",
224+ "classless-arbitrary": "0.1.1",
225+ "classless-decode-json": "0.1.1",
226+ "classless-encode-json": "0.1.3",
227+ "classnames": "2.0.0",
228+ "codec": "6.1.0",
229+ "codec-argonaut": "10.0.0",
230+ "codec-json": "2.0.0",
231+ "colors": "7.0.1",
232+ "concur-core": "0.5.0",
233+ "concur-react": "0.5.0",
234+ "concurrent-queues": "3.0.0",
235+ "console": "6.1.0",
236+ "const": "6.0.0",
237+ "contravariant": "6.0.0",
238+ "control": "6.0.0",
239+ "convertable-options": "1.0.0",
240+ "coroutines": "7.0.0",
241+ "css": "6.0.0",
242+ "css-frameworks": "1.0.1",
243+ "csv-stream": "2.3.0",
244+ "data-mvc": "0.0.2",
245+ "datetime": "6.1.0",
246+ "datetime-parsing": "0.2.0",
247+ "debounce": "0.1.0",
248+ "debug": "6.0.2",
249+ "decimals": "7.1.0",
250+ "default-values": "1.0.1",
251+ "deku": "0.9.23",
252+ "deno": "0.0.5",
253+ "dissect": "1.0.0",
254+ "distributive": "6.0.0",
255+ "dom-filereader": "7.0.0",
256+ "dom-indexed": "12.0.0",
257+ "dom-simple": "0.4.0",
258+ "dotenv": "4.0.3",
259+ "droplet": "0.6.0",
260+ "dts": "1.0.0",
261+ "dual-numbers": "1.0.3",
262+ "dynamic-buffer": "3.0.1",
263+ "echarts-simple": "0.0.1",
264+ "effect": "4.0.0",
265+ "either": "6.1.0",
266+ "elmish": "0.13.0",
267+ "elmish-enzyme": "0.1.1",
268+ "elmish-hooks": "0.10.3",
269+ "elmish-html": "0.9.0",
270+ "elmish-testing-library": "0.3.2",
271+ "email-validate": "7.0.0",
272+ "encoding": "0.0.9",
273+ "enums": "6.0.1",
274+ "env-names": "0.4.0",
275+ "error": "2.0.0",
276+ "eta-conversion": "0.3.2",
277+ "exceptions": "6.1.0",
278+ "exists": "6.0.0",
279+ "exitcodes": "4.0.0",
280+ "expect-inferred": "3.0.0",
281+ "ezfetch": "1.1.0",
282+ "fahrtwind": "2.0.0",
283+ "fallback": "0.1.0",
284+ "fast-vect": "1.2.0",
285+ "fetch": "4.1.0",
286+ "fetch-argonaut": "1.0.1",
287+ "fetch-core": "5.1.0",
288+ "fetch-yoga-json": "1.1.0",
289+ "ffi-simple": "0.5.1",
290+ "fft-js": "0.1.0",
291+ "filterable": "5.0.0",
292+ "fix-functor": "0.1.0",
293+ "fixed-points": "7.0.0",
294+ "fixed-precision": "5.0.0",
295+ "flame": "1.3.0",
296+ "float32": "2.0.0",
297+ "fmt": "0.2.1",
298+ "foldable-traversable": "6.0.0",
299+ "foldable-traversable-extra": "0.0.6",
300+ "foreign": "7.0.0",
301+ "foreign-object": "4.1.0",
302+ "foreign-readwrite": "3.4.0",
303+ "forgetmenot": "0.1.0",
304+ "fork": "6.0.0",
305+ "form-urlencoded": "7.0.0",
306+ "formatters": "7.0.0",
307+ "framer-motion": "1.0.1",
308+ "free": "7.1.0",
309+ "freeap": "7.0.0",
310+ "freer-free": "0.0.1",
311+ "freet": "7.0.0",
312+ "functions": "6.0.0",
313+ "functor1": "3.0.0",
314+ "functors": "5.0.0",
315+ "fuzzy": "0.4.0",
316+ "gen": "4.0.0",
317+ "generate-values": "1.0.1",
318+ "generic-router": "0.0.1",
319+ "geojson": "0.0.5",
320+ "geometria": "2.2.0",
321+ "gojs": "0.1.1",
322+ "grain": "3.0.0",
323+ "grain-router": "3.0.0",
324+ "grain-virtualized": "3.0.0",
325+ "graphs": "8.1.0",
326+ "group": "4.1.1",
327+ "halogen": "7.0.0",
328+ "halogen-bootstrap5": "5.3.2",
329+ "halogen-canvas": "1.0.0",
330+ "halogen-css": "10.0.0",
331+ "halogen-echarts-simple": "0.0.4",
332+ "halogen-formless": "4.0.3",
333+ "halogen-helix": "1.0.1",
334+ "halogen-hooks": "0.6.3",
335+ "halogen-hooks-extra": "0.9.0",
336+ "halogen-infinite-scroll": "1.1.0",
337+ "halogen-store": "0.5.4",
338+ "halogen-storybook": "2.0.0",
339+ "halogen-subscriptions": "2.0.0",
340+ "halogen-svg-elems": "8.0.0",
341+ "halogen-typewriter": "1.0.4",
342+ "halogen-vdom": "8.0.0",
343+ "halogen-vdom-string-renderer": "0.5.0",
344+ "halogen-xterm": "2.0.0",
345+ "heckin": "2.0.1",
346+ "heterogeneous": "0.6.0",
347+ "homogeneous": "0.4.0",
348+ "http-methods": "6.0.0",
349+ "httpurple": "4.0.0",
350+ "huffman": "0.4.0",
351+ "humdrum": "0.0.1",
352+ "hyrule": "2.3.8",
353+ "identity": "6.0.0",
354+ "identy": "4.0.1",
355+ "indexed-db": "1.0.0",
356+ "indexed-monad": "3.0.0",
357+ "int64": "3.0.0",
358+ "integers": "6.0.0",
359+ "interpolate": "5.0.2",
360+ "intersection-observer": "1.0.1",
361+ "invariant": "6.0.0",
362+ "jarilo": "1.0.1",
363+ "jelly": "0.10.0",
364+ "jelly-router": "0.3.0",
365+ "jelly-signal": "0.4.0",
366+ "jest": "1.0.0",
367+ "js-abort-controller": "1.0.0",
368+ "js-bigints": "2.2.1",
369+ "js-date": "8.0.0",
370+ "js-fetch": "0.2.1",
371+ "js-fileio": "3.0.0",
372+ "js-intl": "1.1.4",
373+ "js-iterators": "0.1.1",
374+ "js-maps": "0.1.2",
375+ "js-promise": "1.0.0",
376+ "js-promise-aff": "1.0.0",
377+ "js-timers": "6.1.0",
378+ "js-uri": "3.1.0",
379+ "jsdom": "1.0.0",
380+ "json": "1.1.0",
381+ "json-codecs": "5.0.0",
382+ "justifill": "0.5.0",
383+ "jwt": "0.0.9",
384+ "labeled-data": "0.2.0",
385+ "language-cst-parser": "0.14.0",
386+ "lazy": "6.0.0",
387+ "lazy-joe": "1.0.0",
388+ "lcg": "4.0.0",
389+ "leibniz": "5.0.0",
390+ "leveldb": "1.0.1",
391+ "liminal": "1.0.1",
392+ "linalg": "6.0.0",
393+ "lists": "7.0.0",
394+ "literals": "1.0.2",
395+ "logging": "3.0.0",
396+ "logging-journald": "0.4.0",
397+ "lumi-components": "18.0.0",
398+ "machines": "7.0.0",
399+ "maps-eager": "0.5.0",
400+ "marionette": "1.0.0",
401+ "marionette-react-basic-hooks": "0.1.1",
402+ "marked": "0.1.0",
403+ "matrices": "5.0.1",
404+ "matryoshka": "1.0.0",
405+ "maybe": "6.0.0",
406+ "media-types": "6.0.0",
407+ "meowclient": "1.0.0",
408+ "midi": "4.0.0",
409+ "milkis": "9.0.0",
410+ "minibench": "4.0.1",
411+ "mmorph": "7.0.0",
412+ "monad-control": "5.0.0",
413+ "monad-logger": "1.3.1",
414+ "monad-loops": "0.5.0",
415+ "monad-unlift": "1.0.1",
416+ "monoid-extras": "0.0.1",
417+ "monoidal": "0.16.0",
418+ "morello": "0.4.0",
419+ "mote": "3.0.0",
420+ "motsunabe": "2.0.0",
421+ "mvc": "0.0.1",
422+ "mysql": "6.0.1",
423+ "n3": "0.1.0",
424+ "nano-id": "1.1.0",
425+ "nanoid": "0.1.0",
426+ "naturals": "3.0.0",
427+ "nested-functor": "0.2.1",
428+ "newtype": "5.0.0",
429+ "nextjs": "0.1.1",
430+ "nextui": "0.2.0",
431+ "node-buffer": "9.0.0",
432+ "node-child-process": "11.1.0",
433+ "node-event-emitter": "3.0.0",
434+ "node-execa": "5.0.0",
435+ "node-fs": "9.2.0",
436+ "node-glob-basic": "1.3.0",
437+ "node-http": "9.1.0",
438+ "node-http2": "1.1.1",
439+ "node-human-signals": "1.0.0",
440+ "node-net": "5.1.0",
441+ "node-os": "5.1.0",
442+ "node-path": "5.0.0",
443+ "node-process": "11.2.0",
444+ "node-readline": "8.1.1",
445+ "node-sqlite3": "8.0.0",
446+ "node-stream-pipes": "2.1.6",
447+ "node-streams": "9.0.0",
448+ "node-tls": "0.3.1",
449+ "node-url": "7.0.1",
450+ "node-zlib": "0.4.0",
451+ "nonempty": "7.0.0",
452+ "now": "6.0.0",
453+ "npm-package-json": "2.0.0",
454+ "nullable": "6.0.0",
455+ "numberfield": "0.2.2",
456+ "numbers": "9.0.1",
457+ "oak": "3.1.1",
458+ "oak-debug": "1.2.2",
459+ "object-maps": "0.3.0",
460+ "ocarina": "1.5.4",
461+ "oooooooooorrrrrrrmm-lib": "0.0.1",
462+ "open-colors-scales-and-schemes": "1.0.0",
463+ "open-folds": "6.4.0",
464+ "open-foreign-generic": "11.0.3",
465+ "open-memoize": "6.2.0",
466+ "open-mkdirp-aff": "1.2.0",
467+ "open-pairing": "6.2.0",
468+ "open-smolder": "12.0.2",
469+ "options": "7.0.0",
470+ "optparse": "5.0.1",
471+ "ordered-collections": "3.2.0",
472+ "ordered-set": "0.4.0",
473+ "orders": "6.0.0",
474+ "owoify": "1.2.0",
475+ "pairs": "9.0.1",
476+ "parallel": "7.0.0",
477+ "parsing": "10.2.0",
478+ "parsing-dataview": "3.2.4",
479+ "partial": "4.0.0",
480+ "pathy": "9.0.0",
481+ "pha": "0.13.0",
482+ "phaser": "0.7.0",
483+ "phylio": "1.1.2",
484+ "pipes": "8.0.0",
485+ "pirates-charm": "0.0.1",
486+ "pmock": "0.9.0",
487+ "point-free": "1.0.0",
488+ "pointed-list": "0.5.1",
489+ "polymorphic-vectors": "4.0.0",
490+ "posix-types": "6.0.0",
491+ "postgresql": "2.0.20",
492+ "precise": "6.0.0",
493+ "precise-datetime": "7.0.0",
494+ "prelude": "6.0.1",
495+ "prettier-printer": "3.0.0",
496+ "printf": "0.1.0",
497+ "priority-queue": "0.1.2",
498+ "profunctor": "6.0.1",
499+ "profunctor-lenses": "8.0.0",
500+ "protobuf": "4.4.0",
501+ "psa-utils": "8.0.0",
502+ "psci-support": "6.0.0",
503+ "punycode": "1.0.0",
504+ "qualified-do": "2.2.0",
505+ "quantities": "12.2.0",
506+ "quickcheck": "8.0.1",
507+ "quickcheck-combinators": "0.1.3",
508+ "quickcheck-laws": "7.0.0",
509+ "quickcheck-utf8": "0.0.0",
510+ "random": "6.0.0",
511+ "rationals": "6.0.0",
512+ "rdf": "0.1.0",
513+ "react": "11.0.0",
514+ "react-aria": "0.2.0",
515+ "react-basic": "17.0.0",
516+ "react-basic-classic": "3.0.0",
517+ "react-basic-dnd": "10.1.0",
518+ "react-basic-dom": "7.0.0",
519+ "react-basic-dom-beta": "0.1.1",
520+ "react-basic-emotion": "7.1.0",
521+ "react-basic-hooks": "8.2.0",
522+ "react-basic-storybook": "2.0.0",
523+ "react-dom": "8.0.0",
524+ "react-halo": "3.0.0",
525+ "react-icons": "1.1.5",
526+ "react-markdown": "0.1.0",
527+ "react-testing-library": "4.0.1",
528+ "react-virtuoso": "1.0.0",
529+ "reactix": "0.6.1",
530+ "read": "1.0.1",
531+ "recharts": "1.1.0",
532+ "record": "4.0.0",
533+ "record-extra": "5.0.1",
534+ "record-ptional-fields": "0.1.2",
535+ "record-studio": "1.0.4",
536+ "refs": "6.0.0",
537+ "remotedata": "5.0.1",
538+ "repr": "0.5.0",
539+ "resize-observer": "1.0.0",
540+ "resource": "2.0.1",
541+ "resourcet": "1.0.0",
542+ "result": "1.0.3",
543+ "return": "0.2.0",
544+ "ring-modules": "5.0.1",
545+ "rito": "0.3.4",
546+ "roman": "0.4.0",
547+ "rough-notation": "1.0.2",
548+ "routing": "11.0.0",
549+ "routing-duplex": "0.7.0",
550+ "run": "5.0.0",
551+ "safe-coerce": "2.0.0",
552+ "safely": "4.0.1",
553+ "school-of-music": "1.3.0",
554+ "selection-foldable": "0.2.0",
555+ "selective-functors": "1.0.1",
556+ "semirings": "7.0.0",
557+ "signal": "13.0.0",
558+ "simple-emitter": "3.0.1",
559+ "simple-i18n": "2.0.1",
560+ "simple-json": "9.0.0",
561+ "simple-json-generics": "0.2.1",
562+ "simple-ulid": "3.0.0",
563+ "sized-matrices": "1.0.0",
564+ "sized-vectors": "5.0.2",
565+ "slug": "3.1.0",
566+ "small-ffi": "4.0.1",
567+ "soundfonts": "4.1.0",
568+ "sparse-matrices": "2.0.1",
569+ "sparse-polynomials": "3.0.1",
570+ "spec": "8.1.1",
571+ "spec-discovery": "8.4.0",
572+ "spec-mocha": "5.1.1",
573+ "spec-node": "0.0.3",
574+ "spec-quickcheck": "5.0.2",
575+ "spec-reporter-xunit": "0.7.1",
576+ "splitmix": "2.1.0",
577+ "ssrs": "1.0.0",
578+ "st": "6.2.0",
579+ "statistics": "0.3.2",
580+ "strictlypositiveint": "1.0.1",
581+ "string-parsers": "8.0.0",
582+ "strings": "6.0.1",
583+ "strings-extra": "4.0.0",
584+ "stringutils": "0.0.12",
585+ "substitute": "0.2.3",
586+ "supply": "0.2.0",
587+ "svg-parser": "3.0.0",
588+ "systemd-journald": "0.3.0",
589+ "tagged": "4.0.2",
590+ "tailrec": "6.1.0",
591+ "tecton": "0.2.1",
592+ "tecton-halogen": "0.2.0",
593+ "test-unit": "17.0.0",
594+ "thermite": "6.3.1",
595+ "thermite-dom": "0.3.1",
596+ "these": "6.0.0",
597+ "threading": "0.0.3",
598+ "tldr": "0.0.0",
599+ "toestand": "0.9.0",
600+ "transformation-matrix": "1.0.1",
601+ "transformers": "6.1.0",
602+ "tree-rose": "4.0.2",
603+ "ts-bridge": "4.0.0",
604+ "tuples": "7.0.0",
605+ "two-or-more": "1.0.0",
606+ "type-equality": "4.0.1",
607+ "typedenv": "2.0.1",
608+ "typelevel": "6.0.0",
609+ "typelevel-lists": "2.1.0",
610+ "typelevel-peano": "1.0.1",
611+ "typelevel-prelude": "7.0.0",
612+ "typelevel-regex": "0.0.3",
613+ "typelevel-rows": "0.1.0",
614+ "typisch": "0.4.0",
615+ "uint": "7.0.0",
616+ "ulid": "3.0.1",
617+ "uncurried-transformers": "1.1.0",
618+ "undefined": "2.0.0",
619+ "undefined-is-not-a-problem": "1.1.0",
620+ "unfoldable": "6.0.0",
621+ "unicode": "6.0.0",
622+ "unique": "0.6.1",
623+ "unlift": "1.0.1",
624+ "unordered-collections": "3.1.0",
625+ "unsafe-coerce": "6.0.0",
626+ "unsafe-reference": "5.0.0",
627+ "untagged-to-tagged": "0.1.4",
628+ "untagged-union": "1.0.0",
629+ "uri": "9.0.0",
630+ "url-immutable": "1.0.0",
631+ "uuid": "9.0.0",
632+ "uuidv4": "1.0.0",
633+ "validation": "6.0.0",
634+ "variant": "8.0.0",
635+ "variant-encodings": "2.0.0",
636+ "vectorfield": "1.0.1",
637+ "vectors": "2.1.0",
638+ "versions": "7.0.0",
639+ "visx": "0.0.2",
640+ "web-clipboard": "6.0.0",
641+ "web-cssom": "2.0.0",
642+ "web-cssom-view": "0.1.0",
643+ "web-dom": "6.0.0",
644+ "web-dom-parser": "8.0.0",
645+ "web-dom-xpath": "3.0.0",
646+ "web-encoding": "3.0.0",
647+ "web-events": "4.0.0",
648+ "web-fetch": "4.0.1",
649+ "web-file": "4.0.0",
650+ "web-geometry": "0.1.0",
651+ "web-html": "4.1.0",
652+ "web-pointerevents": "2.0.0",
653+ "web-proletarian": "1.0.0",
654+ "web-promise": "3.2.0",
655+ "web-resize-observer": "2.1.0",
656+ "web-router": "1.0.0",
657+ "web-socket": "4.0.0",
658+ "web-storage": "5.0.0",
659+ "web-streams": "4.0.0",
660+ "web-touchevents": "4.0.0",
661+ "web-uievents": "5.0.0",
662+ "web-url": "2.0.0",
663+ "web-workers": "1.1.0",
664+ "web-xhr": "5.0.1",
665+ "webextension-polyfill": "0.1.0",
666+ "webgpu": "0.0.1",
667+ "which": "2.0.0",
668+ "xterm": "1.0.0",
669+ "yoga-fetch": "1.0.1",
670+ "yoga-json": "5.1.0",
671+ "yoga-om": "0.1.0",
672+ "yoga-postgres": "6.0.0",
673+ "yoga-subtlecrypto": "0.1.0",
674+ "yoga-tree": "1.0.0",
675+ "z3": "0.0.2",
676+ "zipperarray": "2.0.0"
677+ }
678+ },
679+ "extra_packages": {}
680+ },
681+ "packages": {
682+ "aff": {
683+ "type": "registry",
684+ "version": "8.0.0",
685+ "integrity": "sha256-9BRIrSdRoYybfiUmBqgKJ66cPqxYHb277bVWQMn/9sg=",
686+ "dependencies": [
687+ "control",
688+ "datetime",
689+ "effect",
690+ "either",
691+ "exceptions",
692+ "functions",
693+ "newtype",
694+ "parallel",
695+ "partial",
696+ "prelude",
697+ "st",
698+ "tailrec",
699+ "transformers",
700+ "unsafe-coerce"
701+ ]
702+ },
703+ "ansi": {
704+ "type": "registry",
705+ "version": "7.0.0",
706+ "integrity": "sha256-tOUaXJFzPSfBVAqLI8hc+Tz2M1rg16cXqyHaK/3SmFg=",
707+ "dependencies": [
708+ "foldable-traversable",
709+ "lists",
710+ "prelude"
711+ ]
712+ },
713+ "argonaut-codecs": {
714+ "type": "registry",
715+ "version": "9.1.0",
716+ "integrity": "sha256-K910SBrmYallESsm8pxJYThs7lig6hxX3M4PW33Cgew=",
717+ "dependencies": [
718+ "argonaut-core",
719+ "arrays",
720+ "bifunctors",
721+ "either",
722+ "foldable-traversable",
723+ "foreign-object",
724+ "identity",
725+ "integers",
726+ "lists",
727+ "maybe",
728+ "nonempty",
729+ "ordered-collections",
730+ "prelude",
731+ "record",
732+ "strings",
733+ "tuples"
734+ ]
735+ },
736+ "argonaut-core": {
737+ "type": "registry",
738+ "version": "7.0.0",
739+ "integrity": "sha256-gYZihtBIKthVuXXoiPphMookSf8M5aHyFYkcIWqlxTM=",
740+ "dependencies": [
741+ "arrays",
742+ "control",
743+ "either",
744+ "foreign-object",
745+ "functions",
746+ "gen",
747+ "maybe",
748+ "nonempty",
749+ "prelude",
750+ "strings",
751+ "tailrec"
752+ ]
753+ },
754+ "arraybuffer-types": {
755+ "type": "registry",
756+ "version": "3.0.2",
757+ "integrity": "sha256-p05cJnSkyeoB7VHzMyc2Eb1RwUaB7Nl0sQSqEGNEUD8=",
758+ "dependencies": []
759+ },
760+ "arrays": {
761+ "type": "registry",
762+ "version": "7.3.0",
763+ "integrity": "sha256-GD4z7LCi9wzi7FCQqbWhvs8paoUK9NO+HwgXZ+KP8Rk=",
764+ "dependencies": [
765+ "bifunctors",
766+ "control",
767+ "foldable-traversable",
768+ "functions",
769+ "maybe",
770+ "nonempty",
771+ "partial",
772+ "prelude",
773+ "safe-coerce",
774+ "st",
775+ "tailrec",
776+ "tuples",
777+ "unfoldable",
778+ "unsafe-coerce"
779+ ]
780+ },
781+ "avar": {
782+ "type": "registry",
783+ "version": "5.0.0",
784+ "integrity": "sha256-9tAeYrHAFSPkbJ7UCtpyLq7QawSrwf/nwLT9BcmfUx8=",
785+ "dependencies": [
786+ "aff",
787+ "effect",
788+ "either",
789+ "exceptions",
790+ "functions",
791+ "maybe",
792+ "prelude"
793+ ]
794+ },
795+ "bifunctors": {
796+ "type": "registry",
797+ "version": "6.0.0",
798+ "integrity": "sha256-tXhmlMiyVy6mbUreVZQt/2EGEsPr0T1PjJi+YCG5J7E=",
799+ "dependencies": [
800+ "const",
801+ "either",
802+ "newtype",
803+ "prelude",
804+ "tuples"
805+ ]
806+ },
807+ "catenable-lists": {
808+ "type": "registry",
809+ "version": "7.0.0",
810+ "integrity": "sha256-7+i/MHBLIRh604iCNT4ENWRWE/wuHIotER4kpdX9Ve0=",
811+ "dependencies": [
812+ "control",
813+ "foldable-traversable",
814+ "lists",
815+ "maybe",
816+ "prelude",
817+ "tuples",
818+ "unfoldable"
819+ ]
820+ },
821+ "console": {
822+ "type": "registry",
823+ "version": "6.1.0",
824+ "integrity": "sha256-3T5PPz1mATZmV0C4GzkCkpLlCa5xG7u8ZNgnLrrrI1Q=",
825+ "dependencies": [
826+ "effect",
827+ "prelude"
828+ ]
829+ },
830+ "const": {
831+ "type": "registry",
832+ "version": "6.0.0",
833+ "integrity": "sha256-S+m0lQsxnji0z1XRUmkn+3RFuWJ5CXWuIr1u3i8Bfoc=",
834+ "dependencies": [
835+ "invariant",
836+ "newtype",
837+ "prelude"
838+ ]
839+ },
840+ "contravariant": {
841+ "type": "registry",
842+ "version": "6.0.0",
843+ "integrity": "sha256-nuckEWqL80NaPmR/l9AUyrfycNh18XcvlZV9PAamwqc=",
844+ "dependencies": [
845+ "const",
846+ "either",
847+ "newtype",
848+ "prelude",
849+ "tuples"
850+ ]
851+ },
852+ "control": {
853+ "type": "registry",
854+ "version": "6.0.0",
855+ "integrity": "sha256-0vxyYh5FL+ilxgLo954w1LqCUC0RSIivNNlb9CaNUQg=",
856+ "dependencies": [
857+ "newtype",
858+ "prelude"
859+ ]
860+ },
861+ "datetime": {
862+ "type": "registry",
863+ "version": "6.1.0",
864+ "integrity": "sha256-tbv6eDXy6QOD7YSknxYSbsDF32OC2JrNbSBpzMs7Doc=",
865+ "dependencies": [
866+ "bifunctors",
867+ "control",
868+ "either",
869+ "enums",
870+ "foldable-traversable",
871+ "functions",
872+ "gen",
873+ "integers",
874+ "lists",
875+ "maybe",
876+ "newtype",
877+ "numbers",
878+ "ordered-collections",
879+ "partial",
880+ "prelude",
881+ "tuples"
882+ ]
883+ },
884+ "distributive": {
885+ "type": "registry",
886+ "version": "6.0.0",
887+ "integrity": "sha256-netyJK4B32PDYHD0tF2AenKgo3urzbI770ycM0pArAo=",
888+ "dependencies": [
889+ "identity",
890+ "newtype",
891+ "prelude",
892+ "tuples",
893+ "type-equality"
894+ ]
895+ },
896+ "effect": {
897+ "type": "registry",
898+ "version": "4.0.0",
899+ "integrity": "sha256-DdqU3bncRTjgMVPPRlAuGHVeajSPEcRaRhNuio7if6s=",
900+ "dependencies": [
901+ "prelude"
902+ ]
903+ },
904+ "either": {
905+ "type": "registry",
906+ "version": "6.1.0",
907+ "integrity": "sha256-tBHx3PgtH4GZOApZCDkcM7szRTYJinrUrVGWazQCUUg=",
908+ "dependencies": [
909+ "control",
910+ "invariant",
911+ "maybe",
912+ "prelude"
913+ ]
914+ },
915+ "enums": {
916+ "type": "registry",
917+ "version": "6.0.1",
918+ "integrity": "sha256-sdZOmLX5+5pASGpvVyT0vSD5BBYQjZiayjV5XiPutso=",
919+ "dependencies": [
920+ "control",
921+ "either",
922+ "gen",
923+ "maybe",
924+ "newtype",
925+ "nonempty",
926+ "partial",
927+ "prelude",
928+ "tuples",
929+ "unfoldable"
930+ ]
931+ },
932+ "exceptions": {
933+ "type": "registry",
934+ "version": "6.1.0",
935+ "integrity": "sha256-nRrr+N0wk0TUFOWLR7e1n1oxcXo/X345bQUtoY9lW6A=",
936+ "dependencies": [
937+ "effect",
938+ "either",
939+ "maybe",
940+ "prelude"
941+ ]
942+ },
943+ "exists": {
944+ "type": "registry",
945+ "version": "6.0.0",
946+ "integrity": "sha256-vtLbrWNaI+pzx/2fw2AQnCovoLtcosClIhjO26QKkh8=",
947+ "dependencies": [
948+ "unsafe-coerce"
949+ ]
950+ },
951+ "exitcodes": {
952+ "type": "registry",
953+ "version": "4.0.0",
954+ "integrity": "sha256-xBl4aFSEQ05Owp1ZvO6OxxvLK3LVzU35RSbj79SsePQ=",
955+ "dependencies": [
956+ "enums",
957+ "maybe",
958+ "prelude"
959+ ]
960+ },
961+ "foldable-traversable": {
962+ "type": "registry",
963+ "version": "6.0.0",
964+ "integrity": "sha256-NGGWyCio/xjce6fPP7y3wwg7CheqllID6aJudDxbWhA=",
965+ "dependencies": [
966+ "bifunctors",
967+ "const",
968+ "control",
969+ "either",
970+ "functors",
971+ "identity",
972+ "maybe",
973+ "newtype",
974+ "orders",
975+ "prelude",
976+ "tuples"
977+ ]
978+ },
979+ "foreign": {
980+ "type": "registry",
981+ "version": "7.0.0",
982+ "integrity": "sha256-jiDRMVQfovGsbbA/FzbzYf6iWk9i2b5gNrIjz+gFfsI=",
983+ "dependencies": [
984+ "either",
985+ "functions",
986+ "integers",
987+ "lists",
988+ "maybe",
989+ "prelude",
990+ "strings",
991+ "transformers",
992+ "unsafe-coerce"
993+ ]
994+ },
995+ "foreign-object": {
996+ "type": "registry",
997+ "version": "4.1.0",
998+ "integrity": "sha256-x/Q7r80z/vmHRKvPwhYmHP/DnJciPtsyGfRTMzayKIU=",
999+ "dependencies": [
1000+ "arrays",
1001+ "foldable-traversable",
1002+ "functions",
1003+ "gen",
1004+ "lists",
1005+ "maybe",
1006+ "prelude",
1007+ "st",
1008+ "tailrec",
1009+ "tuples",
1010+ "typelevel-prelude",
1011+ "unfoldable",
1012+ "unsafe-coerce"
1013+ ]
1014+ },
1015+ "fork": {
1016+ "type": "registry",
1017+ "version": "6.0.0",
1018+ "integrity": "sha256-0keBVeZZg1eCZEy/En1CohVW829gQUqKtqBNIRa93/A=",
1019+ "dependencies": [
1020+ "aff",
1021+ "prelude",
1022+ "transformers"
1023+ ]
1024+ },
1025+ "free": {
1026+ "type": "registry",
1027+ "version": "7.1.0",
1028+ "integrity": "sha256-tUBInfUpRQEw4u94GWcYW7EYdmSdDHSRn88a+C0eltU=",
1029+ "dependencies": [
1030+ "catenable-lists",
1031+ "control",
1032+ "distributive",
1033+ "either",
1034+ "exists",
1035+ "foldable-traversable",
1036+ "invariant",
1037+ "lazy",
1038+ "maybe",
1039+ "prelude",
1040+ "tailrec",
1041+ "transformers",
1042+ "tuples",
1043+ "unsafe-coerce"
1044+ ]
1045+ },
1046+ "functions": {
1047+ "type": "registry",
1048+ "version": "6.0.0",
1049+ "integrity": "sha256-0jgtOr+SFO4UScKc40oA/9Vdcf2rLn3h3vZlY0KfqVo=",
1050+ "dependencies": [
1051+ "prelude"
1052+ ]
1053+ },
1054+ "functors": {
1055+ "type": "registry",
1056+ "version": "5.0.0",
1057+ "integrity": "sha256-W1o/4wcp6S3chodYL8uixlXK2mfr1L+SzM1R+whqUco=",
1058+ "dependencies": [
1059+ "bifunctors",
1060+ "const",
1061+ "contravariant",
1062+ "control",
1063+ "distributive",
1064+ "either",
1065+ "invariant",
1066+ "maybe",
1067+ "newtype",
1068+ "prelude",
1069+ "profunctor",
1070+ "tuples",
1071+ "unsafe-coerce"
1072+ ]
1073+ },
1074+ "gen": {
1075+ "type": "registry",
1076+ "version": "4.0.0",
1077+ "integrity": "sha256-kyOateeOtQa07vfTMYeSuCKdelgKE1R65fwKkZ10wsY=",
1078+ "dependencies": [
1079+ "either",
1080+ "foldable-traversable",
1081+ "identity",
1082+ "maybe",
1083+ "newtype",
1084+ "nonempty",
1085+ "prelude",
1086+ "tailrec",
1087+ "tuples",
1088+ "unfoldable"
1089+ ]
1090+ },
1091+ "identity": {
1092+ "type": "registry",
1093+ "version": "6.0.0",
1094+ "integrity": "sha256-RY/iXPpxpqvKHYfJeFVNI1J06kohB9rbtWYuha8t0LE=",
1095+ "dependencies": [
1096+ "control",
1097+ "invariant",
1098+ "newtype",
1099+ "prelude"
1100+ ]
1101+ },
1102+ "integers": {
1103+ "type": "registry",
1104+ "version": "6.0.0",
1105+ "integrity": "sha256-Y8yozC1uHRLcruobEyv5/bMKzE1BoKJ/olHv6o+bgm8=",
1106+ "dependencies": [
1107+ "maybe",
1108+ "numbers",
1109+ "prelude"
1110+ ]
1111+ },
1112+ "invariant": {
1113+ "type": "registry",
1114+ "version": "6.0.0",
1115+ "integrity": "sha256-HyoT1I5qIHRq8RSZji6zZDvqnpVjLw748utrKwZtqsw=",
1116+ "dependencies": [
1117+ "control",
1118+ "prelude"
1119+ ]
1120+ },
1121+ "js-bigints": {
1122+ "type": "registry",
1123+ "version": "2.2.1",
1124+ "integrity": "sha256-r1rE6Olv5b3JrP32lY2uKJ+eBRTsrVnC983K8VWwqe4=",
1125+ "dependencies": [
1126+ "integers",
1127+ "maybe",
1128+ "prelude"
1129+ ]
1130+ },
1131+ "js-date": {
1132+ "type": "registry",
1133+ "version": "8.0.0",
1134+ "integrity": "sha256-DNQrp4xYc8o80jtxo0aOkUeXGi6h0Xidkk2ZQ8Y4l5Y=",
1135+ "dependencies": [
1136+ "datetime",
1137+ "effect",
1138+ "enums",
1139+ "foreign",
1140+ "functions",
1141+ "integers",
1142+ "maybe",
1143+ "prelude"
1144+ ]
1145+ },
1146+ "lazy": {
1147+ "type": "registry",
1148+ "version": "6.0.0",
1149+ "integrity": "sha256-MHRC+1Pc+AjortBp4b/e1e6KpEpsDwaJBNBB7TOL+1I=",
1150+ "dependencies": [
1151+ "control",
1152+ "foldable-traversable",
1153+ "invariant",
1154+ "prelude"
1155+ ]
1156+ },
1157+ "lcg": {
1158+ "type": "registry",
1159+ "version": "4.0.0",
1160+ "integrity": "sha256-bUYyfXYmjTn7zSpj2hTiePywzsuD80fCjkonsrpdGOw=",
1161+ "dependencies": [
1162+ "effect",
1163+ "integers",
1164+ "maybe",
1165+ "numbers",
1166+ "partial",
1167+ "prelude",
1168+ "random"
1169+ ]
1170+ },
1171+ "lists": {
1172+ "type": "registry",
1173+ "version": "7.0.0",
1174+ "integrity": "sha256-/mGd7wLoU+wsTcqii7SSUByxsvwvjnu2PjwAD47yYb4=",
1175+ "dependencies": [
1176+ "bifunctors",
1177+ "control",
1178+ "foldable-traversable",
1179+ "lazy",
1180+ "maybe",
1181+ "newtype",
1182+ "nonempty",
1183+ "partial",
1184+ "prelude",
1185+ "tailrec",
1186+ "tuples",
1187+ "unfoldable"
1188+ ]
1189+ },
1190+ "maybe": {
1191+ "type": "registry",
1192+ "version": "6.0.0",
1193+ "integrity": "sha256-8X6XEgtZ5lqfkEuc1hWOofnL6mwhk8gSJTxwvbR/SbY=",
1194+ "dependencies": [
1195+ "control",
1196+ "invariant",
1197+ "newtype",
1198+ "prelude"
1199+ ]
1200+ },
1201+ "mmorph": {
1202+ "type": "registry",
1203+ "version": "7.0.0",
1204+ "integrity": "sha256-Cfltaq+tfYjuSoSBN/b8cSQZbvZTqIRs6ebQewbIkGs=",
1205+ "dependencies": [
1206+ "bifunctors",
1207+ "either",
1208+ "free",
1209+ "functors",
1210+ "identity",
1211+ "maybe",
1212+ "newtype",
1213+ "prelude",
1214+ "transformers",
1215+ "tuples"
1216+ ]
1217+ },
1218+ "newtype": {
1219+ "type": "registry",
1220+ "version": "5.0.0",
1221+ "integrity": "sha256-dt6w0cty4OS+Pjt9fsh3iU6ottqSU83mdAZkaEEvo6c=",
1222+ "dependencies": [
1223+ "prelude",
1224+ "safe-coerce"
1225+ ]
1226+ },
1227+ "node-buffer": {
1228+ "type": "registry",
1229+ "version": "9.0.0",
1230+ "integrity": "sha256-RdQjilmEHqsT4fwpCr8Mavw8KTafYrS3ZM6zeAAVAl8=",
1231+ "dependencies": [
1232+ "arraybuffer-types",
1233+ "effect",
1234+ "functions",
1235+ "maybe",
1236+ "nullable",
1237+ "partial",
1238+ "prelude",
1239+ "st",
1240+ "unsafe-coerce"
1241+ ]
1242+ },
1243+ "node-event-emitter": {
1244+ "type": "registry",
1245+ "version": "3.0.0",
1246+ "integrity": "sha256-wodx71NxJBPXOaawFn01V1ByYB2vT+I3RuV2giOVKMg=",
1247+ "dependencies": [
1248+ "effect",
1249+ "either",
1250+ "functions",
1251+ "maybe",
1252+ "nullable",
1253+ "prelude",
1254+ "unsafe-coerce"
1255+ ]
1256+ },
1257+ "node-fs": {
1258+ "type": "registry",
1259+ "version": "9.2.0",
1260+ "integrity": "sha256-fxioTSm9y47WuYs9F/7nxCh/RVDCl3Kr3Hg779J4SJA=",
1261+ "dependencies": [
1262+ "aff",
1263+ "datetime",
1264+ "effect",
1265+ "either",
1266+ "enums",
1267+ "exceptions",
1268+ "functions",
1269+ "integers",
1270+ "js-date",
1271+ "maybe",
1272+ "node-buffer",
1273+ "node-path",
1274+ "node-streams",
1275+ "nullable",
1276+ "partial",
1277+ "prelude",
1278+ "strings"
1279+ ]
1280+ },
1281+ "node-path": {
1282+ "type": "registry",
1283+ "version": "5.0.0",
1284+ "integrity": "sha256-ki3WfT2DT1mj6wECNmhJ99d/a9aqohne3Gj48yH53Tk=",
1285+ "dependencies": [
1286+ "effect"
1287+ ]
1288+ },
1289+ "node-process": {
1290+ "type": "registry",
1291+ "version": "11.2.0",
1292+ "integrity": "sha256-onzKeNmaeYfN3HSDPqSFTrrP2Yl9tnVsfKKhnf2plxM=",
1293+ "dependencies": [
1294+ "effect",
1295+ "exceptions",
1296+ "foreign",
1297+ "foreign-object",
1298+ "maybe",
1299+ "node-event-emitter",
1300+ "node-streams",
1301+ "nullable",
1302+ "posix-types",
1303+ "prelude",
1304+ "strings"
1305+ ]
1306+ },
1307+ "node-streams": {
1308+ "type": "registry",
1309+ "version": "9.0.0",
1310+ "integrity": "sha256-EUpw7EDZCHstxj0vqJUR4BXORmRBN2LTlHw6/te+jxs=",
1311+ "dependencies": [
1312+ "aff",
1313+ "arrays",
1314+ "effect",
1315+ "either",
1316+ "exceptions",
1317+ "maybe",
1318+ "node-buffer",
1319+ "node-event-emitter",
1320+ "nullable",
1321+ "prelude",
1322+ "refs",
1323+ "st",
1324+ "tailrec",
1325+ "unsafe-coerce"
1326+ ]
1327+ },
1328+ "nonempty": {
1329+ "type": "registry",
1330+ "version": "7.0.0",
1331+ "integrity": "sha256-Ctkq8/+KiGqCE53Y/LvibA/coy7ev9HtRZU+GYS7yfQ=",
1332+ "dependencies": [
1333+ "control",
1334+ "foldable-traversable",
1335+ "maybe",
1336+ "prelude",
1337+ "tuples",
1338+ "unfoldable"
1339+ ]
1340+ },
1341+ "now": {
1342+ "type": "registry",
1343+ "version": "6.0.0",
1344+ "integrity": "sha256-mTyG4s8tps3XIf0jjV/lME2/QlwMzrQly2wqfSSUM3o=",
1345+ "dependencies": [
1346+ "datetime",
1347+ "effect",
1348+ "prelude"
1349+ ]
1350+ },
1351+ "nullable": {
1352+ "type": "registry",
1353+ "version": "6.0.0",
1354+ "integrity": "sha256-CDAZk+L9Sc0GCFTkE8n+qdp4Ys8avvnkU+m2hVALt7M=",
1355+ "dependencies": [
1356+ "functions",
1357+ "maybe",
1358+ "prelude"
1359+ ]
1360+ },
1361+ "numbers": {
1362+ "type": "registry",
1363+ "version": "9.0.1",
1364+ "integrity": "sha256-ZydYckgwRAnRaFC7pu6fADhzdwX+UqHZrfJyet64zls=",
1365+ "dependencies": [
1366+ "functions",
1367+ "maybe",
1368+ "prelude"
1369+ ]
1370+ },
1371+ "open-memoize": {
1372+ "type": "registry",
1373+ "version": "6.2.0",
1374+ "integrity": "sha256-yJLuVYX8FocHIJ+6q7efH/Pj4S+e1Y57DZ5Dn7qf4ww=",
1375+ "dependencies": [
1376+ "either",
1377+ "integers",
1378+ "lazy",
1379+ "lists",
1380+ "maybe",
1381+ "partial",
1382+ "prelude",
1383+ "strings",
1384+ "tuples"
1385+ ]
1386+ },
1387+ "optparse": {
1388+ "type": "registry",
1389+ "version": "5.0.1",
1390+ "integrity": "sha256-2btDjHPRR0uujUQJuZAN9AzvVoXe7yG6IwnY5evERhQ=",
1391+ "dependencies": [
1392+ "arrays",
1393+ "bifunctors",
1394+ "control",
1395+ "effect",
1396+ "either",
1397+ "enums",
1398+ "exists",
1399+ "exitcodes",
1400+ "foldable-traversable",
1401+ "free",
1402+ "integers",
1403+ "lazy",
1404+ "lists",
1405+ "maybe",
1406+ "newtype",
1407+ "node-buffer",
1408+ "node-process",
1409+ "node-streams",
1410+ "nonempty",
1411+ "numbers",
1412+ "open-memoize",
1413+ "partial",
1414+ "prelude",
1415+ "strings",
1416+ "tailrec",
1417+ "transformers",
1418+ "tuples"
1419+ ]
1420+ },
1421+ "ordered-collections": {
1422+ "type": "registry",
1423+ "version": "3.2.0",
1424+ "integrity": "sha256-NaEXc2cz/7lJfxPWEja4XlZbGxuRqJwFKQJjsJf51kQ=",
1425+ "dependencies": [
1426+ "arrays",
1427+ "control",
1428+ "foldable-traversable",
1429+ "functions",
1430+ "gen",
1431+ "lists",
1432+ "maybe",
1433+ "newtype",
1434+ "partial",
1435+ "prelude",
1436+ "safe-coerce",
1437+ "tailrec",
1438+ "tuples",
1439+ "unfoldable"
1440+ ]
1441+ },
1442+ "orders": {
1443+ "type": "registry",
1444+ "version": "6.0.0",
1445+ "integrity": "sha256-nSMxZK7wxyDULkjZqvMyB71mVo6b0AyLLHosDVbv1XM=",
1446+ "dependencies": [
1447+ "newtype",
1448+ "prelude"
1449+ ]
1450+ },
1451+ "parallel": {
1452+ "type": "registry",
1453+ "version": "7.0.0",
1454+ "integrity": "sha256-bAGpVhrFz2IyHkA4MR7+tE/19FZ7dzYBdYPgK5svkqw=",
1455+ "dependencies": [
1456+ "control",
1457+ "effect",
1458+ "either",
1459+ "foldable-traversable",
1460+ "functors",
1461+ "maybe",
1462+ "newtype",
1463+ "prelude",
1464+ "profunctor",
1465+ "refs",
1466+ "transformers"
1467+ ]
1468+ },
1469+ "partial": {
1470+ "type": "registry",
1471+ "version": "4.0.0",
1472+ "integrity": "sha256-mdrlJBAgFMh79hNRW39uv7c+BwnnaOrAMmdh7+VhEhs=",
1473+ "dependencies": []
1474+ },
1475+ "pipes": {
1476+ "type": "registry",
1477+ "version": "8.0.0",
1478+ "integrity": "sha256-dtUNpG8BGVr7pu6mQZyAnUAftUHgNS7f0QH3Kw5UTpQ=",
1479+ "dependencies": [
1480+ "aff",
1481+ "control",
1482+ "effect",
1483+ "either",
1484+ "foldable-traversable",
1485+ "identity",
1486+ "lists",
1487+ "maybe",
1488+ "mmorph",
1489+ "newtype",
1490+ "prelude",
1491+ "tailrec",
1492+ "transformers",
1493+ "tuples"
1494+ ]
1495+ },
1496+ "posix-types": {
1497+ "type": "registry",
1498+ "version": "6.0.0",
1499+ "integrity": "sha256-Je5jG439F/SFO/IvVevZnWVxDIonrehlKuJkefP2lHE=",
1500+ "dependencies": [
1501+ "maybe",
1502+ "newtype",
1503+ "prelude"
1504+ ]
1505+ },
1506+ "prelude": {
1507+ "type": "registry",
1508+ "version": "6.0.1",
1509+ "integrity": "sha256-qicw3g9AkjIxyVp73o1dF9BiTCMWouPk9rYe6AASBCU=",
1510+ "dependencies": []
1511+ },
1512+ "profunctor": {
1513+ "type": "registry",
1514+ "version": "6.0.1",
1515+ "integrity": "sha256-Ow0mJC+PIIRq/a3mzCWY5vxuTgR/e+Ee68+mWeSRnWY=",
1516+ "dependencies": [
1517+ "control",
1518+ "distributive",
1519+ "either",
1520+ "exists",
1521+ "invariant",
1522+ "newtype",
1523+ "prelude",
1524+ "tuples"
1525+ ]
1526+ },
1527+ "quickcheck": {
1528+ "type": "registry",
1529+ "version": "8.0.1",
1530+ "integrity": "sha256-SfW+maesCt0jnnFhfrgJZGPcWLj8oFcGbcDIVklmdzc=",
1531+ "dependencies": [
1532+ "arrays",
1533+ "console",
1534+ "control",
1535+ "effect",
1536+ "either",
1537+ "enums",
1538+ "exceptions",
1539+ "foldable-traversable",
1540+ "gen",
1541+ "identity",
1542+ "integers",
1543+ "lazy",
1544+ "lcg",
1545+ "lists",
1546+ "maybe",
1547+ "newtype",
1548+ "nonempty",
1549+ "numbers",
1550+ "partial",
1551+ "prelude",
1552+ "record",
1553+ "st",
1554+ "strings",
1555+ "tailrec",
1556+ "transformers",
1557+ "tuples"
1558+ ]
1559+ },
1560+ "random": {
1561+ "type": "registry",
1562+ "version": "6.0.0",
1563+ "integrity": "sha256-7sZRo6P9UIiXDZ9s2QL9T8h3wlIwLdQrR4+oZKOijQw=",
1564+ "dependencies": [
1565+ "effect",
1566+ "integers",
1567+ "prelude"
1568+ ]
1569+ },
1570+ "record": {
1571+ "type": "registry",
1572+ "version": "4.0.0",
1573+ "integrity": "sha256-WQ8fqp4X1wTA70J4qUcPW4Z7DCwx6e5KJnT/EuTdWSc=",
1574+ "dependencies": [
1575+ "functions",
1576+ "prelude",
1577+ "unsafe-coerce"
1578+ ]
1579+ },
1580+ "refs": {
1581+ "type": "registry",
1582+ "version": "6.0.0",
1583+ "integrity": "sha256-KKD5G9dR2SauuDGULUJsxjqDOEi1Jqm+2Sq5U2mY8YU=",
1584+ "dependencies": [
1585+ "effect",
1586+ "prelude"
1587+ ]
1588+ },
1589+ "safe-coerce": {
1590+ "type": "registry",
1591+ "version": "2.0.0",
1592+ "integrity": "sha256-EJrxtKt5xC7TYjBZrSBO/J7Aw3DmtilYjt4olpAXWVc=",
1593+ "dependencies": [
1594+ "unsafe-coerce"
1595+ ]
1596+ },
1597+ "spec": {
1598+ "type": "registry",
1599+ "version": "8.1.1",
1600+ "integrity": "sha256-b6qjDb7lUJGLV+WEoywLu6BCXC4zGpfbN43mTL+vBeI=",
1601+ "dependencies": [
1602+ "aff",
1603+ "ansi",
1604+ "arrays",
1605+ "avar",
1606+ "bifunctors",
1607+ "control",
1608+ "datetime",
1609+ "effect",
1610+ "either",
1611+ "exceptions",
1612+ "foldable-traversable",
1613+ "fork",
1614+ "identity",
1615+ "integers",
1616+ "lists",
1617+ "maybe",
1618+ "newtype",
1619+ "now",
1620+ "ordered-collections",
1621+ "parallel",
1622+ "pipes",
1623+ "prelude",
1624+ "refs",
1625+ "strings",
1626+ "tailrec",
1627+ "transformers",
1628+ "tuples"
1629+ ]
1630+ },
1631+ "spec-discovery": {
1632+ "type": "registry",
1633+ "version": "8.4.0",
1634+ "integrity": "sha256-aFp8bllT/wrxQu8hMlDchQQY08dQAz+Xdq2hZi5z3yY=",
1635+ "dependencies": [
1636+ "aff",
1637+ "effect",
1638+ "foldable-traversable",
1639+ "prelude",
1640+ "spec",
1641+ "spec-node"
1642+ ]
1643+ },
1644+ "spec-node": {
1645+ "type": "registry",
1646+ "version": "0.0.3",
1647+ "integrity": "sha256-8/9+g0obbamV0YtqzmttbWs8HaWF7CEeW+eDtqzuAAo=",
1648+ "dependencies": [
1649+ "aff",
1650+ "argonaut-codecs",
1651+ "argonaut-core",
1652+ "arrays",
1653+ "control",
1654+ "datetime",
1655+ "effect",
1656+ "either",
1657+ "foldable-traversable",
1658+ "identity",
1659+ "integers",
1660+ "maybe",
1661+ "newtype",
1662+ "node-buffer",
1663+ "node-fs",
1664+ "node-process",
1665+ "now",
1666+ "numbers",
1667+ "optparse",
1668+ "ordered-collections",
1669+ "partial",
1670+ "prelude",
1671+ "spec",
1672+ "strings",
1673+ "tuples"
1674+ ]
1675+ },
1676+ "spec-quickcheck": {
1677+ "type": "registry",
1678+ "version": "5.0.2",
1679+ "integrity": "sha256-pmnLu9e9Yk+Yx4hi71XwbyuPS27ya4hjTOKk2KFK/Ns=",
1680+ "dependencies": [
1681+ "aff",
1682+ "arrays",
1683+ "effect",
1684+ "foldable-traversable",
1685+ "lists",
1686+ "maybe",
1687+ "prelude",
1688+ "quickcheck",
1689+ "tuples"
1690+ ]
1691+ },
1692+ "st": {
1693+ "type": "registry",
1694+ "version": "6.2.0",
1695+ "integrity": "sha256-WI4MEkkwUd4pnwZQ3G8VKWgX5t1RSNJludm5e9boaRo=",
1696+ "dependencies": [
1697+ "effect",
1698+ "partial",
1699+ "prelude",
1700+ "tailrec",
1701+ "unsafe-coerce"
1702+ ]
1703+ },
1704+ "strings": {
1705+ "type": "registry",
1706+ "version": "6.0.1",
1707+ "integrity": "sha256-FNto2hoNW5Da6W6crIk77YXMagBvOGHZE1kO7eZ1vLM=",
1708+ "dependencies": [
1709+ "arrays",
1710+ "control",
1711+ "either",
1712+ "enums",
1713+ "foldable-traversable",
1714+ "gen",
1715+ "integers",
1716+ "maybe",
1717+ "newtype",
1718+ "nonempty",
1719+ "partial",
1720+ "prelude",
1721+ "tailrec",
1722+ "tuples",
1723+ "unfoldable",
1724+ "unsafe-coerce"
1725+ ]
1726+ },
1727+ "tailrec": {
1728+ "type": "registry",
1729+ "version": "6.1.0",
1730+ "integrity": "sha256-xrorCfP0xV1wubs27idQCHQqdvSUuqmmL/am7Ji1wVU=",
1731+ "dependencies": [
1732+ "bifunctors",
1733+ "effect",
1734+ "either",
1735+ "identity",
1736+ "maybe",
1737+ "partial",
1738+ "prelude",
1739+ "refs"
1740+ ]
1741+ },
1742+ "transformers": {
1743+ "type": "registry",
1744+ "version": "6.1.0",
1745+ "integrity": "sha256-QJmgNT/y7ljPHSsXaW4zxF/982BFiQ90KNL1g/NtEOQ=",
1746+ "dependencies": [
1747+ "control",
1748+ "distributive",
1749+ "effect",
1750+ "either",
1751+ "exceptions",
1752+ "foldable-traversable",
1753+ "identity",
1754+ "lazy",
1755+ "maybe",
1756+ "newtype",
1757+ "prelude",
1758+ "st",
1759+ "tailrec",
1760+ "tuples",
1761+ "unfoldable"
1762+ ]
1763+ },
1764+ "tuples": {
1765+ "type": "registry",
1766+ "version": "7.0.0",
1767+ "integrity": "sha256-BKy7EfK8S1KeTCwyWqyW1wwcpSAQuh3IsczSVgS6fzY=",
1768+ "dependencies": [
1769+ "control",
1770+ "invariant",
1771+ "prelude"
1772+ ]
1773+ },
1774+ "type-equality": {
1775+ "type": "registry",
1776+ "version": "4.0.1",
1777+ "integrity": "sha256-BBqYOSnAKmayRvR5mtZoCf4SlYs2ipatD/+5nQx73aw=",
1778+ "dependencies": []
1779+ },
1780+ "typelevel-prelude": {
1781+ "type": "registry",
1782+ "version": "7.0.0",
1783+ "integrity": "sha256-+pHi14/40mTj/+lmCWqL0T7iXIXD1+NSg/KItyyoB0A=",
1784+ "dependencies": [
1785+ "prelude",
1786+ "type-equality"
1787+ ]
1788+ },
1789+ "unfoldable": {
1790+ "type": "registry",
1791+ "version": "6.0.0",
1792+ "integrity": "sha256-BK/6By1sKp/ztk+9CF3q43SV0QDTLVdsGqFerKHSmbg=",
1793+ "dependencies": [
1794+ "foldable-traversable",
1795+ "maybe",
1796+ "partial",
1797+ "prelude",
1798+ "tuples"
1799+ ]
1800+ },
1801+ "unsafe-coerce": {
1802+ "type": "registry",
1803+ "version": "6.0.0",
1804+ "integrity": "sha256-0L1QsaY20OILjfU5TV72d3U/tSjhmL9hJ32WMp857Lk=",
1805+ "dependencies": []
1806+ },
1807+ "variant": {
1808+ "type": "registry",
1809+ "version": "8.0.0",
1810+ "integrity": "sha256-Ydrgl8liWEwYQOWW76PdZtg3vxKpoKgsnmFyTLgZkoU=",
1811+ "dependencies": [
1812+ "control",
1813+ "enums",
1814+ "foldable-traversable",
1815+ "lists",
1816+ "maybe",
1817+ "partial",
1818+ "prelude",
1819+ "type-equality",
1820+ "unsafe-coerce"
1821+ ]
1822+ },
1823+ "yoga-json": {
1824+ "type": "registry",
1825+ "version": "5.1.0",
1826+ "integrity": "sha256-DK+KyaQ7YyWo8p3SuZPPEMoVKy6HF1iV4rGFPXgBygw=",
1827+ "dependencies": [
1828+ "arrays",
1829+ "bifunctors",
1830+ "control",
1831+ "datetime",
1832+ "effect",
1833+ "either",
1834+ "exceptions",
1835+ "foldable-traversable",
1836+ "foreign",
1837+ "foreign-object",
1838+ "free",
1839+ "identity",
1840+ "integers",
1841+ "js-bigints",
1842+ "js-date",
1843+ "lists",
1844+ "maybe",
1845+ "newtype",
1846+ "nullable",
1847+ "numbers",
1848+ "ordered-collections",
1849+ "partial",
1850+ "prelude",
1851+ "record",
1852+ "strings",
1853+ "transformers",
1854+ "tuples",
1855+ "typelevel-prelude",
1856+ "unsafe-coerce",
1857+ "variant",
1858+ "yoga-tree"
1859+ ]
1860+ },
1861+ "yoga-tree": {
1862+ "type": "registry",
1863+ "version": "1.0.0",
1864+ "integrity": "sha256-s8rIVEQkRi1VrMc92T9ceXcY0X6r5A4QqT6f7GgmDQI=",
1865+ "dependencies": [
1866+ "arrays",
1867+ "control",
1868+ "foldable-traversable",
1869+ "free",
1870+ "maybe",
1871+ "prelude",
1872+ "tailrec"
1873+ ]
1874+ }
1875+ }
1876+}
spago.yamlnew file+23
@@ -0,0 +1,23 @@
1+package:
2+ name: yoga-country
3+ dependencies:
4+ - prelude
5+ - maybe
6+ - yoga-json
7+ - foreign
8+ - control
9+ - enums
10+ test:
11+ main: Test.Main
12+ dependencies:
13+ - spec
14+ - spec-discovery
15+ - spec-quickcheck
16+ - quickcheck
17+ - aff
18+ - arrays
19+ - foldable-traversable
20+workspace:
21+ packageSet:
22+ registry: 61.2.0
23+ extraPackages: {}
src/Data/Country.pursnew file+1796
@@ -0,0 +1,1796 @@
1+module Data.Country where
2+
3+import Prelude
4+
5+import Control.Monad.Except (throwError)
6+import Data.Enum (class Enum, class BoundedEnum, Cardinality(..), enumFromTo)
7+import Data.Maybe (Maybe(..))
8+import Foreign (ForeignError(..))
9+import Yoga.JSON (class ReadForeign, class WriteForeign, readImpl, writeImpl)
10+
11+data Country
12+ = Andorra
13+ | UnitedArabEmirates
14+ | Afghanistan
15+ | AntiguaAndBarbuda
16+ | Anguilla
17+ | Albania
18+ | Armenia
19+ | Angola
20+ | Antarctica
21+ | Argentina
22+ | AmericanSamoa
23+ | Austria
24+ | Australia
25+ | Aruba
26+ | AlandIslands
27+ | Azerbaijan
28+ | BosniaAndHerzegovina
29+ | Barbados
30+ | Bangladesh
31+ | Belgium
32+ | BurkinaFaso
33+ | Bulgaria
34+ | Bahrain
35+ | Burundi
36+ | Benin
37+ | SaintBarthelemy
38+ | Bermuda
39+ | BruneiDarussalam
40+ | BoliviaPlurinationalStateOf
41+ | BonaireSintEustatiusAndSaba
42+ | Brazil
43+ | Bahamas
44+ | Bhutan
45+ | BouvetIsland
46+ | Botswana
47+ | Belarus
48+ | Belize
49+ | Canada
50+ | CocosKeelingIslands
51+ | CongoDemocraticRepublicOfThe
52+ | CentralAfricanRepublic
53+ | Congo
54+ | Switzerland
55+ | CoteDIvoire
56+ | CookIslands
57+ | Chile
58+ | Cameroon
59+ | China
60+ | Colombia
61+ | CostaRica
62+ | Cuba
63+ | CaboVerde
64+ | Curacao
65+ | ChristmasIsland
66+ | Cyprus
67+ | Czechia
68+ | Germany
69+ | Djibouti
70+ | Denmark
71+ | Dominica
72+ | DominicanRepublic
73+ | Algeria
74+ | Ecuador
75+ | Estonia
76+ | Egypt
77+ | WesternSahara
78+ | Eritrea
79+ | Spain
80+ | Ethiopia
81+ | Finland
82+ | Fiji
83+ | FalklandIslandsMalvinas
84+ | MicronesiaFederatedStatesOf
85+ | FaroeIslands
86+ | France
87+ | Gabon
88+ | UnitedKingdomOfGreatBritainAndNorthernIreland
89+ | Grenada
90+ | Georgia
91+ | FrenchGuiana
92+ | Guernsey
93+ | Ghana
94+ | Gibraltar
95+ | Greenland
96+ | Gambia
97+ | Guinea
98+ | Guadeloupe
99+ | EquatorialGuinea
100+ | Greece
101+ | SouthGeorgiaAndTheSouthSandwichIslands
102+ | Guatemala
103+ | Guam
104+ | GuineaBissau
105+ | Guyana
106+ | HongKong
107+ | HeardIslandAndMcdonaldIslands
108+ | Honduras
109+ | Croatia
110+ | Haiti
111+ | Hungary
112+ | Indonesia
113+ | Ireland
114+ | Israel
115+ | IsleOfMan
116+ | India
117+ | BritishIndianOceanTerritory
118+ | Iraq
119+ | IranIslamicRepublicOf
120+ | Iceland
121+ | Italy
122+ | Jersey
123+ | Jamaica
124+ | Jordan
125+ | Japan
126+ | Kenya
127+ | Kyrgyzstan
128+ | Cambodia
129+ | Kiribati
130+ | Comoros
131+ | SaintKittsAndNevis
132+ | KoreaDemocraticPeopleSRepublicOf
133+ | KoreaRepublicOf
134+ | Kuwait
135+ | CaymanIslands
136+ | Kazakhstan
137+ | LaoPeopleSDemocraticRepublic
138+ | Lebanon
139+ | SaintLucia
140+ | Liechtenstein
141+ | SriLanka
142+ | Liberia
143+ | Lesotho
144+ | Lithuania
145+ | Luxembourg
146+ | Latvia
147+ | Libya
148+ | Morocco
149+ | Monaco
150+ | MoldovaRepublicOf
151+ | Montenegro
152+ | SaintMartinFrenchPart
153+ | Madagascar
154+ | MarshallIslands
155+ | NorthMacedonia
156+ | Mali
157+ | Myanmar
158+ | Mongolia
159+ | Macao
160+ | NorthernMarianaIslands
161+ | Martinique
162+ | Mauritania
163+ | Montserrat
164+ | Malta
165+ | Mauritius
166+ | Maldives
167+ | Malawi
168+ | Mexico
169+ | Malaysia
170+ | Mozambique
171+ | Namibia
172+ | NewCaledonia
173+ | Niger
174+ | NorfolkIsland
175+ | Nigeria
176+ | Nicaragua
177+ | NetherlandsKingdomOfThe
178+ | Norway
179+ | Nepal
180+ | Nauru
181+ | Niue
182+ | NewZealand
183+ | Oman
184+ | Panama
185+ | Peru
186+ | FrenchPolynesia
187+ | PapuaNewGuinea
188+ | Philippines
189+ | Pakistan
190+ | Poland
191+ | SaintPierreAndMiquelon
192+ | Pitcairn
193+ | PuertoRico
194+ | PalestineStateOf
195+ | Portugal
196+ | Palau
197+ | Paraguay
198+ | Qatar
199+ | Reunion
200+ | Romania
201+ | Serbia
202+ | RussianFederation
203+ | Rwanda
204+ | SaudiArabia
205+ | SolomonIslands
206+ | Seychelles
207+ | Sudan
208+ | Sweden
209+ | Singapore
210+ | SaintHelenaAscensionAndTristanDaCunha
211+ | Slovenia
212+ | SvalbardAndJanMayen
213+ | Slovakia
214+ | SierraLeone
215+ | SanMarino
216+ | Senegal
217+ | Somalia
218+ | Suriname
219+ | SouthSudan
220+ | SaoTomeAndPrincipe
221+ | ElSalvador
222+ | SintMaartenDutchPart
223+ | SyrianArabRepublic
224+ | Eswatini
225+ | TurksAndCaicosIslands
226+ | Chad
227+ | FrenchSouthernTerritories
228+ | Togo
229+ | Thailand
230+ | Tajikistan
231+ | Tokelau
232+ | TimorLeste
233+ | Turkmenistan
234+ | Tunisia
235+ | Tonga
236+ | Turkiye
237+ | TrinidadAndTobago
238+ | Tuvalu
239+ | TaiwanProvinceOfChina
240+ | TanzaniaUnitedRepublicOf
241+ | Ukraine
242+ | Uganda
243+ | UnitedStatesMinorOutlyingIslands
244+ | UnitedStatesOfAmerica
245+ | Uruguay
246+ | Uzbekistan
247+ | HolySee
248+ | SaintVincentAndTheGrenadines
249+ | VenezuelaBolivarianRepublicOf
250+ | VirginIslandsBritish
251+ | VirginIslandsUS
252+ | VietNam
253+ | Vanuatu
254+ | WallisAndFutuna
255+ | Samoa
256+ | Yemen
257+ | Mayotte
258+ | SouthAfrica
259+ | Zambia
260+ | Zimbabwe
261+
262+derive instance Eq Country
263+derive instance Ord Country
264+
265+instance Show Country where
266+ show = toAlpha2
267+
268+instance Bounded Country where
269+ bottom = Andorra
270+ top = Zimbabwe
271+
272+instance Enum Country where
273+ succ = case _ of
274+ Andorra -> Just UnitedArabEmirates
275+ UnitedArabEmirates -> Just Afghanistan
276+ Afghanistan -> Just AntiguaAndBarbuda
277+ AntiguaAndBarbuda -> Just Anguilla
278+ Anguilla -> Just Albania
279+ Albania -> Just Armenia
280+ Armenia -> Just Angola
281+ Angola -> Just Antarctica
282+ Antarctica -> Just Argentina
283+ Argentina -> Just AmericanSamoa
284+ AmericanSamoa -> Just Austria
285+ Austria -> Just Australia
286+ Australia -> Just Aruba
287+ Aruba -> Just AlandIslands
288+ AlandIslands -> Just Azerbaijan
289+ Azerbaijan -> Just BosniaAndHerzegovina
290+ BosniaAndHerzegovina -> Just Barbados
291+ Barbados -> Just Bangladesh
292+ Bangladesh -> Just Belgium
293+ Belgium -> Just BurkinaFaso
294+ BurkinaFaso -> Just Bulgaria
295+ Bulgaria -> Just Bahrain
296+ Bahrain -> Just Burundi
297+ Burundi -> Just Benin
298+ Benin -> Just SaintBarthelemy
299+ SaintBarthelemy -> Just Bermuda
300+ Bermuda -> Just BruneiDarussalam
301+ BruneiDarussalam -> Just BoliviaPlurinationalStateOf
302+ BoliviaPlurinationalStateOf -> Just BonaireSintEustatiusAndSaba
303+ BonaireSintEustatiusAndSaba -> Just Brazil
304+ Brazil -> Just Bahamas
305+ Bahamas -> Just Bhutan
306+ Bhutan -> Just BouvetIsland
307+ BouvetIsland -> Just Botswana
308+ Botswana -> Just Belarus
309+ Belarus -> Just Belize
310+ Belize -> Just Canada
311+ Canada -> Just CocosKeelingIslands
312+ CocosKeelingIslands -> Just CongoDemocraticRepublicOfThe
313+ CongoDemocraticRepublicOfThe -> Just CentralAfricanRepublic
314+ CentralAfricanRepublic -> Just Congo
315+ Congo -> Just Switzerland
316+ Switzerland -> Just CoteDIvoire
317+ CoteDIvoire -> Just CookIslands
318+ CookIslands -> Just Chile
319+ Chile -> Just Cameroon
320+ Cameroon -> Just China
321+ China -> Just Colombia
322+ Colombia -> Just CostaRica
323+ CostaRica -> Just Cuba
324+ Cuba -> Just CaboVerde
325+ CaboVerde -> Just Curacao
326+ Curacao -> Just ChristmasIsland
327+ ChristmasIsland -> Just Cyprus
328+ Cyprus -> Just Czechia
329+ Czechia -> Just Germany
330+ Germany -> Just Djibouti
331+ Djibouti -> Just Denmark
332+ Denmark -> Just Dominica
333+ Dominica -> Just DominicanRepublic
334+ DominicanRepublic -> Just Algeria
335+ Algeria -> Just Ecuador
336+ Ecuador -> Just Estonia
337+ Estonia -> Just Egypt
338+ Egypt -> Just WesternSahara
339+ WesternSahara -> Just Eritrea
340+ Eritrea -> Just Spain
341+ Spain -> Just Ethiopia
342+ Ethiopia -> Just Finland
343+ Finland -> Just Fiji
344+ Fiji -> Just FalklandIslandsMalvinas
345+ FalklandIslandsMalvinas -> Just MicronesiaFederatedStatesOf
346+ MicronesiaFederatedStatesOf -> Just FaroeIslands
347+ FaroeIslands -> Just France
348+ France -> Just Gabon
349+ Gabon -> Just UnitedKingdomOfGreatBritainAndNorthernIreland
350+ UnitedKingdomOfGreatBritainAndNorthernIreland -> Just Grenada
351+ Grenada -> Just Georgia
352+ Georgia -> Just FrenchGuiana
353+ FrenchGuiana -> Just Guernsey
354+ Guernsey -> Just Ghana
355+ Ghana -> Just Gibraltar
356+ Gibraltar -> Just Greenland
357+ Greenland -> Just Gambia
358+ Gambia -> Just Guinea
359+ Guinea -> Just Guadeloupe
360+ Guadeloupe -> Just EquatorialGuinea
361+ EquatorialGuinea -> Just Greece
362+ Greece -> Just SouthGeorgiaAndTheSouthSandwichIslands
363+ SouthGeorgiaAndTheSouthSandwichIslands -> Just Guatemala
364+ Guatemala -> Just Guam
365+ Guam -> Just GuineaBissau
366+ GuineaBissau -> Just Guyana
367+ Guyana -> Just HongKong
368+ HongKong -> Just HeardIslandAndMcdonaldIslands
369+ HeardIslandAndMcdonaldIslands -> Just Honduras
370+ Honduras -> Just Croatia
371+ Croatia -> Just Haiti
372+ Haiti -> Just Hungary
373+ Hungary -> Just Indonesia
374+ Indonesia -> Just Ireland
375+ Ireland -> Just Israel
376+ Israel -> Just IsleOfMan
377+ IsleOfMan -> Just India
378+ India -> Just BritishIndianOceanTerritory
379+ BritishIndianOceanTerritory -> Just Iraq
380+ Iraq -> Just IranIslamicRepublicOf
381+ IranIslamicRepublicOf -> Just Iceland
382+ Iceland -> Just Italy
383+ Italy -> Just Jersey
384+ Jersey -> Just Jamaica
385+ Jamaica -> Just Jordan
386+ Jordan -> Just Japan
387+ Japan -> Just Kenya
388+ Kenya -> Just Kyrgyzstan
389+ Kyrgyzstan -> Just Cambodia
390+ Cambodia -> Just Kiribati
391+ Kiribati -> Just Comoros
392+ Comoros -> Just SaintKittsAndNevis
393+ SaintKittsAndNevis -> Just KoreaDemocraticPeopleSRepublicOf
394+ KoreaDemocraticPeopleSRepublicOf -> Just KoreaRepublicOf
395+ KoreaRepublicOf -> Just Kuwait
396+ Kuwait -> Just CaymanIslands
397+ CaymanIslands -> Just Kazakhstan
398+ Kazakhstan -> Just LaoPeopleSDemocraticRepublic
399+ LaoPeopleSDemocraticRepublic -> Just Lebanon
400+ Lebanon -> Just SaintLucia
401+ SaintLucia -> Just Liechtenstein
402+ Liechtenstein -> Just SriLanka
403+ SriLanka -> Just Liberia
404+ Liberia -> Just Lesotho
405+ Lesotho -> Just Lithuania
406+ Lithuania -> Just Luxembourg
407+ Luxembourg -> Just Latvia
408+ Latvia -> Just Libya
409+ Libya -> Just Morocco
410+ Morocco -> Just Monaco
411+ Monaco -> Just MoldovaRepublicOf
412+ MoldovaRepublicOf -> Just Montenegro
413+ Montenegro -> Just SaintMartinFrenchPart
414+ SaintMartinFrenchPart -> Just Madagascar
415+ Madagascar -> Just MarshallIslands
416+ MarshallIslands -> Just NorthMacedonia
417+ NorthMacedonia -> Just Mali
418+ Mali -> Just Myanmar
419+ Myanmar -> Just Mongolia
420+ Mongolia -> Just Macao
421+ Macao -> Just NorthernMarianaIslands
422+ NorthernMarianaIslands -> Just Martinique
423+ Martinique -> Just Mauritania
424+ Mauritania -> Just Montserrat
425+ Montserrat -> Just Malta
426+ Malta -> Just Mauritius
427+ Mauritius -> Just Maldives
428+ Maldives -> Just Malawi
429+ Malawi -> Just Mexico
430+ Mexico -> Just Malaysia
431+ Malaysia -> Just Mozambique
432+ Mozambique -> Just Namibia
433+ Namibia -> Just NewCaledonia
434+ NewCaledonia -> Just Niger
435+ Niger -> Just NorfolkIsland
436+ NorfolkIsland -> Just Nigeria
437+ Nigeria -> Just Nicaragua
438+ Nicaragua -> Just NetherlandsKingdomOfThe
439+ NetherlandsKingdomOfThe -> Just Norway
440+ Norway -> Just Nepal
441+ Nepal -> Just Nauru
442+ Nauru -> Just Niue
443+ Niue -> Just NewZealand
444+ NewZealand -> Just Oman
445+ Oman -> Just Panama
446+ Panama -> Just Peru
447+ Peru -> Just FrenchPolynesia
448+ FrenchPolynesia -> Just PapuaNewGuinea
449+ PapuaNewGuinea -> Just Philippines
450+ Philippines -> Just Pakistan
451+ Pakistan -> Just Poland
452+ Poland -> Just SaintPierreAndMiquelon
453+ SaintPierreAndMiquelon -> Just Pitcairn
454+ Pitcairn -> Just PuertoRico
455+ PuertoRico -> Just PalestineStateOf
456+ PalestineStateOf -> Just Portugal
457+ Portugal -> Just Palau
458+ Palau -> Just Paraguay
459+ Paraguay -> Just Qatar
460+ Qatar -> Just Reunion
461+ Reunion -> Just Romania
462+ Romania -> Just Serbia
463+ Serbia -> Just RussianFederation
464+ RussianFederation -> Just Rwanda
465+ Rwanda -> Just SaudiArabia
466+ SaudiArabia -> Just SolomonIslands
467+ SolomonIslands -> Just Seychelles
468+ Seychelles -> Just Sudan
469+ Sudan -> Just Sweden
470+ Sweden -> Just Singapore
471+ Singapore -> Just SaintHelenaAscensionAndTristanDaCunha
472+ SaintHelenaAscensionAndTristanDaCunha -> Just Slovenia
473+ Slovenia -> Just SvalbardAndJanMayen
474+ SvalbardAndJanMayen -> Just Slovakia
475+ Slovakia -> Just SierraLeone
476+ SierraLeone -> Just SanMarino
477+ SanMarino -> Just Senegal
478+ Senegal -> Just Somalia
479+ Somalia -> Just Suriname
480+ Suriname -> Just SouthSudan
481+ SouthSudan -> Just SaoTomeAndPrincipe
482+ SaoTomeAndPrincipe -> Just ElSalvador
483+ ElSalvador -> Just SintMaartenDutchPart
484+ SintMaartenDutchPart -> Just SyrianArabRepublic
485+ SyrianArabRepublic -> Just Eswatini
486+ Eswatini -> Just TurksAndCaicosIslands
487+ TurksAndCaicosIslands -> Just Chad
488+ Chad -> Just FrenchSouthernTerritories
489+ FrenchSouthernTerritories -> Just Togo
490+ Togo -> Just Thailand
491+ Thailand -> Just Tajikistan
492+ Tajikistan -> Just Tokelau
493+ Tokelau -> Just TimorLeste
494+ TimorLeste -> Just Turkmenistan
495+ Turkmenistan -> Just Tunisia
496+ Tunisia -> Just Tonga
497+ Tonga -> Just Turkiye
498+ Turkiye -> Just TrinidadAndTobago
499+ TrinidadAndTobago -> Just Tuvalu
500+ Tuvalu -> Just TaiwanProvinceOfChina
501+ TaiwanProvinceOfChina -> Just TanzaniaUnitedRepublicOf
502+ TanzaniaUnitedRepublicOf -> Just Ukraine
503+ Ukraine -> Just Uganda
504+ Uganda -> Just UnitedStatesMinorOutlyingIslands
505+ UnitedStatesMinorOutlyingIslands -> Just UnitedStatesOfAmerica
506+ UnitedStatesOfAmerica -> Just Uruguay
507+ Uruguay -> Just Uzbekistan
508+ Uzbekistan -> Just HolySee
509+ HolySee -> Just SaintVincentAndTheGrenadines
510+ SaintVincentAndTheGrenadines -> Just VenezuelaBolivarianRepublicOf
511+ VenezuelaBolivarianRepublicOf -> Just VirginIslandsBritish
512+ VirginIslandsBritish -> Just VirginIslandsUS
513+ VirginIslandsUS -> Just VietNam
514+ VietNam -> Just Vanuatu
515+ Vanuatu -> Just WallisAndFutuna
516+ WallisAndFutuna -> Just Samoa
517+ Samoa -> Just Yemen
518+ Yemen -> Just Mayotte
519+ Mayotte -> Just SouthAfrica
520+ SouthAfrica -> Just Zambia
521+ Zambia -> Just Zimbabwe
522+ Zimbabwe -> Nothing
523+ pred = case _ of
524+ Andorra -> Nothing
525+ UnitedArabEmirates -> Just Andorra
526+ Afghanistan -> Just UnitedArabEmirates
527+ AntiguaAndBarbuda -> Just Afghanistan
528+ Anguilla -> Just AntiguaAndBarbuda
529+ Albania -> Just Anguilla
530+ Armenia -> Just Albania
531+ Angola -> Just Armenia
532+ Antarctica -> Just Angola
533+ Argentina -> Just Antarctica
534+ AmericanSamoa -> Just Argentina
535+ Austria -> Just AmericanSamoa
536+ Australia -> Just Austria
537+ Aruba -> Just Australia
538+ AlandIslands -> Just Aruba
539+ Azerbaijan -> Just AlandIslands
540+ BosniaAndHerzegovina -> Just Azerbaijan
541+ Barbados -> Just BosniaAndHerzegovina
542+ Bangladesh -> Just Barbados
543+ Belgium -> Just Bangladesh
544+ BurkinaFaso -> Just Belgium
545+ Bulgaria -> Just BurkinaFaso
546+ Bahrain -> Just Bulgaria
547+ Burundi -> Just Bahrain
548+ Benin -> Just Burundi
549+ SaintBarthelemy -> Just Benin
550+ Bermuda -> Just SaintBarthelemy
551+ BruneiDarussalam -> Just Bermuda
552+ BoliviaPlurinationalStateOf -> Just BruneiDarussalam
553+ BonaireSintEustatiusAndSaba -> Just BoliviaPlurinationalStateOf
554+ Brazil -> Just BonaireSintEustatiusAndSaba
555+ Bahamas -> Just Brazil
556+ Bhutan -> Just Bahamas
557+ BouvetIsland -> Just Bhutan
558+ Botswana -> Just BouvetIsland
559+ Belarus -> Just Botswana
560+ Belize -> Just Belarus
561+ Canada -> Just Belize
562+ CocosKeelingIslands -> Just Canada
563+ CongoDemocraticRepublicOfThe -> Just CocosKeelingIslands
564+ CentralAfricanRepublic -> Just CongoDemocraticRepublicOfThe
565+ Congo -> Just CentralAfricanRepublic
566+ Switzerland -> Just Congo
567+ CoteDIvoire -> Just Switzerland
568+ CookIslands -> Just CoteDIvoire
569+ Chile -> Just CookIslands
570+ Cameroon -> Just Chile
571+ China -> Just Cameroon
572+ Colombia -> Just China
573+ CostaRica -> Just Colombia
574+ Cuba -> Just CostaRica
575+ CaboVerde -> Just Cuba
576+ Curacao -> Just CaboVerde
577+ ChristmasIsland -> Just Curacao
578+ Cyprus -> Just ChristmasIsland
579+ Czechia -> Just Cyprus
580+ Germany -> Just Czechia
581+ Djibouti -> Just Germany
582+ Denmark -> Just Djibouti
583+ Dominica -> Just Denmark
584+ DominicanRepublic -> Just Dominica
585+ Algeria -> Just DominicanRepublic
586+ Ecuador -> Just Algeria
587+ Estonia -> Just Ecuador
588+ Egypt -> Just Estonia
589+ WesternSahara -> Just Egypt
590+ Eritrea -> Just WesternSahara
591+ Spain -> Just Eritrea
592+ Ethiopia -> Just Spain
593+ Finland -> Just Ethiopia
594+ Fiji -> Just Finland
595+ FalklandIslandsMalvinas -> Just Fiji
596+ MicronesiaFederatedStatesOf -> Just FalklandIslandsMalvinas
597+ FaroeIslands -> Just MicronesiaFederatedStatesOf
598+ France -> Just FaroeIslands
599+ Gabon -> Just France
600+ UnitedKingdomOfGreatBritainAndNorthernIreland -> Just Gabon
601+ Grenada -> Just UnitedKingdomOfGreatBritainAndNorthernIreland
602+ Georgia -> Just Grenada
603+ FrenchGuiana -> Just Georgia
604+ Guernsey -> Just FrenchGuiana
605+ Ghana -> Just Guernsey
606+ Gibraltar -> Just Ghana
607+ Greenland -> Just Gibraltar
608+ Gambia -> Just Greenland
609+ Guinea -> Just Gambia
610+ Guadeloupe -> Just Guinea
611+ EquatorialGuinea -> Just Guadeloupe
612+ Greece -> Just EquatorialGuinea
613+ SouthGeorgiaAndTheSouthSandwichIslands -> Just Greece
614+ Guatemala -> Just SouthGeorgiaAndTheSouthSandwichIslands
615+ Guam -> Just Guatemala
616+ GuineaBissau -> Just Guam
617+ Guyana -> Just GuineaBissau
618+ HongKong -> Just Guyana
619+ HeardIslandAndMcdonaldIslands -> Just HongKong
620+ Honduras -> Just HeardIslandAndMcdonaldIslands
621+ Croatia -> Just Honduras
622+ Haiti -> Just Croatia
623+ Hungary -> Just Haiti
624+ Indonesia -> Just Hungary
625+ Ireland -> Just Indonesia
626+ Israel -> Just Ireland
627+ IsleOfMan -> Just Israel
628+ India -> Just IsleOfMan
629+ BritishIndianOceanTerritory -> Just India
630+ Iraq -> Just BritishIndianOceanTerritory
631+ IranIslamicRepublicOf -> Just Iraq
632+ Iceland -> Just IranIslamicRepublicOf
633+ Italy -> Just Iceland
634+ Jersey -> Just Italy
635+ Jamaica -> Just Jersey
636+ Jordan -> Just Jamaica
637+ Japan -> Just Jordan
638+ Kenya -> Just Japan
639+ Kyrgyzstan -> Just Kenya
640+ Cambodia -> Just Kyrgyzstan
641+ Kiribati -> Just Cambodia
642+ Comoros -> Just Kiribati
643+ SaintKittsAndNevis -> Just Comoros
644+ KoreaDemocraticPeopleSRepublicOf -> Just SaintKittsAndNevis
645+ KoreaRepublicOf -> Just KoreaDemocraticPeopleSRepublicOf
646+ Kuwait -> Just KoreaRepublicOf
647+ CaymanIslands -> Just Kuwait
648+ Kazakhstan -> Just CaymanIslands
649+ LaoPeopleSDemocraticRepublic -> Just Kazakhstan
650+ Lebanon -> Just LaoPeopleSDemocraticRepublic
651+ SaintLucia -> Just Lebanon
652+ Liechtenstein -> Just SaintLucia
653+ SriLanka -> Just Liechtenstein
654+ Liberia -> Just SriLanka
655+ Lesotho -> Just Liberia
656+ Lithuania -> Just Lesotho
657+ Luxembourg -> Just Lithuania
658+ Latvia -> Just Luxembourg
659+ Libya -> Just Latvia
660+ Morocco -> Just Libya
661+ Monaco -> Just Morocco
662+ MoldovaRepublicOf -> Just Monaco
663+ Montenegro -> Just MoldovaRepublicOf
664+ SaintMartinFrenchPart -> Just Montenegro
665+ Madagascar -> Just SaintMartinFrenchPart
666+ MarshallIslands -> Just Madagascar
667+ NorthMacedonia -> Just MarshallIslands
668+ Mali -> Just NorthMacedonia
669+ Myanmar -> Just Mali
670+ Mongolia -> Just Myanmar
671+ Macao -> Just Mongolia
672+ NorthernMarianaIslands -> Just Macao
673+ Martinique -> Just NorthernMarianaIslands
674+ Mauritania -> Just Martinique
675+ Montserrat -> Just Mauritania
676+ Malta -> Just Montserrat
677+ Mauritius -> Just Malta
678+ Maldives -> Just Mauritius
679+ Malawi -> Just Maldives
680+ Mexico -> Just Malawi
681+ Malaysia -> Just Mexico
682+ Mozambique -> Just Malaysia
683+ Namibia -> Just Mozambique
684+ NewCaledonia -> Just Namibia
685+ Niger -> Just NewCaledonia
686+ NorfolkIsland -> Just Niger
687+ Nigeria -> Just NorfolkIsland
688+ Nicaragua -> Just Nigeria
689+ NetherlandsKingdomOfThe -> Just Nicaragua
690+ Norway -> Just NetherlandsKingdomOfThe
691+ Nepal -> Just Norway
692+ Nauru -> Just Nepal
693+ Niue -> Just Nauru
694+ NewZealand -> Just Niue
695+ Oman -> Just NewZealand
696+ Panama -> Just Oman
697+ Peru -> Just Panama
698+ FrenchPolynesia -> Just Peru
699+ PapuaNewGuinea -> Just FrenchPolynesia
700+ Philippines -> Just PapuaNewGuinea
701+ Pakistan -> Just Philippines
702+ Poland -> Just Pakistan
703+ SaintPierreAndMiquelon -> Just Poland
704+ Pitcairn -> Just SaintPierreAndMiquelon
705+ PuertoRico -> Just Pitcairn
706+ PalestineStateOf -> Just PuertoRico
707+ Portugal -> Just PalestineStateOf
708+ Palau -> Just Portugal
709+ Paraguay -> Just Palau
710+ Qatar -> Just Paraguay
711+ Reunion -> Just Qatar
712+ Romania -> Just Reunion
713+ Serbia -> Just Romania
714+ RussianFederation -> Just Serbia
715+ Rwanda -> Just RussianFederation
716+ SaudiArabia -> Just Rwanda
717+ SolomonIslands -> Just SaudiArabia
718+ Seychelles -> Just SolomonIslands
719+ Sudan -> Just Seychelles
720+ Sweden -> Just Sudan
721+ Singapore -> Just Sweden
722+ SaintHelenaAscensionAndTristanDaCunha -> Just Singapore
723+ Slovenia -> Just SaintHelenaAscensionAndTristanDaCunha
724+ SvalbardAndJanMayen -> Just Slovenia
725+ Slovakia -> Just SvalbardAndJanMayen
726+ SierraLeone -> Just Slovakia
727+ SanMarino -> Just SierraLeone
728+ Senegal -> Just SanMarino
729+ Somalia -> Just Senegal
730+ Suriname -> Just Somalia
731+ SouthSudan -> Just Suriname
732+ SaoTomeAndPrincipe -> Just SouthSudan
733+ ElSalvador -> Just SaoTomeAndPrincipe
734+ SintMaartenDutchPart -> Just ElSalvador
735+ SyrianArabRepublic -> Just SintMaartenDutchPart
736+ Eswatini -> Just SyrianArabRepublic
737+ TurksAndCaicosIslands -> Just Eswatini
738+ Chad -> Just TurksAndCaicosIslands
739+ FrenchSouthernTerritories -> Just Chad
740+ Togo -> Just FrenchSouthernTerritories
741+ Thailand -> Just Togo
742+ Tajikistan -> Just Thailand
743+ Tokelau -> Just Tajikistan
744+ TimorLeste -> Just Tokelau
745+ Turkmenistan -> Just TimorLeste
746+ Tunisia -> Just Turkmenistan
747+ Tonga -> Just Tunisia
748+ Turkiye -> Just Tonga
749+ TrinidadAndTobago -> Just Turkiye
750+ Tuvalu -> Just TrinidadAndTobago
751+ TaiwanProvinceOfChina -> Just Tuvalu
752+ TanzaniaUnitedRepublicOf -> Just TaiwanProvinceOfChina
753+ Ukraine -> Just TanzaniaUnitedRepublicOf
754+ Uganda -> Just Ukraine
755+ UnitedStatesMinorOutlyingIslands -> Just Uganda
756+ UnitedStatesOfAmerica -> Just UnitedStatesMinorOutlyingIslands
757+ Uruguay -> Just UnitedStatesOfAmerica
758+ Uzbekistan -> Just Uruguay
759+ HolySee -> Just Uzbekistan
760+ SaintVincentAndTheGrenadines -> Just HolySee
761+ VenezuelaBolivarianRepublicOf -> Just SaintVincentAndTheGrenadines
762+ VirginIslandsBritish -> Just VenezuelaBolivarianRepublicOf
763+ VirginIslandsUS -> Just VirginIslandsBritish
764+ VietNam -> Just VirginIslandsUS
765+ Vanuatu -> Just VietNam
766+ WallisAndFutuna -> Just Vanuatu
767+ Samoa -> Just WallisAndFutuna
768+ Yemen -> Just Samoa
769+ Mayotte -> Just Yemen
770+ SouthAfrica -> Just Mayotte
771+ Zambia -> Just SouthAfrica
772+ Zimbabwe -> Just Zambia
773+
774+instance BoundedEnum Country where
775+ cardinality = Cardinality 249
776+ toEnum = case _ of
777+ 0 -> Just Andorra
778+ 1 -> Just UnitedArabEmirates
779+ 2 -> Just Afghanistan
780+ 3 -> Just AntiguaAndBarbuda
781+ 4 -> Just Anguilla
782+ 5 -> Just Albania
783+ 6 -> Just Armenia
784+ 7 -> Just Angola
785+ 8 -> Just Antarctica
786+ 9 -> Just Argentina
787+ 10 -> Just AmericanSamoa
788+ 11 -> Just Austria
789+ 12 -> Just Australia
790+ 13 -> Just Aruba
791+ 14 -> Just AlandIslands
792+ 15 -> Just Azerbaijan
793+ 16 -> Just BosniaAndHerzegovina
794+ 17 -> Just Barbados
795+ 18 -> Just Bangladesh
796+ 19 -> Just Belgium
797+ 20 -> Just BurkinaFaso
798+ 21 -> Just Bulgaria
799+ 22 -> Just Bahrain
800+ 23 -> Just Burundi
801+ 24 -> Just Benin
802+ 25 -> Just SaintBarthelemy
803+ 26 -> Just Bermuda
804+ 27 -> Just BruneiDarussalam
805+ 28 -> Just BoliviaPlurinationalStateOf
806+ 29 -> Just BonaireSintEustatiusAndSaba
807+ 30 -> Just Brazil
808+ 31 -> Just Bahamas
809+ 32 -> Just Bhutan
810+ 33 -> Just BouvetIsland
811+ 34 -> Just Botswana
812+ 35 -> Just Belarus
813+ 36 -> Just Belize
814+ 37 -> Just Canada
815+ 38 -> Just CocosKeelingIslands
816+ 39 -> Just CongoDemocraticRepublicOfThe
817+ 40 -> Just CentralAfricanRepublic
818+ 41 -> Just Congo
819+ 42 -> Just Switzerland
820+ 43 -> Just CoteDIvoire
821+ 44 -> Just CookIslands
822+ 45 -> Just Chile
823+ 46 -> Just Cameroon
824+ 47 -> Just China
825+ 48 -> Just Colombia
826+ 49 -> Just CostaRica
827+ 50 -> Just Cuba
828+ 51 -> Just CaboVerde
829+ 52 -> Just Curacao
830+ 53 -> Just ChristmasIsland
831+ 54 -> Just Cyprus
832+ 55 -> Just Czechia
833+ 56 -> Just Germany
834+ 57 -> Just Djibouti
835+ 58 -> Just Denmark
836+ 59 -> Just Dominica
837+ 60 -> Just DominicanRepublic
838+ 61 -> Just Algeria
839+ 62 -> Just Ecuador
840+ 63 -> Just Estonia
841+ 64 -> Just Egypt
842+ 65 -> Just WesternSahara
843+ 66 -> Just Eritrea
844+ 67 -> Just Spain
845+ 68 -> Just Ethiopia
846+ 69 -> Just Finland
847+ 70 -> Just Fiji
848+ 71 -> Just FalklandIslandsMalvinas
849+ 72 -> Just MicronesiaFederatedStatesOf
850+ 73 -> Just FaroeIslands
851+ 74 -> Just France
852+ 75 -> Just Gabon
853+ 76 -> Just UnitedKingdomOfGreatBritainAndNorthernIreland
854+ 77 -> Just Grenada
855+ 78 -> Just Georgia
856+ 79 -> Just FrenchGuiana
857+ 80 -> Just Guernsey
858+ 81 -> Just Ghana
859+ 82 -> Just Gibraltar
860+ 83 -> Just Greenland
861+ 84 -> Just Gambia
862+ 85 -> Just Guinea
863+ 86 -> Just Guadeloupe
864+ 87 -> Just EquatorialGuinea
865+ 88 -> Just Greece
866+ 89 -> Just SouthGeorgiaAndTheSouthSandwichIslands
867+ 90 -> Just Guatemala
868+ 91 -> Just Guam
869+ 92 -> Just GuineaBissau
870+ 93 -> Just Guyana
871+ 94 -> Just HongKong
872+ 95 -> Just HeardIslandAndMcdonaldIslands
873+ 96 -> Just Honduras
874+ 97 -> Just Croatia
875+ 98 -> Just Haiti
876+ 99 -> Just Hungary
877+ 100 -> Just Indonesia
878+ 101 -> Just Ireland
879+ 102 -> Just Israel
880+ 103 -> Just IsleOfMan
881+ 104 -> Just India
882+ 105 -> Just BritishIndianOceanTerritory
883+ 106 -> Just Iraq
884+ 107 -> Just IranIslamicRepublicOf
885+ 108 -> Just Iceland
886+ 109 -> Just Italy
887+ 110 -> Just Jersey
888+ 111 -> Just Jamaica
889+ 112 -> Just Jordan
890+ 113 -> Just Japan
891+ 114 -> Just Kenya
892+ 115 -> Just Kyrgyzstan
893+ 116 -> Just Cambodia
894+ 117 -> Just Kiribati
895+ 118 -> Just Comoros
896+ 119 -> Just SaintKittsAndNevis
897+ 120 -> Just KoreaDemocraticPeopleSRepublicOf
898+ 121 -> Just KoreaRepublicOf
899+ 122 -> Just Kuwait
900+ 123 -> Just CaymanIslands
901+ 124 -> Just Kazakhstan
902+ 125 -> Just LaoPeopleSDemocraticRepublic
903+ 126 -> Just Lebanon
904+ 127 -> Just SaintLucia
905+ 128 -> Just Liechtenstein
906+ 129 -> Just SriLanka
907+ 130 -> Just Liberia
908+ 131 -> Just Lesotho
909+ 132 -> Just Lithuania
910+ 133 -> Just Luxembourg
911+ 134 -> Just Latvia
912+ 135 -> Just Libya
913+ 136 -> Just Morocco
914+ 137 -> Just Monaco
915+ 138 -> Just MoldovaRepublicOf
916+ 139 -> Just Montenegro
917+ 140 -> Just SaintMartinFrenchPart
918+ 141 -> Just Madagascar
919+ 142 -> Just MarshallIslands
920+ 143 -> Just NorthMacedonia
921+ 144 -> Just Mali
922+ 145 -> Just Myanmar
923+ 146 -> Just Mongolia
924+ 147 -> Just Macao
925+ 148 -> Just NorthernMarianaIslands
926+ 149 -> Just Martinique
927+ 150 -> Just Mauritania
928+ 151 -> Just Montserrat
929+ 152 -> Just Malta
930+ 153 -> Just Mauritius
931+ 154 -> Just Maldives
932+ 155 -> Just Malawi
933+ 156 -> Just Mexico
934+ 157 -> Just Malaysia
935+ 158 -> Just Mozambique
936+ 159 -> Just Namibia
937+ 160 -> Just NewCaledonia
938+ 161 -> Just Niger
939+ 162 -> Just NorfolkIsland
940+ 163 -> Just Nigeria
941+ 164 -> Just Nicaragua
942+ 165 -> Just NetherlandsKingdomOfThe
943+ 166 -> Just Norway
944+ 167 -> Just Nepal
945+ 168 -> Just Nauru
946+ 169 -> Just Niue
947+ 170 -> Just NewZealand
948+ 171 -> Just Oman
949+ 172 -> Just Panama
950+ 173 -> Just Peru
951+ 174 -> Just FrenchPolynesia
952+ 175 -> Just PapuaNewGuinea
953+ 176 -> Just Philippines
954+ 177 -> Just Pakistan
955+ 178 -> Just Poland
956+ 179 -> Just SaintPierreAndMiquelon
957+ 180 -> Just Pitcairn
958+ 181 -> Just PuertoRico
959+ 182 -> Just PalestineStateOf
960+ 183 -> Just Portugal
961+ 184 -> Just Palau
962+ 185 -> Just Paraguay
963+ 186 -> Just Qatar
964+ 187 -> Just Reunion
965+ 188 -> Just Romania
966+ 189 -> Just Serbia
967+ 190 -> Just RussianFederation
968+ 191 -> Just Rwanda
969+ 192 -> Just SaudiArabia
970+ 193 -> Just SolomonIslands
971+ 194 -> Just Seychelles
972+ 195 -> Just Sudan
973+ 196 -> Just Sweden
974+ 197 -> Just Singapore
975+ 198 -> Just SaintHelenaAscensionAndTristanDaCunha
976+ 199 -> Just Slovenia
977+ 200 -> Just SvalbardAndJanMayen
978+ 201 -> Just Slovakia
979+ 202 -> Just SierraLeone
980+ 203 -> Just SanMarino
981+ 204 -> Just Senegal
982+ 205 -> Just Somalia
983+ 206 -> Just Suriname
984+ 207 -> Just SouthSudan
985+ 208 -> Just SaoTomeAndPrincipe
986+ 209 -> Just ElSalvador
987+ 210 -> Just SintMaartenDutchPart
988+ 211 -> Just SyrianArabRepublic
989+ 212 -> Just Eswatini
990+ 213 -> Just TurksAndCaicosIslands
991+ 214 -> Just Chad
992+ 215 -> Just FrenchSouthernTerritories
993+ 216 -> Just Togo
994+ 217 -> Just Thailand
995+ 218 -> Just Tajikistan
996+ 219 -> Just Tokelau
997+ 220 -> Just TimorLeste
998+ 221 -> Just Turkmenistan
999+ 222 -> Just Tunisia
1000+ 223 -> Just Tonga
1001+ 224 -> Just Turkiye
1002+ 225 -> Just TrinidadAndTobago
1003+ 226 -> Just Tuvalu
1004+ 227 -> Just TaiwanProvinceOfChina
1005+ 228 -> Just TanzaniaUnitedRepublicOf
1006+ 229 -> Just Ukraine
1007+ 230 -> Just Uganda
1008+ 231 -> Just UnitedStatesMinorOutlyingIslands
1009+ 232 -> Just UnitedStatesOfAmerica
1010+ 233 -> Just Uruguay
1011+ 234 -> Just Uzbekistan
1012+ 235 -> Just HolySee
1013+ 236 -> Just SaintVincentAndTheGrenadines
1014+ 237 -> Just VenezuelaBolivarianRepublicOf
1015+ 238 -> Just VirginIslandsBritish
1016+ 239 -> Just VirginIslandsUS
1017+ 240 -> Just VietNam
1018+ 241 -> Just Vanuatu
1019+ 242 -> Just WallisAndFutuna
1020+ 243 -> Just Samoa
1021+ 244 -> Just Yemen
1022+ 245 -> Just Mayotte
1023+ 246 -> Just SouthAfrica
1024+ 247 -> Just Zambia
1025+ 248 -> Just Zimbabwe
1026+ _ -> Nothing
1027+ fromEnum = case _ of
1028+ Andorra -> 0
1029+ UnitedArabEmirates -> 1
1030+ Afghanistan -> 2
1031+ AntiguaAndBarbuda -> 3
1032+ Anguilla -> 4
1033+ Albania -> 5
1034+ Armenia -> 6
1035+ Angola -> 7
1036+ Antarctica -> 8
1037+ Argentina -> 9
1038+ AmericanSamoa -> 10
1039+ Austria -> 11
1040+ Australia -> 12
1041+ Aruba -> 13
1042+ AlandIslands -> 14
1043+ Azerbaijan -> 15
1044+ BosniaAndHerzegovina -> 16
1045+ Barbados -> 17
1046+ Bangladesh -> 18
1047+ Belgium -> 19
1048+ BurkinaFaso -> 20
1049+ Bulgaria -> 21
1050+ Bahrain -> 22
1051+ Burundi -> 23
1052+ Benin -> 24
1053+ SaintBarthelemy -> 25
1054+ Bermuda -> 26
1055+ BruneiDarussalam -> 27
1056+ BoliviaPlurinationalStateOf -> 28
1057+ BonaireSintEustatiusAndSaba -> 29
1058+ Brazil -> 30
1059+ Bahamas -> 31
1060+ Bhutan -> 32
1061+ BouvetIsland -> 33
1062+ Botswana -> 34
1063+ Belarus -> 35
1064+ Belize -> 36
1065+ Canada -> 37
1066+ CocosKeelingIslands -> 38
1067+ CongoDemocraticRepublicOfThe -> 39
1068+ CentralAfricanRepublic -> 40
1069+ Congo -> 41
1070+ Switzerland -> 42
1071+ CoteDIvoire -> 43
1072+ CookIslands -> 44
1073+ Chile -> 45
1074+ Cameroon -> 46
1075+ China -> 47
1076+ Colombia -> 48
1077+ CostaRica -> 49
1078+ Cuba -> 50
1079+ CaboVerde -> 51
1080+ Curacao -> 52
1081+ ChristmasIsland -> 53
1082+ Cyprus -> 54
1083+ Czechia -> 55
1084+ Germany -> 56
1085+ Djibouti -> 57
1086+ Denmark -> 58
1087+ Dominica -> 59
1088+ DominicanRepublic -> 60
1089+ Algeria -> 61
1090+ Ecuador -> 62
1091+ Estonia -> 63
1092+ Egypt -> 64
1093+ WesternSahara -> 65
1094+ Eritrea -> 66
1095+ Spain -> 67
1096+ Ethiopia -> 68
1097+ Finland -> 69
1098+ Fiji -> 70
1099+ FalklandIslandsMalvinas -> 71
1100+ MicronesiaFederatedStatesOf -> 72
1101+ FaroeIslands -> 73
1102+ France -> 74
1103+ Gabon -> 75
1104+ UnitedKingdomOfGreatBritainAndNorthernIreland -> 76
1105+ Grenada -> 77
1106+ Georgia -> 78
1107+ FrenchGuiana -> 79
1108+ Guernsey -> 80
1109+ Ghana -> 81
1110+ Gibraltar -> 82
1111+ Greenland -> 83
1112+ Gambia -> 84
1113+ Guinea -> 85
1114+ Guadeloupe -> 86
1115+ EquatorialGuinea -> 87
1116+ Greece -> 88
1117+ SouthGeorgiaAndTheSouthSandwichIslands -> 89
1118+ Guatemala -> 90
1119+ Guam -> 91
1120+ GuineaBissau -> 92
1121+ Guyana -> 93
1122+ HongKong -> 94
1123+ HeardIslandAndMcdonaldIslands -> 95
1124+ Honduras -> 96
1125+ Croatia -> 97
1126+ Haiti -> 98
1127+ Hungary -> 99
1128+ Indonesia -> 100
1129+ Ireland -> 101
1130+ Israel -> 102
1131+ IsleOfMan -> 103
1132+ India -> 104
1133+ BritishIndianOceanTerritory -> 105
1134+ Iraq -> 106
1135+ IranIslamicRepublicOf -> 107
1136+ Iceland -> 108
1137+ Italy -> 109
1138+ Jersey -> 110
1139+ Jamaica -> 111
1140+ Jordan -> 112
1141+ Japan -> 113
1142+ Kenya -> 114
1143+ Kyrgyzstan -> 115
1144+ Cambodia -> 116
1145+ Kiribati -> 117
1146+ Comoros -> 118
1147+ SaintKittsAndNevis -> 119
1148+ KoreaDemocraticPeopleSRepublicOf -> 120
1149+ KoreaRepublicOf -> 121
1150+ Kuwait -> 122
1151+ CaymanIslands -> 123
1152+ Kazakhstan -> 124
1153+ LaoPeopleSDemocraticRepublic -> 125
1154+ Lebanon -> 126
1155+ SaintLucia -> 127
1156+ Liechtenstein -> 128
1157+ SriLanka -> 129
1158+ Liberia -> 130
1159+ Lesotho -> 131
1160+ Lithuania -> 132
1161+ Luxembourg -> 133
1162+ Latvia -> 134
1163+ Libya -> 135
1164+ Morocco -> 136
1165+ Monaco -> 137
1166+ MoldovaRepublicOf -> 138
1167+ Montenegro -> 139
1168+ SaintMartinFrenchPart -> 140
1169+ Madagascar -> 141
1170+ MarshallIslands -> 142
1171+ NorthMacedonia -> 143
1172+ Mali -> 144
1173+ Myanmar -> 145
1174+ Mongolia -> 146
1175+ Macao -> 147
1176+ NorthernMarianaIslands -> 148
1177+ Martinique -> 149
1178+ Mauritania -> 150
1179+ Montserrat -> 151
1180+ Malta -> 152
1181+ Mauritius -> 153
1182+ Maldives -> 154
1183+ Malawi -> 155
1184+ Mexico -> 156
1185+ Malaysia -> 157
1186+ Mozambique -> 158
1187+ Namibia -> 159
1188+ NewCaledonia -> 160
1189+ Niger -> 161
1190+ NorfolkIsland -> 162
1191+ Nigeria -> 163
1192+ Nicaragua -> 164
1193+ NetherlandsKingdomOfThe -> 165
1194+ Norway -> 166
1195+ Nepal -> 167
1196+ Nauru -> 168
1197+ Niue -> 169
1198+ NewZealand -> 170
1199+ Oman -> 171
1200+ Panama -> 172
1201+ Peru -> 173
1202+ FrenchPolynesia -> 174
1203+ PapuaNewGuinea -> 175
1204+ Philippines -> 176
1205+ Pakistan -> 177
1206+ Poland -> 178
1207+ SaintPierreAndMiquelon -> 179
1208+ Pitcairn -> 180
1209+ PuertoRico -> 181
1210+ PalestineStateOf -> 182
1211+ Portugal -> 183
1212+ Palau -> 184
1213+ Paraguay -> 185
1214+ Qatar -> 186
1215+ Reunion -> 187
1216+ Romania -> 188
1217+ Serbia -> 189
1218+ RussianFederation -> 190
1219+ Rwanda -> 191
1220+ SaudiArabia -> 192
1221+ SolomonIslands -> 193
1222+ Seychelles -> 194
1223+ Sudan -> 195
1224+ Sweden -> 196
1225+ Singapore -> 197
1226+ SaintHelenaAscensionAndTristanDaCunha -> 198
1227+ Slovenia -> 199
1228+ SvalbardAndJanMayen -> 200
1229+ Slovakia -> 201
1230+ SierraLeone -> 202
1231+ SanMarino -> 203
1232+ Senegal -> 204
1233+ Somalia -> 205
1234+ Suriname -> 206
1235+ SouthSudan -> 207
1236+ SaoTomeAndPrincipe -> 208
1237+ ElSalvador -> 209
1238+ SintMaartenDutchPart -> 210
1239+ SyrianArabRepublic -> 211
1240+ Eswatini -> 212
1241+ TurksAndCaicosIslands -> 213
1242+ Chad -> 214
1243+ FrenchSouthernTerritories -> 215
1244+ Togo -> 216
1245+ Thailand -> 217
1246+ Tajikistan -> 218
1247+ Tokelau -> 219
1248+ TimorLeste -> 220
1249+ Turkmenistan -> 221
1250+ Tunisia -> 222
1251+ Tonga -> 223
1252+ Turkiye -> 224
1253+ TrinidadAndTobago -> 225
1254+ Tuvalu -> 226
1255+ TaiwanProvinceOfChina -> 227
1256+ TanzaniaUnitedRepublicOf -> 228
1257+ Ukraine -> 229
1258+ Uganda -> 230
1259+ UnitedStatesMinorOutlyingIslands -> 231
1260+ UnitedStatesOfAmerica -> 232
1261+ Uruguay -> 233
1262+ Uzbekistan -> 234
1263+ HolySee -> 235
1264+ SaintVincentAndTheGrenadines -> 236
1265+ VenezuelaBolivarianRepublicOf -> 237
1266+ VirginIslandsBritish -> 238
1267+ VirginIslandsUS -> 239
1268+ VietNam -> 240
1269+ Vanuatu -> 241
1270+ WallisAndFutuna -> 242
1271+ Samoa -> 243
1272+ Yemen -> 244
1273+ Mayotte -> 245
1274+ SouthAfrica -> 246
1275+ Zambia -> 247
1276+ Zimbabwe -> 248
1277+
1278+toAlpha2 :: Country -> String
1279+toAlpha2 = case _ of
1280+ Andorra -> "AD"
1281+ UnitedArabEmirates -> "AE"
1282+ Afghanistan -> "AF"
1283+ AntiguaAndBarbuda -> "AG"
1284+ Anguilla -> "AI"
1285+ Albania -> "AL"
1286+ Armenia -> "AM"
1287+ Angola -> "AO"
1288+ Antarctica -> "AQ"
1289+ Argentina -> "AR"
1290+ AmericanSamoa -> "AS"
1291+ Austria -> "AT"
1292+ Australia -> "AU"
1293+ Aruba -> "AW"
1294+ AlandIslands -> "AX"
1295+ Azerbaijan -> "AZ"
1296+ BosniaAndHerzegovina -> "BA"
1297+ Barbados -> "BB"
1298+ Bangladesh -> "BD"
1299+ Belgium -> "BE"
1300+ BurkinaFaso -> "BF"
1301+ Bulgaria -> "BG"
1302+ Bahrain -> "BH"
1303+ Burundi -> "BI"
1304+ Benin -> "BJ"
1305+ SaintBarthelemy -> "BL"
1306+ Bermuda -> "BM"
1307+ BruneiDarussalam -> "BN"
1308+ BoliviaPlurinationalStateOf -> "BO"
1309+ BonaireSintEustatiusAndSaba -> "BQ"
1310+ Brazil -> "BR"
1311+ Bahamas -> "BS"
1312+ Bhutan -> "BT"
1313+ BouvetIsland -> "BV"
1314+ Botswana -> "BW"
1315+ Belarus -> "BY"
1316+ Belize -> "BZ"
1317+ Canada -> "CA"
1318+ CocosKeelingIslands -> "CC"
1319+ CongoDemocraticRepublicOfThe -> "CD"
1320+ CentralAfricanRepublic -> "CF"
1321+ Congo -> "CG"
1322+ Switzerland -> "CH"
1323+ CoteDIvoire -> "CI"
1324+ CookIslands -> "CK"
1325+ Chile -> "CL"
1326+ Cameroon -> "CM"
1327+ China -> "CN"
1328+ Colombia -> "CO"
1329+ CostaRica -> "CR"
1330+ Cuba -> "CU"
1331+ CaboVerde -> "CV"
1332+ Curacao -> "CW"
1333+ ChristmasIsland -> "CX"
1334+ Cyprus -> "CY"
1335+ Czechia -> "CZ"
1336+ Germany -> "DE"
1337+ Djibouti -> "DJ"
1338+ Denmark -> "DK"
1339+ Dominica -> "DM"
1340+ DominicanRepublic -> "DO"
1341+ Algeria -> "DZ"
1342+ Ecuador -> "EC"
1343+ Estonia -> "EE"
1344+ Egypt -> "EG"
1345+ WesternSahara -> "EH"
1346+ Eritrea -> "ER"
1347+ Spain -> "ES"
1348+ Ethiopia -> "ET"
1349+ Finland -> "FI"
1350+ Fiji -> "FJ"
1351+ FalklandIslandsMalvinas -> "FK"
1352+ MicronesiaFederatedStatesOf -> "FM"
1353+ FaroeIslands -> "FO"
1354+ France -> "FR"
1355+ Gabon -> "GA"
1356+ UnitedKingdomOfGreatBritainAndNorthernIreland -> "GB"
1357+ Grenada -> "GD"
1358+ Georgia -> "GE"
1359+ FrenchGuiana -> "GF"
1360+ Guernsey -> "GG"
1361+ Ghana -> "GH"
1362+ Gibraltar -> "GI"
1363+ Greenland -> "GL"
1364+ Gambia -> "GM"
1365+ Guinea -> "GN"
1366+ Guadeloupe -> "GP"
1367+ EquatorialGuinea -> "GQ"
1368+ Greece -> "GR"
1369+ SouthGeorgiaAndTheSouthSandwichIslands -> "GS"
1370+ Guatemala -> "GT"
1371+ Guam -> "GU"
1372+ GuineaBissau -> "GW"
1373+ Guyana -> "GY"
1374+ HongKong -> "HK"
1375+ HeardIslandAndMcdonaldIslands -> "HM"
1376+ Honduras -> "HN"
1377+ Croatia -> "HR"
1378+ Haiti -> "HT"
1379+ Hungary -> "HU"
1380+ Indonesia -> "ID"
1381+ Ireland -> "IE"
1382+ Israel -> "IL"
1383+ IsleOfMan -> "IM"
1384+ India -> "IN"
1385+ BritishIndianOceanTerritory -> "IO"
1386+ Iraq -> "IQ"
1387+ IranIslamicRepublicOf -> "IR"
1388+ Iceland -> "IS"
1389+ Italy -> "IT"
1390+ Jersey -> "JE"
1391+ Jamaica -> "JM"
1392+ Jordan -> "JO"
1393+ Japan -> "JP"
1394+ Kenya -> "KE"
1395+ Kyrgyzstan -> "KG"
1396+ Cambodia -> "KH"
1397+ Kiribati -> "KI"
1398+ Comoros -> "KM"
1399+ SaintKittsAndNevis -> "KN"
1400+ KoreaDemocraticPeopleSRepublicOf -> "KP"
1401+ KoreaRepublicOf -> "KR"
1402+ Kuwait -> "KW"
1403+ CaymanIslands -> "KY"
1404+ Kazakhstan -> "KZ"
1405+ LaoPeopleSDemocraticRepublic -> "LA"
1406+ Lebanon -> "LB"
1407+ SaintLucia -> "LC"
1408+ Liechtenstein -> "LI"
1409+ SriLanka -> "LK"
1410+ Liberia -> "LR"
1411+ Lesotho -> "LS"
1412+ Lithuania -> "LT"
1413+ Luxembourg -> "LU"
1414+ Latvia -> "LV"
1415+ Libya -> "LY"
1416+ Morocco -> "MA"
1417+ Monaco -> "MC"
1418+ MoldovaRepublicOf -> "MD"
1419+ Montenegro -> "ME"
1420+ SaintMartinFrenchPart -> "MF"
1421+ Madagascar -> "MG"
1422+ MarshallIslands -> "MH"
1423+ NorthMacedonia -> "MK"
1424+ Mali -> "ML"
1425+ Myanmar -> "MM"
1426+ Mongolia -> "MN"
1427+ Macao -> "MO"
1428+ NorthernMarianaIslands -> "MP"
1429+ Martinique -> "MQ"
1430+ Mauritania -> "MR"
1431+ Montserrat -> "MS"
1432+ Malta -> "MT"
1433+ Mauritius -> "MU"
1434+ Maldives -> "MV"
1435+ Malawi -> "MW"
1436+ Mexico -> "MX"
1437+ Malaysia -> "MY"
1438+ Mozambique -> "MZ"
1439+ Namibia -> "NA"
1440+ NewCaledonia -> "NC"
1441+ Niger -> "NE"
1442+ NorfolkIsland -> "NF"
1443+ Nigeria -> "NG"
1444+ Nicaragua -> "NI"
1445+ NetherlandsKingdomOfThe -> "NL"
1446+ Norway -> "NO"
1447+ Nepal -> "NP"
1448+ Nauru -> "NR"
1449+ Niue -> "NU"
1450+ NewZealand -> "NZ"
1451+ Oman -> "OM"
1452+ Panama -> "PA"
1453+ Peru -> "PE"
1454+ FrenchPolynesia -> "PF"
1455+ PapuaNewGuinea -> "PG"
1456+ Philippines -> "PH"
1457+ Pakistan -> "PK"
1458+ Poland -> "PL"
1459+ SaintPierreAndMiquelon -> "PM"
1460+ Pitcairn -> "PN"
1461+ PuertoRico -> "PR"
1462+ PalestineStateOf -> "PS"
1463+ Portugal -> "PT"
1464+ Palau -> "PW"
1465+ Paraguay -> "PY"
1466+ Qatar -> "QA"
1467+ Reunion -> "RE"
1468+ Romania -> "RO"
1469+ Serbia -> "RS"
1470+ RussianFederation -> "RU"
1471+ Rwanda -> "RW"
1472+ SaudiArabia -> "SA"
1473+ SolomonIslands -> "SB"
1474+ Seychelles -> "SC"
1475+ Sudan -> "SD"
1476+ Sweden -> "SE"
1477+ Singapore -> "SG"
1478+ SaintHelenaAscensionAndTristanDaCunha -> "SH"
1479+ Slovenia -> "SI"
1480+ SvalbardAndJanMayen -> "SJ"
1481+ Slovakia -> "SK"
1482+ SierraLeone -> "SL"
1483+ SanMarino -> "SM"
1484+ Senegal -> "SN"
1485+ Somalia -> "SO"
1486+ Suriname -> "SR"
1487+ SouthSudan -> "SS"
1488+ SaoTomeAndPrincipe -> "ST"
1489+ ElSalvador -> "SV"
1490+ SintMaartenDutchPart -> "SX"
1491+ SyrianArabRepublic -> "SY"
1492+ Eswatini -> "SZ"
1493+ TurksAndCaicosIslands -> "TC"
1494+ Chad -> "TD"
1495+ FrenchSouthernTerritories -> "TF"
1496+ Togo -> "TG"
1497+ Thailand -> "TH"
1498+ Tajikistan -> "TJ"
1499+ Tokelau -> "TK"
1500+ TimorLeste -> "TL"
1501+ Turkmenistan -> "TM"
1502+ Tunisia -> "TN"
1503+ Tonga -> "TO"
1504+ Turkiye -> "TR"
1505+ TrinidadAndTobago -> "TT"
1506+ Tuvalu -> "TV"
1507+ TaiwanProvinceOfChina -> "TW"
1508+ TanzaniaUnitedRepublicOf -> "TZ"
1509+ Ukraine -> "UA"
1510+ Uganda -> "UG"
1511+ UnitedStatesMinorOutlyingIslands -> "UM"
1512+ UnitedStatesOfAmerica -> "US"
1513+ Uruguay -> "UY"
1514+ Uzbekistan -> "UZ"
1515+ HolySee -> "VA"
1516+ SaintVincentAndTheGrenadines -> "VC"
1517+ VenezuelaBolivarianRepublicOf -> "VE"
1518+ VirginIslandsBritish -> "VG"
1519+ VirginIslandsUS -> "VI"
1520+ VietNam -> "VN"
1521+ Vanuatu -> "VU"
1522+ WallisAndFutuna -> "WF"
1523+ Samoa -> "WS"
1524+ Yemen -> "YE"
1525+ Mayotte -> "YT"
1526+ SouthAfrica -> "ZA"
1527+ Zambia -> "ZM"
1528+ Zimbabwe -> "ZW"
1529+
1530+fromAlpha2 :: String -> Maybe Country
1531+fromAlpha2 = case _ of
1532+ "AD" -> Just Andorra
1533+ "AE" -> Just UnitedArabEmirates
1534+ "AF" -> Just Afghanistan
1535+ "AG" -> Just AntiguaAndBarbuda
1536+ "AI" -> Just Anguilla
1537+ "AL" -> Just Albania
1538+ "AM" -> Just Armenia
1539+ "AO" -> Just Angola
1540+ "AQ" -> Just Antarctica
1541+ "AR" -> Just Argentina
1542+ "AS" -> Just AmericanSamoa
1543+ "AT" -> Just Austria
1544+ "AU" -> Just Australia
1545+ "AW" -> Just Aruba
1546+ "AX" -> Just AlandIslands
1547+ "AZ" -> Just Azerbaijan
1548+ "BA" -> Just BosniaAndHerzegovina
1549+ "BB" -> Just Barbados
1550+ "BD" -> Just Bangladesh
1551+ "BE" -> Just Belgium
1552+ "BF" -> Just BurkinaFaso
1553+ "BG" -> Just Bulgaria
1554+ "BH" -> Just Bahrain
1555+ "BI" -> Just Burundi
1556+ "BJ" -> Just Benin
1557+ "BL" -> Just SaintBarthelemy
1558+ "BM" -> Just Bermuda
1559+ "BN" -> Just BruneiDarussalam
1560+ "BO" -> Just BoliviaPlurinationalStateOf
1561+ "BQ" -> Just BonaireSintEustatiusAndSaba
1562+ "BR" -> Just Brazil
1563+ "BS" -> Just Bahamas
1564+ "BT" -> Just Bhutan
1565+ "BV" -> Just BouvetIsland
1566+ "BW" -> Just Botswana
1567+ "BY" -> Just Belarus
1568+ "BZ" -> Just Belize
1569+ "CA" -> Just Canada
1570+ "CC" -> Just CocosKeelingIslands
1571+ "CD" -> Just CongoDemocraticRepublicOfThe
1572+ "CF" -> Just CentralAfricanRepublic
1573+ "CG" -> Just Congo
1574+ "CH" -> Just Switzerland
1575+ "CI" -> Just CoteDIvoire
1576+ "CK" -> Just CookIslands
1577+ "CL" -> Just Chile
1578+ "CM" -> Just Cameroon
1579+ "CN" -> Just China
1580+ "CO" -> Just Colombia
1581+ "CR" -> Just CostaRica
1582+ "CU" -> Just Cuba
1583+ "CV" -> Just CaboVerde
1584+ "CW" -> Just Curacao
1585+ "CX" -> Just ChristmasIsland
1586+ "CY" -> Just Cyprus
1587+ "CZ" -> Just Czechia
1588+ "DE" -> Just Germany
1589+ "DJ" -> Just Djibouti
1590+ "DK" -> Just Denmark
1591+ "DM" -> Just Dominica
1592+ "DO" -> Just DominicanRepublic
1593+ "DZ" -> Just Algeria
1594+ "EC" -> Just Ecuador
1595+ "EE" -> Just Estonia
1596+ "EG" -> Just Egypt
1597+ "EH" -> Just WesternSahara
1598+ "ER" -> Just Eritrea
1599+ "ES" -> Just Spain
1600+ "ET" -> Just Ethiopia
1601+ "FI" -> Just Finland
1602+ "FJ" -> Just Fiji
1603+ "FK" -> Just FalklandIslandsMalvinas
1604+ "FM" -> Just MicronesiaFederatedStatesOf
1605+ "FO" -> Just FaroeIslands
1606+ "FR" -> Just France
1607+ "GA" -> Just Gabon
1608+ "GB" -> Just UnitedKingdomOfGreatBritainAndNorthernIreland
1609+ "GD" -> Just Grenada
1610+ "GE" -> Just Georgia
1611+ "GF" -> Just FrenchGuiana
1612+ "GG" -> Just Guernsey
1613+ "GH" -> Just Ghana
1614+ "GI" -> Just Gibraltar
1615+ "GL" -> Just Greenland
1616+ "GM" -> Just Gambia
1617+ "GN" -> Just Guinea
1618+ "GP" -> Just Guadeloupe
1619+ "GQ" -> Just EquatorialGuinea
1620+ "GR" -> Just Greece
1621+ "GS" -> Just SouthGeorgiaAndTheSouthSandwichIslands
1622+ "GT" -> Just Guatemala
1623+ "GU" -> Just Guam
1624+ "GW" -> Just GuineaBissau
1625+ "GY" -> Just Guyana
1626+ "HK" -> Just HongKong
1627+ "HM" -> Just HeardIslandAndMcdonaldIslands
1628+ "HN" -> Just Honduras
1629+ "HR" -> Just Croatia
1630+ "HT" -> Just Haiti
1631+ "HU" -> Just Hungary
1632+ "ID" -> Just Indonesia
1633+ "IE" -> Just Ireland
1634+ "IL" -> Just Israel
1635+ "IM" -> Just IsleOfMan
1636+ "IN" -> Just India
1637+ "IO" -> Just BritishIndianOceanTerritory
1638+ "IQ" -> Just Iraq
1639+ "IR" -> Just IranIslamicRepublicOf
1640+ "IS" -> Just Iceland
1641+ "IT" -> Just Italy
1642+ "JE" -> Just Jersey
1643+ "JM" -> Just Jamaica
1644+ "JO" -> Just Jordan
1645+ "JP" -> Just Japan
1646+ "KE" -> Just Kenya
1647+ "KG" -> Just Kyrgyzstan
1648+ "KH" -> Just Cambodia
1649+ "KI" -> Just Kiribati
1650+ "KM" -> Just Comoros
1651+ "KN" -> Just SaintKittsAndNevis
1652+ "KP" -> Just KoreaDemocraticPeopleSRepublicOf
1653+ "KR" -> Just KoreaRepublicOf
1654+ "KW" -> Just Kuwait
1655+ "KY" -> Just CaymanIslands
1656+ "KZ" -> Just Kazakhstan
1657+ "LA" -> Just LaoPeopleSDemocraticRepublic
1658+ "LB" -> Just Lebanon
1659+ "LC" -> Just SaintLucia
1660+ "LI" -> Just Liechtenstein
1661+ "LK" -> Just SriLanka
1662+ "LR" -> Just Liberia
1663+ "LS" -> Just Lesotho
1664+ "LT" -> Just Lithuania
1665+ "LU" -> Just Luxembourg
1666+ "LV" -> Just Latvia
1667+ "LY" -> Just Libya
1668+ "MA" -> Just Morocco
1669+ "MC" -> Just Monaco
1670+ "MD" -> Just MoldovaRepublicOf
1671+ "ME" -> Just Montenegro
1672+ "MF" -> Just SaintMartinFrenchPart
1673+ "MG" -> Just Madagascar
1674+ "MH" -> Just MarshallIslands
1675+ "MK" -> Just NorthMacedonia
1676+ "ML" -> Just Mali
1677+ "MM" -> Just Myanmar
1678+ "MN" -> Just Mongolia
1679+ "MO" -> Just Macao
1680+ "MP" -> Just NorthernMarianaIslands
1681+ "MQ" -> Just Martinique
1682+ "MR" -> Just Mauritania
1683+ "MS" -> Just Montserrat
1684+ "MT" -> Just Malta
1685+ "MU" -> Just Mauritius
1686+ "MV" -> Just Maldives
1687+ "MW" -> Just Malawi
1688+ "MX" -> Just Mexico
1689+ "MY" -> Just Malaysia
1690+ "MZ" -> Just Mozambique
1691+ "NA" -> Just Namibia
1692+ "NC" -> Just NewCaledonia
1693+ "NE" -> Just Niger
1694+ "NF" -> Just NorfolkIsland
1695+ "NG" -> Just Nigeria
1696+ "NI" -> Just Nicaragua
1697+ "NL" -> Just NetherlandsKingdomOfThe
1698+ "NO" -> Just Norway
1699+ "NP" -> Just Nepal
1700+ "NR" -> Just Nauru
1701+ "NU" -> Just Niue
1702+ "NZ" -> Just NewZealand
1703+ "OM" -> Just Oman
1704+ "PA" -> Just Panama
1705+ "PE" -> Just Peru
1706+ "PF" -> Just FrenchPolynesia
1707+ "PG" -> Just PapuaNewGuinea
1708+ "PH" -> Just Philippines
1709+ "PK" -> Just Pakistan
1710+ "PL" -> Just Poland
1711+ "PM" -> Just SaintPierreAndMiquelon
1712+ "PN" -> Just Pitcairn
1713+ "PR" -> Just PuertoRico
1714+ "PS" -> Just PalestineStateOf
1715+ "PT" -> Just Portugal
1716+ "PW" -> Just Palau
1717+ "PY" -> Just Paraguay
1718+ "QA" -> Just Qatar
1719+ "RE" -> Just Reunion
1720+ "RO" -> Just Romania
1721+ "RS" -> Just Serbia
1722+ "RU" -> Just RussianFederation
1723+ "RW" -> Just Rwanda
1724+ "SA" -> Just SaudiArabia
1725+ "SB" -> Just SolomonIslands
1726+ "SC" -> Just Seychelles
1727+ "SD" -> Just Sudan
1728+ "SE" -> Just Sweden
1729+ "SG" -> Just Singapore
1730+ "SH" -> Just SaintHelenaAscensionAndTristanDaCunha
1731+ "SI" -> Just Slovenia
1732+ "SJ" -> Just SvalbardAndJanMayen
1733+ "SK" -> Just Slovakia
1734+ "SL" -> Just SierraLeone
1735+ "SM" -> Just SanMarino
1736+ "SN" -> Just Senegal
1737+ "SO" -> Just Somalia
1738+ "SR" -> Just Suriname
1739+ "SS" -> Just SouthSudan
1740+ "ST" -> Just SaoTomeAndPrincipe
1741+ "SV" -> Just ElSalvador
1742+ "SX" -> Just SintMaartenDutchPart
1743+ "SY" -> Just SyrianArabRepublic
1744+ "SZ" -> Just Eswatini
1745+ "TC" -> Just TurksAndCaicosIslands
1746+ "TD" -> Just Chad
1747+ "TF" -> Just FrenchSouthernTerritories
1748+ "TG" -> Just Togo
1749+ "TH" -> Just Thailand
1750+ "TJ" -> Just Tajikistan
1751+ "TK" -> Just Tokelau
1752+ "TL" -> Just TimorLeste
1753+ "TM" -> Just Turkmenistan
1754+ "TN" -> Just Tunisia
1755+ "TO" -> Just Tonga
1756+ "TR" -> Just Turkiye
1757+ "TT" -> Just TrinidadAndTobago
1758+ "TV" -> Just Tuvalu
1759+ "TW" -> Just TaiwanProvinceOfChina
1760+ "TZ" -> Just TanzaniaUnitedRepublicOf
1761+ "UA" -> Just Ukraine
1762+ "UG" -> Just Uganda
1763+ "UM" -> Just UnitedStatesMinorOutlyingIslands
1764+ "US" -> Just UnitedStatesOfAmerica
1765+ "UY" -> Just Uruguay
1766+ "UZ" -> Just Uzbekistan
1767+ "VA" -> Just HolySee
1768+ "VC" -> Just SaintVincentAndTheGrenadines
1769+ "VE" -> Just VenezuelaBolivarianRepublicOf
1770+ "VG" -> Just VirginIslandsBritish
1771+ "VI" -> Just VirginIslandsUS
1772+ "VN" -> Just VietNam
1773+ "VU" -> Just Vanuatu
1774+ "WF" -> Just WallisAndFutuna
1775+ "WS" -> Just Samoa
1776+ "YE" -> Just Yemen
1777+ "YT" -> Just Mayotte
1778+ "ZA" -> Just SouthAfrica
1779+ "ZM" -> Just Zambia
1780+ "ZW" -> Just Zimbabwe
1781+ _ -> Nothing
1782+
1783+allCountries :: Array Country
1784+allCountries = enumFromTo bottom top
1785+
1786+instance WriteForeign Country where
1787+ writeImpl = toAlpha2 >>> writeImpl
1788+
1789+instance ReadForeign Country where
1790+ readImpl f = do
1791+ let parse s = case fromAlpha2 s of
1792+ Just c -> pure c
1793+ Nothing -> throwError $ pure $ ForeignError $ "Unknown country: " <> s
1794+ s <- readImpl f
1795+ parse s
1796+
test/Test/Main.pursnew file+52
@@ -0,0 +1,52 @@
1+module Test.Main where
2+
3+import Prelude
4+
5+import Data.Array as Array
6+import Data.Array.NonEmpty as NEA
7+import Data.Country (Country)
8+import Data.Country as Country
9+import Data.Maybe (Maybe(..))
10+import Data.String as String
11+import Effect (Effect)
12+import Effect.Aff (launchAff_)
13+import Partial.Unsafe (unsafeCrashWith)
14+import Test.QuickCheck (class Arbitrary)
15+import Test.QuickCheck.Gen (elements)
16+import Test.Spec (describe, it)
17+import Test.Spec.Assertions (shouldEqual)
18+import Test.Spec.QuickCheck (quickCheck)
19+import Test.Spec.Reporter.Console (consoleReporter)
20+import Test.Spec.Runner (runSpec)
21+
22+newtype ArbCountry = ArbCountry Country
23+
24+instance Arbitrary ArbCountry where
25+ arbitrary = ArbCountry <$> elements nea
26+ where
27+ nea = case NEA.fromArray Country.allCountries of
28+ Just a -> a
29+ Nothing -> unsafeCrashWith "allCountries is empty"
30+
31+main :: Effect Unit
32+main = launchAff_ $ runSpec [consoleReporter] do
33+ describe "Country" do
34+ it "toAlpha2 produces 2-char codes" do
35+ quickCheck \(ArbCountry c) ->
36+ String.length (Country.toAlpha2 c) == 2
37+
38+ it "fromAlpha2 <<< toAlpha2 = Just (property)" do
39+ quickCheck \(ArbCountry c) ->
40+ Country.fromAlpha2 (Country.toAlpha2 c) == Just c
41+
42+ it "fromAlpha2 rejects garbage" do
43+ Country.fromAlpha2 "ZZ" `shouldEqual` Nothing
44+ Country.fromAlpha2 "" `shouldEqual` Nothing
45+
46+ it "allCountries has 249 entries" do
47+ Array.length Country.allCountries `shouldEqual` 249
48+
49+ it "spot check known countries" do
50+ Country.toAlpha2 Country.UnitedStatesOfAmerica `shouldEqual` "US"
51+ Country.toAlpha2 Country.Japan `shouldEqual` "JP"
52+ Country.fromAlpha2 "GB" `shouldEqual` Just Country.UnitedKingdomOfGreatBritainAndNorthernIreland