tobogganSe connecter

louise

The Louise language: compiler, runtime, std, tooling

Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.

2167 lignes · 37615 octetsBrut · Historique
1/// The prelude: visible in every module without an import.
2///
3/// Operators are trait methods: `==` `!=` use `Eq`, `<` `>` `<=` `>=` use
4/// `Ord`, `+` `-` `*` `/` `%` and unary `-` use `Num`, `<>` uses
5/// `Semigroup` (Strings, Lists, Bytes, Order). `&&`, `||` and `!` work on
6/// Bool.
7
8/// A signed integer of any size: a 63-bit word, promoted to a big
9/// integer when a result does not fit (arithmetic never overflows).
10@builtin
11pub type Int
12
13/// A 64-bit IEEE float.
14@builtin
15pub type Float
16
17/// Immutable UTF-8 text.
18@builtin
19pub type String
20
21/// Immutable binary data (see std/bytes).
22@builtin
23pub type Bytes
24
25/// Built-in effects, handled by the runtime around `main`, tests and
26/// actors. `io`: input/output. `ffi`: foreign calls. The others with it
27/// are `proc` (std/process), `clock` (std/time) and `random` (std/random).
28/// (Mutable state is `st<h>`, handled by `region { }`: see std/ref.)
29pub effect io {}
30pub effect ffi {}
31
32/// The compiler's, for an early `return` from inside a `use` callback or a
33/// `defer`, `handle` or `region` body (ADR 0037): the function handles it
34/// around that construct, and leaves with the value. Private: no program
35/// can name it.
36effect early_return<a>
37{
38 final ctl early_return :: value: a -> Never
39}
40
41pub type Bool { False, True }
42
43pub type List<a> { Nil, Cons(a, List<a>) }
44
45pub type Option<a> { None, Some(a) }
46
47pub type Result<a, e> { Ok(a), Error(e) }
48
49/// The type with no values: the result of computations that never return.
50pub type Never
51
52pub type Order { Lt, Eq, Gt }
53
54/// Stop the program (or the current actor) with a message. Panics are not
55/// tracked in effect rows (ADR 0001); use `Result` or an effect for errors
56/// a caller should handle.
57@extern c "tl_panic"
58pub fn panic :: message: String -> Never
59
60/// Derivable. Derived equality compares constructors, then fields in
61/// order, and stops at the first difference.
62@derivable
63pub trait Eq<a>
64{
65 fn eq :: x: a y: a -> Bool
66}
67
68/// Derivable. Derived order compares constructors in declaration order,
69/// then fields lexicographically.
70@derivable
71pub trait Ord<a>
72{
73 fn compare :: x: a y: a -> Order
74}
75
76pub trait Num<a>
77{
78 fn add :: x: a y: a -> a
79 fn sub :: x: a y: a -> a
80 fn mul :: x: a y: a -> a
81 fn div :: x: a y: a -> a
82 fn rem :: x: a y: a -> a
83 fn negate :: x: a -> a
84}
85
86/// `<>`: one value followed by another of the same type (ADR 0027).
87/// Strings, lists and `Bytes` are joined in order (`[1] <> [2, 3]` is
88/// `[1, 2, 3]`). On `Order`, `<>` breaks ties: the first that is not `Eq`,
89/// so `compare(a.last, b.last) <> compare(a.first, b.first)` sorts by last
90/// name, then first name.
91pub trait Semigroup<a>
92{
93 fn append :: x: a y: a -> a
94}
95
96/// Derivable: `Name` or `Name(field, ...)`.
97@derivable show_constructor
98pub trait Show<a>
99{
100 fn show :: x: a -> String
101}
102
103/// A programmer-facing representation, like Rust's `Debug`: strings are
104/// quoted and escaped, records show their field names. Derivable.
105/// (`Show` is for text meant for users, like Rust's `Display`.)
106@derivable debug_constructor
107pub trait Debug<a>
108{
109 fn debug :: x: a -> String
110}
111
112/// Hash values, e.g. for dictionary keys. Derivable: the constructor's
113/// index mixed with every field's hash, with `hash_combine`.
114@derivable
115pub trait Hash<a>
116{
117 fn hash :: x: a -> Int
118}
119
120/// A default value. Derivable for single-constructor types.
121@derivable
122pub trait Default<a>
123{
124 fn default :: -> a
125}
126
127/// Values that can be sent to another actor (ADR 0004, Revision 6). The
128/// compiler decides it from the type's structure: a `Ref` never is, a
129/// `Resource<k>` is when `k` is `@thread_safe`, and a type is when all its
130/// fields are. It cannot be implemented, and costs nothing at run time.
131pub trait Send<a> {}
132
133/// Values that can cross hosts, to an actor on another node (ADR 0072).
134/// The compiler decides it from the type's structure, like `Send`: the
135/// built-in values (`Int`, `String`, `Bytes`, `Pid`, `Array<a>`, ...),
136/// tuples, a `Subject<m>` when `m` is, and a type whose fields are. Never
137/// a function, a `Ref`, a `Resource`, a `Dynamic`, or a type whose
138/// constructor hides or refines a type (ADR 0041). `Wire<a>` implies
139/// `Send<a>`. It cannot be implemented; its dictionary describes the
140/// type.
141pub trait Wire<a> {}
142
143/// The label of a function type's capture row that says it may capture
144/// what cannot be sent (ADR 0004, Revision 6): written `fn` in a type's
145/// field, or a closure that captured a `Ref`. Used by the compiler only.
146type LocalCapture { LocalCapture }
147
148/// A value seen through its constructor, for derived impls (ADR 0019):
149/// the constructor's name, its index in its type's declaration, and one
150/// field for each of its fields, in order. A trait marked
151/// `@derivable(f)` derives its method `m` as `f(Constructor(..., fields))`,
152/// where each field's value is `m` applied to that field.
153pub type Constructor<r>
154{ Constructor(name: String, index: Int, fields: List<Field<r>>) }
155
156/// A field's label (`""` for a positional field) and its value.
157pub type Field<r> { Field(label: String, value: r) }
158
159fn show_constructor :: c: Constructor<String> -> String
160{
161 match c.fields
162 { [] -> c.name, fields -> c.name <> "(" <> join_fields fields False <> ")" }
163}
164
165/// Labelled fields as `Name { label: value, ... }`, as Rust does.
166fn debug_constructor :: c: Constructor<String> -> String
167{
168 match c.fields
169 { [] -> c.name
170 , fields if all_labelled fields ->
171 c.name <> " \{ " <> join_fields fields True <> " \}"
172 , fields -> c.name <> "(" <> join_fields fields False <> ")"
173 }
174}
175
176fn join_fields :: fields: List<Field<String>> labelled: Bool -> String
177{
178 match fields
179 { [] -> ""
180 , [f] -> field_text f labelled
181 , [f, ..rest] -> field_text f labelled <> ", " <> join_fields rest labelled
182 }
183}
184
185fn field_text :: f: Field<String> labelled: Bool -> String
186{
187 if labelled
188 {
189 f.label <> ": " <> f.value
190 }
191 else
192 {
193 f.value
194 }
195}
196
197fn all_labelled :: fields: List<Field<String>> -> Bool
198{
199 match fields { [] -> True, [f, ..rest] -> f.label != "" && all_labelled rest }
200}
201
202@extern c "tl_int_eq"
203fn int_eq :: x: Int y: Int -> Bool
204@extern c "tl_int_compare"
205fn int_compare :: x: Int y: Int -> Order
206@extern c "tl_int_add"
207fn int_add :: x: Int y: Int -> Int
208@extern c "tl_int_sub"
209fn int_sub :: x: Int y: Int -> Int
210@extern c "tl_int_mul"
211fn int_mul :: x: Int y: Int -> Int
212@extern c "tl_int_div"
213fn int_div :: x: Int y: Int -> Int
214@extern c "tl_int_rem"
215fn int_rem :: x: Int y: Int -> Int
216@extern c "tl_int_show"
217fn int_show :: x: Int -> String
218
219@extern c "tl_float_eq"
220fn float_eq :: x: Float y: Float -> Bool
221@extern c "tl_float_compare"
222fn float_compare :: x: Float y: Float -> Order
223@extern c "tl_float_add"
224fn float_add :: x: Float y: Float -> Float
225@extern c "tl_float_sub"
226fn float_sub :: x: Float y: Float -> Float
227@extern c "tl_float_mul"
228fn float_mul :: x: Float y: Float -> Float
229@extern c "tl_float_div"
230fn float_div :: x: Float y: Float -> Float
231@extern c "tl_float_rem"
232fn float_rem :: x: Float y: Float -> Float
233@extern c "tl_float_show"
234fn float_show :: x: Float -> String
235
236@extern c "tl_string_eq"
237fn string_eq :: x: String y: String -> Bool
238@extern c "tl_string_compare"
239fn string_compare :: x: String y: String -> Order
240
241@extern c "tl_string_concat"
242fn string_concat :: x: String y: String -> String
243@extern c "tl_bytes_concat"
244fn bytes_concat :: x: Bytes y: Bytes -> Bytes
245
246impl Semigroup<String>
247{
248 fn append :: x y
249 {
250 string_concat x y
251 }
252}
253
254/// Copies `xs`, unless it is unique: then its cells are reused.
255impl Semigroup<List<a>>
256{
257 fn append :: xs ys
258 {
259 append_lists xs ys
260 }
261}
262
263fn append_lists :: xs ys
264{
265 match xs { [] -> ys, [x, ..rest] -> [x, ..append_lists rest ys] }
266}
267
268impl Semigroup<Bytes>
269{
270 fn append :: x y
271 {
272 bytes_concat x y
273 }
274}
275
276impl Semigroup<Order>
277{
278 fn append :: x y
279 {
280 match x { Eq -> y, first -> first }
281 }
282}
283
284impl Eq<Int>
285{
286 fn eq :: x y
287 {
288 int_eq x y
289 }
290}
291
292impl Ord<Int>
293{
294 fn compare :: x y
295 {
296 int_compare x y
297 }
298}
299
300impl Num<Int>
301{
302 fn add :: x y
303 {
304 int_add x y
305 }
306 fn sub :: x y
307 {
308 int_sub x y
309 }
310 fn mul :: x y
311 {
312 int_mul x y
313 }
314 fn div :: x y
315 {
316 int_div x y
317 }
318 fn rem :: x y
319 {
320 int_rem x y
321 }
322 fn negate :: x
323 {
324 int_sub 0 x
325 }
326}
327
328impl Show<Int>
329{
330 fn show :: x
331 {
332 int_show x
333 }
334}
335
336impl Eq<Float>
337{
338 fn eq :: x y
339 {
340 float_eq x y
341 }
342}
343
344impl Ord<Float>
345{
346 fn compare :: x y
347 {
348 float_compare x y
349 }
350}
351
352impl Num<Float>
353{
354 fn add :: x y
355 {
356 float_add x y
357 }
358 fn sub :: x y
359 {
360 float_sub x y
361 }
362 fn mul :: x y
363 {
364 float_mul x y
365 }
366 fn div :: x y
367 {
368 float_div x y
369 }
370 fn rem :: x y
371 {
372 float_rem x y
373 }
374 fn negate :: x
375 {
376 float_sub 0.0 x
377 }
378}
379
380impl Show<Float>
381{
382 fn show :: x
383 {
384 float_show x
385 }
386}
387
388impl Eq<String>
389{
390 fn eq :: x y
391 {
392 string_eq x y
393 }
394}
395
396impl Ord<String>
397{
398 fn compare :: x y
399 {
400 string_compare x y
401 }
402}
403
404impl Show<String>
405{
406 fn show :: x
407 {
408 x
409 }
410}
411
412@extern c "tl_bytes_eq"
413fn bytes_eq :: x: Bytes y: Bytes -> Bool
414@extern c "tl_bytes_compare"
415fn bytes_compare :: x: Bytes y: Bytes -> Order
416
417impl Eq<Bytes>
418{
419 fn eq :: x y
420 {
421 bytes_eq x y
422 }
423}
424
425/// Lexicographic, byte by byte: a prefix is smaller.
426impl Ord<Bytes>
427{
428 fn compare :: x y
429 {
430 bytes_compare x y
431 }
432}
433
434impl Eq<Bool>
435{
436 fn eq :: x y
437 {
438 match (x, y) { (True, True) | (False, False) -> True, _ -> False }
439 }
440}
441
442impl Show<Bool>
443{
444 fn show :: x
445 {
446 if x
447 {
448 "True"
449 }
450 else
451 {
452 "False"
453 }
454 }
455}
456
457impl Eq<List<a>> where Eq<a>
458{
459 fn eq :: xs ys
460 {
461 match (xs, ys)
462 { (Nil, Nil) -> True
463 , (Cons(x, xs), Cons(y, ys)) -> x == y && xs == ys
464 , _ -> False
465 }
466 }
467}
468
469impl Eq<Option<a>> where Eq<a>
470{
471 fn eq :: x y
472 {
473 match (x, y)
474 { (None, None) -> True, (Some(a), Some(b)) -> a == b, _ -> False }
475 }
476}
477
478impl Show<List<a>> where Show<a>
479{
480 fn show :: xs
481 {
482 "[" <> show_items xs <> "]"
483 }
484}
485
486fn show_items :: xs
487{
488 match xs
489 { [] -> "", [x] -> show x, [x, ..rest] -> show x <> ", " <> show_items rest }
490}
491
492impl Show<Option<a>> where Show<a>
493{
494 fn show :: o
495 {
496 match o { Some(x) -> "Some(" <> show x <> ")", None -> "None" }
497 }
498}
499
500@extern c "tl_hash_int"
501fn hash_int :: x: Int -> Int
502@extern c "tl_hash_float"
503fn hash_float :: x: Float -> Int
504@extern c "tl_hash_string"
505fn hash_string :: x: String -> Int
506@extern c "tl_hash_bytes"
507fn hash_bytes :: x: Bytes -> Int
508
509/// Mix two hashes (what derived `Hash` uses for fields).
510@extern c "tl_hash_combine"
511pub fn hash_combine :: a: Int b: Int -> Int
512
513impl Hash<Int>
514{
515 fn hash :: x
516 {
517 hash_int x
518 }
519}
520
521impl Hash<Float>
522{
523 fn hash :: x
524 {
525 hash_float x
526 }
527}
528
529impl Hash<String>
530{
531 fn hash :: x
532 {
533 hash_string x
534 }
535}
536
537impl Hash<Bytes>
538{
539 fn hash :: x
540 {
541 hash_bytes x
542 }
543}
544
545impl Hash<Bool>
546{
547 fn hash :: x
548 {
549 if x
550 {
551 1
552 }
553 else
554 {
555 0
556 }
557 }
558}
559
560impl Hash<List<a>> where Hash<a>
561{
562 fn hash :: xs
563 {
564 hash_items xs 7
565 }
566}
567
568fn hash_items :: xs acc
569{
570 match xs
571 { [] -> acc, [x, ..rest] -> hash_items rest (hash_combine acc (hash x)) }
572}
573
574impl Hash<Option<a>> where Hash<a>
575{
576 fn hash :: o
577 {
578 match o { None -> 0, Some(x) -> hash_combine 1 (hash x) }
579 }
580}
581
582impl Default<Int>
583{
584 fn default ::
585 {
586 0
587 }
588}
589
590impl Default<Float>
591{
592 fn default ::
593 {
594 0.0
595 }
596}
597
598impl Default<String>
599{
600 fn default ::
601 {
602 ""
603 }
604}
605
606impl Default<Bool>
607{
608 fn default ::
609 {
610 False
611 }
612}
613
614impl Default<List<a>>
615{
616 fn default ::
617 {
618 []
619 }
620}
621
622impl Default<Option<a>>
623{
624 fn default ::
625 {
626 None
627 }
628}
629
630impl Ord<Bool>
631{
632 fn compare :: x y
633 {
634 match (x, y) { (False, True) -> Lt, (True, False) -> Gt, _ -> Eq }
635 }
636}
637
638/// Lexicographic, as in Rust: a prefix is smaller.
639impl Ord<List<a>> where Ord<a>
640{
641 fn compare :: xs ys
642 {
643 match (xs, ys)
644 { ([], []) -> Eq
645 , ([], _) -> Lt
646 , (_, []) -> Gt
647 , ([x, ..xs], [y, ..ys]) -> match compare x y
648 { Eq -> compare xs ys, other -> other }
649 }
650 }
651}
652
653/// `None` is smaller than any `Some`.
654impl Ord<Option<a>> where Ord<a>
655{
656 fn compare :: x y
657 {
658 match (x, y)
659 { (None, None) -> Eq
660 , (None, Some(_)) -> Lt
661 , (Some(_), None) -> Gt
662 , (Some(a), Some(b)) -> compare a b
663 }
664 }
665}
666
667@extern c "tl_string_debug"
668fn string_debug :: x: String -> String
669
670impl Debug<Int>
671{
672 fn debug :: x
673 {
674 show x
675 }
676}
677
678impl Debug<Float>
679{
680 fn debug :: x
681 {
682 show x
683 }
684}
685
686impl Debug<Bool>
687{
688 fn debug :: x
689 {
690 show x
691 }
692}
693
694impl Debug<String>
695{
696 fn debug :: x
697 {
698 string_debug x
699 }
700}
701
702@extern c "tl_bytes_debug"
703fn bytes_debug :: x: Bytes -> String
704
705/// `b"..."`: printable ASCII as is, other bytes escaped (`\xff`).
706impl Debug<Bytes>
707{
708 fn debug :: x
709 {
710 bytes_debug x
711 }
712}
713
714impl Debug<List<a>> where Debug<a>
715{
716 fn debug :: xs
717 {
718 "[" <> debug_items xs <> "]"
719 }
720}
721
722fn debug_items :: xs
723{
724 match xs
725 { [] -> ""
726 , [x] -> debug x
727 , [x, ..rest] -> debug x <> ", " <> debug_items rest
728 }
729}
730
731impl Debug<Option<a>> where Debug<a>
732{
733 fn debug :: o
734 {
735 match o { Some(x) -> "Some(" <> debug x <> ")", None -> "None" }
736 }
737}
738
739impl Eq<Result<a, e>> where Eq<a>, Eq<e>
740{
741 fn eq :: x y
742 {
743 match (x, y)
744 { (Ok(a), Ok(b)) -> a == b, (Error(a), Error(b)) -> a == b, _ -> False }
745 }
746}
747
748impl Show<Result<a, e>> where Show<a>, Show<e>
749{
750 fn show :: r
751 {
752 match r
753 { Ok(x) -> "Ok(" <> show x <> ")", Error(x) -> "Error(" <> show x <> ")" }
754 }
755}
756
757impl Debug<Result<a, e>> where Debug<a>, Debug<e>
758{
759 fn debug :: r
760 {
761 match r
762 { Ok(x) -> "Ok(" <> debug x <> ")", Error(x) -> "Error(" <> debug x <> ")" }
763 }
764}
765
766/// `Ok` is smaller than any `Error` (declaration order, as derived).
767impl Ord<Result<a, e>> where Ord<a>, Ord<e>
768{
769 fn compare :: x y
770 {
771 match (x, y)
772 { (Ok(a), Ok(b)) -> compare a b
773 , (Ok(_), Error(_)) -> Lt
774 , (Error(_), Ok(_)) -> Gt
775 , (Error(a), Error(b)) -> compare a b
776 }
777 }
778}
779
780impl Hash<Result<a, e>> where Hash<a>, Hash<e>
781{
782 fn hash :: r
783 {
784 match r
785 { Ok(x) -> hash_combine 0 (hash x), Error(x) -> hash_combine 1 (hash x) }
786 }
787}
788
789// --- `()` and tuples: generated by scripts/gen-tuple-impls.py, do not edit ---
790// Tuples compare element by element, in order; they show as `(1, a)`
791// and debug as `(1, "a")`. A tuple's hash folds its elements' with
792// `hash_combine`, as a derived impl does.
793
794impl Eq<()>
795{
796 fn eq :: _ _
797 {
798 True
799 }
800}
801
802impl Ord<()>
803{
804 fn compare :: _ _
805 {
806 Eq
807 }
808}
809
810impl Show<()>
811{
812 fn show :: _
813 {
814 "()"
815 }
816}
817
818impl Debug<()>
819{
820 fn debug :: _
821 {
822 "()"
823 }
824}
825
826impl Hash<()>
827{
828 fn hash :: _
829 {
830 0
831 }
832}
833
834impl Default<()>
835{
836 fn default ::
837 {
838 ()
839 }
840}
841
842impl Eq<(a, b)> where Eq<a>, Eq<b>
843{
844 fn eq :: x y
845 {
846 x.0 == y.0 && x.1 == y.1
847 }
848}
849
850impl Ord<(a, b)> where Ord<a>, Ord<b>
851{
852 fn compare :: x y
853 {
854 compare x.0 y.0 <> compare x.1 y.1
855 }
856}
857
858impl Show<(a, b)> where Show<a>, Show<b>
859{
860 fn show :: x
861 {
862 "(" <> show x.0 <> ", " <> show x.1 <> ")"
863 }
864}
865
866impl Debug<(a, b)> where Debug<a>, Debug<b>
867{
868 fn debug :: x
869 {
870 "(" <> debug x.0 <> ", " <> debug x.1 <> ")"
871 }
872}
873
874impl Hash<(a, b)> where Hash<a>, Hash<b>
875{
876 fn hash :: x
877 {
878 hash_combine (hash_combine 0 (hash x.0)) (hash x.1)
879 }
880}
881
882impl Default<(a, b)> where Default<a>, Default<b>
883{
884 fn default ::
885 {
886 (default (), default ())
887 }
888}
889
890impl Eq<(a, b, c)> where Eq<a>, Eq<b>, Eq<c>
891{
892 fn eq :: x y
893 {
894 x.0 == y.0 && x.1 == y.1 && x.2 == y.2
895 }
896}
897
898impl Ord<(a, b, c)> where Ord<a>, Ord<b>, Ord<c>
899{
900 fn compare :: x y
901 {
902 compare x.0 y.0 <> compare x.1 y.1 <> compare x.2 y.2
903 }
904}
905
906impl Show<(a, b, c)> where Show<a>, Show<b>, Show<c>
907{
908 fn show :: x
909 {
910 "(" <> show x.0 <> ", " <> show x.1 <> ", " <> show x.2 <> ")"
911 }
912}
913
914impl Debug<(a, b, c)> where Debug<a>, Debug<b>, Debug<c>
915{
916 fn debug :: x
917 {
918 "(" <> debug x.0 <> ", " <> debug x.1 <> ", " <> debug x.2 <> ")"
919 }
920}
921
922impl Hash<(a, b, c)> where Hash<a>, Hash<b>, Hash<c>
923{
924 fn hash :: x
925 {
926 hash_combine
927 (hash_combine (hash_combine 0 (hash x.0)) (hash x.1))
928 (hash x.2)
929 }
930}
931
932impl Default<(a, b, c)> where Default<a>, Default<b>, Default<c>
933{
934 fn default ::
935 {
936 (default (), default (), default ())
937 }
938}
939
940impl Eq<(a, b, c, d)> where Eq<a>, Eq<b>, Eq<c>, Eq<d>
941{
942 fn eq :: x y
943 {
944 x.0 == y.0 && x.1 == y.1 && x.2 == y.2 && x.3 == y.3
945 }
946}
947
948impl Ord<(a, b, c, d)> where Ord<a>, Ord<b>, Ord<c>, Ord<d>
949{
950 fn compare :: x y
951 {
952 compare x.0 y.0 <> compare x.1 y.1 <> compare x.2 y.2 <> compare x.3 y.3
953 }
954}
955
956impl Show<(a, b, c, d)> where Show<a>, Show<b>, Show<c>, Show<d>
957{
958 fn show :: x
959 {
960 "(" <> show x.0 <> ", " <> show x.1 <> ", " <> show x.2 <> ", " <> show x.3
961 <> ")"
962 }
963}
964
965impl Debug<(a, b, c, d)> where Debug<a>, Debug<b>, Debug<c>, Debug<d>
966{
967 fn debug :: x
968 {
969 "(" <> debug x.0 <> ", " <> debug x.1 <> ", " <> debug x.2 <> ", "
970 <> debug x.3
971 <> ")"
972 }
973}
974
975impl Hash<(a, b, c, d)> where Hash<a>, Hash<b>, Hash<c>, Hash<d>
976{
977 fn hash :: x
978 {
979 hash_combine
980 ( hash_combine
981 (hash_combine (hash_combine 0 (hash x.0)) (hash x.1))
982 (hash x.2)
983 )
984 (hash x.3)
985 }
986}
987
988impl Default<(a, b, c, d)> where Default<a>, Default<b>, Default<c>, Default<d>
989{
990 fn default ::
991 {
992 (default (), default (), default (), default ())
993 }
994}
995
996impl Eq<(a, b, c, d, e)> where Eq<a>, Eq<b>, Eq<c>, Eq<d>, Eq<e>
997{
998 fn eq :: x y
999 {
1000 x.0 == y.0 && x.1 == y.1 && x.2 == y.2 && x.3 == y.3 && x.4 == y.4
1001 }
1002}
1003
1004impl Ord<(a, b, c, d, e)> where Ord<a>, Ord<b>, Ord<c>, Ord<d>, Ord<e>
1005{
1006 fn compare :: x y
1007 {
1008 compare x.0 y.0 <> compare x.1 y.1 <> compare x.2 y.2 <> compare x.3 y.3
1009 <> compare x.4 y.4
1010 }
1011}
1012
1013impl Show<(a, b, c, d, e)> where Show<a>, Show<b>, Show<c>, Show<d>, Show<e>
1014{
1015 fn show :: x
1016 {
1017 "(" <> show x.0 <> ", " <> show x.1 <> ", " <> show x.2 <> ", " <> show x.3
1018 <> ", "
1019 <> show x.4
1020 <> ")"
1021 }
1022}
1023
1024impl Debug<(a, b, c, d, e)> where Debug<a>
1025, Debug<b>
1026, Debug<c>
1027, Debug<d>
1028, Debug<e>
1029{
1030 fn debug :: x
1031 {
1032 "(" <> debug x.0 <> ", " <> debug x.1 <> ", " <> debug x.2 <> ", "
1033 <> debug x.3
1034 <> ", "
1035 <> debug x.4
1036 <> ")"
1037 }
1038}
1039
1040impl Hash<(a, b, c, d, e)> where Hash<a>, Hash<b>, Hash<c>, Hash<d>, Hash<e>
1041{
1042 fn hash :: x
1043 {
1044 hash_combine
1045 ( hash_combine
1046 ( hash_combine
1047 (hash_combine (hash_combine 0 (hash x.0)) (hash x.1))
1048 (hash x.2)
1049 )
1050 (hash x.3)
1051 )
1052 (hash x.4)
1053 }
1054}
1055
1056impl Default<(a, b, c, d, e)> where Default<a>
1057, Default<b>
1058, Default<c>
1059, Default<d>
1060, Default<e>
1061{
1062 fn default ::
1063 {
1064 (default (), default (), default (), default (), default ())
1065 }
1066}
1067
1068impl Eq<(a, b, c, d, e, f)> where Eq<a>, Eq<b>, Eq<c>, Eq<d>, Eq<e>, Eq<f>
1069{
1070 fn eq :: x y
1071 {
1072 x.0 == y.0 && x.1 == y.1 && x.2 == y.2 && x.3 == y.3 && x.4 == y.4
1073 && x.5 == y.5
1074 }
1075}
1076
1077impl Ord<(a, b, c, d, e, f)> where Ord<a>
1078, Ord<b>
1079, Ord<c>
1080, Ord<d>
1081, Ord<e>
1082, Ord<f>
1083{
1084 fn compare :: x y
1085 {
1086 compare x.0 y.0 <> compare x.1 y.1 <> compare x.2 y.2 <> compare x.3 y.3
1087 <> compare x.4 y.4
1088 <> compare x.5 y.5
1089 }
1090}
1091
1092impl Show<(a, b, c, d, e, f)> where Show<a>
1093, Show<b>
1094, Show<c>
1095, Show<d>
1096, Show<e>
1097, Show<f>
1098{
1099 fn show :: x
1100 {
1101 "(" <> show x.0 <> ", " <> show x.1 <> ", " <> show x.2 <> ", " <> show x.3
1102 <> ", "
1103 <> show x.4
1104 <> ", "
1105 <> show x.5
1106 <> ")"
1107 }
1108}
1109
1110impl Debug<(a, b, c, d, e, f)> where Debug<a>
1111, Debug<b>
1112, Debug<c>
1113, Debug<d>
1114, Debug<e>
1115, Debug<f>
1116{
1117 fn debug :: x
1118 {
1119 "(" <> debug x.0 <> ", " <> debug x.1 <> ", " <> debug x.2 <> ", "
1120 <> debug x.3
1121 <> ", "
1122 <> debug x.4
1123 <> ", "
1124 <> debug x.5
1125 <> ")"
1126 }
1127}
1128
1129impl Hash<(a, b, c, d, e, f)> where Hash<a>
1130, Hash<b>
1131, Hash<c>
1132, Hash<d>
1133, Hash<e>
1134, Hash<f>
1135{
1136 fn hash :: x
1137 {
1138 hash_combine
1139 ( hash_combine
1140 ( hash_combine
1141 ( hash_combine
1142 (hash_combine (hash_combine 0 (hash x.0)) (hash x.1))
1143 (hash x.2)
1144 )
1145 (hash x.3)
1146 )
1147 (hash x.4)
1148 )
1149 (hash x.5)
1150 }
1151}
1152
1153impl Default<(a, b, c, d, e, f)> where Default<a>
1154, Default<b>
1155, Default<c>
1156, Default<d>
1157, Default<e>
1158, Default<f>
1159{
1160 fn default ::
1161 {
1162 (default (), default (), default (), default (), default (), default ())
1163 }
1164}
1165
1166impl Eq<(a, b, c, d, e, f, g)> where Eq<a>
1167, Eq<b>
1168, Eq<c>
1169, Eq<d>
1170, Eq<e>
1171, Eq<f>
1172, Eq<g>
1173{
1174 fn eq :: x y
1175 {
1176 x.0 == y.0 && x.1 == y.1 && x.2 == y.2 && x.3 == y.3 && x.4 == y.4
1177 && x.5 == y.5
1178 && x.6 == y.6
1179 }
1180}
1181
1182impl Ord<(a, b, c, d, e, f, g)> where Ord<a>
1183, Ord<b>
1184, Ord<c>
1185, Ord<d>
1186, Ord<e>
1187, Ord<f>
1188, Ord<g>
1189{
1190 fn compare :: x y
1191 {
1192 compare x.0 y.0 <> compare x.1 y.1 <> compare x.2 y.2 <> compare x.3 y.3
1193 <> compare x.4 y.4
1194 <> compare x.5 y.5
1195 <> compare x.6 y.6
1196 }
1197}
1198
1199impl Show<(a, b, c, d, e, f, g)> where Show<a>
1200, Show<b>
1201, Show<c>
1202, Show<d>
1203, Show<e>
1204, Show<f>
1205, Show<g>
1206{
1207 fn show :: x
1208 {
1209 "(" <> show x.0 <> ", " <> show x.1 <> ", " <> show x.2 <> ", " <> show x.3
1210 <> ", "
1211 <> show x.4
1212 <> ", "
1213 <> show x.5
1214 <> ", "
1215 <> show x.6
1216 <> ")"
1217 }
1218}
1219
1220impl Debug<(a, b, c, d, e, f, g)> where Debug<a>
1221, Debug<b>
1222, Debug<c>
1223, Debug<d>
1224, Debug<e>
1225, Debug<f>
1226, Debug<g>
1227{
1228 fn debug :: x
1229 {
1230 "(" <> debug x.0 <> ", " <> debug x.1 <> ", " <> debug x.2 <> ", "
1231 <> debug x.3
1232 <> ", "
1233 <> debug x.4
1234 <> ", "
1235 <> debug x.5
1236 <> ", "
1237 <> debug x.6
1238 <> ")"
1239 }
1240}
1241
1242impl Hash<(a, b, c, d, e, f, g)> where Hash<a>
1243, Hash<b>
1244, Hash<c>
1245, Hash<d>
1246, Hash<e>
1247, Hash<f>
1248, Hash<g>
1249{
1250 fn hash :: x
1251 {
1252 hash_combine
1253 ( hash_combine
1254 ( hash_combine
1255 ( hash_combine
1256 ( hash_combine
1257 (hash_combine (hash_combine 0 (hash x.0)) (hash x.1))
1258 (hash x.2)
1259 )
1260 (hash x.3)
1261 )
1262 (hash x.4)
1263 )
1264 (hash x.5)
1265 )
1266 (hash x.6)
1267 }
1268}
1269
1270impl Default<(a, b, c, d, e, f, g)> where Default<a>
1271, Default<b>
1272, Default<c>
1273, Default<d>
1274, Default<e>
1275, Default<f>
1276, Default<g>
1277{
1278 fn default ::
1279 {
1280 ( default ()
1281 , default ()
1282 , default ()
1283 , default ()
1284 , default ()
1285 , default ()
1286 , default ()
1287 )
1288 }
1289}
1290
1291impl Eq<(a, b, c, d, e, f, g, h)> where Eq<a>
1292, Eq<b>
1293, Eq<c>
1294, Eq<d>
1295, Eq<e>
1296, Eq<f>
1297, Eq<g>
1298, Eq<h>
1299{
1300 fn eq :: x y
1301 {
1302 x.0 == y.0 && x.1 == y.1 && x.2 == y.2 && x.3 == y.3 && x.4 == y.4
1303 && x.5 == y.5
1304 && x.6 == y.6
1305 && x.7 == y.7
1306 }
1307}
1308
1309impl Ord<(a, b, c, d, e, f, g, h)> where Ord<a>
1310, Ord<b>
1311, Ord<c>
1312, Ord<d>
1313, Ord<e>
1314, Ord<f>
1315, Ord<g>
1316, Ord<h>
1317{
1318 fn compare :: x y
1319 {
1320 compare x.0 y.0 <> compare x.1 y.1 <> compare x.2 y.2 <> compare x.3 y.3
1321 <> compare x.4 y.4
1322 <> compare x.5 y.5
1323 <> compare x.6 y.6
1324 <> compare x.7 y.7
1325 }
1326}
1327
1328impl Show<(a, b, c, d, e, f, g, h)> where Show<a>
1329, Show<b>
1330, Show<c>
1331, Show<d>
1332, Show<e>
1333, Show<f>
1334, Show<g>
1335, Show<h>
1336{
1337 fn show :: x
1338 {
1339 "(" <> show x.0 <> ", " <> show x.1 <> ", " <> show x.2 <> ", " <> show x.3
1340 <> ", "
1341 <> show x.4
1342 <> ", "
1343 <> show x.5
1344 <> ", "
1345 <> show x.6
1346 <> ", "
1347 <> show x.7
1348 <> ")"
1349 }
1350}
1351
1352impl Debug<(a, b, c, d, e, f, g, h)> where Debug<a>
1353, Debug<b>
1354, Debug<c>
1355, Debug<d>
1356, Debug<e>
1357, Debug<f>
1358, Debug<g>
1359, Debug<h>
1360{
1361 fn debug :: x
1362 {
1363 "(" <> debug x.0 <> ", " <> debug x.1 <> ", " <> debug x.2 <> ", "
1364 <> debug x.3
1365 <> ", "
1366 <> debug x.4
1367 <> ", "
1368 <> debug x.5
1369 <> ", "
1370 <> debug x.6
1371 <> ", "
1372 <> debug x.7
1373 <> ")"
1374 }
1375}
1376
1377impl Hash<(a, b, c, d, e, f, g, h)> where Hash<a>
1378, Hash<b>
1379, Hash<c>
1380, Hash<d>
1381, Hash<e>
1382, Hash<f>
1383, Hash<g>
1384, Hash<h>
1385{
1386 fn hash :: x
1387 {
1388 hash_combine
1389 ( hash_combine
1390 ( hash_combine
1391 ( hash_combine
1392 ( hash_combine
1393 ( hash_combine
1394 (hash_combine (hash_combine 0 (hash x.0)) (hash x.1))
1395 (hash x.2)
1396 )
1397 (hash x.3)
1398 )
1399 (hash x.4)
1400 )
1401 (hash x.5)
1402 )
1403 (hash x.6)
1404 )
1405 (hash x.7)
1406 }
1407}
1408
1409impl Default<(a, b, c, d, e, f, g, h)> where Default<a>
1410, Default<b>
1411, Default<c>
1412, Default<d>
1413, Default<e>
1414, Default<f>
1415, Default<g>
1416, Default<h>
1417{
1418 fn default ::
1419 {
1420 ( default ()
1421 , default ()
1422 , default ()
1423 , default ()
1424 , default ()
1425 , default ()
1426 , default ()
1427 , default ()
1428 )
1429 }
1430}
1431
1432impl Eq<(a, b, c, d, e, f, g, h, i)> where Eq<a>
1433, Eq<b>
1434, Eq<c>
1435, Eq<d>
1436, Eq<e>
1437, Eq<f>
1438, Eq<g>
1439, Eq<h>
1440, Eq<i>
1441{
1442 fn eq :: x y
1443 {
1444 x.0 == y.0 && x.1 == y.1 && x.2 == y.2 && x.3 == y.3 && x.4 == y.4
1445 && x.5 == y.5
1446 && x.6 == y.6
1447 && x.7 == y.7
1448 && x.8 == y.8
1449 }
1450}
1451
1452impl Ord<(a, b, c, d, e, f, g, h, i)> where Ord<a>
1453, Ord<b>
1454, Ord<c>
1455, Ord<d>
1456, Ord<e>
1457, Ord<f>
1458, Ord<g>
1459, Ord<h>
1460, Ord<i>
1461{
1462 fn compare :: x y
1463 {
1464 compare x.0 y.0 <> compare x.1 y.1 <> compare x.2 y.2 <> compare x.3 y.3
1465 <> compare x.4 y.4
1466 <> compare x.5 y.5
1467 <> compare x.6 y.6
1468 <> compare x.7 y.7
1469 <> compare x.8 y.8
1470 }
1471}
1472
1473impl Show<(a, b, c, d, e, f, g, h, i)> where Show<a>
1474, Show<b>
1475, Show<c>
1476, Show<d>
1477, Show<e>
1478, Show<f>
1479, Show<g>
1480, Show<h>
1481, Show<i>
1482{
1483 fn show :: x
1484 {
1485 "(" <> show x.0 <> ", " <> show x.1 <> ", " <> show x.2 <> ", " <> show x.3
1486 <> ", "
1487 <> show x.4
1488 <> ", "
1489 <> show x.5
1490 <> ", "
1491 <> show x.6
1492 <> ", "
1493 <> show x.7
1494 <> ", "
1495 <> show x.8
1496 <> ")"
1497 }
1498}
1499
1500impl Debug<(a, b, c, d, e, f, g, h, i)> where Debug<a>
1501, Debug<b>
1502, Debug<c>
1503, Debug<d>
1504, Debug<e>
1505, Debug<f>
1506, Debug<g>
1507, Debug<h>
1508, Debug<i>
1509{
1510 fn debug :: x
1511 {
1512 "(" <> debug x.0 <> ", " <> debug x.1 <> ", " <> debug x.2 <> ", "
1513 <> debug x.3
1514 <> ", "
1515 <> debug x.4
1516 <> ", "
1517 <> debug x.5
1518 <> ", "
1519 <> debug x.6
1520 <> ", "
1521 <> debug x.7
1522 <> ", "
1523 <> debug x.8
1524 <> ")"
1525 }
1526}
1527
1528impl Hash<(a, b, c, d, e, f, g, h, i)> where Hash<a>
1529, Hash<b>
1530, Hash<c>
1531, Hash<d>
1532, Hash<e>
1533, Hash<f>
1534, Hash<g>
1535, Hash<h>
1536, Hash<i>
1537{
1538 fn hash :: x
1539 {
1540 hash_combine
1541 ( hash_combine
1542 ( hash_combine
1543 ( hash_combine
1544 ( hash_combine
1545 ( hash_combine
1546 ( hash_combine
1547 ( hash_combine
1548 (hash_combine 0 (hash x.0))
1549 (hash x.1)
1550 )
1551 (hash x.2)
1552 )
1553 (hash x.3)
1554 )
1555 (hash x.4)
1556 )
1557 (hash x.5)
1558 )
1559 (hash x.6)
1560 )
1561 (hash x.7)
1562 )
1563 (hash x.8)
1564 }
1565}
1566
1567impl Default<(a, b, c, d, e, f, g, h, i)> where Default<a>
1568, Default<b>
1569, Default<c>
1570, Default<d>
1571, Default<e>
1572, Default<f>
1573, Default<g>
1574, Default<h>
1575, Default<i>
1576{
1577 fn default ::
1578 {
1579 ( default ()
1580 , default ()
1581 , default ()
1582 , default ()
1583 , default ()
1584 , default ()
1585 , default ()
1586 , default ()
1587 , default ()
1588 )
1589 }
1590}
1591
1592impl Eq<(a, b, c, d, e, f, g, h, i, j)> where Eq<a>
1593, Eq<b>
1594, Eq<c>
1595, Eq<d>
1596, Eq<e>
1597, Eq<f>
1598, Eq<g>
1599, Eq<h>
1600, Eq<i>
1601, Eq<j>
1602{
1603 fn eq :: x y
1604 {
1605 x.0 == y.0 && x.1 == y.1 && x.2 == y.2 && x.3 == y.3 && x.4 == y.4
1606 && x.5 == y.5
1607 && x.6 == y.6
1608 && x.7 == y.7
1609 && x.8 == y.8
1610 && x.9 == y.9
1611 }
1612}
1613
1614impl Ord<(a, b, c, d, e, f, g, h, i, j)> where Ord<a>
1615, Ord<b>
1616, Ord<c>
1617, Ord<d>
1618, Ord<e>
1619, Ord<f>
1620, Ord<g>
1621, Ord<h>
1622, Ord<i>
1623, Ord<j>
1624{
1625 fn compare :: x y
1626 {
1627 compare x.0 y.0 <> compare x.1 y.1 <> compare x.2 y.2 <> compare x.3 y.3
1628 <> compare x.4 y.4
1629 <> compare x.5 y.5
1630 <> compare x.6 y.6
1631 <> compare x.7 y.7
1632 <> compare x.8 y.8
1633 <> compare x.9 y.9
1634 }
1635}
1636
1637impl Show<(a, b, c, d, e, f, g, h, i, j)> where Show<a>
1638, Show<b>
1639, Show<c>
1640, Show<d>
1641, Show<e>
1642, Show<f>
1643, Show<g>
1644, Show<h>
1645, Show<i>
1646, Show<j>
1647{
1648 fn show :: x
1649 {
1650 "(" <> show x.0 <> ", " <> show x.1 <> ", " <> show x.2 <> ", " <> show x.3
1651 <> ", "
1652 <> show x.4
1653 <> ", "
1654 <> show x.5
1655 <> ", "
1656 <> show x.6
1657 <> ", "
1658 <> show x.7
1659 <> ", "
1660 <> show x.8
1661 <> ", "
1662 <> show x.9
1663 <> ")"
1664 }
1665}
1666
1667impl Debug<(a, b, c, d, e, f, g, h, i, j)> where Debug<a>
1668, Debug<b>
1669, Debug<c>
1670, Debug<d>
1671, Debug<e>
1672, Debug<f>
1673, Debug<g>
1674, Debug<h>
1675, Debug<i>
1676, Debug<j>
1677{
1678 fn debug :: x
1679 {
1680 "(" <> debug x.0 <> ", " <> debug x.1 <> ", " <> debug x.2 <> ", "
1681 <> debug x.3
1682 <> ", "
1683 <> debug x.4
1684 <> ", "
1685 <> debug x.5
1686 <> ", "
1687 <> debug x.6
1688 <> ", "
1689 <> debug x.7
1690 <> ", "
1691 <> debug x.8
1692 <> ", "
1693 <> debug x.9
1694 <> ")"
1695 }
1696}
1697
1698impl Hash<(a, b, c, d, e, f, g, h, i, j)> where Hash<a>
1699, Hash<b>
1700, Hash<c>
1701, Hash<d>
1702, Hash<e>
1703, Hash<f>
1704, Hash<g>
1705, Hash<h>
1706, Hash<i>
1707, Hash<j>
1708{
1709 fn hash :: x
1710 {
1711 hash_combine
1712 ( hash_combine
1713 ( hash_combine
1714 ( hash_combine
1715 ( hash_combine
1716 ( hash_combine
1717 ( hash_combine
1718 ( hash_combine
1719 ( hash_combine
1720 (hash_combine 0 (hash x.0))
1721 (hash x.1)
1722 )
1723 (hash x.2)
1724 )
1725 (hash x.3)
1726 )
1727 (hash x.4)
1728 )
1729 (hash x.5)
1730 )
1731 (hash x.6)
1732 )
1733 (hash x.7)
1734 )
1735 (hash x.8)
1736 )
1737 (hash x.9)
1738 }
1739}
1740
1741impl Default<(a, b, c, d, e, f, g, h, i, j)> where Default<a>
1742, Default<b>
1743, Default<c>
1744, Default<d>
1745, Default<e>
1746, Default<f>
1747, Default<g>
1748, Default<h>
1749, Default<i>
1750, Default<j>
1751{
1752 fn default ::
1753 {
1754 ( default ()
1755 , default ()
1756 , default ()
1757 , default ()
1758 , default ()
1759 , default ()
1760 , default ()
1761 , default ()
1762 , default ()
1763 , default ()
1764 )
1765 }
1766}
1767
1768impl Eq<(a, b, c, d, e, f, g, h, i, j, k)> where Eq<a>
1769, Eq<b>
1770, Eq<c>
1771, Eq<d>
1772, Eq<e>
1773, Eq<f>
1774, Eq<g>
1775, Eq<h>
1776, Eq<i>
1777, Eq<j>
1778, Eq<k>
1779{
1780 fn eq :: x y
1781 {
1782 x.0 == y.0 && x.1 == y.1 && x.2 == y.2 && x.3 == y.3 && x.4 == y.4
1783 && x.5 == y.5
1784 && x.6 == y.6
1785 && x.7 == y.7
1786 && x.8 == y.8
1787 && x.9 == y.9
1788 && x.10 == y.10
1789 }
1790}
1791
1792impl Ord<(a, b, c, d, e, f, g, h, i, j, k)> where Ord<a>
1793, Ord<b>
1794, Ord<c>
1795, Ord<d>
1796, Ord<e>
1797, Ord<f>
1798, Ord<g>
1799, Ord<h>
1800, Ord<i>
1801, Ord<j>
1802, Ord<k>
1803{
1804 fn compare :: x y
1805 {
1806 compare x.0 y.0 <> compare x.1 y.1 <> compare x.2 y.2 <> compare x.3 y.3
1807 <> compare x.4 y.4
1808 <> compare x.5 y.5
1809 <> compare x.6 y.6
1810 <> compare x.7 y.7
1811 <> compare x.8 y.8
1812 <> compare x.9 y.9
1813 <> compare x.10 y.10
1814 }
1815}
1816
1817impl Show<(a, b, c, d, e, f, g, h, i, j, k)> where Show<a>
1818, Show<b>
1819, Show<c>
1820, Show<d>
1821, Show<e>
1822, Show<f>
1823, Show<g>
1824, Show<h>
1825, Show<i>
1826, Show<j>
1827, Show<k>
1828{
1829 fn show :: x
1830 {
1831 "(" <> show x.0 <> ", " <> show x.1 <> ", " <> show x.2 <> ", " <> show x.3
1832 <> ", "
1833 <> show x.4
1834 <> ", "
1835 <> show x.5
1836 <> ", "
1837 <> show x.6
1838 <> ", "
1839 <> show x.7
1840 <> ", "
1841 <> show x.8
1842 <> ", "
1843 <> show x.9
1844 <> ", "
1845 <> show x.10
1846 <> ")"
1847 }
1848}
1849
1850impl Debug<(a, b, c, d, e, f, g, h, i, j, k)> where Debug<a>
1851, Debug<b>
1852, Debug<c>
1853, Debug<d>
1854, Debug<e>
1855, Debug<f>
1856, Debug<g>
1857, Debug<h>
1858, Debug<i>
1859, Debug<j>
1860, Debug<k>
1861{
1862 fn debug :: x
1863 {
1864 "(" <> debug x.0 <> ", " <> debug x.1 <> ", " <> debug x.2 <> ", "
1865 <> debug x.3
1866 <> ", "
1867 <> debug x.4
1868 <> ", "
1869 <> debug x.5
1870 <> ", "
1871 <> debug x.6
1872 <> ", "
1873 <> debug x.7
1874 <> ", "
1875 <> debug x.8
1876 <> ", "
1877 <> debug x.9
1878 <> ", "
1879 <> debug x.10
1880 <> ")"
1881 }
1882}
1883
1884impl Hash<(a, b, c, d, e, f, g, h, i, j, k)> where Hash<a>
1885, Hash<b>
1886, Hash<c>
1887, Hash<d>
1888, Hash<e>
1889, Hash<f>
1890, Hash<g>
1891, Hash<h>
1892, Hash<i>
1893, Hash<j>
1894, Hash<k>
1895{
1896 fn hash :: x
1897 {
1898 hash_combine
1899 ( hash_combine
1900 ( hash_combine
1901 ( hash_combine
1902 ( hash_combine
1903 ( hash_combine
1904 ( hash_combine
1905 ( hash_combine
1906 ( hash_combine
1907 ( hash_combine
1908 (hash_combine 0 (hash x.0))
1909 (hash x.1)
1910 )
1911 (hash x.2)
1912 )
1913 (hash x.3)
1914 )
1915 (hash x.4)
1916 )
1917 (hash x.5)
1918 )
1919 (hash x.6)
1920 )
1921 (hash x.7)
1922 )
1923 (hash x.8)
1924 )
1925 (hash x.9)
1926 )
1927 (hash x.10)
1928 }
1929}
1930
1931impl Default<(a, b, c, d, e, f, g, h, i, j, k)> where Default<a>
1932, Default<b>
1933, Default<c>
1934, Default<d>
1935, Default<e>
1936, Default<f>
1937, Default<g>
1938, Default<h>
1939, Default<i>
1940, Default<j>
1941, Default<k>
1942{
1943 fn default ::
1944 {
1945 ( default ()
1946 , default ()
1947 , default ()
1948 , default ()
1949 , default ()
1950 , default ()
1951 , default ()
1952 , default ()
1953 , default ()
1954 , default ()
1955 , default ()
1956 )
1957 }
1958}
1959
1960impl Eq<(a, b, c, d, e, f, g, h, i, j, k, l)> where Eq<a>
1961, Eq<b>
1962, Eq<c>
1963, Eq<d>
1964, Eq<e>
1965, Eq<f>
1966, Eq<g>
1967, Eq<h>
1968, Eq<i>
1969, Eq<j>
1970, Eq<k>
1971, Eq<l>
1972{
1973 fn eq :: x y
1974 {
1975 x.0 == y.0 && x.1 == y.1 && x.2 == y.2 && x.3 == y.3 && x.4 == y.4
1976 && x.5 == y.5
1977 && x.6 == y.6
1978 && x.7 == y.7
1979 && x.8 == y.8
1980 && x.9 == y.9
1981 && x.10 == y.10
1982 && x.11 == y.11
1983 }
1984}
1985
1986impl Ord<(a, b, c, d, e, f, g, h, i, j, k, l)> where Ord<a>
1987, Ord<b>
1988, Ord<c>
1989, Ord<d>
1990, Ord<e>
1991, Ord<f>
1992, Ord<g>
1993, Ord<h>
1994, Ord<i>
1995, Ord<j>
1996, Ord<k>
1997, Ord<l>
1998{
1999 fn compare :: x y
2000 {
2001 compare x.0 y.0 <> compare x.1 y.1 <> compare x.2 y.2 <> compare x.3 y.3
2002 <> compare x.4 y.4
2003 <> compare x.5 y.5
2004 <> compare x.6 y.6
2005 <> compare x.7 y.7
2006 <> compare x.8 y.8
2007 <> compare x.9 y.9
2008 <> compare x.10 y.10
2009 <> compare x.11 y.11
2010 }
2011}
2012
2013impl Show<(a, b, c, d, e, f, g, h, i, j, k, l)> where Show<a>
2014, Show<b>
2015, Show<c>
2016, Show<d>
2017, Show<e>
2018, Show<f>
2019, Show<g>
2020, Show<h>
2021, Show<i>
2022, Show<j>
2023, Show<k>
2024, Show<l>
2025{
2026 fn show :: x
2027 {
2028 "(" <> show x.0 <> ", " <> show x.1 <> ", " <> show x.2 <> ", " <> show x.3
2029 <> ", "
2030 <> show x.4
2031 <> ", "
2032 <> show x.5
2033 <> ", "
2034 <> show x.6
2035 <> ", "
2036 <> show x.7
2037 <> ", "
2038 <> show x.8
2039 <> ", "
2040 <> show x.9
2041 <> ", "
2042 <> show x.10
2043 <> ", "
2044 <> show x.11
2045 <> ")"
2046 }
2047}
2048
2049impl Debug<(a, b, c, d, e, f, g, h, i, j, k, l)> where Debug<a>
2050, Debug<b>
2051, Debug<c>
2052, Debug<d>
2053, Debug<e>
2054, Debug<f>
2055, Debug<g>
2056, Debug<h>
2057, Debug<i>
2058, Debug<j>
2059, Debug<k>
2060, Debug<l>
2061{
2062 fn debug :: x
2063 {
2064 "(" <> debug x.0 <> ", " <> debug x.1 <> ", " <> debug x.2 <> ", "
2065 <> debug x.3
2066 <> ", "
2067 <> debug x.4
2068 <> ", "
2069 <> debug x.5
2070 <> ", "
2071 <> debug x.6
2072 <> ", "
2073 <> debug x.7
2074 <> ", "
2075 <> debug x.8
2076 <> ", "
2077 <> debug x.9
2078 <> ", "
2079 <> debug x.10
2080 <> ", "
2081 <> debug x.11
2082 <> ")"
2083 }
2084}
2085
2086impl Hash<(a, b, c, d, e, f, g, h, i, j, k, l)> where Hash<a>
2087, Hash<b>
2088, Hash<c>
2089, Hash<d>
2090, Hash<e>
2091, Hash<f>
2092, Hash<g>
2093, Hash<h>
2094, Hash<i>
2095, Hash<j>
2096, Hash<k>
2097, Hash<l>
2098{
2099 fn hash :: x
2100 {
2101 hash_combine
2102 ( hash_combine
2103 ( hash_combine
2104 ( hash_combine
2105 ( hash_combine
2106 ( hash_combine
2107 ( hash_combine
2108 ( hash_combine
2109 ( hash_combine
2110 ( hash_combine
2111 ( hash_combine
2112 (hash_combine 0 (hash x.0))
2113 (hash x.1)
2114 )
2115 (hash x.2)
2116 )
2117 (hash x.3)
2118 )
2119 (hash x.4)
2120 )
2121 (hash x.5)
2122 )
2123 (hash x.6)
2124 )
2125 (hash x.7)
2126 )
2127 (hash x.8)
2128 )
2129 (hash x.9)
2130 )
2131 (hash x.10)
2132 )
2133 (hash x.11)
2134 }
2135}
2136
2137impl Default<(a, b, c, d, e, f, g, h, i, j, k, l)> where Default<a>
2138, Default<b>
2139, Default<c>
2140, Default<d>
2141, Default<e>
2142, Default<f>
2143, Default<g>
2144, Default<h>
2145, Default<i>
2146, Default<j>
2147, Default<k>
2148, Default<l>
2149{
2150 fn default ::
2151 {
2152 ( default ()
2153 , default ()
2154 , default ()
2155 , default ()
2156 , default ()
2157 , default ()
2158 , default ()
2159 , default ()
2160 , default ()
2161 , default ()
2162 , default ()
2163 , default ()
2164 )
2165 }
2166}
2167// --- end of the generated tuple impls ---