-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Generate (non-recursive) utility functions for tuples of statically known size -- -- Template Haskell functions for generating functions similar to those -- in Data.List for tuples of statically known size. @package tuple-th @version 0.1 -- | Note: One-tuples are currently understood as just the original type by -- Template Haskell (though this could be an undefined case which is not -- guaranteed to work this way?), so for example, we get -- --
--   $(catTuples 1 2) = \x (y,z) -> (x,y,z)
--   
module TupleTH -- | Makes a homogenous tuple type of the given size and element type -- --
--   $(htuple 2) [t| Char |] = (Char,Char)
--   
htuple :: Int -> TypeQ -> TypeQ -- | Type of the generated expression: -- --
--   (a -> b) -> (a, ..) -> (b, ..)
--   
mapTuple :: Int -> ExpQ -- | Takes the mapping as a quoted expression. This can sometimes produce -- an expression that typechecks when the analogous expression using -- filterTuple does not, e.g.: -- --
--   $(mapTuple 2) Just        ((),"foo") -- Type error 
--   $(mapTuple' 2 [| Just |]) ((),"foo") -- OK
--   
mapTuple' :: Int -> ExpQ -> Q Exp -- | Type of the generated expression: -- --
--   (a -> Bool) -> (a, ..) -> [a]
--   
filterTuple :: Int -> ExpQ -- | Takes the predicate as a quoted expression. See mapTuple' for -- how this can be useful. filterTuple' :: Int -> ExpQ -> ExpQ -- | reindexTuple n js creates the function -- --
--   \(x_0, ..., x_{n-1}) -> (x_{js !! 0}, x_{js !! 1}, .. x_{last js})
--   
-- -- For example, -- --
--   $(reindexTuple 3 [1,1,0,0]) ('a','b','c') == ('b','b','a','a')
--   
-- -- Each element of js must be nonnegative and less than -- n. reindexTuple :: Int -> [Int] -> Q Exp -- | Like reverse. reverseTuple :: Int -> Q Exp -- | rotateTuple n k creates a function which rotates an -- n-tuple rightwards by k positions (k may be -- negative or greater than n-1). rotateTuple :: Int -> Int -> Q Exp -- | Like zip. -- -- Type of the generated expression: -- --
--   (a1, a2, ..) -> (b1, b2, ..) -> ((a1,b1), (a2,b2), ..)
--   
zipTuple :: Int -> Q Exp -- | Type of the generated expression: -- --
--   (a1, ..) -> (b1, ..) -> (a1, .., b1, ..)
--   
catTuples :: Int -> Int -> Q Exp -- | uncatTuple n m is the inverse function of uncurry -- (catTuples n m). uncatTuple :: Int -> Int -> Q Exp -- | Like zipWith. -- -- Type of the generated expression: -- --
--   (a -> b -> c) -> (a, ..) -> (b, ..) -> (c, ..)
--   
zipTupleWith :: Int -> ExpQ -- | Takes the zipping function as a quoted expression. See -- mapTuple' for how this can be useful. zipTupleWith' :: Int -> ExpQ -> ExpQ -- | Type of the generated expression: -- --
--   [a] -> Maybe (a, ..)
--   
safeTupleFromList :: Int -> Q Exp -- | Type of the generated expression: -- --
--   [a] -> (a, ..)
--   
-- -- The generated function is partial. tupleFromList :: Int -> Q Exp constTuple :: Int -> Q Exp -- |
--   Generate a projection (like 'fst' and 'snd').
--   
proj :: Int -> Int -> ExpQ -- | Like elem. -- -- Type of generated expression: -- --
--   Eq a => a -> (a, ..) -> Bool
--   
elemTuple :: Int -> Q Exp tupleToList :: Int -> Q Exp sumTuple :: Int -> Q Exp -- | Type of the generated expression: -- --
--   (a -> r -> r) -> r -> (a, ..) -> r
--   
foldrTuple :: Int -> ExpQ -- | Takes the folding function (but not the seed element) as a quoted -- expression. See mapTuple' for how this can be useful. foldrTuple' :: Int -> ExpQ -> ExpQ -- | Type of the generated expression: -- --
--   (a -> a -> a) -> (a, ..) -> a
--   
foldr1Tuple :: Int -> ExpQ -- | Takes the folding function as a quoted expression. See -- mapTuple' for how this can be useful. foldr1Tuple' :: Int -> ExpQ -> Q Exp -- | Type of the generated expression: -- --
--   (r -> a -> r) -> r -> (a, ..) -> r
--   
foldlTuple :: Int -> ExpQ -- | Takes the folding function (but not the seed element) as a quoted -- expression. See mapTuple' for how this can be useful. foldlTuple' :: Int -> ExpQ -> ExpQ -- | Type of the generated expression: -- --
--   (a -> a -> a) -> (a, ..) -> a
--   
foldl1Tuple :: Int -> ExpQ -- | Takes the folding function as a quoted expression. See -- mapTuple' for how this can be useful. foldl1Tuple' :: Int -> ExpQ -> Q Exp -- | Like and. andTuple :: Int -> Q Exp -- | Like or. orTuple :: Int -> Q Exp -- | Like any. anyTuple :: Int -> Q Exp anyTuple' :: Int -> Q Exp -> Q Exp -- | Like all. allTuple :: Int -> Q Exp allTuple' :: Int -> Q Exp -> Q Exp -- | Like sequence. sequenceTuple :: Int -> Q Exp -- | Like sequenceA. sequenceATuple :: Int -> Q Exp