Skip to content

Commit 2af0a6f

Browse files
committed
Expr.Types: NString: mv standalone instances into list
1 parent d996d42 commit 2af0a6f

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

src/Nix/Expr/Types.hs

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -174,25 +174,18 @@ data NString r
174174
-- > Indented 0 [Plain "x\n ",Antiquoted y] ~ ''
175175
-- > x
176176
-- > ${y}''
177-
deriving (Eq, Ord, Generic, Generic1, Typeable, Data, Functor, Foldable,
178-
Traversable, Show, Read, NFData, Hashable)
179-
180-
instance Hashable1 NString
181-
182-
instance NFData1 NString
183-
184-
instance Serialise r => Serialise (NString r)
177+
deriving
178+
( Eq, Ord, Generic, Generic1
179+
, Typeable, Data, NFData, NFData1, Serialise, Binary, ToJSON, FromJSON
180+
, Functor, Foldable, Traversable
181+
, Show, Read, Hashable, Hashable1
182+
)
185183

186184
-- | For the the 'IsString' instance, we use a plain doublequoted string.
187185
instance IsString (NString r) where
188186
fromString "" = DoubleQuoted mempty
189187
fromString string = DoubleQuoted [Plain $ toText string]
190188

191-
instance Binary a => Binary (NString a)
192-
193-
instance ToJSON a => ToJSON (NString a)
194-
instance FromJSON a => FromJSON (NString a)
195-
196189

197190
-- ** @NKeyName@
198191

0 commit comments

Comments
 (0)