on master help sign in
Bump various dependencies.
6b56341Antoine Latter
.travis.yml+1
@@ -1,5 +1,6 @@
1language: haskell
1language: haskell
2ghc:
2ghc:
3+ - 7.10
3 - 7.8
4 - 7.8
4 - 7.6
5 - 7.6
5 - 7.4
6 - 7.4
uuid-types/tests/BenchByteString.hsdeleted−82
@@ -1,82 +0,0 @@
1−import Control.Applicative ((<*>))
2−import Data.Functor ((<$>))
3−
4−import Data.ByteString (ByteString)
5−import qualified Data.ByteString.Char8 as BC8
6−import System.Random
7−import Test.QuickCheck
8−
9−import Criterion
10−import Criterion.Main
11−
12−import Data.UUID.Types
13−
14−instance Arbitrary UUID where
15− arbitrary =
16− fromWords <$> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary
17−
18−-- Testing what we do in the codebase
19−fromASCIIBytes_naive :: ByteString -> Maybe UUID
20−fromASCIIBytes_naive = fromString . BC8.unpack
21−
22−toASCIIBytes_naive :: UUID -> ByteString
23−toASCIIBytes_naive = BC8.pack . toString
24−
25−randomUUIDs :: IO [UUID]
26−randomUUIDs = sample' arbitrary
27−
28−randomCorrect :: IO [String]
29−randomCorrect = map toString <$> randomUUIDs
30−
31−randomSlightlyWrong :: IO [String]
32−randomSlightlyWrong = mapM screw =<< randomCorrect
33− where
34− screw s = do
35− ix <- randomRIO (0, length s - 1)
36− return (take ix s ++ "x" ++ drop (ix + 1) s)
37−
38−randomVeryWrong :: IO [String]
39−randomVeryWrong = sample' arbitrary
40−
41−main :: IO ()
42−main = do
43− uuids <- randomUUIDs
44− correct <- randomCorrect
45− let correctBytes = map BC8.pack correct
46− slightlyWrong <- randomSlightlyWrong
47− let slightlyWrongBytes = map BC8.pack slightlyWrong
48− veryWrong <- randomVeryWrong
49− let veryWrongBytes = map BC8.pack veryWrong
50−
51− defaultMain
52− [ bgroup "decoding"
53− [ bcompare
54− [ bgroup "correct"
55− [ bench "fromASCIIBytes" (nf (map fromASCIIBytes) correctBytes)
56− , bench "fromString" (nf (map fromString) correct)
57− , bench "fromASCIIBytes_naive" (nf (map fromASCIIBytes_naive) correctBytes)
58− ]
59− ]
60− , bcompare
61− [ bgroup "slightly wrong"
62− [ bench "fromASCIIBytes" (nf (map fromASCIIBytes) slightlyWrongBytes)
63− , bench "fromString" (nf (map fromString) slightlyWrong)
64− , bench "fromASCIIBytes_naive" (nf (map fromASCIIBytes_naive) slightlyWrongBytes)
65− ]
66− ]
67− , bcompare
68− [ bgroup "very wrong"
69− [ bench "fromASCIIBytes" (nf (map fromASCIIBytes) veryWrongBytes)
70− , bench "fromString" (nf (map fromString) veryWrong)
71− , bench "fromASCIIBytes_naive" (nf (map fromASCIIBytes_naive) veryWrongBytes)
72− ]
73− ]
74− ]
75− , bcompare
76− [ bgroup "encoding"
77− [ bench "toASCIIBytes" (nf (map toASCIIBytes) uuids)
78− , bench "toString" (nf (map toString) uuids)
79− , bench "toASCIIBytes_naive" (nf (map toASCIIBytes_naive) uuids)
80− ]
81− ]
82− ]
uuid-types/tests/BenchUUID.hs+1−1
@@ -55,7 +55,7 @@ main = do
55
55
56 bgroup "storable" [
56 bgroup "storable" [
57 bench "peek" $ nfIO (peek uuidPtr),
57 bench "peek" $ nfIO (peek uuidPtr),
58− bench "poke" $ poke uuidPtr u1
58+ bench "poke" $ whnfIO $ poke uuidPtr u1
59 ]
59 ]
60 ]
60 ]
61
61
uuid-types/uuid-types.cabal+3−15
@@ -57,7 +57,7 @@ Test-Suite testuuid
57 uuid-types,
57 uuid-types,
58 bytestring >= 0.9 && < 0.11,
58 bytestring >= 0.9 && < 0.11,
59 HUnit >=1.2 && < 1.3,
59 HUnit >=1.2 && < 1.3,
60− QuickCheck >=2.4 && < 2.8,
60+ QuickCheck >=2.4 && < 2.9,
61 test-framework == 0.8.*,
61 test-framework == 0.8.*,
62 test-framework-hunit == 0.3.*,
62 test-framework-hunit == 0.3.*,
63 test-framework-quickcheck2 == 0.3.*
63 test-framework-quickcheck2 == 0.3.*
@@ -72,18 +72,6 @@ benchmark benchmark
72 uuid-types,
72 uuid-types,
73 bytestring >= 0.9 && < 0.11,
73 bytestring >= 0.9 && < 0.11,
74 containers >= 0.4 && < 0.6,
74 containers >= 0.4 && < 0.6,
75− criterion >= 0.4 && < 0.9,
75+ criterion >= 0.4 && < 1.1,
76− deepseq >= 1.1 && < 1.4,
76+ deepseq >= 1.1 && < 1.5,
77 random >= 1.0.1 && < 1.2
77 random >= 1.0.1 && < 1.2
78−
79−benchmark benchbytestring
80− Type: exitcode-stdio-1.0
81− Hs-Source-Dirs: tests
82− Main-Is: BenchByteString.hs
83− Ghc-Options: -threaded -rtsopts -Wall -O2 -fno-warn-orphans
84− Build-Depends: base >= 4 && < 5
85− , uuid-types
86− , bytestring >= 0.10
87− , criterion >= 0.8
88− , random >= 1.0
89− , QuickCheck >= 2