on master help sign in
remove custom arbitrary instance in preference to arbitrary-instances versions

also reformat ever longer build-depends line

commitf4fe88eed4b8443fbf8541bf9f890dd4490eedc2 authorAgentM <agentm@themactionfaction.com> dateFri 10 Aug 2018, 23:30 (8 years ago) parentddac411
2 files changed+2−78
project-m36.cabal+2−66 src/lib/ProjectM36/Arbitrary.hs−12
project-m36.cabal+2−66
@@ -22,73 +22,9 @@ Flag profiler
2222 Default: False
2323 Manual: True
2424
25+
2526Library
26− Build-Depends: base>=4.8 && < 6.0
27− ,ghc >= 7.8 && < 8.3
28− ,ghc-paths
29− ,mtl
30− ,containers
31− ,unordered-containers
32− ,hashable
33− ,haskeline
34− ,directory
35− ,MonadRandom
36− ,random-shuffle
37− --critical uuid bug in lesser versions https://www.reddit.com/r/haskell/comments/4myot5/psa_make_sure_to_use_uuid_1312/
38− ,uuid >= 1.3.12
39− ,cassava >= 0.4.5.1 && < 0.6
40− ,text
41− ,bytestring
42− ,deepseq
43− ,deepseq-generics
44− ,vector
45− ,parallel
46− ,monad-parallel
47− ,exceptions
48− ,transformers
49− ,gnuplot
50− ,binary
51− ,filepath
52− ,zlib
53− ,directory
54− ,vector-binary-instances
55− ,temporary
56− ,stm
57− ,time
58− ,hashable-time
59− ,old-locale
60− ,rset
61− --used for CSV parsing
62− ,attoparsec
63− ,either
64− ,base64-bytestring
65− ,data-interval
66− ,extended-reals
67− ,network-transport
68− -- aeson 1.1 and above includes instances for UUID types
69− ,aeson >= 1.1
70− ,path-pieces
71− ,conduit
72− ,resourcet
73− ,http-api-data
74− ,semigroups
75− -- used for arbitrary tuples
76− ,QuickCheck
77−--needed for remote access
78− ,distributed-process-client-server >= 0.2.3
79− ,distributed-process >= 0.7.2
80− ,distributed-process-extras >= 0.3.2
81− ,distributed-process-async >= 0.2.4.1
82− ,network-transport-tcp >= 0.6.0
83− ,network-transport
84− ,list-t
85− ,stm-containers >= 0.2.15
86− ,foldl
87− ,deferred-folds
88− ,optparse-applicative
89− ,Glob
90−--used for hashing the transaction graph file to check for differences
91− ,cryptohash-sha256
27+ Build-Depends: base>=4.8 && < 6.0, ghc >= 7.8 && < 8.3, ghc-paths, mtl, containers, unordered-containers, hashable, haskeline, directory, MonadRandom, random-shuffle, uuid >= 1.3.12, cassava >= 0.4.5.1 && < 0.6, text, bytestring, deepseq, deepseq-generics, vector, parallel, monad-parallel, exceptions, transformers, gnuplot, binary, filepath, zlib, directory, vector-binary-instances, temporary, stm, time, hashable-time, old-locale, rset, attoparsec, either, base64-bytestring, data-interval, extended-reals, network-transport, aeson >= 1.1, path-pieces, conduit, resourcet, http-api-data, semigroups, QuickCheck, quickcheck-instances, distributed-process-client-server >= 0.2.3, distributed-process >= 0.7.2, distributed-process-extras >= 0.3.2, distributed-process-async >= 0.2.4.1, network-transport-tcp >= 0.6.0, network-transport, list-t, stm-containers >= 0.2.15, foldl, deferred-folds, optparse-applicative, Glob, cryptohash-sha256
9228 Exposed-Modules: ProjectM36.Error,
9329 ProjectM36.Transaction,
9430 ProjectM36.TransactionGraph,
src/lib/ProjectM36/Arbitrary.hs−12
@@ -75,18 +75,6 @@ maybeToRight :: b -> Maybe a -> Either b a
7575maybeToRight _ (Just x) = Right x
7676maybeToRight y Nothing = Left y
7777
78−instance Arbitrary Text where
79− arbitrary = pack <$> elements (map (replicate 3) ['A'..'Z'])
80−
81−instance Arbitrary Day where
82− arbitrary = ModifiedJulianDay <$> (arbitrary :: Gen Integer)
83−
84−instance Arbitrary UTCTime where
85− arbitrary = UTCTime <$> arbitrary <*> (secondsToDiffTime <$> choose(0,86400))
86−
87−instance Arbitrary B.ByteString where
88− arbitrary = B.pack <$> (arbitrary :: Gen String)
89−
9078arbitraryRelationTuple :: Attributes -> WithTCMap Gen (Either RelationalError RelationTuple)
9179arbitraryRelationTuple attris = do
9280 tcMap <- ask