Safe Haskell | None |
---|---|
Language | Haskell2010 |
Construction and elimination of tuples
- class Select1 tup where
- class Select2 tup where
- class Select3 tup where
- class Select4 tup where
- class Select5 tup where
- class Select6 tup where
- class Select7 tup where
- class Select8 tup where
- class Select9 tup where
- class Select10 tup where
- class Select11 tup where
- class Select12 tup where
- class Select13 tup where
- class Select14 tup where
- class Select15 tup where
- data Tuple sig
- = forall a b . (sig ~ (:->) a ((:->) b (Full (a, b)))) => Tup2
- | forall a b c . (sig ~ (:->) a ((:->) b ((:->) c (Full (a, b, c))))) => Tup3
- | forall a b c d . (sig ~ (:->) a ((:->) b ((:->) c ((:->) d (Full (a, b, c, d)))))) => Tup4
- | forall a b c d e . (sig ~ (:->) a ((:->) b ((:->) c ((:->) d ((:->) e (Full (a, b, c, d, e))))))) => Tup5
- | forall a b c d e f . (sig ~ (:->) a ((:->) b ((:->) c ((:->) d ((:->) e ((:->) f (Full (a, b, c, d, e, f)))))))) => Tup6
- | forall a b c d e f g . (sig ~ (:->) a ((:->) b ((:->) c ((:->) d ((:->) e ((:->) f ((:->) g (Full (a, b, c, d, e, f, g))))))))) => Tup7
- | forall a b c d e f g h . (sig ~ (:->) a ((:->) b ((:->) c ((:->) d ((:->) e ((:->) f ((:->) g ((:->) h (Full (a, b, c, d, e, f, g, h)))))))))) => Tup8
- | forall a b c d e f g h i . (sig ~ (:->) a ((:->) b ((:->) c ((:->) d ((:->) e ((:->) f ((:->) g ((:->) h ((:->) i (Full (a, b, c, d, e, f, g, h, i))))))))))) => Tup9
- | forall a b c d e f g h i j . (sig ~ (:->) a ((:->) b ((:->) c ((:->) d ((:->) e ((:->) f ((:->) g ((:->) h ((:->) i ((:->) j (Full (a, b, c, d, e, f, g, h, i, j)))))))))))) => Tup10
- | forall a b c d e f g h i j k . (sig ~ (:->) a ((:->) b ((:->) c ((:->) d ((:->) e ((:->) f ((:->) g ((:->) h ((:->) i ((:->) j ((:->) k (Full (a, b, c, d, e, f, g, h, i, j, k))))))))))))) => Tup11
- | forall a b c d e f g h i j k l . (sig ~ (:->) a ((:->) b ((:->) c ((:->) d ((:->) e ((:->) f ((:->) g ((:->) h ((:->) i ((:->) j ((:->) k ((:->) l (Full (a, b, c, d, e, f, g, h, i, j, k, l)))))))))))))) => Tup12
- | forall a b c d e f g h i j k l m . (sig ~ (:->) a ((:->) b ((:->) c ((:->) d ((:->) e ((:->) f ((:->) g ((:->) h ((:->) i ((:->) j ((:->) k ((:->) l ((:->) m (Full (a, b, c, d, e, f, g, h, i, j, k, l, m))))))))))))))) => Tup13
- | forall a b c d e f g h i j k l m n . (sig ~ (:->) a ((:->) b ((:->) c ((:->) d ((:->) e ((:->) f ((:->) g ((:->) h ((:->) i ((:->) j ((:->) k ((:->) l ((:->) m ((:->) n (Full (a, b, c, d, e, f, g, h, i, j, k, l, m, n)))))))))))))))) => Tup14
- | forall a b c d e f g h i j k l m n o . (sig ~ (:->) a ((:->) b ((:->) c ((:->) d ((:->) e ((:->) f ((:->) g ((:->) h ((:->) i ((:->) j ((:->) k ((:->) l ((:->) m ((:->) n ((:->) o (Full (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o))))))))))))))))) => Tup15
- | forall tup . (sig ~ (:->) tup (Full (Sel1 tup)), Select1 tup) => Sel1
- | forall tup . (sig ~ (:->) tup (Full (Sel2 tup)), Select2 tup) => Sel2
- | forall tup . (sig ~ (:->) tup (Full (Sel3 tup)), Select3 tup) => Sel3
- | forall tup . (sig ~ (:->) tup (Full (Sel4 tup)), Select4 tup) => Sel4
- | forall tup . (sig ~ (:->) tup (Full (Sel5 tup)), Select5 tup) => Sel5
- | forall tup . (sig ~ (:->) tup (Full (Sel6 tup)), Select6 tup) => Sel6
- | forall tup . (sig ~ (:->) tup (Full (Sel7 tup)), Select7 tup) => Sel7
- | forall tup . (sig ~ (:->) tup (Full (Sel8 tup)), Select8 tup) => Sel8
- | forall tup . (sig ~ (:->) tup (Full (Sel9 tup)), Select9 tup) => Sel9
- | forall tup . (sig ~ (:->) tup (Full (Sel10 tup)), Select10 tup) => Sel10
- | forall tup . (sig ~ (:->) tup (Full (Sel11 tup)), Select11 tup) => Sel11
- | forall tup . (sig ~ (:->) tup (Full (Sel12 tup)), Select12 tup) => Sel12
- | forall tup . (sig ~ (:->) tup (Full (Sel13 tup)), Select13 tup) => Sel13
- | forall tup . (sig ~ (:->) tup (Full (Sel14 tup)), Select14 tup) => Sel14
- | forall tup . (sig ~ (:->) tup (Full (Sel15 tup)), Select15 tup) => Sel15
- eqPred :: Type -> Type -> Pred
- classPred :: Name -> (Name -> Type) -> [Type] -> Pred
- mkSelectClassPlusInstances :: Int -> DecsQ
- deriveSyntacticForTuples :: (Type -> Cxt) -> (Type -> Type) -> (Exp -> Exp) -> Int -> DecsQ
Generic tuple projection
class Select1 tup where Source
Select1 (a, b) Source | |
Select1 (a, b, c) Source | |
Select1 (a, b, c, d) Source | |
Select1 (a, b, c, d, e) Source | |
Select1 (a, b, c, d, e, f) Source | |
Select1 (a, b, c, d, e, f, g) Source | |
Select1 (a, b, c, d, e, f, g, h) Source | |
Select1 (a, b, c, d, e, f, g, h, i) Source | |
Select1 (a, b, c, d, e, f, g, h, i, j) Source | |
Select1 (a, b, c, d, e, f, g, h, i, j, k) Source | |
Select1 (a, b, c, d, e, f, g, h, i, j, k, l) Source | |
Select1 (a, b, c, d, e, f, g, h, i, j, k, l, m) Source | |
Select1 (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source | |
Select1 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source |
class Select2 tup where Source
Select2 (a, b) Source | |
Select2 (a, b, c) Source | |
Select2 (a, b, c, d) Source | |
Select2 (a, b, c, d, e) Source | |
Select2 (a, b, c, d, e, f) Source | |
Select2 (a, b, c, d, e, f, g) Source | |
Select2 (a, b, c, d, e, f, g, h) Source | |
Select2 (a, b, c, d, e, f, g, h, i) Source | |
Select2 (a, b, c, d, e, f, g, h, i, j) Source | |
Select2 (a, b, c, d, e, f, g, h, i, j, k) Source | |
Select2 (a, b, c, d, e, f, g, h, i, j, k, l) Source | |
Select2 (a, b, c, d, e, f, g, h, i, j, k, l, m) Source | |
Select2 (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source | |
Select2 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source |
class Select3 tup where Source
Select3 (a, b, c) Source | |
Select3 (a, b, c, d) Source | |
Select3 (a, b, c, d, e) Source | |
Select3 (a, b, c, d, e, f) Source | |
Select3 (a, b, c, d, e, f, g) Source | |
Select3 (a, b, c, d, e, f, g, h) Source | |
Select3 (a, b, c, d, e, f, g, h, i) Source | |
Select3 (a, b, c, d, e, f, g, h, i, j) Source | |
Select3 (a, b, c, d, e, f, g, h, i, j, k) Source | |
Select3 (a, b, c, d, e, f, g, h, i, j, k, l) Source | |
Select3 (a, b, c, d, e, f, g, h, i, j, k, l, m) Source | |
Select3 (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source | |
Select3 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source |
class Select4 tup where Source
Select4 (a, b, c, d) Source | |
Select4 (a, b, c, d, e) Source | |
Select4 (a, b, c, d, e, f) Source | |
Select4 (a, b, c, d, e, f, g) Source | |
Select4 (a, b, c, d, e, f, g, h) Source | |
Select4 (a, b, c, d, e, f, g, h, i) Source | |
Select4 (a, b, c, d, e, f, g, h, i, j) Source | |
Select4 (a, b, c, d, e, f, g, h, i, j, k) Source | |
Select4 (a, b, c, d, e, f, g, h, i, j, k, l) Source | |
Select4 (a, b, c, d, e, f, g, h, i, j, k, l, m) Source | |
Select4 (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source | |
Select4 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source |
class Select5 tup where Source
Select5 (a, b, c, d, e) Source | |
Select5 (a, b, c, d, e, f) Source | |
Select5 (a, b, c, d, e, f, g) Source | |
Select5 (a, b, c, d, e, f, g, h) Source | |
Select5 (a, b, c, d, e, f, g, h, i) Source | |
Select5 (a, b, c, d, e, f, g, h, i, j) Source | |
Select5 (a, b, c, d, e, f, g, h, i, j, k) Source | |
Select5 (a, b, c, d, e, f, g, h, i, j, k, l) Source | |
Select5 (a, b, c, d, e, f, g, h, i, j, k, l, m) Source | |
Select5 (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source | |
Select5 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source |
class Select6 tup where Source
Select6 (a, b, c, d, e, f) Source | |
Select6 (a, b, c, d, e, f, g) Source | |
Select6 (a, b, c, d, e, f, g, h) Source | |
Select6 (a, b, c, d, e, f, g, h, i) Source | |
Select6 (a, b, c, d, e, f, g, h, i, j) Source | |
Select6 (a, b, c, d, e, f, g, h, i, j, k) Source | |
Select6 (a, b, c, d, e, f, g, h, i, j, k, l) Source | |
Select6 (a, b, c, d, e, f, g, h, i, j, k, l, m) Source | |
Select6 (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source | |
Select6 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source |
class Select7 tup where Source
Select7 (a, b, c, d, e, f, g) Source | |
Select7 (a, b, c, d, e, f, g, h) Source | |
Select7 (a, b, c, d, e, f, g, h, i) Source | |
Select7 (a, b, c, d, e, f, g, h, i, j) Source | |
Select7 (a, b, c, d, e, f, g, h, i, j, k) Source | |
Select7 (a, b, c, d, e, f, g, h, i, j, k, l) Source | |
Select7 (a, b, c, d, e, f, g, h, i, j, k, l, m) Source | |
Select7 (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source | |
Select7 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source |
class Select8 tup where Source
Select8 (a, b, c, d, e, f, g, h) Source | |
Select8 (a, b, c, d, e, f, g, h, i) Source | |
Select8 (a, b, c, d, e, f, g, h, i, j) Source | |
Select8 (a, b, c, d, e, f, g, h, i, j, k) Source | |
Select8 (a, b, c, d, e, f, g, h, i, j, k, l) Source | |
Select8 (a, b, c, d, e, f, g, h, i, j, k, l, m) Source | |
Select8 (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source | |
Select8 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source |
class Select9 tup where Source
Select9 (a, b, c, d, e, f, g, h, i) Source | |
Select9 (a, b, c, d, e, f, g, h, i, j) Source | |
Select9 (a, b, c, d, e, f, g, h, i, j, k) Source | |
Select9 (a, b, c, d, e, f, g, h, i, j, k, l) Source | |
Select9 (a, b, c, d, e, f, g, h, i, j, k, l, m) Source | |
Select9 (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source | |
Select9 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source |
class Select10 tup where Source
Select10 (a, b, c, d, e, f, g, h, i, j) Source | |
Select10 (a, b, c, d, e, f, g, h, i, j, k) Source | |
Select10 (a, b, c, d, e, f, g, h, i, j, k, l) Source | |
Select10 (a, b, c, d, e, f, g, h, i, j, k, l, m) Source | |
Select10 (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source | |
Select10 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source |
Symbols
Construction and elimination of tuples
forall a b . (sig ~ (:->) a ((:->) b (Full (a, b)))) => Tup2 | |
forall a b c . (sig ~ (:->) a ((:->) b ((:->) c (Full (a, b, c))))) => Tup3 | |
forall a b c d . (sig ~ (:->) a ((:->) b ((:->) c ((:->) d (Full (a, b, c, d)))))) => Tup4 | |
forall a b c d e . (sig ~ (:->) a ((:->) b ((:->) c ((:->) d ((:->) e (Full (a, b, c, d, e))))))) => Tup5 | |
forall a b c d e f . (sig ~ (:->) a ((:->) b ((:->) c ((:->) d ((:->) e ((:->) f (Full (a, b, c, d, e, f)))))))) => Tup6 | |
forall a b c d e f g . (sig ~ (:->) a ((:->) b ((:->) c ((:->) d ((:->) e ((:->) f ((:->) g (Full (a, b, c, d, e, f, g))))))))) => Tup7 | |
forall a b c d e f g h . (sig ~ (:->) a ((:->) b ((:->) c ((:->) d ((:->) e ((:->) f ((:->) g ((:->) h (Full (a, b, c, d, e, f, g, h)))))))))) => Tup8 | |
forall a b c d e f g h i . (sig ~ (:->) a ((:->) b ((:->) c ((:->) d ((:->) e ((:->) f ((:->) g ((:->) h ((:->) i (Full (a, b, c, d, e, f, g, h, i))))))))))) => Tup9 | |
forall a b c d e f g h i j . (sig ~ (:->) a ((:->) b ((:->) c ((:->) d ((:->) e ((:->) f ((:->) g ((:->) h ((:->) i ((:->) j (Full (a, b, c, d, e, f, g, h, i, j)))))))))))) => Tup10 | |
forall a b c d e f g h i j k . (sig ~ (:->) a ((:->) b ((:->) c ((:->) d ((:->) e ((:->) f ((:->) g ((:->) h ((:->) i ((:->) j ((:->) k (Full (a, b, c, d, e, f, g, h, i, j, k))))))))))))) => Tup11 | |
forall a b c d e f g h i j k l . (sig ~ (:->) a ((:->) b ((:->) c ((:->) d ((:->) e ((:->) f ((:->) g ((:->) h ((:->) i ((:->) j ((:->) k ((:->) l (Full (a, b, c, d, e, f, g, h, i, j, k, l)))))))))))))) => Tup12 | |
forall a b c d e f g h i j k l m . (sig ~ (:->) a ((:->) b ((:->) c ((:->) d ((:->) e ((:->) f ((:->) g ((:->) h ((:->) i ((:->) j ((:->) k ((:->) l ((:->) m (Full (a, b, c, d, e, f, g, h, i, j, k, l, m))))))))))))))) => Tup13 | |
forall a b c d e f g h i j k l m n . (sig ~ (:->) a ((:->) b ((:->) c ((:->) d ((:->) e ((:->) f ((:->) g ((:->) h ((:->) i ((:->) j ((:->) k ((:->) l ((:->) m ((:->) n (Full (a, b, c, d, e, f, g, h, i, j, k, l, m, n)))))))))))))))) => Tup14 | |
forall a b c d e f g h i j k l m n o . (sig ~ (:->) a ((:->) b ((:->) c ((:->) d ((:->) e ((:->) f ((:->) g ((:->) h ((:->) i ((:->) j ((:->) k ((:->) l ((:->) m ((:->) n ((:->) o (Full (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o))))))))))))))))) => Tup15 | |
forall tup . (sig ~ (:->) tup (Full (Sel1 tup)), Select1 tup) => Sel1 | |
forall tup . (sig ~ (:->) tup (Full (Sel2 tup)), Select2 tup) => Sel2 | |
forall tup . (sig ~ (:->) tup (Full (Sel3 tup)), Select3 tup) => Sel3 | |
forall tup . (sig ~ (:->) tup (Full (Sel4 tup)), Select4 tup) => Sel4 | |
forall tup . (sig ~ (:->) tup (Full (Sel5 tup)), Select5 tup) => Sel5 | |
forall tup . (sig ~ (:->) tup (Full (Sel6 tup)), Select6 tup) => Sel6 | |
forall tup . (sig ~ (:->) tup (Full (Sel7 tup)), Select7 tup) => Sel7 | |
forall tup . (sig ~ (:->) tup (Full (Sel8 tup)), Select8 tup) => Sel8 | |
forall tup . (sig ~ (:->) tup (Full (Sel9 tup)), Select9 tup) => Sel9 | |
forall tup . (sig ~ (:->) tup (Full (Sel10 tup)), Select10 tup) => Sel10 | |
forall tup . (sig ~ (:->) tup (Full (Sel11 tup)), Select11 tup) => Sel11 | |
forall tup . (sig ~ (:->) tup (Full (Sel12 tup)), Select12 tup) => Sel12 | |
forall tup . (sig ~ (:->) tup (Full (Sel13 tup)), Select13 tup) => Sel13 | |
forall tup . (sig ~ (:->) tup (Full (Sel14 tup)), Select14 tup) => Sel14 | |
forall tup . (sig ~ (:->) tup (Full (Sel15 tup)), Select15 tup) => Sel15 |
Template Haskell
:: Name | Class name |
-> (Name -> Type) | How to make a type for the class (typically |
-> [Type] | Class arguments |
-> Pred |
Portable method for constructing a Pred
of the form SomeClass t1 t2 ...