tuple-th 0.2.1 → 0.2.2
raw patch · 3 files changed
+6/−2 lines, 3 files
Files
- TupleTH.hs +1/−1
- tests/Test.hs +4/−0
- tuple-th.cabal +1/−1
TupleTH.hs view
@@ -94,7 +94,7 @@ -- -- > (a1, a2, ..) -> (b1, b2, ..) -> ((a1,b1), (a2,b2), ..) zipTuple :: Int -> Q Exp-zipTuple n = zipTupleWith' n (conE (tupleDataName n))+zipTuple n = zipTupleWith' n (conE (tupleDataName 2)) -- | Like 'zipWith'. --
tests/Test.hs view
@@ -25,6 +25,10 @@ prop_zipTuple t@(x::Int,y::Integer) t'@(x'::Char,y'::String) = $(zipTuple 2) t t' == ((x,x'),(y,y')) +prop_zipTuple3 :: (Int, Integer, Int) -> (Char, String, String) -> Bool+prop_zipTuple3 t@(x,y,z) t'@(x',y',z') =+ $(zipTuple 3) t t' == ((x,x'),(y,y'),(z,z'))+ prop_tupleFromList :: Int -> Int -> Int -> Bool prop_tupleFromList (x::Int) y z = $(tupleFromList 3) [x,y,z] == (x,y,z) prop_safeTupleFromList :: Int -> Int -> Int -> Bool
tuple-th.cabal view
@@ -1,5 +1,5 @@ Name: tuple-th-Version: 0.2.1+Version: 0.2.2 Synopsis: Generate (non-recursive) utility functions for tuples of statically known size Description: Template Haskell functions for generating functions similar to those in Data.List for tuples of statically known size. License: BSD3