Skip to content

Commit d996d42

Browse files
committed
Expr.Types: Antiquoted: mv standalone instances into list
1 parent dcd3029 commit d996d42

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
@@ -138,25 +138,18 @@ data Antiquoted (v :: Type) (r :: Type)
138138
--
139139
-- > ''''\n'' ≡ "\n"
140140
| Antiquoted !r
141-
deriving (Ord, Eq, Generic, Generic1, Typeable, Data, Functor, Foldable,
142-
Traversable, Show, Read, NFData, Hashable)
143-
144-
instance Hashable v => Hashable1 (Antiquoted v)
141+
deriving
142+
( Eq, Ord, Generic, Generic1
143+
, Typeable, Data, NFData, NFData1, Serialise, Binary, ToJSON, FromJSON
144+
, Functor, Foldable, Traversable
145+
, Show, Read, Hashable, Hashable1
146+
)
145147

146148
instance Hashable2 Antiquoted where
147149
liftHashWithSalt2 ha _ salt (Plain a) = ha (salt `hashWithSalt` (0 :: Int)) a
148150
liftHashWithSalt2 _ _ salt EscapedNewline = salt `hashWithSalt` (1 :: Int)
149151
liftHashWithSalt2 _ hb salt (Antiquoted b) = hb (salt `hashWithSalt` (2 :: Int)) b
150152

151-
instance NFData v => NFData1 (Antiquoted v)
152-
153-
instance (Serialise v, Serialise r) => Serialise (Antiquoted v r)
154-
155-
instance (Binary v, Binary a) => Binary (Antiquoted v a)
156-
157-
instance (ToJSON v, ToJSON a) => ToJSON (Antiquoted v a)
158-
instance (FromJSON v, FromJSON a) => FromJSON (Antiquoted v a)
159-
160153

161154
-- ** @NString@
162155

0 commit comments

Comments
 (0)