on master help sign in
Bump various dependencies.
commit6b56341ecfec870e40cfbe56138749eb3234a864 authorAntoine Latter <aslatter@gmail.com> dateMon 30 Mar 2015, 06:25 (12 years ago) parented103e5
4 files changed+5−98
.travis.yml+1 uuid-types/tests/BenchByteString.hs−82 uuid-types/tests/BenchUUID.hs+1−1 uuid-types/uuid-types.cabal+3−15
.travis.yml+1
@@ -1,5 +1,6 @@
11language: haskell
22ghc:
3+ - 7.10
34 - 7.8
45 - 7.6
56 - 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
5555
5656 bgroup "storable" [
5757 bench "peek" $ nfIO (peek uuidPtr),
58− bench "poke" $ poke uuidPtr u1
58+ bench "poke" $ whnfIO $ poke uuidPtr u1
5959 ]
6060 ]
6161
uuid-types/uuid-types.cabal+3−15
@@ -57,7 +57,7 @@ Test-Suite testuuid
5757 uuid-types,
5858 bytestring >= 0.9 && < 0.11,
5959 HUnit >=1.2 && < 1.3,
60− QuickCheck >=2.4 && < 2.8,
60+ QuickCheck >=2.4 && < 2.9,
6161 test-framework == 0.8.*,
6262 test-framework-hunit == 0.3.*,
6363 test-framework-quickcheck2 == 0.3.*
@@ -72,18 +72,6 @@ benchmark benchmark
7272 uuid-types,
7373 bytestring >= 0.9 && < 0.11,
7474 containers >= 0.4 && < 0.6,
75− criterion >= 0.4 && < 0.9,
76− deepseq >= 1.1 && < 1.4,
75+ criterion >= 0.4 && < 1.1,
76+ deepseq >= 1.1 && < 1.5,
7777 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