Safe Haskell | None |
---|---|
Language | Haskell2010 |
Language.Syntactic.Constructs.Tuple
Contents
Description
Construction and elimination of tuples in the object language
- data Tuple sig where
- Tup2 :: Tuple (a :-> (b :-> Full (a, b)))
- Tup3 :: Tuple (a :-> (b :-> (c :-> Full (a, b, c))))
- Tup4 :: Tuple (a :-> (b :-> (c :-> (d :-> Full (a, b, c, d)))))
- Tup5 :: Tuple (a :-> (b :-> (c :-> (d :-> (e :-> Full (a, b, c, d, e))))))
- Tup6 :: Tuple (a :-> (b :-> (c :-> (d :-> (e :-> (f :-> Full (a, b, c, d, e, f)))))))
- Tup7 :: Tuple (a :-> (b :-> (c :-> (d :-> (e :-> (f :-> (g :-> Full (a, b, c, d, e, f, g))))))))
- Tup8 :: Tuple (a :-> (b :-> (c :-> (d :-> (e :-> (f :-> (g :-> (h :-> Full (a, b, c, d, e, f, g, h)))))))))
- Tup9 :: Tuple (a :-> (b :-> (c :-> (d :-> (e :-> (f :-> (g :-> (h :-> (i :-> Full (a, b, c, d, e, f, g, h, i))))))))))
- Tup10 :: Tuple (a :-> (b :-> (c :-> (d :-> (e :-> (f :-> (g :-> (h :-> (i :-> (j :-> Full (a, b, c, d, e, f, g, h, i, j)))))))))))
- Tup11 :: Tuple (a :-> (b :-> (c :-> (d :-> (e :-> (f :-> (g :-> (h :-> (i :-> (j :-> (k :-> Full (a, b, c, d, e, f, g, h, i, j, k))))))))))))
- Tup12 :: Tuple (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)))))))))))))
- Tup13 :: Tuple (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))))))))))))))
- Tup14 :: Tuple (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)))))))))))))))
- Tup15 :: Tuple (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))))))))))))))))
- type family Sel1' a
- type family Sel2' a
- type family Sel3' a
- type family Sel4' a
- type family Sel5' a
- type family Sel6' a
- type family Sel7' a
- type family Sel8' a
- type family Sel9' a
- type family Sel10' a
- type family Sel11' a
- type family Sel12' a
- type family Sel13' a
- type family Sel14' a
- type family Sel15' a
- data Select a where
- Sel1 :: (Sel1 a b, Sel1' a ~ b) => Select (a :-> Full b)
- Sel2 :: (Sel2 a b, Sel2' a ~ b) => Select (a :-> Full b)
- Sel3 :: (Sel3 a b, Sel3' a ~ b) => Select (a :-> Full b)
- Sel4 :: (Sel4 a b, Sel4' a ~ b) => Select (a :-> Full b)
- Sel5 :: (Sel5 a b, Sel5' a ~ b) => Select (a :-> Full b)
- Sel6 :: (Sel6 a b, Sel6' a ~ b) => Select (a :-> Full b)
- Sel7 :: (Sel7 a b, Sel7' a ~ b) => Select (a :-> Full b)
- Sel8 :: (Sel8 a b, Sel8' a ~ b) => Select (a :-> Full b)
- Sel9 :: (Sel9 a b, Sel9' a ~ b) => Select (a :-> Full b)
- Sel10 :: (Sel10 a b, Sel10' a ~ b) => Select (a :-> Full b)
- Sel11 :: (Sel11 a b, Sel11' a ~ b) => Select (a :-> Full b)
- Sel12 :: (Sel12 a b, Sel12' a ~ b) => Select (a :-> Full b)
- Sel13 :: (Sel13 a b, Sel13' a ~ b) => Select (a :-> Full b)
- Sel14 :: (Sel14 a b, Sel14' a ~ b) => Select (a :-> Full b)
- Sel15 :: (Sel15 a b, Sel15' a ~ b) => Select (a :-> Full b)
- selectPos :: Select a -> Int
Construction
Expressions for constructing tuples
Constructors
Tup2 :: Tuple (a :-> (b :-> Full (a, b))) | |
Tup3 :: Tuple (a :-> (b :-> (c :-> Full (a, b, c)))) | |
Tup4 :: Tuple (a :-> (b :-> (c :-> (d :-> Full (a, b, c, d))))) | |
Tup5 :: Tuple (a :-> (b :-> (c :-> (d :-> (e :-> Full (a, b, c, d, e)))))) | |
Tup6 :: Tuple (a :-> (b :-> (c :-> (d :-> (e :-> (f :-> Full (a, b, c, d, e, f))))))) | |
Tup7 :: Tuple (a :-> (b :-> (c :-> (d :-> (e :-> (f :-> (g :-> Full (a, b, c, d, e, f, g)))))))) | |
Tup8 :: Tuple (a :-> (b :-> (c :-> (d :-> (e :-> (f :-> (g :-> (h :-> Full (a, b, c, d, e, f, g, h))))))))) | |
Tup9 :: Tuple (a :-> (b :-> (c :-> (d :-> (e :-> (f :-> (g :-> (h :-> (i :-> Full (a, b, c, d, e, f, g, h, i)))))))))) | |
Tup10 :: Tuple (a :-> (b :-> (c :-> (d :-> (e :-> (f :-> (g :-> (h :-> (i :-> (j :-> Full (a, b, c, d, e, f, g, h, i, j))))))))))) | |
Tup11 :: Tuple (a :-> (b :-> (c :-> (d :-> (e :-> (f :-> (g :-> (h :-> (i :-> (j :-> (k :-> Full (a, b, c, d, e, f, g, h, i, j, k)))))))))))) | |
Tup12 :: Tuple (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))))))))))))) | |
Tup13 :: Tuple (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)))))))))))))) | |
Tup14 :: Tuple (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))))))))))))))) | |
Tup15 :: Tuple (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)))))))))))))))) |
Instances
Equality Tuple Source | |
StringTree Tuple Source | |
Render Tuple Source | |
Eval Tuple Source | |
Semantic Tuple Source | |
Constrained Tuple Source | |
EvalBind Tuple Source | |
Optimize Tuple Source | |
AlphaEq dom dom dom env => AlphaEq Tuple Tuple dom env Source | |
TupleSat ((:+:) ((:||) Tuple p) dom2) p Source | |
TupleSat ((:||) Tuple p) p Source | |
type Sat Tuple = Top Source |
Projection
These families (Sel1'
- Sel15'
) are needed because of the problem
described in:
http://emil-fp.blogspot.com/2011/08/fundeps-weaker-than-type-families.html
Instances
type Sel1' (a, b) = a Source | |
type Sel1' (a, b, c) = a Source | |
type Sel1' (a, b, c, d) = a Source | |
type Sel1' (a, b, c, d, e) = a Source | |
type Sel1' (a, b, c, d, e, f) = a Source | |
type Sel1' (a, b, c, d, e, f, g) = a Source | |
type Sel1' (a, b, c, d, e, f, g, h) = a Source | |
type Sel1' (a, b, c, d, e, f, g, h, i) = a Source | |
type Sel1' (a, b, c, d, e, f, g, h, i, j) = a Source | |
type Sel1' (a, b, c, d, e, f, g, h, i, j, k) = a Source | |
type Sel1' (a, b, c, d, e, f, g, h, i, j, k, l) = a Source | |
type Sel1' (a, b, c, d, e, f, g, h, i, j, k, l, m) = a Source | |
type Sel1' (a, b, c, d, e, f, g, h, i, j, k, l, m, n) = a Source | |
type Sel1' (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) = a Source |
Instances
type Sel2' (a, b) = b Source | |
type Sel2' (a, b, c) = b Source | |
type Sel2' (a, b, c, d) = b Source | |
type Sel2' (a, b, c, d, e) = b Source | |
type Sel2' (a, b, c, d, e, f) = b Source | |
type Sel2' (a, b, c, d, e, f, g) = b Source | |
type Sel2' (a, b, c, d, e, f, g, h) = b Source | |
type Sel2' (a, b, c, d, e, f, g, h, i) = b Source | |
type Sel2' (a, b, c, d, e, f, g, h, i, j) = b Source | |
type Sel2' (a, b, c, d, e, f, g, h, i, j, k) = b Source | |
type Sel2' (a, b, c, d, e, f, g, h, i, j, k, l) = b Source | |
type Sel2' (a, b, c, d, e, f, g, h, i, j, k, l, m) = b Source | |
type Sel2' (a, b, c, d, e, f, g, h, i, j, k, l, m, n) = b Source | |
type Sel2' (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) = b Source |
Instances
type Sel3' (a, b, c) = c Source | |
type Sel3' (a, b, c, d) = c Source | |
type Sel3' (a, b, c, d, e) = c Source | |
type Sel3' (a, b, c, d, e, f) = c Source | |
type Sel3' (a, b, c, d, e, f, g) = c Source | |
type Sel3' (a, b, c, d, e, f, g, h) = c Source | |
type Sel3' (a, b, c, d, e, f, g, h, i) = c Source | |
type Sel3' (a, b, c, d, e, f, g, h, i, j) = c Source | |
type Sel3' (a, b, c, d, e, f, g, h, i, j, k) = c Source | |
type Sel3' (a, b, c, d, e, f, g, h, i, j, k, l) = c Source | |
type Sel3' (a, b, c, d, e, f, g, h, i, j, k, l, m) = c Source | |
type Sel3' (a, b, c, d, e, f, g, h, i, j, k, l, m, n) = c Source | |
type Sel3' (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) = c Source |
Instances
type Sel4' (a, b, c, d) = d Source | |
type Sel4' (a, b, c, d, e) = d Source | |
type Sel4' (a, b, c, d, e, f) = d Source | |
type Sel4' (a, b, c, d, e, f, g) = d Source | |
type Sel4' (a, b, c, d, e, f, g, h) = d Source | |
type Sel4' (a, b, c, d, e, f, g, h, i) = d Source | |
type Sel4' (a, b, c, d, e, f, g, h, i, j) = d Source | |
type Sel4' (a, b, c, d, e, f, g, h, i, j, k) = d Source | |
type Sel4' (a, b, c, d, e, f, g, h, i, j, k, l) = d Source | |
type Sel4' (a, b, c, d, e, f, g, h, i, j, k, l, m) = d Source | |
type Sel4' (a, b, c, d, e, f, g, h, i, j, k, l, m, n) = d Source | |
type Sel4' (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) = d Source |
Instances
type Sel5' (a, b, c, d, e) = e Source | |
type Sel5' (a, b, c, d, e, f) = e Source | |
type Sel5' (a, b, c, d, e, f, g) = e Source | |
type Sel5' (a, b, c, d, e, f, g, h) = e Source | |
type Sel5' (a, b, c, d, e, f, g, h, i) = e Source | |
type Sel5' (a, b, c, d, e, f, g, h, i, j) = e Source | |
type Sel5' (a, b, c, d, e, f, g, h, i, j, k) = e Source | |
type Sel5' (a, b, c, d, e, f, g, h, i, j, k, l) = e Source | |
type Sel5' (a, b, c, d, e, f, g, h, i, j, k, l, m) = e Source | |
type Sel5' (a, b, c, d, e, f, g, h, i, j, k, l, m, n) = e Source | |
type Sel5' (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) = e Source |
Instances
type Sel6' (a, b, c, d, e, f) = f Source | |
type Sel6' (a, b, c, d, e, f, g) = f Source | |
type Sel6' (a, b, c, d, e, f, g, h) = f Source | |
type Sel6' (a, b, c, d, e, f, g, h, i) = f Source | |
type Sel6' (a, b, c, d, e, f, g, h, i, j) = f Source | |
type Sel6' (a, b, c, d, e, f, g, h, i, j, k) = f Source | |
type Sel6' (a, b, c, d, e, f, g, h, i, j, k, l) = f Source | |
type Sel6' (a, b, c, d, e, f, g, h, i, j, k, l, m) = f Source | |
type Sel6' (a, b, c, d, e, f, g, h, i, j, k, l, m, n) = f Source | |
type Sel6' (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) = f Source |
Instances
type Sel7' (a, b, c, d, e, f, g) = g Source | |
type Sel7' (a, b, c, d, e, f, g, h) = g Source | |
type Sel7' (a, b, c, d, e, f, g, h, i) = g Source | |
type Sel7' (a, b, c, d, e, f, g, h, i, j) = g Source | |
type Sel7' (a, b, c, d, e, f, g, h, i, j, k) = g Source | |
type Sel7' (a, b, c, d, e, f, g, h, i, j, k, l) = g Source | |
type Sel7' (a, b, c, d, e, f, g, h, i, j, k, l, m) = g Source | |
type Sel7' (a, b, c, d, e, f, g, h, i, j, k, l, m, n) = g Source | |
type Sel7' (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) = g Source |
Instances
type Sel8' (a, b, c, d, e, f, g, h) = h Source | |
type Sel8' (a, b, c, d, e, f, g, h, i) = h Source | |
type Sel8' (a, b, c, d, e, f, g, h, i, j) = h Source | |
type Sel8' (a, b, c, d, e, f, g, h, i, j, k) = h Source | |
type Sel8' (a, b, c, d, e, f, g, h, i, j, k, l) = h Source | |
type Sel8' (a, b, c, d, e, f, g, h, i, j, k, l, m) = h Source | |
type Sel8' (a, b, c, d, e, f, g, h, i, j, k, l, m, n) = h Source | |
type Sel8' (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) = h Source |
Instances
type Sel9' (a, b, c, d, e, f, g, h, i) = i Source | |
type Sel9' (a, b, c, d, e, f, g, h, i, j) = i Source | |
type Sel9' (a, b, c, d, e, f, g, h, i, j, k) = i Source | |
type Sel9' (a, b, c, d, e, f, g, h, i, j, k, l) = i Source | |
type Sel9' (a, b, c, d, e, f, g, h, i, j, k, l, m) = i Source | |
type Sel9' (a, b, c, d, e, f, g, h, i, j, k, l, m, n) = i Source | |
type Sel9' (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) = i Source |
Instances
type Sel10' (a, b, c, d, e, f, g, h, i, j) = j Source | |
type Sel10' (a, b, c, d, e, f, g, h, i, j, k) = j Source | |
type Sel10' (a, b, c, d, e, f, g, h, i, j, k, l) = j Source | |
type Sel10' (a, b, c, d, e, f, g, h, i, j, k, l, m) = j Source | |
type Sel10' (a, b, c, d, e, f, g, h, i, j, k, l, m, n) = j Source | |
type Sel10' (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) = j Source |
Instances
type Sel11' (a, b, c, d, e, f, g, h, i, j, k) = k Source | |
type Sel11' (a, b, c, d, e, f, g, h, i, j, k, l) = k Source | |
type Sel11' (a, b, c, d, e, f, g, h, i, j, k, l, m) = k Source | |
type Sel11' (a, b, c, d, e, f, g, h, i, j, k, l, m, n) = k Source | |
type Sel11' (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) = k Source |
Expressions for selecting elements of a tuple
Constructors
Sel1 :: (Sel1 a b, Sel1' a ~ b) => Select (a :-> Full b) | |
Sel2 :: (Sel2 a b, Sel2' a ~ b) => Select (a :-> Full b) | |
Sel3 :: (Sel3 a b, Sel3' a ~ b) => Select (a :-> Full b) | |
Sel4 :: (Sel4 a b, Sel4' a ~ b) => Select (a :-> Full b) | |
Sel5 :: (Sel5 a b, Sel5' a ~ b) => Select (a :-> Full b) | |
Sel6 :: (Sel6 a b, Sel6' a ~ b) => Select (a :-> Full b) | |
Sel7 :: (Sel7 a b, Sel7' a ~ b) => Select (a :-> Full b) | |
Sel8 :: (Sel8 a b, Sel8' a ~ b) => Select (a :-> Full b) | |
Sel9 :: (Sel9 a b, Sel9' a ~ b) => Select (a :-> Full b) | |
Sel10 :: (Sel10 a b, Sel10' a ~ b) => Select (a :-> Full b) | |
Sel11 :: (Sel11 a b, Sel11' a ~ b) => Select (a :-> Full b) | |
Sel12 :: (Sel12 a b, Sel12' a ~ b) => Select (a :-> Full b) | |
Sel13 :: (Sel13 a b, Sel13' a ~ b) => Select (a :-> Full b) | |
Sel14 :: (Sel14 a b, Sel14' a ~ b) => Select (a :-> Full b) | |
Sel15 :: (Sel15 a b, Sel15' a ~ b) => Select (a :-> Full b) |
Instances
Equality Select Source | |
StringTree Select Source | |
Render Select Source | |
Eval Select Source | |
Semantic Select Source | |
Constrained Select Source | |
EvalBind Select Source | |
Optimize Select Source | |
AlphaEq dom dom dom env => AlphaEq Select Select dom env Source | |
TupleSat ((:+:) ((:||) Select p) dom2) p Source | |
TupleSat ((:||) Select p) p Source | |
type Sat Select = Top Source |