@@ -1,1862 +0,0 @@
1−// | This module defines a data type representing ANSI escape codes, as well as
2−// | functions for serialising them as Strings.
3−import * as $runtime from "../runtime.js";
4−import * as Data$dGeneric$dRep from "../Data.Generic.Rep/index.js";
5−import * as Data$dList$dTypes from "../Data.List.Types/index.js";
6−import * as Data$dOrd from "../Data.Ord/index.js";
7−import * as Data$dOrdering from "../Data.Ordering/index.js";
8−import * as Data$dShow from "../Data.Show/index.js";
9−import * as Data$dShow$dGeneric from "../Data.Show.Generic/index.js";
10−const $Color = tag => ({tag});
11−const $EraseParam = tag => ({tag});
12−const $EscapeCode = (tag, _1, _2) => ({tag, _1, _2});
13−const $GraphicsParam = (tag, _1) => ({tag, _1});
14−const $RenderingMode = tag => ({tag});
15−const genericShowArgsArgument = {genericShowArgs: v => [Data$dShow.showIntImpl(v)]};
16−const Bold = /* #__PURE__ */ $RenderingMode("Bold");
17−const Dim = /* #__PURE__ */ $RenderingMode("Dim");
18−const Italic = /* #__PURE__ */ $RenderingMode("Italic");
19−const Underline = /* #__PURE__ */ $RenderingMode("Underline");
20−const Inverse = /* #__PURE__ */ $RenderingMode("Inverse");
21−const Strikethrough = /* #__PURE__ */ $RenderingMode("Strikethrough");
22−const ToEnd = /* #__PURE__ */ $EraseParam("ToEnd");
23−const FromBeginning = /* #__PURE__ */ $EraseParam("FromBeginning");
24−const Entire = /* #__PURE__ */ $EraseParam("Entire");
25−const Black = /* #__PURE__ */ $Color("Black");
26−const Red = /* #__PURE__ */ $Color("Red");
27−const Green = /* #__PURE__ */ $Color("Green");
28−const Yellow = /* #__PURE__ */ $Color("Yellow");
29−const Blue = /* #__PURE__ */ $Color("Blue");
30−const Magenta = /* #__PURE__ */ $Color("Magenta");
31−const Cyan = /* #__PURE__ */ $Color("Cyan");
32−const White = /* #__PURE__ */ $Color("White");
33−const BrightBlack = /* #__PURE__ */ $Color("BrightBlack");
34−const BrightRed = /* #__PURE__ */ $Color("BrightRed");
35−const BrightGreen = /* #__PURE__ */ $Color("BrightGreen");
36−const BrightYellow = /* #__PURE__ */ $Color("BrightYellow");
37−const BrightBlue = /* #__PURE__ */ $Color("BrightBlue");
38−const BrightMagenta = /* #__PURE__ */ $Color("BrightMagenta");
39−const BrightCyan = /* #__PURE__ */ $Color("BrightCyan");
40−const BrightWhite = /* #__PURE__ */ $Color("BrightWhite");
41−const Reset = /* #__PURE__ */ $GraphicsParam("Reset");
42−const PMode = value0 => $GraphicsParam("PMode", value0);
43−const PForeground = value0 => $GraphicsParam("PForeground", value0);
44−const PBackground = value0 => $GraphicsParam("PBackground", value0);
45−const Up = value0 => $EscapeCode("Up", value0);
46−const Down = value0 => $EscapeCode("Down", value0);
47−const Forward = value0 => $EscapeCode("Forward", value0);
48−const Back = value0 => $EscapeCode("Back", value0);
49−const NextLine = value0 => $EscapeCode("NextLine", value0);
50−const PreviousLine = value0 => $EscapeCode("PreviousLine", value0);
51−const HorizontalAbsolute = value0 => $EscapeCode("HorizontalAbsolute", value0);
52−const Position = value0 => value1 => $EscapeCode("Position", value0, value1);
53−const EraseData = value0 => $EscapeCode("EraseData", value0);
54−const EraseLine = value0 => $EscapeCode("EraseLine", value0);
55−const ScrollUp = value0 => $EscapeCode("ScrollUp", value0);
56−const ScrollDown = value0 => $EscapeCode("ScrollDown", value0);
57−const Graphics = value0 => $EscapeCode("Graphics", value0);
58−const SavePosition = /* #__PURE__ */ $EscapeCode("SavePosition");
59−const RestorePosition = /* #__PURE__ */ $EscapeCode("RestorePosition");
60−const QueryPosition = /* #__PURE__ */ $EscapeCode("QueryPosition");
61−const HideCursor = /* #__PURE__ */ $EscapeCode("HideCursor");
62−const ShowCursor = /* #__PURE__ */ $EscapeCode("ShowCursor");
63−const prefix = "\u001b[";
64−const genericRenderingMode = {
65− to: x => {
66− if (x.tag === "Inl") { return Bold; }
67− if (x.tag === "Inr") {
68− if (x._1.tag === "Inl") { return Dim; }
69− if (x._1.tag === "Inr") {
70− if (x._1._1.tag === "Inl") { return Italic; }
71− if (x._1._1.tag === "Inr") {
72− if (x._1._1._1.tag === "Inl") { return Underline; }
73− if (x._1._1._1.tag === "Inr") {
74− if (x._1._1._1._1.tag === "Inl") { return Inverse; }
75− if (x._1._1._1._1.tag === "Inr") { return Strikethrough; }
76− $runtime.fail();
77− }
78− $runtime.fail();
79− }
80− $runtime.fail();
81− }
82− $runtime.fail();
83− }
84− $runtime.fail();
85− },
86− from: x => {
87− if (x.tag === "Bold") { return Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.NoArguments); }
88− if (x.tag === "Dim") { return Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.NoArguments)); }
89− if (x.tag === "Italic") { return Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.NoArguments))); }
90− if (x.tag === "Underline") {
91− return Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.NoArguments))));
92− }
93− if (x.tag === "Inverse") {
94− return Data$dGeneric$dRep.$Sum(
95− "Inr",
96− Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.NoArguments))))
97− );
98− }
99− if (x.tag === "Strikethrough") {
100− return Data$dGeneric$dRep.$Sum(
101− "Inr",
102− Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.NoArguments))))
103− );
104− }
105− $runtime.fail();
106− }
107−};
108−const showRenderingMode = {
109− show: /* #__PURE__ */ (() => {
110− const $0 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsNoArguments)({reflectSymbol: () => "Bold"});
111− const $1 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsNoArguments)({reflectSymbol: () => "Dim"});
112− const $2 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsNoArguments)({reflectSymbol: () => "Italic"});
113− const $3 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsNoArguments)({reflectSymbol: () => "Underline"});
114− const $4 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsNoArguments)({reflectSymbol: () => "Inverse"});
115− const $5 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsNoArguments)({reflectSymbol: () => "Strikethrough"});
116− return x => {
117− const $7 = genericRenderingMode.from(x);
118− if ($7.tag === "Inl") { return $0["genericShow'"]($7._1); }
119− if ($7.tag === "Inr") {
120− if ($7._1.tag === "Inl") { return $1["genericShow'"]($7._1._1); }
121− if ($7._1.tag === "Inr") {
122− if ($7._1._1.tag === "Inl") { return $2["genericShow'"]($7._1._1._1); }
123− if ($7._1._1.tag === "Inr") {
124− if ($7._1._1._1.tag === "Inl") { return $3["genericShow'"]($7._1._1._1._1); }
125− if ($7._1._1._1.tag === "Inr") {
126− if ($7._1._1._1._1.tag === "Inl") { return $4["genericShow'"]($7._1._1._1._1._1); }
127− if ($7._1._1._1._1.tag === "Inr") { return $5["genericShow'"]($7._1._1._1._1._1); }
128− $runtime.fail();
129− }
130− $runtime.fail();
131− }
132− $runtime.fail();
133− }
134− $runtime.fail();
135− }
136− $runtime.fail();
137− };
138− })()
139−};
140−const genericGraphicsParam = {
141− to: x => {
142− if (x.tag === "Inl") { return Reset; }
143− if (x.tag === "Inr") {
144− if (x._1.tag === "Inl") { return $GraphicsParam("PMode", x._1._1); }
145− if (x._1.tag === "Inr") {
146− if (x._1._1.tag === "Inl") { return $GraphicsParam("PForeground", x._1._1._1); }
147− if (x._1._1.tag === "Inr") { return $GraphicsParam("PBackground", x._1._1._1); }
148− $runtime.fail();
149− }
150− $runtime.fail();
151− }
152− $runtime.fail();
153− },
154− from: x => {
155− if (x.tag === "Reset") { return Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.NoArguments); }
156− if (x.tag === "PMode") { return Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", x._1)); }
157− if (x.tag === "PForeground") { return Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", x._1))); }
158− if (x.tag === "PBackground") { return Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", x._1))); }
159− $runtime.fail();
160− }
161−};
162−const genericEscapeCode = {
163− to: x => {
164− if (x.tag === "Inl") { return $EscapeCode("Up", x._1); }
165− if (x.tag === "Inr") {
166− if (x._1.tag === "Inl") { return $EscapeCode("Down", x._1._1); }
167− if (x._1.tag === "Inr") {
168− if (x._1._1.tag === "Inl") { return $EscapeCode("Forward", x._1._1._1); }
169− if (x._1._1.tag === "Inr") {
170− if (x._1._1._1.tag === "Inl") { return $EscapeCode("Back", x._1._1._1._1); }
171− if (x._1._1._1.tag === "Inr") {
172− if (x._1._1._1._1.tag === "Inl") { return $EscapeCode("NextLine", x._1._1._1._1._1); }
173− if (x._1._1._1._1.tag === "Inr") {
174− if (x._1._1._1._1._1.tag === "Inl") { return $EscapeCode("PreviousLine", x._1._1._1._1._1._1); }
175− if (x._1._1._1._1._1.tag === "Inr") {
176− if (x._1._1._1._1._1._1.tag === "Inl") { return $EscapeCode("HorizontalAbsolute", x._1._1._1._1._1._1._1); }
177− if (x._1._1._1._1._1._1.tag === "Inr") {
178− if (x._1._1._1._1._1._1._1.tag === "Inl") { return $EscapeCode("Position", x._1._1._1._1._1._1._1._1._1, x._1._1._1._1._1._1._1._1._2); }
179− if (x._1._1._1._1._1._1._1.tag === "Inr") {
180− if (x._1._1._1._1._1._1._1._1.tag === "Inl") { return $EscapeCode("EraseData", x._1._1._1._1._1._1._1._1._1); }
181− if (x._1._1._1._1._1._1._1._1.tag === "Inr") {
182− if (x._1._1._1._1._1._1._1._1._1.tag === "Inl") { return $EscapeCode("EraseLine", x._1._1._1._1._1._1._1._1._1._1); }
183− if (x._1._1._1._1._1._1._1._1._1.tag === "Inr") {
184− if (x._1._1._1._1._1._1._1._1._1._1.tag === "Inl") { return $EscapeCode("ScrollUp", x._1._1._1._1._1._1._1._1._1._1._1); }
185− if (x._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
186− if (x._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") { return $EscapeCode("ScrollDown", x._1._1._1._1._1._1._1._1._1._1._1._1); }
187− if (x._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
188− if (x._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") { return $EscapeCode("Graphics", x._1._1._1._1._1._1._1._1._1._1._1._1._1); }
189− if (x._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
190− if (x._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") { return SavePosition; }
191− if (x._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
192− if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") { return RestorePosition; }
193− if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
194− if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") { return QueryPosition; }
195− if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
196− if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") { return HideCursor; }
197− if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") { return ShowCursor; }
198− $runtime.fail();
199− }
200− $runtime.fail();
201− }
202− $runtime.fail();
203− }
204− $runtime.fail();
205− }
206− $runtime.fail();
207− }
208− $runtime.fail();
209− }
210− $runtime.fail();
211− }
212− $runtime.fail();
213− }
214− $runtime.fail();
215− }
216− $runtime.fail();
217− }
218− $runtime.fail();
219− }
220− $runtime.fail();
221− }
222− $runtime.fail();
223− }
224− $runtime.fail();
225− }
226− $runtime.fail();
227− }
228− $runtime.fail();
229− }
230− $runtime.fail();
231− },
232− from: x => {
233− if (x.tag === "Up") { return Data$dGeneric$dRep.$Sum("Inl", x._1); }
234− if (x.tag === "Down") { return Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", x._1)); }
235− if (x.tag === "Forward") { return Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", x._1))); }
236− if (x.tag === "Back") { return Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", x._1)))); }
237− if (x.tag === "NextLine") {
238− return Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", x._1)))));
239− }
240− if (x.tag === "PreviousLine") {
241− return Data$dGeneric$dRep.$Sum(
242− "Inr",
243− Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", x._1)))))
244− );
245− }
246− if (x.tag === "HorizontalAbsolute") {
247− return Data$dGeneric$dRep.$Sum(
248− "Inr",
249− Data$dGeneric$dRep.$Sum(
250− "Inr",
251− Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", x._1)))))
252− )
253− );
254− }
255− if (x.tag === "Position") {
256− return Data$dGeneric$dRep.$Sum(
257− "Inr",
258− Data$dGeneric$dRep.$Sum(
259− "Inr",
260− Data$dGeneric$dRep.$Sum(
261− "Inr",
262− Data$dGeneric$dRep.$Sum(
263− "Inr",
264− Data$dGeneric$dRep.$Sum(
265− "Inr",
266− Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.$Product(x._1, x._2))))
267− )
268− )
269− )
270− )
271− );
272− }
273− if (x.tag === "EraseData") {
274− return Data$dGeneric$dRep.$Sum(
275− "Inr",
276− Data$dGeneric$dRep.$Sum(
277− "Inr",
278− Data$dGeneric$dRep.$Sum(
279− "Inr",
280− Data$dGeneric$dRep.$Sum(
281− "Inr",
282− Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", x._1)))))
283− )
284− )
285− )
286− );
287− }
288− if (x.tag === "EraseLine") {
289− return Data$dGeneric$dRep.$Sum(
290− "Inr",
291− Data$dGeneric$dRep.$Sum(
292− "Inr",
293− Data$dGeneric$dRep.$Sum(
294− "Inr",
295− Data$dGeneric$dRep.$Sum(
296− "Inr",
297− Data$dGeneric$dRep.$Sum(
298− "Inr",
299− Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", x._1)))))
300− )
301− )
302− )
303− )
304− );
305− }
306− if (x.tag === "ScrollUp") {
307− return Data$dGeneric$dRep.$Sum(
308− "Inr",
309− Data$dGeneric$dRep.$Sum(
310− "Inr",
311− Data$dGeneric$dRep.$Sum(
312− "Inr",
313− Data$dGeneric$dRep.$Sum(
314− "Inr",
315− Data$dGeneric$dRep.$Sum(
316− "Inr",
317− Data$dGeneric$dRep.$Sum(
318− "Inr",
319− Data$dGeneric$dRep.$Sum(
320− "Inr",
321− Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", x._1))))
322− )
323− )
324− )
325− )
326− )
327− )
328− );
329− }
330− if (x.tag === "ScrollDown") {
331− return Data$dGeneric$dRep.$Sum(
332− "Inr",
333− Data$dGeneric$dRep.$Sum(
334− "Inr",
335− Data$dGeneric$dRep.$Sum(
336− "Inr",
337− Data$dGeneric$dRep.$Sum(
338− "Inr",
339− Data$dGeneric$dRep.$Sum(
340− "Inr",
341− Data$dGeneric$dRep.$Sum(
342− "Inr",
343− Data$dGeneric$dRep.$Sum(
344− "Inr",
345− Data$dGeneric$dRep.$Sum(
346− "Inr",
347− Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", x._1))))
348− )
349− )
350− )
351− )
352− )
353− )
354− )
355− );
356− }
357− if (x.tag === "Graphics") {
358− return Data$dGeneric$dRep.$Sum(
359− "Inr",
360− Data$dGeneric$dRep.$Sum(
361− "Inr",
362− Data$dGeneric$dRep.$Sum(
363− "Inr",
364− Data$dGeneric$dRep.$Sum(
365− "Inr",
366− Data$dGeneric$dRep.$Sum(
367− "Inr",
368− Data$dGeneric$dRep.$Sum(
369− "Inr",
370− Data$dGeneric$dRep.$Sum(
371− "Inr",
372− Data$dGeneric$dRep.$Sum(
373− "Inr",
374− Data$dGeneric$dRep.$Sum(
375− "Inr",
376− Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", x._1))))
377− )
378− )
379− )
380− )
381− )
382− )
383− )
384− )
385− );
386− }
387− if (x.tag === "SavePosition") {
388− return Data$dGeneric$dRep.$Sum(
389− "Inr",
390− Data$dGeneric$dRep.$Sum(
391− "Inr",
392− Data$dGeneric$dRep.$Sum(
393− "Inr",
394− Data$dGeneric$dRep.$Sum(
395− "Inr",
396− Data$dGeneric$dRep.$Sum(
397− "Inr",
398− Data$dGeneric$dRep.$Sum(
399− "Inr",
400− Data$dGeneric$dRep.$Sum(
401− "Inr",
402− Data$dGeneric$dRep.$Sum(
403− "Inr",
404− Data$dGeneric$dRep.$Sum(
405− "Inr",
406− Data$dGeneric$dRep.$Sum(
407− "Inr",
408− Data$dGeneric$dRep.$Sum(
409− "Inr",
410− Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.NoArguments)))
411− )
412− )
413− )
414− )
415− )
416− )
417− )
418− )
419− )
420− )
421− );
422− }
423− if (x.tag === "RestorePosition") {
424− return Data$dGeneric$dRep.$Sum(
425− "Inr",
426− Data$dGeneric$dRep.$Sum(
427− "Inr",
428− Data$dGeneric$dRep.$Sum(
429− "Inr",
430− Data$dGeneric$dRep.$Sum(
431− "Inr",
432− Data$dGeneric$dRep.$Sum(
433− "Inr",
434− Data$dGeneric$dRep.$Sum(
435− "Inr",
436− Data$dGeneric$dRep.$Sum(
437− "Inr",
438− Data$dGeneric$dRep.$Sum(
439− "Inr",
440− Data$dGeneric$dRep.$Sum(
441− "Inr",
442− Data$dGeneric$dRep.$Sum(
443− "Inr",
444− Data$dGeneric$dRep.$Sum(
445− "Inr",
446− Data$dGeneric$dRep.$Sum(
447− "Inr",
448− Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.NoArguments)))
449− )
450− )
451− )
452− )
453− )
454− )
455− )
456− )
457− )
458− )
459− )
460− );
461− }
462− if (x.tag === "QueryPosition") {
463− return Data$dGeneric$dRep.$Sum(
464− "Inr",
465− Data$dGeneric$dRep.$Sum(
466− "Inr",
467− Data$dGeneric$dRep.$Sum(
468− "Inr",
469− Data$dGeneric$dRep.$Sum(
470− "Inr",
471− Data$dGeneric$dRep.$Sum(
472− "Inr",
473− Data$dGeneric$dRep.$Sum(
474− "Inr",
475− Data$dGeneric$dRep.$Sum(
476− "Inr",
477− Data$dGeneric$dRep.$Sum(
478− "Inr",
479− Data$dGeneric$dRep.$Sum(
480− "Inr",
481− Data$dGeneric$dRep.$Sum(
482− "Inr",
483− Data$dGeneric$dRep.$Sum(
484− "Inr",
485− Data$dGeneric$dRep.$Sum(
486− "Inr",
487− Data$dGeneric$dRep.$Sum(
488− "Inr",
489− Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.NoArguments)))
490− )
491− )
492− )
493− )
494− )
495− )
496− )
497− )
498− )
499− )
500− )
501− )
502− );
503− }
504− if (x.tag === "HideCursor") {
505− return Data$dGeneric$dRep.$Sum(
506− "Inr",
507− Data$dGeneric$dRep.$Sum(
508− "Inr",
509− Data$dGeneric$dRep.$Sum(
510− "Inr",
511− Data$dGeneric$dRep.$Sum(
512− "Inr",
513− Data$dGeneric$dRep.$Sum(
514− "Inr",
515− Data$dGeneric$dRep.$Sum(
516− "Inr",
517− Data$dGeneric$dRep.$Sum(
518− "Inr",
519− Data$dGeneric$dRep.$Sum(
520− "Inr",
521− Data$dGeneric$dRep.$Sum(
522− "Inr",
523− Data$dGeneric$dRep.$Sum(
524− "Inr",
525− Data$dGeneric$dRep.$Sum(
526− "Inr",
527− Data$dGeneric$dRep.$Sum(
528− "Inr",
529− Data$dGeneric$dRep.$Sum(
530− "Inr",
531− Data$dGeneric$dRep.$Sum(
532− "Inr",
533− Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.NoArguments)))
534− )
535− )
536− )
537− )
538− )
539− )
540− )
541− )
542− )
543− )
544− )
545− )
546− )
547− );
548− }
549− if (x.tag === "ShowCursor") {
550− return Data$dGeneric$dRep.$Sum(
551− "Inr",
552− Data$dGeneric$dRep.$Sum(
553− "Inr",
554− Data$dGeneric$dRep.$Sum(
555− "Inr",
556− Data$dGeneric$dRep.$Sum(
557− "Inr",
558− Data$dGeneric$dRep.$Sum(
559− "Inr",
560− Data$dGeneric$dRep.$Sum(
561− "Inr",
562− Data$dGeneric$dRep.$Sum(
563− "Inr",
564− Data$dGeneric$dRep.$Sum(
565− "Inr",
566− Data$dGeneric$dRep.$Sum(
567− "Inr",
568− Data$dGeneric$dRep.$Sum(
569− "Inr",
570− Data$dGeneric$dRep.$Sum(
571− "Inr",
572− Data$dGeneric$dRep.$Sum(
573− "Inr",
574− Data$dGeneric$dRep.$Sum(
575− "Inr",
576− Data$dGeneric$dRep.$Sum(
577− "Inr",
578− Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.NoArguments)))
579− )
580− )
581− )
582− )
583− )
584− )
585− )
586− )
587− )
588− )
589− )
590− )
591− )
592− );
593− }
594− $runtime.fail();
595− }
596−};
597−const genericEraseParam = {
598− to: x => {
599− if (x.tag === "Inl") { return ToEnd; }
600− if (x.tag === "Inr") {
601− if (x._1.tag === "Inl") { return FromBeginning; }
602− if (x._1.tag === "Inr") { return Entire; }
603− $runtime.fail();
604− }
605− $runtime.fail();
606− },
607− from: x => {
608− if (x.tag === "ToEnd") { return Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.NoArguments); }
609− if (x.tag === "FromBeginning") { return Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.NoArguments)); }
610− if (x.tag === "Entire") { return Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.NoArguments)); }
611− $runtime.fail();
612− }
613−};
614−const showEraseParam = {
615− show: /* #__PURE__ */ (() => {
616− const $0 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsNoArguments)({reflectSymbol: () => "ToEnd"});
617− const $1 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsNoArguments)({reflectSymbol: () => "FromBeginning"});
618− const $2 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsNoArguments)({reflectSymbol: () => "Entire"});
619− return x => {
620− const $4 = genericEraseParam.from(x);
621− if ($4.tag === "Inl") { return $0["genericShow'"]($4._1); }
622− if ($4.tag === "Inr") {
623− if ($4._1.tag === "Inl") { return $1["genericShow'"]($4._1._1); }
624− if ($4._1.tag === "Inr") { return $2["genericShow'"]($4._1._1); }
625− $runtime.fail();
626− }
627− $runtime.fail();
628− };
629− })()
630−};
631−const genericColor = {
632− to: x => {
633− if (x.tag === "Inl") { return Black; }
634− if (x.tag === "Inr") {
635− if (x._1.tag === "Inl") { return Red; }
636− if (x._1.tag === "Inr") {
637− if (x._1._1.tag === "Inl") { return Green; }
638− if (x._1._1.tag === "Inr") {
639− if (x._1._1._1.tag === "Inl") { return Yellow; }
640− if (x._1._1._1.tag === "Inr") {
641− if (x._1._1._1._1.tag === "Inl") { return Blue; }
642− if (x._1._1._1._1.tag === "Inr") {
643− if (x._1._1._1._1._1.tag === "Inl") { return Magenta; }
644− if (x._1._1._1._1._1.tag === "Inr") {
645− if (x._1._1._1._1._1._1.tag === "Inl") { return Cyan; }
646− if (x._1._1._1._1._1._1.tag === "Inr") {
647− if (x._1._1._1._1._1._1._1.tag === "Inl") { return White; }
648− if (x._1._1._1._1._1._1._1.tag === "Inr") {
649− if (x._1._1._1._1._1._1._1._1.tag === "Inl") { return BrightBlack; }
650− if (x._1._1._1._1._1._1._1._1.tag === "Inr") {
651− if (x._1._1._1._1._1._1._1._1._1.tag === "Inl") { return BrightRed; }
652− if (x._1._1._1._1._1._1._1._1._1.tag === "Inr") {
653− if (x._1._1._1._1._1._1._1._1._1._1.tag === "Inl") { return BrightGreen; }
654− if (x._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
655− if (x._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") { return BrightYellow; }
656− if (x._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
657− if (x._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") { return BrightBlue; }
658− if (x._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
659− if (x._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") { return BrightMagenta; }
660− if (x._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
661− if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") { return BrightCyan; }
662− if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") { return BrightWhite; }
663− $runtime.fail();
664− }
665− $runtime.fail();
666− }
667− $runtime.fail();
668− }
669− $runtime.fail();
670− }
671− $runtime.fail();
672− }
673− $runtime.fail();
674− }
675− $runtime.fail();
676− }
677− $runtime.fail();
678− }
679− $runtime.fail();
680− }
681− $runtime.fail();
682− }
683− $runtime.fail();
684− }
685− $runtime.fail();
686− }
687− $runtime.fail();
688− }
689− $runtime.fail();
690− }
691− $runtime.fail();
692− },
693− from: x => {
694− if (x.tag === "Black") { return Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.NoArguments); }
695− if (x.tag === "Red") { return Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.NoArguments)); }
696− if (x.tag === "Green") { return Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.NoArguments))); }
697− if (x.tag === "Yellow") {
698− return Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.NoArguments))));
699− }
700− if (x.tag === "Blue") {
701− return Data$dGeneric$dRep.$Sum(
702− "Inr",
703− Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.NoArguments))))
704− );
705− }
706− if (x.tag === "Magenta") {
707− return Data$dGeneric$dRep.$Sum(
708− "Inr",
709− Data$dGeneric$dRep.$Sum(
710− "Inr",
711− Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.NoArguments))))
712− )
713− );
714− }
715− if (x.tag === "Cyan") {
716− return Data$dGeneric$dRep.$Sum(
717− "Inr",
718− Data$dGeneric$dRep.$Sum(
719− "Inr",
720− Data$dGeneric$dRep.$Sum(
721− "Inr",
722− Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.NoArguments))))
723− )
724− )
725− );
726− }
727− if (x.tag === "White") {
728− return Data$dGeneric$dRep.$Sum(
729− "Inr",
730− Data$dGeneric$dRep.$Sum(
731− "Inr",
732− Data$dGeneric$dRep.$Sum(
733− "Inr",
734− Data$dGeneric$dRep.$Sum(
735− "Inr",
736− Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.NoArguments))))
737− )
738− )
739− )
740− );
741− }
742− if (x.tag === "BrightBlack") {
743− return Data$dGeneric$dRep.$Sum(
744− "Inr",
745− Data$dGeneric$dRep.$Sum(
746− "Inr",
747− Data$dGeneric$dRep.$Sum(
748− "Inr",
749− Data$dGeneric$dRep.$Sum(
750− "Inr",
751− Data$dGeneric$dRep.$Sum(
752− "Inr",
753− Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.NoArguments))))
754− )
755− )
756− )
757− )
758− );
759− }
760− if (x.tag === "BrightRed") {
761− return Data$dGeneric$dRep.$Sum(
762− "Inr",
763− Data$dGeneric$dRep.$Sum(
764− "Inr",
765− Data$dGeneric$dRep.$Sum(
766− "Inr",
767− Data$dGeneric$dRep.$Sum(
768− "Inr",
769− Data$dGeneric$dRep.$Sum(
770− "Inr",
771− Data$dGeneric$dRep.$Sum(
772− "Inr",
773− Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.NoArguments))))
774− )
775− )
776− )
777− )
778− )
779− );
780− }
781− if (x.tag === "BrightGreen") {
782− return Data$dGeneric$dRep.$Sum(
783− "Inr",
784− Data$dGeneric$dRep.$Sum(
785− "Inr",
786− Data$dGeneric$dRep.$Sum(
787− "Inr",
788− Data$dGeneric$dRep.$Sum(
789− "Inr",
790− Data$dGeneric$dRep.$Sum(
791− "Inr",
792− Data$dGeneric$dRep.$Sum(
793− "Inr",
794− Data$dGeneric$dRep.$Sum(
795− "Inr",
796− Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.NoArguments))))
797− )
798− )
799− )
800− )
801− )
802− )
803− );
804− }
805− if (x.tag === "BrightYellow") {
806− return Data$dGeneric$dRep.$Sum(
807− "Inr",
808− Data$dGeneric$dRep.$Sum(
809− "Inr",
810− Data$dGeneric$dRep.$Sum(
811− "Inr",
812− Data$dGeneric$dRep.$Sum(
813− "Inr",
814− Data$dGeneric$dRep.$Sum(
815− "Inr",
816− Data$dGeneric$dRep.$Sum(
817− "Inr",
818− Data$dGeneric$dRep.$Sum(
819− "Inr",
820− Data$dGeneric$dRep.$Sum(
821− "Inr",
822− Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.NoArguments))))
823− )
824− )
825− )
826− )
827− )
828− )
829− )
830− );
831− }
832− if (x.tag === "BrightBlue") {
833− return Data$dGeneric$dRep.$Sum(
834− "Inr",
835− Data$dGeneric$dRep.$Sum(
836− "Inr",
837− Data$dGeneric$dRep.$Sum(
838− "Inr",
839− Data$dGeneric$dRep.$Sum(
840− "Inr",
841− Data$dGeneric$dRep.$Sum(
842− "Inr",
843− Data$dGeneric$dRep.$Sum(
844− "Inr",
845− Data$dGeneric$dRep.$Sum(
846− "Inr",
847− Data$dGeneric$dRep.$Sum(
848− "Inr",
849− Data$dGeneric$dRep.$Sum(
850− "Inr",
851− Data$dGeneric$dRep.$Sum(
852− "Inr",
853− Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.NoArguments)))
854− )
855− )
856− )
857− )
858− )
859− )
860− )
861− )
862− )
863− );
864− }
865− if (x.tag === "BrightMagenta") {
866− return Data$dGeneric$dRep.$Sum(
867− "Inr",
868− Data$dGeneric$dRep.$Sum(
869− "Inr",
870− Data$dGeneric$dRep.$Sum(
871− "Inr",
872− Data$dGeneric$dRep.$Sum(
873− "Inr",
874− Data$dGeneric$dRep.$Sum(
875− "Inr",
876− Data$dGeneric$dRep.$Sum(
877− "Inr",
878− Data$dGeneric$dRep.$Sum(
879− "Inr",
880− Data$dGeneric$dRep.$Sum(
881− "Inr",
882− Data$dGeneric$dRep.$Sum(
883− "Inr",
884− Data$dGeneric$dRep.$Sum(
885− "Inr",
886− Data$dGeneric$dRep.$Sum(
887− "Inr",
888− Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.NoArguments)))
889− )
890− )
891− )
892− )
893− )
894− )
895− )
896− )
897− )
898− )
899− );
900− }
901− if (x.tag === "BrightCyan") {
902− return Data$dGeneric$dRep.$Sum(
903− "Inr",
904− Data$dGeneric$dRep.$Sum(
905− "Inr",
906− Data$dGeneric$dRep.$Sum(
907− "Inr",
908− Data$dGeneric$dRep.$Sum(
909− "Inr",
910− Data$dGeneric$dRep.$Sum(
911− "Inr",
912− Data$dGeneric$dRep.$Sum(
913− "Inr",
914− Data$dGeneric$dRep.$Sum(
915− "Inr",
916− Data$dGeneric$dRep.$Sum(
917− "Inr",
918− Data$dGeneric$dRep.$Sum(
919− "Inr",
920− Data$dGeneric$dRep.$Sum(
921− "Inr",
922− Data$dGeneric$dRep.$Sum(
923− "Inr",
924− Data$dGeneric$dRep.$Sum(
925− "Inr",
926− Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.NoArguments)))
927− )
928− )
929− )
930− )
931− )
932− )
933− )
934− )
935− )
936− )
937− )
938− );
939− }
940− if (x.tag === "BrightWhite") {
941− return Data$dGeneric$dRep.$Sum(
942− "Inr",
943− Data$dGeneric$dRep.$Sum(
944− "Inr",
945− Data$dGeneric$dRep.$Sum(
946− "Inr",
947− Data$dGeneric$dRep.$Sum(
948− "Inr",
949− Data$dGeneric$dRep.$Sum(
950− "Inr",
951− Data$dGeneric$dRep.$Sum(
952− "Inr",
953− Data$dGeneric$dRep.$Sum(
954− "Inr",
955− Data$dGeneric$dRep.$Sum(
956− "Inr",
957− Data$dGeneric$dRep.$Sum(
958− "Inr",
959− Data$dGeneric$dRep.$Sum(
960− "Inr",
961− Data$dGeneric$dRep.$Sum(
962− "Inr",
963− Data$dGeneric$dRep.$Sum(
964− "Inr",
965− Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.NoArguments)))
966− )
967− )
968− )
969− )
970− )
971− )
972− )
973− )
974− )
975− )
976− )
977− );
978− }
979− $runtime.fail();
980− }
981−};
982−const showColor = {
983− show: /* #__PURE__ */ (() => {
984− const $0 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsNoArguments)({reflectSymbol: () => "Black"});
985− const $1 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsNoArguments)({reflectSymbol: () => "Red"});
986− const $2 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsNoArguments)({reflectSymbol: () => "Green"});
987− const $3 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsNoArguments)({reflectSymbol: () => "Yellow"});
988− const $4 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsNoArguments)({reflectSymbol: () => "Blue"});
989− const $5 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsNoArguments)({reflectSymbol: () => "Magenta"});
990− const $6 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsNoArguments)({reflectSymbol: () => "Cyan"});
991− const $7 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsNoArguments)({reflectSymbol: () => "White"});
992− const $8 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsNoArguments)({reflectSymbol: () => "BrightBlack"});
993− const $9 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsNoArguments)({reflectSymbol: () => "BrightRed"});
994− const $10 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsNoArguments)({reflectSymbol: () => "BrightGreen"});
995− const $11 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsNoArguments)({reflectSymbol: () => "BrightYellow"});
996− const $12 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsNoArguments)({reflectSymbol: () => "BrightBlue"});
997− const $13 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsNoArguments)({reflectSymbol: () => "BrightMagenta"});
998− const $14 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsNoArguments)({reflectSymbol: () => "BrightCyan"});
999− const $15 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsNoArguments)({reflectSymbol: () => "BrightWhite"});
1000− return x => {
1001− const $17 = genericColor.from(x);
1002− if ($17.tag === "Inl") { return $0["genericShow'"]($17._1); }
1003− if ($17.tag === "Inr") {
1004− if ($17._1.tag === "Inl") { return $1["genericShow'"]($17._1._1); }
1005− if ($17._1.tag === "Inr") {
1006− if ($17._1._1.tag === "Inl") { return $2["genericShow'"]($17._1._1._1); }
1007− if ($17._1._1.tag === "Inr") {
1008− if ($17._1._1._1.tag === "Inl") { return $3["genericShow'"]($17._1._1._1._1); }
1009− if ($17._1._1._1.tag === "Inr") {
1010− if ($17._1._1._1._1.tag === "Inl") { return $4["genericShow'"]($17._1._1._1._1._1); }
1011− if ($17._1._1._1._1.tag === "Inr") {
1012− if ($17._1._1._1._1._1.tag === "Inl") { return $5["genericShow'"]($17._1._1._1._1._1._1); }
1013− if ($17._1._1._1._1._1.tag === "Inr") {
1014− if ($17._1._1._1._1._1._1.tag === "Inl") { return $6["genericShow'"]($17._1._1._1._1._1._1._1); }
1015− if ($17._1._1._1._1._1._1.tag === "Inr") {
1016− if ($17._1._1._1._1._1._1._1.tag === "Inl") { return $7["genericShow'"]($17._1._1._1._1._1._1._1._1); }
1017− if ($17._1._1._1._1._1._1._1.tag === "Inr") {
1018− if ($17._1._1._1._1._1._1._1._1.tag === "Inl") { return $8["genericShow'"]($17._1._1._1._1._1._1._1._1._1); }
1019− if ($17._1._1._1._1._1._1._1._1.tag === "Inr") {
1020− if ($17._1._1._1._1._1._1._1._1._1.tag === "Inl") { return $9["genericShow'"]($17._1._1._1._1._1._1._1._1._1._1); }
1021− if ($17._1._1._1._1._1._1._1._1._1.tag === "Inr") {
1022− if ($17._1._1._1._1._1._1._1._1._1._1.tag === "Inl") { return $10["genericShow'"]($17._1._1._1._1._1._1._1._1._1._1._1); }
1023− if ($17._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
1024− if ($17._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") { return $11["genericShow'"]($17._1._1._1._1._1._1._1._1._1._1._1._1); }
1025− if ($17._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
1026− if ($17._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") { return $12["genericShow'"]($17._1._1._1._1._1._1._1._1._1._1._1._1._1); }
1027− if ($17._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
1028− if ($17._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") { return $13["genericShow'"]($17._1._1._1._1._1._1._1._1._1._1._1._1._1._1); }
1029− if ($17._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
1030− if ($17._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") { return $14["genericShow'"]($17._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1); }
1031− if ($17._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") { return $15["genericShow'"]($17._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1); }
1032− $runtime.fail();
1033− }
1034− $runtime.fail();
1035− }
1036− $runtime.fail();
1037− }
1038− $runtime.fail();
1039− }
1040− $runtime.fail();
1041− }
1042− $runtime.fail();
1043− }
1044− $runtime.fail();
1045− }
1046− $runtime.fail();
1047− }
1048− $runtime.fail();
1049− }
1050− $runtime.fail();
1051− }
1052− $runtime.fail();
1053− }
1054− $runtime.fail();
1055− }
1056− $runtime.fail();
1057− }
1058− $runtime.fail();
1059− }
1060− $runtime.fail();
1061− };
1062− })()
1063−};
1064−const showGraphicsParam = {
1065− show: /* #__PURE__ */ (() => {
1066− const $0 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsNoArguments)({reflectSymbol: () => "Reset"});
1067− const $1 = Data$dShow$dGeneric.genericShowConstructor({genericShowArgs: v => [showRenderingMode.show(v)]})({reflectSymbol: () => "PMode"});
1068− const $2 = Data$dShow$dGeneric.genericShowConstructor({genericShowArgs: v => [showColor.show(v)]})({reflectSymbol: () => "PForeground"});
1069− const $3 = Data$dShow$dGeneric.genericShowConstructor({genericShowArgs: v => [showColor.show(v)]})({reflectSymbol: () => "PBackground"});
1070− return x => {
1071− const $5 = genericGraphicsParam.from(x);
1072− if ($5.tag === "Inl") { return $0["genericShow'"]($5._1); }
1073− if ($5.tag === "Inr") {
1074− if ($5._1.tag === "Inl") { return $1["genericShow'"]($5._1._1); }
1075− if ($5._1.tag === "Inr") {
1076− if ($5._1._1.tag === "Inl") { return $2["genericShow'"]($5._1._1._1); }
1077− if ($5._1._1.tag === "Inr") { return $3["genericShow'"]($5._1._1._1); }
1078− $runtime.fail();
1079− }
1080− $runtime.fail();
1081− }
1082− $runtime.fail();
1083− };
1084− })()
1085−};
1086−const showEscapeCode = {
1087− show: /* #__PURE__ */ (() => {
1088− const $0 = Data$dShow$dGeneric.genericShowConstructor(genericShowArgsArgument)({reflectSymbol: () => "Up"});
1089− const $1 = Data$dShow$dGeneric.genericShowConstructor(genericShowArgsArgument)({reflectSymbol: () => "Down"});
1090− const $2 = Data$dShow$dGeneric.genericShowConstructor(genericShowArgsArgument)({reflectSymbol: () => "Forward"});
1091− const $3 = Data$dShow$dGeneric.genericShowConstructor(genericShowArgsArgument)({reflectSymbol: () => "Back"});
1092− const $4 = Data$dShow$dGeneric.genericShowConstructor(genericShowArgsArgument)({reflectSymbol: () => "NextLine"});
1093− const $5 = Data$dShow$dGeneric.genericShowConstructor(genericShowArgsArgument)({reflectSymbol: () => "PreviousLine"});
1094− const $6 = Data$dShow$dGeneric.genericShowConstructor(genericShowArgsArgument)({reflectSymbol: () => "HorizontalAbsolute"});
1095− const $7 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsProduct(genericShowArgsArgument)(genericShowArgsArgument))({
1096− reflectSymbol: () => "Position"
1097− });
1098− const $8 = Data$dShow$dGeneric.genericShowConstructor({genericShowArgs: v => [showEraseParam.show(v)]})({reflectSymbol: () => "EraseData"});
1099− const $9 = Data$dShow$dGeneric.genericShowConstructor({genericShowArgs: v => [showEraseParam.show(v)]})({reflectSymbol: () => "EraseLine"});
1100− const $10 = Data$dShow$dGeneric.genericShowConstructor(genericShowArgsArgument)({reflectSymbol: () => "ScrollUp"});
1101− const $11 = Data$dShow$dGeneric.genericShowConstructor(genericShowArgsArgument)({reflectSymbol: () => "ScrollDown"});
1102− const $12 = Data$dShow$dGeneric.genericShowConstructor((() => {
1103− const $12 = Data$dList$dTypes.showNonEmptyList(showGraphicsParam);
1104− return {genericShowArgs: v => [$12.show(v)]};
1105− })())({reflectSymbol: () => "Graphics"});
1106− const $13 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsNoArguments)({reflectSymbol: () => "SavePosition"});
1107− const $14 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsNoArguments)({reflectSymbol: () => "RestorePosition"});
1108− const $15 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsNoArguments)({reflectSymbol: () => "QueryPosition"});
1109− const $16 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsNoArguments)({reflectSymbol: () => "HideCursor"});
1110− const $17 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsNoArguments)({reflectSymbol: () => "ShowCursor"});
1111− return x => {
1112− const $19 = genericEscapeCode.from(x);
1113− if ($19.tag === "Inl") { return $0["genericShow'"]($19._1); }
1114− if ($19.tag === "Inr") {
1115− if ($19._1.tag === "Inl") { return $1["genericShow'"]($19._1._1); }
1116− if ($19._1.tag === "Inr") {
1117− if ($19._1._1.tag === "Inl") { return $2["genericShow'"]($19._1._1._1); }
1118− if ($19._1._1.tag === "Inr") {
1119− if ($19._1._1._1.tag === "Inl") { return $3["genericShow'"]($19._1._1._1._1); }
1120− if ($19._1._1._1.tag === "Inr") {
1121− if ($19._1._1._1._1.tag === "Inl") { return $4["genericShow'"]($19._1._1._1._1._1); }
1122− if ($19._1._1._1._1.tag === "Inr") {
1123− if ($19._1._1._1._1._1.tag === "Inl") { return $5["genericShow'"]($19._1._1._1._1._1._1); }
1124− if ($19._1._1._1._1._1.tag === "Inr") {
1125− if ($19._1._1._1._1._1._1.tag === "Inl") { return $6["genericShow'"]($19._1._1._1._1._1._1._1); }
1126− if ($19._1._1._1._1._1._1.tag === "Inr") {
1127− if ($19._1._1._1._1._1._1._1.tag === "Inl") { return $7["genericShow'"]($19._1._1._1._1._1._1._1._1); }
1128− if ($19._1._1._1._1._1._1._1.tag === "Inr") {
1129− if ($19._1._1._1._1._1._1._1._1.tag === "Inl") { return $8["genericShow'"]($19._1._1._1._1._1._1._1._1._1); }
1130− if ($19._1._1._1._1._1._1._1._1.tag === "Inr") {
1131− if ($19._1._1._1._1._1._1._1._1._1.tag === "Inl") { return $9["genericShow'"]($19._1._1._1._1._1._1._1._1._1._1); }
1132− if ($19._1._1._1._1._1._1._1._1._1.tag === "Inr") {
1133− if ($19._1._1._1._1._1._1._1._1._1._1.tag === "Inl") { return $10["genericShow'"]($19._1._1._1._1._1._1._1._1._1._1._1); }
1134− if ($19._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
1135− if ($19._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") { return $11["genericShow'"]($19._1._1._1._1._1._1._1._1._1._1._1._1); }
1136− if ($19._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
1137− if ($19._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") { return $12["genericShow'"]($19._1._1._1._1._1._1._1._1._1._1._1._1._1); }
1138− if ($19._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
1139− if ($19._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") { return $13["genericShow'"]($19._1._1._1._1._1._1._1._1._1._1._1._1._1._1); }
1140− if ($19._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
1141− if ($19._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") { return $14["genericShow'"]($19._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1); }
1142− if ($19._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
1143− if ($19._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
1144− return $15["genericShow'"]($19._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1);
1145− }
1146− if ($19._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
1147− if ($19._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
1148− return $16["genericShow'"]($19._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1);
1149− }
1150− if ($19._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
1151− return $17["genericShow'"]($19._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1);
1152− }
1153− $runtime.fail();
1154− }
1155− $runtime.fail();
1156− }
1157− $runtime.fail();
1158− }
1159− $runtime.fail();
1160− }
1161− $runtime.fail();
1162− }
1163− $runtime.fail();
1164− }
1165− $runtime.fail();
1166− }
1167− $runtime.fail();
1168− }
1169− $runtime.fail();
1170− }
1171− $runtime.fail();
1172− }
1173− $runtime.fail();
1174− }
1175− $runtime.fail();
1176− }
1177− $runtime.fail();
1178− }
1179− $runtime.fail();
1180− }
1181− $runtime.fail();
1182− }
1183− $runtime.fail();
1184− }
1185− $runtime.fail();
1186− };
1187− })()
1188−};
1189−const eraseParamToString = ep => {
1190− if (ep.tag === "ToEnd") { return "0"; }
1191− if (ep.tag === "FromBeginning") { return "1"; }
1192− if (ep.tag === "Entire") { return "2"; }
1193− $runtime.fail();
1194−};
1195−const eqRenderingMode = {
1196− eq: x => y => {
1197− if (x.tag === "Bold") { return y.tag === "Bold"; }
1198− if (x.tag === "Dim") { return y.tag === "Dim"; }
1199− if (x.tag === "Italic") { return y.tag === "Italic"; }
1200− if (x.tag === "Underline") { return y.tag === "Underline"; }
1201− if (x.tag === "Inverse") { return y.tag === "Inverse"; }
1202− if (x.tag === "Strikethrough") { return y.tag === "Strikethrough"; }
1203− return false;
1204− }
1205−};
1206−const ordRenderingMode = {
1207− compare: x => y => {
1208− if (x.tag === "Bold") {
1209− if (y.tag === "Bold") { return Data$dOrdering.EQ; }
1210− return Data$dOrdering.LT;
1211− }
1212− if (y.tag === "Bold") { return Data$dOrdering.GT; }
1213− if (x.tag === "Dim") {
1214− if (y.tag === "Dim") { return Data$dOrdering.EQ; }
1215− return Data$dOrdering.LT;
1216− }
1217− if (y.tag === "Dim") { return Data$dOrdering.GT; }
1218− if (x.tag === "Italic") {
1219− if (y.tag === "Italic") { return Data$dOrdering.EQ; }
1220− return Data$dOrdering.LT;
1221− }
1222− if (y.tag === "Italic") { return Data$dOrdering.GT; }
1223− if (x.tag === "Underline") {
1224− if (y.tag === "Underline") { return Data$dOrdering.EQ; }
1225− return Data$dOrdering.LT;
1226− }
1227− if (y.tag === "Underline") { return Data$dOrdering.GT; }
1228− if (x.tag === "Inverse") {
1229− if (y.tag === "Inverse") { return Data$dOrdering.EQ; }
1230− return Data$dOrdering.LT;
1231− }
1232− if (y.tag === "Inverse") { return Data$dOrdering.GT; }
1233− if (x.tag === "Strikethrough") {
1234− if (y.tag === "Strikethrough") { return Data$dOrdering.EQ; }
1235− $runtime.fail();
1236− }
1237− $runtime.fail();
1238− },
1239− Eq0: () => eqRenderingMode
1240−};
1241−const eqEraseParam = {
1242− eq: x => y => {
1243− if (x.tag === "ToEnd") { return y.tag === "ToEnd"; }
1244− if (x.tag === "FromBeginning") { return y.tag === "FromBeginning"; }
1245− if (x.tag === "Entire") { return y.tag === "Entire"; }
1246− return false;
1247− }
1248−};
1249−const ordEraseParam = {
1250− compare: x => y => {
1251− if (x.tag === "ToEnd") {
1252− if (y.tag === "ToEnd") { return Data$dOrdering.EQ; }
1253− return Data$dOrdering.LT;
1254− }
1255− if (y.tag === "ToEnd") { return Data$dOrdering.GT; }
1256− if (x.tag === "FromBeginning") {
1257− if (y.tag === "FromBeginning") { return Data$dOrdering.EQ; }
1258− return Data$dOrdering.LT;
1259− }
1260− if (y.tag === "FromBeginning") { return Data$dOrdering.GT; }
1261− if (x.tag === "Entire") {
1262− if (y.tag === "Entire") { return Data$dOrdering.EQ; }
1263− $runtime.fail();
1264− }
1265− $runtime.fail();
1266− },
1267− Eq0: () => eqEraseParam
1268−};
1269−const eqColor = {
1270− eq: x => y => {
1271− if (x.tag === "Black") { return y.tag === "Black"; }
1272− if (x.tag === "Red") { return y.tag === "Red"; }
1273− if (x.tag === "Green") { return y.tag === "Green"; }
1274− if (x.tag === "Yellow") { return y.tag === "Yellow"; }
1275− if (x.tag === "Blue") { return y.tag === "Blue"; }
1276− if (x.tag === "Magenta") { return y.tag === "Magenta"; }
1277− if (x.tag === "Cyan") { return y.tag === "Cyan"; }
1278− if (x.tag === "White") { return y.tag === "White"; }
1279− if (x.tag === "BrightBlack") { return y.tag === "BrightBlack"; }
1280− if (x.tag === "BrightRed") { return y.tag === "BrightRed"; }
1281− if (x.tag === "BrightGreen") { return y.tag === "BrightGreen"; }
1282− if (x.tag === "BrightYellow") { return y.tag === "BrightYellow"; }
1283− if (x.tag === "BrightBlue") { return y.tag === "BrightBlue"; }
1284− if (x.tag === "BrightMagenta") { return y.tag === "BrightMagenta"; }
1285− if (x.tag === "BrightCyan") { return y.tag === "BrightCyan"; }
1286− if (x.tag === "BrightWhite") { return y.tag === "BrightWhite"; }
1287− return false;
1288− }
1289−};
1290−const eqGraphicsParam = {
1291− eq: x => y => {
1292− if (x.tag === "Reset") { return y.tag === "Reset"; }
1293− if (x.tag === "PMode") {
1294− if (y.tag === "PMode") {
1295− if (x._1.tag === "Bold") { return y._1.tag === "Bold"; }
1296− if (x._1.tag === "Dim") { return y._1.tag === "Dim"; }
1297− if (x._1.tag === "Italic") { return y._1.tag === "Italic"; }
1298− if (x._1.tag === "Underline") { return y._1.tag === "Underline"; }
1299− if (x._1.tag === "Inverse") { return y._1.tag === "Inverse"; }
1300− if (x._1.tag === "Strikethrough") { return y._1.tag === "Strikethrough"; }
1301− return false;
1302− }
1303− return false;
1304− }
1305− if (x.tag === "PForeground") {
1306− if (y.tag === "PForeground") { return eqColor.eq(x._1)(y._1); }
1307− return false;
1308− }
1309− if (x.tag === "PBackground") {
1310− if (y.tag === "PBackground") { return eqColor.eq(x._1)(y._1); }
1311− return false;
1312− }
1313− return false;
1314− }
1315−};
1316−const eq4 = x => y => eqGraphicsParam.eq(x._1)(y._1) && (() => {
1317− const go = go$a0$copy => go$a1$copy => go$a2$copy => {
1318− let go$a0 = go$a0$copy, go$a1 = go$a1$copy, go$a2 = go$a2$copy, go$c = true, go$r;
1319− while (go$c) {
1320− const v = go$a0, v1 = go$a1, v2 = go$a2;
1321− if (!v2) {
1322− go$c = false;
1323− go$r = false;
1324− continue;
1325− }
1326− if (v.tag === "Nil") {
1327− if (v1.tag === "Nil") {
1328− go$c = false;
1329− go$r = v2;
1330− continue;
1331− }
1332− go$c = false;
1333− go$r = false;
1334− continue;
1335− }
1336− if (v.tag === "Cons") {
1337− if (v1.tag === "Cons") {
1338− go$a0 = v._2;
1339− go$a1 = v1._2;
1340− go$a2 = v2 && eqGraphicsParam.eq(v1._1)(v._1);
1341− continue;
1342− }
1343− go$c = false;
1344− go$r = false;
1345− continue;
1346− }
1347− go$c = false;
1348− go$r = false;
1349− continue;
1350− };
1351− return go$r;
1352− };
1353− return go(x._2)(y._2)(true);
1354−})();
1355−const eqEscapeCode = {
1356− eq: x => y => {
1357− if (x.tag === "Up") {
1358− if (y.tag === "Up") { return x._1 === y._1; }
1359− return false;
1360− }
1361− if (x.tag === "Down") {
1362− if (y.tag === "Down") { return x._1 === y._1; }
1363− return false;
1364− }
1365− if (x.tag === "Forward") {
1366− if (y.tag === "Forward") { return x._1 === y._1; }
1367− return false;
1368− }
1369− if (x.tag === "Back") {
1370− if (y.tag === "Back") { return x._1 === y._1; }
1371− return false;
1372− }
1373− if (x.tag === "NextLine") {
1374− if (y.tag === "NextLine") { return x._1 === y._1; }
1375− return false;
1376− }
1377− if (x.tag === "PreviousLine") {
1378− if (y.tag === "PreviousLine") { return x._1 === y._1; }
1379− return false;
1380− }
1381− if (x.tag === "HorizontalAbsolute") {
1382− if (y.tag === "HorizontalAbsolute") { return x._1 === y._1; }
1383− return false;
1384− }
1385− if (x.tag === "Position") {
1386− if (y.tag === "Position") { return x._1 === y._1 && x._2 === y._2; }
1387− return false;
1388− }
1389− if (x.tag === "EraseData") {
1390− if (y.tag === "EraseData") {
1391− if (x._1.tag === "ToEnd") { return y._1.tag === "ToEnd"; }
1392− if (x._1.tag === "FromBeginning") { return y._1.tag === "FromBeginning"; }
1393− if (x._1.tag === "Entire") { return y._1.tag === "Entire"; }
1394− return false;
1395− }
1396− return false;
1397− }
1398− if (x.tag === "EraseLine") {
1399− if (y.tag === "EraseLine") {
1400− if (x._1.tag === "ToEnd") { return y._1.tag === "ToEnd"; }
1401− if (x._1.tag === "FromBeginning") { return y._1.tag === "FromBeginning"; }
1402− if (x._1.tag === "Entire") { return y._1.tag === "Entire"; }
1403− return false;
1404− }
1405− return false;
1406− }
1407− if (x.tag === "ScrollUp") {
1408− if (y.tag === "ScrollUp") { return x._1 === y._1; }
1409− return false;
1410− }
1411− if (x.tag === "ScrollDown") {
1412− if (y.tag === "ScrollDown") { return x._1 === y._1; }
1413− return false;
1414− }
1415− if (x.tag === "Graphics") {
1416− if (y.tag === "Graphics") { return eq4(x._1)(y._1); }
1417− return false;
1418− }
1419− if (x.tag === "SavePosition") { return y.tag === "SavePosition"; }
1420− if (x.tag === "RestorePosition") { return y.tag === "RestorePosition"; }
1421− if (x.tag === "QueryPosition") { return y.tag === "QueryPosition"; }
1422− if (x.tag === "HideCursor") { return y.tag === "HideCursor"; }
1423− if (x.tag === "ShowCursor") { return y.tag === "ShowCursor"; }
1424− return false;
1425− }
1426−};
1427−const ordColor = {
1428− compare: x => y => {
1429− if (x.tag === "Black") {
1430− if (y.tag === "Black") { return Data$dOrdering.EQ; }
1431− return Data$dOrdering.LT;
1432− }
1433− if (y.tag === "Black") { return Data$dOrdering.GT; }
1434− if (x.tag === "Red") {
1435− if (y.tag === "Red") { return Data$dOrdering.EQ; }
1436− return Data$dOrdering.LT;
1437− }
1438− if (y.tag === "Red") { return Data$dOrdering.GT; }
1439− if (x.tag === "Green") {
1440− if (y.tag === "Green") { return Data$dOrdering.EQ; }
1441− return Data$dOrdering.LT;
1442− }
1443− if (y.tag === "Green") { return Data$dOrdering.GT; }
1444− if (x.tag === "Yellow") {
1445− if (y.tag === "Yellow") { return Data$dOrdering.EQ; }
1446− return Data$dOrdering.LT;
1447− }
1448− if (y.tag === "Yellow") { return Data$dOrdering.GT; }
1449− if (x.tag === "Blue") {
1450− if (y.tag === "Blue") { return Data$dOrdering.EQ; }
1451− return Data$dOrdering.LT;
1452− }
1453− if (y.tag === "Blue") { return Data$dOrdering.GT; }
1454− if (x.tag === "Magenta") {
1455− if (y.tag === "Magenta") { return Data$dOrdering.EQ; }
1456− return Data$dOrdering.LT;
1457− }
1458− if (y.tag === "Magenta") { return Data$dOrdering.GT; }
1459− if (x.tag === "Cyan") {
1460− if (y.tag === "Cyan") { return Data$dOrdering.EQ; }
1461− return Data$dOrdering.LT;
1462− }
1463− if (y.tag === "Cyan") { return Data$dOrdering.GT; }
1464− if (x.tag === "White") {
1465− if (y.tag === "White") { return Data$dOrdering.EQ; }
1466− return Data$dOrdering.LT;
1467− }
1468− if (y.tag === "White") { return Data$dOrdering.GT; }
1469− if (x.tag === "BrightBlack") {
1470− if (y.tag === "BrightBlack") { return Data$dOrdering.EQ; }
1471− return Data$dOrdering.LT;
1472− }
1473− if (y.tag === "BrightBlack") { return Data$dOrdering.GT; }
1474− if (x.tag === "BrightRed") {
1475− if (y.tag === "BrightRed") { return Data$dOrdering.EQ; }
1476− return Data$dOrdering.LT;
1477− }
1478− if (y.tag === "BrightRed") { return Data$dOrdering.GT; }
1479− if (x.tag === "BrightGreen") {
1480− if (y.tag === "BrightGreen") { return Data$dOrdering.EQ; }
1481− return Data$dOrdering.LT;
1482− }
1483− if (y.tag === "BrightGreen") { return Data$dOrdering.GT; }
1484− if (x.tag === "BrightYellow") {
1485− if (y.tag === "BrightYellow") { return Data$dOrdering.EQ; }
1486− return Data$dOrdering.LT;
1487− }
1488− if (y.tag === "BrightYellow") { return Data$dOrdering.GT; }
1489− if (x.tag === "BrightBlue") {
1490− if (y.tag === "BrightBlue") { return Data$dOrdering.EQ; }
1491− return Data$dOrdering.LT;
1492− }
1493− if (y.tag === "BrightBlue") { return Data$dOrdering.GT; }
1494− if (x.tag === "BrightMagenta") {
1495− if (y.tag === "BrightMagenta") { return Data$dOrdering.EQ; }
1496− return Data$dOrdering.LT;
1497− }
1498− if (y.tag === "BrightMagenta") { return Data$dOrdering.GT; }
1499− if (x.tag === "BrightCyan") {
1500− if (y.tag === "BrightCyan") { return Data$dOrdering.EQ; }
1501− return Data$dOrdering.LT;
1502− }
1503− if (y.tag === "BrightCyan") { return Data$dOrdering.GT; }
1504− if (x.tag === "BrightWhite") {
1505− if (y.tag === "BrightWhite") { return Data$dOrdering.EQ; }
1506− $runtime.fail();
1507− }
1508− $runtime.fail();
1509− },
1510− Eq0: () => eqColor
1511−};
1512−const ordGraphicsParam = {
1513− compare: x => y => {
1514− if (x.tag === "Reset") {
1515− if (y.tag === "Reset") { return Data$dOrdering.EQ; }
1516− return Data$dOrdering.LT;
1517− }
1518− if (y.tag === "Reset") { return Data$dOrdering.GT; }
1519− if (x.tag === "PMode") {
1520− if (y.tag === "PMode") { return ordRenderingMode.compare(x._1)(y._1); }
1521− return Data$dOrdering.LT;
1522− }
1523− if (y.tag === "PMode") { return Data$dOrdering.GT; }
1524− if (x.tag === "PForeground") {
1525− if (y.tag === "PForeground") { return ordColor.compare(x._1)(y._1); }
1526− return Data$dOrdering.LT;
1527− }
1528− if (y.tag === "PForeground") { return Data$dOrdering.GT; }
1529− if (x.tag === "PBackground") {
1530− if (y.tag === "PBackground") { return ordColor.compare(x._1)(y._1); }
1531− $runtime.fail();
1532− }
1533− $runtime.fail();
1534− },
1535− Eq0: () => eqGraphicsParam
1536−};
1537−const compare4 = /* #__PURE__ */ (() => Data$dList$dTypes.ordNonEmpty(ordGraphicsParam).compare)();
1538−const ordEscapeCode = {
1539− compare: x => y => {
1540− if (x.tag === "Up") {
1541− if (y.tag === "Up") { return Data$dOrd.ordInt.compare(x._1)(y._1); }
1542− return Data$dOrdering.LT;
1543− }
1544− if (y.tag === "Up") { return Data$dOrdering.GT; }
1545− if (x.tag === "Down") {
1546− if (y.tag === "Down") { return Data$dOrd.ordInt.compare(x._1)(y._1); }
1547− return Data$dOrdering.LT;
1548− }
1549− if (y.tag === "Down") { return Data$dOrdering.GT; }
1550− if (x.tag === "Forward") {
1551− if (y.tag === "Forward") { return Data$dOrd.ordInt.compare(x._1)(y._1); }
1552− return Data$dOrdering.LT;
1553− }
1554− if (y.tag === "Forward") { return Data$dOrdering.GT; }
1555− if (x.tag === "Back") {
1556− if (y.tag === "Back") { return Data$dOrd.ordInt.compare(x._1)(y._1); }
1557− return Data$dOrdering.LT;
1558− }
1559− if (y.tag === "Back") { return Data$dOrdering.GT; }
1560− if (x.tag === "NextLine") {
1561− if (y.tag === "NextLine") { return Data$dOrd.ordInt.compare(x._1)(y._1); }
1562− return Data$dOrdering.LT;
1563− }
1564− if (y.tag === "NextLine") { return Data$dOrdering.GT; }
1565− if (x.tag === "PreviousLine") {
1566− if (y.tag === "PreviousLine") { return Data$dOrd.ordInt.compare(x._1)(y._1); }
1567− return Data$dOrdering.LT;
1568− }
1569− if (y.tag === "PreviousLine") { return Data$dOrdering.GT; }
1570− if (x.tag === "HorizontalAbsolute") {
1571− if (y.tag === "HorizontalAbsolute") { return Data$dOrd.ordInt.compare(x._1)(y._1); }
1572− return Data$dOrdering.LT;
1573− }
1574− if (y.tag === "HorizontalAbsolute") { return Data$dOrdering.GT; }
1575− if (x.tag === "Position") {
1576− if (y.tag === "Position") {
1577− const v = Data$dOrd.ordInt.compare(x._1)(y._1);
1578− if (v.tag === "LT") { return Data$dOrdering.LT; }
1579− if (v.tag === "GT") { return Data$dOrdering.GT; }
1580− return Data$dOrd.ordInt.compare(x._2)(y._2);
1581− }
1582− return Data$dOrdering.LT;
1583− }
1584− if (y.tag === "Position") { return Data$dOrdering.GT; }
1585− if (x.tag === "EraseData") {
1586− if (y.tag === "EraseData") { return ordEraseParam.compare(x._1)(y._1); }
1587− return Data$dOrdering.LT;
1588− }
1589− if (y.tag === "EraseData") { return Data$dOrdering.GT; }
1590− if (x.tag === "EraseLine") {
1591− if (y.tag === "EraseLine") { return ordEraseParam.compare(x._1)(y._1); }
1592− return Data$dOrdering.LT;
1593− }
1594− if (y.tag === "EraseLine") { return Data$dOrdering.GT; }
1595− if (x.tag === "ScrollUp") {
1596− if (y.tag === "ScrollUp") { return Data$dOrd.ordInt.compare(x._1)(y._1); }
1597− return Data$dOrdering.LT;
1598− }
1599− if (y.tag === "ScrollUp") { return Data$dOrdering.GT; }
1600− if (x.tag === "ScrollDown") {
1601− if (y.tag === "ScrollDown") { return Data$dOrd.ordInt.compare(x._1)(y._1); }
1602− return Data$dOrdering.LT;
1603− }
1604− if (y.tag === "ScrollDown") { return Data$dOrdering.GT; }
1605− if (x.tag === "Graphics") {
1606− if (y.tag === "Graphics") { return compare4(x._1)(y._1); }
1607− return Data$dOrdering.LT;
1608− }
1609− if (y.tag === "Graphics") { return Data$dOrdering.GT; }
1610− if (x.tag === "SavePosition") {
1611− if (y.tag === "SavePosition") { return Data$dOrdering.EQ; }
1612− return Data$dOrdering.LT;
1613− }
1614− if (y.tag === "SavePosition") { return Data$dOrdering.GT; }
1615− if (x.tag === "RestorePosition") {
1616− if (y.tag === "RestorePosition") { return Data$dOrdering.EQ; }
1617− return Data$dOrdering.LT;
1618− }
1619− if (y.tag === "RestorePosition") { return Data$dOrdering.GT; }
1620− if (x.tag === "QueryPosition") {
1621− if (y.tag === "QueryPosition") { return Data$dOrdering.EQ; }
1622− return Data$dOrdering.LT;
1623− }
1624− if (y.tag === "QueryPosition") { return Data$dOrdering.GT; }
1625− if (x.tag === "HideCursor") {
1626− if (y.tag === "HideCursor") { return Data$dOrdering.EQ; }
1627− return Data$dOrdering.LT;
1628− }
1629− if (y.tag === "HideCursor") { return Data$dOrdering.GT; }
1630− if (x.tag === "ShowCursor") {
1631− if (y.tag === "ShowCursor") { return Data$dOrdering.EQ; }
1632− $runtime.fail();
1633− }
1634− $runtime.fail();
1635− },
1636− Eq0: () => eqEscapeCode
1637−};
1638−const colorSuffix = "m";
1639−const colorCode = c => {
1640− if (c.tag === "Black") { return 30; }
1641− if (c.tag === "Red") { return 31; }
1642− if (c.tag === "Green") { return 32; }
1643− if (c.tag === "Yellow") { return 33; }
1644− if (c.tag === "Blue") { return 34; }
1645− if (c.tag === "Magenta") { return 35; }
1646− if (c.tag === "Cyan") { return 36; }
1647− if (c.tag === "White") { return 37; }
1648− if (c.tag === "BrightBlack") { return 90; }
1649− if (c.tag === "BrightRed") { return 91; }
1650− if (c.tag === "BrightGreen") { return 92; }
1651− if (c.tag === "BrightYellow") { return 93; }
1652− if (c.tag === "BrightBlue") { return 94; }
1653− if (c.tag === "BrightMagenta") { return 95; }
1654− if (c.tag === "BrightCyan") { return 96; }
1655− if (c.tag === "BrightWhite") { return 97; }
1656− $runtime.fail();
1657−};
1658−const codeForRenderingMode = m => {
1659− if (m.tag === "Bold") { return 1; }
1660− if (m.tag === "Dim") { return 2; }
1661− if (m.tag === "Italic") { return 3; }
1662− if (m.tag === "Underline") { return 4; }
1663− if (m.tag === "Inverse") { return 7; }
1664− if (m.tag === "Strikethrough") { return 9; }
1665− $runtime.fail();
1666−};
1667−const graphicsParamToString = gp => {
1668− if (gp.tag === "Reset") { return "0"; }
1669− if (gp.tag === "PMode") {
1670− return Data$dShow.showIntImpl((() => {
1671− if (gp._1.tag === "Bold") { return 1; }
1672− if (gp._1.tag === "Dim") { return 2; }
1673− if (gp._1.tag === "Italic") { return 3; }
1674− if (gp._1.tag === "Underline") { return 4; }
1675− if (gp._1.tag === "Inverse") { return 7; }
1676− if (gp._1.tag === "Strikethrough") { return 9; }
1677− $runtime.fail();
1678− })());
1679− }
1680− if (gp.tag === "PForeground") {
1681− return Data$dShow.showIntImpl((() => {
1682− if (gp._1.tag === "Black") { return 30; }
1683− if (gp._1.tag === "Red") { return 31; }
1684− if (gp._1.tag === "Green") { return 32; }
1685− if (gp._1.tag === "Yellow") { return 33; }
1686− if (gp._1.tag === "Blue") { return 34; }
1687− if (gp._1.tag === "Magenta") { return 35; }
1688− if (gp._1.tag === "Cyan") { return 36; }
1689− if (gp._1.tag === "White") { return 37; }
1690− if (gp._1.tag === "BrightBlack") { return 90; }
1691− if (gp._1.tag === "BrightRed") { return 91; }
1692− if (gp._1.tag === "BrightGreen") { return 92; }
1693− if (gp._1.tag === "BrightYellow") { return 93; }
1694− if (gp._1.tag === "BrightBlue") { return 94; }
1695− if (gp._1.tag === "BrightMagenta") { return 95; }
1696− if (gp._1.tag === "BrightCyan") { return 96; }
1697− if (gp._1.tag === "BrightWhite") { return 97; }
1698− $runtime.fail();
1699− })());
1700− }
1701− if (gp.tag === "PBackground") {
1702− return Data$dShow.showIntImpl((() => {
1703− if (gp._1.tag === "Black") { return 40; }
1704− if (gp._1.tag === "Red") { return 41; }
1705− if (gp._1.tag === "Green") { return 42; }
1706− if (gp._1.tag === "Yellow") { return 43; }
1707− if (gp._1.tag === "Blue") { return 44; }
1708− if (gp._1.tag === "Magenta") { return 45; }
1709− if (gp._1.tag === "Cyan") { return 46; }
1710− if (gp._1.tag === "White") { return 47; }
1711− if (gp._1.tag === "BrightBlack") { return 100; }
1712− if (gp._1.tag === "BrightRed") { return 101; }
1713− if (gp._1.tag === "BrightGreen") { return 102; }
1714− if (gp._1.tag === "BrightYellow") { return 103; }
1715− if (gp._1.tag === "BrightBlue") { return 104; }
1716− if (gp._1.tag === "BrightMagenta") { return 105; }
1717− if (gp._1.tag === "BrightCyan") { return 106; }
1718− if (gp._1.tag === "BrightWhite") { return 107; }
1719− $runtime.fail();
1720− })());
1721− }
1722− $runtime.fail();
1723−};
1724−const escapeCodeToString = x => {
1725− if (x.tag === "Up") { return "\u001b[" + (Data$dShow.showIntImpl(x._1) + "A"); }
1726− if (x.tag === "Down") { return "\u001b[" + (Data$dShow.showIntImpl(x._1) + "B"); }
1727− if (x.tag === "Forward") { return "\u001b[" + (Data$dShow.showIntImpl(x._1) + "C"); }
1728− if (x.tag === "Back") { return "\u001b[" + (Data$dShow.showIntImpl(x._1) + "D"); }
1729− if (x.tag === "NextLine") { return "\u001b[" + (Data$dShow.showIntImpl(x._1) + "E"); }
1730− if (x.tag === "PreviousLine") { return "\u001b[" + (Data$dShow.showIntImpl(x._1) + "F"); }
1731− if (x.tag === "HorizontalAbsolute") { return "\u001b[" + (Data$dShow.showIntImpl(x._1) + "G"); }
1732− if (x.tag === "Position") { return "\u001b[" + (Data$dShow.showIntImpl(x._1) + (";" + (Data$dShow.showIntImpl(x._2) + "H"))); }
1733− if (x.tag === "EraseData") {
1734− if (x._1.tag === "ToEnd") { return "\u001b[0J"; }
1735− if (x._1.tag === "FromBeginning") { return "\u001b[1J"; }
1736− if (x._1.tag === "Entire") { return "\u001b[2J"; }
1737− $runtime.fail();
1738− }
1739− if (x.tag === "EraseLine") {
1740− if (x._1.tag === "ToEnd") { return "\u001b[0K"; }
1741− if (x._1.tag === "FromBeginning") { return "\u001b[1K"; }
1742− if (x._1.tag === "Entire") { return "\u001b[2K"; }
1743− $runtime.fail();
1744− }
1745− if (x.tag === "ScrollUp") { return "\u001b[" + (Data$dShow.showIntImpl(x._1) + "S"); }
1746− if (x.tag === "ScrollDown") { return "\u001b[" + (Data$dShow.showIntImpl(x._1) + "T"); }
1747− if (x.tag === "Graphics") {
1748− const $1 = Data$dList$dTypes.functorNonEmptyList.map(graphicsParamToString)(x._1);
1749− const go = go$a0$copy => go$a1$copy => {
1750− let go$a0 = go$a0$copy, go$a1 = go$a1$copy, go$c = true, go$r;
1751− while (go$c) {
1752− const b = go$a0, v = go$a1;
1753− if (v.tag === "Nil") {
1754− go$c = false;
1755− go$r = b;
1756− continue;
1757− }
1758− if (v.tag === "Cons") {
1759− go$a0 = (() => {
1760− if (b.init) { return {init: false, acc: v._1}; }
1761− return {init: false, acc: b.acc + (";" + v._1)};
1762− })();
1763− go$a1 = v._2;
1764− continue;
1765− }
1766− $runtime.fail();
1767− };
1768− return go$r;
1769− };
1770− return "\u001b[" + (go({init: false, acc: $1._1})($1._2).acc + "m");
1771− }
1772− if (x.tag === "SavePosition") { return "\u001b[s"; }
1773− if (x.tag === "RestorePosition") { return "\u001b[u"; }
1774− if (x.tag === "QueryPosition") { return "\u001b[6n"; }
1775− if (x.tag === "HideCursor") { return "\u001b[?25l"; }
1776− if (x.tag === "ShowCursor") { return "\u001b[?25h"; }
1777− $runtime.fail();
1778−};
1779−export {
1780− $Color,
1781− $EraseParam,
1782− $EscapeCode,
1783− $GraphicsParam,
1784− $RenderingMode,
1785− Back,
1786− Black,
1787− Blue,
1788− Bold,
1789− BrightBlack,
1790− BrightBlue,
1791− BrightCyan,
1792− BrightGreen,
1793− BrightMagenta,
1794− BrightRed,
1795− BrightWhite,
1796− BrightYellow,
1797− Cyan,
1798− Dim,
1799− Down,
1800− Entire,
1801− EraseData,
1802− EraseLine,
1803− Forward,
1804− FromBeginning,
1805− Graphics,
1806− Green,
1807− HideCursor,
1808− HorizontalAbsolute,
1809− Inverse,
1810− Italic,
1811− Magenta,
1812− NextLine,
1813− PBackground,
1814− PForeground,
1815− PMode,
1816− Position,
1817− PreviousLine,
1818− QueryPosition,
1819− Red,
1820− Reset,
1821− RestorePosition,
1822− SavePosition,
1823− ScrollDown,
1824− ScrollUp,
1825− ShowCursor,
1826− Strikethrough,
1827− ToEnd,
1828− Underline,
1829− Up,
1830− White,
1831− Yellow,
1832− codeForRenderingMode,
1833− colorCode,
1834− colorSuffix,
1835− compare4,
1836− eq4,
1837− eqColor,
1838− eqEraseParam,
1839− eqEscapeCode,
1840− eqGraphicsParam,
1841− eqRenderingMode,
1842− eraseParamToString,
1843− escapeCodeToString,
1844− genericColor,
1845− genericEraseParam,
1846− genericEscapeCode,
1847− genericGraphicsParam,
1848− genericRenderingMode,
1849− genericShowArgsArgument,
1850− graphicsParamToString,
1851− ordColor,
1852− ordEraseParam,
1853− ordEscapeCode,
1854− ordGraphicsParam,
1855− ordRenderingMode,
1856− prefix,
1857− showColor,
1858− showEraseParam,
1859− showEscapeCode,
1860− showGraphicsParam,
1861− showRenderingMode
1862−};