Skip to content

Commit 9e87d0d

Browse files
committed
Expr.Types: NKeyName: mv standalone instances into list
1 parent 2af0a6f commit 9e87d0d

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/Nix/Expr/Types.hs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,11 @@ data NKeyName r
217217
| StaticKey !VarName
218218
-- ^
219219
-- > StaticKey "x" ~ x
220-
deriving (Eq, Ord, Generic, Typeable, Data, Show, Read, NFData, Hashable)
221-
222-
instance Serialise r => Serialise (NKeyName r)
220+
deriving
221+
( Eq, Ord, Generic
222+
, Typeable, Data, NFData, Serialise, Binary, ToJSON, FromJSON
223+
, Show, Read, Hashable
224+
)
223225

224226
instance Serialise Pos where
225227
encode = Serialise.encode . unPos
@@ -304,11 +306,6 @@ instance Traversable NKeyName where
304306
DynamicKey EscapedNewline -> pure $ DynamicKey EscapedNewline
305307
StaticKey key -> pure $ StaticKey key
306308

307-
instance Binary a => Binary (NKeyName a)
308-
309-
instance ToJSON a => ToJSON (NKeyName a)
310-
instance FromJSON a => FromJSON (NKeyName a)
311-
312309

313310
-- ** @NAttrPath@
314311

0 commit comments

Comments
 (0)