From b048acb53538cd0bb99128839b963886574c6b63 Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Thu, 24 Oct 2024 12:42:56 -0700 Subject: [PATCH] Fix JSON instances for `OutputNames` We want `deriving newtype` so that we use the `Set Text` representation and not `{"unOutputNames": [...]}`. --- src/Nix/Diff/Types.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Nix/Diff/Types.hs b/src/Nix/Diff/Types.hs index 47e35df..54fdfdc 100644 --- a/src/Nix/Diff/Types.hs +++ b/src/Nix/Diff/Types.hs @@ -79,9 +79,8 @@ type Argument = Text -- | A set of Nix derivation output names. newtype OutputNames = OutputNames {unOutputNames :: Set Text} - deriving newtype (Eq, Ord) + deriving newtype (Eq, Ord, ToJSON, FromJSON) deriving stock (Show, Generic, Data) - deriving anyclass (ToJSON, FromJSON) deriving Arbitrary via GenericArbitrary OutputNames -- Derivation diff