diff options
author | Griffin Smith <root@gws.fyi> | 2019-11-30T03·57-0500 |
---|---|---|
committer | Griffin Smith <root@gws.fyi> | 2019-11-30T03·57-0500 |
commit | 7d8ce026a2acc5a4d208110750be188f0ce5591c (patch) | |
tree | 7a2fc4080eae2b4c1280977fb0ea25b26b25ce96 /haskell-overlay.nix | |
parent | 0abcd8c9581f0017cb2bd59a09e93800ea8f3b1f (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 'haskell-overlay.nix')
-rw-r--r-- | haskell-overlay.nix | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/haskell-overlay.nix b/haskell-overlay.nix new file mode 100644 index 000000000000..90ba35c6af6e --- /dev/null +++ b/haskell-overlay.nix @@ -0,0 +1,7 @@ +{ nixpkgs ? import ./nixpkgs.nix {} }: +let inherit (nixpkgs) pkgs; +in self: super: rec { + generic-arbitrary = pkgs.haskell.lib.appendPatch + super.generic-arbitrary + [ ./generic-arbitrary-export-garbitrary.patch ]; +} |