Skip to content

Commit 643ec1e

Browse files
committed
move TH instance Eq1 NValue' to the parent as derivable
Eq1 instance was previously derived as an orphan through TemplateHaskell. And that TH instance when moved into Nix.Value was breaking the NValue' data constructor deriving. So it is moved as derivable instance.
1 parent af02e38 commit 643ec1e

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/Nix/Value.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ type MonadDataContext f (m :: * -> *)
176176
-- | At the time of constructor, the expected arguments to closures are values
177177
-- that may contain thunks. The type of such thunks are fixed at that time.
178178
newtype NValue' t f m a = NValue { _nValue :: f (NValueF (NValue t f m) m a) }
179-
deriving (Generic, Typeable, Functor, Foldable)
179+
deriving (Generic, Typeable, Functor, Foldable, Eq1)
180180

181181
instance (Comonad f, Show a) => Show (NValue' t f m a) where
182182
show (NValue (extract -> v)) = show v

src/Nix/Value/Equal.hs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ import Control.Monad.Free
3333
import Control.Monad.Trans.Class
3434
import Control.Monad.Trans.Except
3535
import Data.Align
36-
import Data.Eq.Deriving
3736
import Data.Functor.Identity
3837
import qualified Data.HashMap.Lazy as M
3938
import Data.These
@@ -176,5 +175,3 @@ thunkEqM lt rt = force lt $ \lv -> force rt $ \rv ->
176175
(NVList _ , NVList _ ) -> unsafePtrEq
177176
(NVSet _ _ , NVSet _ _ ) -> unsafePtrEq
178177
_ -> valueEqM lv rv
179-
180-
$(deriveEq1 ''NValue')

0 commit comments

Comments
 (0)