git.iko.soy/typeable/bloodhound
on master help sign in
Switch derive to generics-sop

Until https://github.com/nick8325/quickcheck/pull/112 is merged and released

commit3534c68f2e8964a667b787f100e7e45ca3d88814 authorOleg Grenrus <oleg.grenrus@iki.fi> dateFri 18 Nov 2016, 12:19 (10 years ago) parent4170273
3 files changed+6−3
bloodhound.cabal+1−1 stack-7.8.yaml+1 tests/tests.hs+4−2
bloodhound.cabal+1−1
@@ -72,7 +72,7 @@ test-suite tests
7272 unordered-containers >= 0.2.5.0 && <0.3,
7373 mtl,
7474 quickcheck-properties,
75− generics-sop,
75+ generics-sop >=0.2 && <0.3,
7676 errors,
7777 exceptions,
7878 temporary,
stack-7.8.yaml+1
@@ -15,4 +15,5 @@ extra-deps:
1515- tagged-0.8.3
1616- uri-bytestring-0.1.9
1717- void-0.7.1
18+- generics-sop-0.2.2.0
1819resolver: lts-2.18
tests/tests.hs+4−2
@@ -7,9 +7,11 @@
77{-# LANGUAGE OverloadedStrings #-}
88{-# LANGUAGE RecordWildCards #-}
99{-# LANGUAGE ScopedTypeVariables #-}
10−{-# LANGUAGE TemplateHaskell #-}
1110{-# LANGUAGE TypeOperators #-}
1211{-# OPTIONS_GHC -fno-warn-orphans #-}
12+#if __GLASGOW_HASKELL__ < 800
13+{-# OPTIONS_GHC -fcontext-stack=100 #-}
14+#endif
1315module Main where
1416
1517import Control.Applicative
@@ -1853,7 +1855,7 @@ sopArbitrary :: forall a. (Generic a, SOP.GTo a, SOP.All SOP.SListI (SOP.GCode a
18531855sopArbitrary = fmap SOP.gto sopArbitrary'
18541856
18551857sopArbitrary' :: forall xss. (SOP.All SOP.SListI xss, SOP.All2 Arbitrary xss) => Gen (SOP.SOP SOP.I xss)
1856−sopArbitrary' = oneof (map SOP.hsequence $ SOP.apInjs_POP $ SOP.hcpure p arbitrary)
1858+sopArbitrary' = SOP.hsequence =<< elements (SOP.apInjs_POP $ SOP.hcpure p arbitrary)
18571859 where
18581860 p :: Proxy Arbitrary
18591861 p = Proxy