about summary refs log tree commit diff
path: root/generic-arbitrary-export-garbitrary.patch
diff options
context:
space:
mode:
authorGriffin Smith <root@gws.fyi>2019-11-30T03·57-0500
committerGriffin Smith <root@gws.fyi>2019-11-30T03·57-0500
commit7d8ce026a2acc5a4d208110750be188f0ce5591c (patch)
tree7a2fc4080eae2b4c1280977fb0ea25b26b25ce96 /generic-arbitrary-export-garbitrary.patch
parent0abcd8c9581f0017cb2bd59a09e93800ea8f3b1f (diff)
Add DerivingVia newtype for generic arbitrary
Add a newtype, GenericArbitrary, which can be used with -XDerivingVia to
derive Arbitrary instances for types with Generic, via patching
generic-arbitrary to expose the underlying typeclass it uses for
surfacing the type information.
Diffstat (limited to 'generic-arbitrary-export-garbitrary.patch')
-rw-r--r--generic-arbitrary-export-garbitrary.patch12
1 files changed, 12 insertions, 0 deletions
diff --git a/generic-arbitrary-export-garbitrary.patch b/generic-arbitrary-export-garbitrary.patch
new file mode 100644
index 000000000000..f0c936bfca18
--- /dev/null
+++ b/generic-arbitrary-export-garbitrary.patch
@@ -0,0 +1,12 @@
+diff --git a/src/Test/QuickCheck/Arbitrary/Generic.hs b/src/Test/QuickCheck/Arbitrary/Generic.hs
+index fed6ab3..91f59f1 100644
+--- a/src/Test/QuickCheck/Arbitrary/Generic.hs
++++ b/src/Test/QuickCheck/Arbitrary/Generic.hs
+@@ -23,6 +23,7 @@ The generated 'arbitrary' method is equivalent to
+ 
+ module Test.QuickCheck.Arbitrary.Generic
+   ( Arbitrary(..)
++  , GArbitrary
+   , genericArbitrary
+   , genericShrink
+   ) where