Template Haskell functions for generating functions similar to those in Data.List for tuples of statically known size.