Skip to content

Commit 7fbdcad

Browse files
committed
Expr.Types: NBinaryOp: mv standalone instances into list
1 parent 8d26c16 commit 7fbdcad

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

src/Nix/Expr/Types.hs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -402,15 +402,11 @@ data NBinaryOp
402402
| NApp -- ^ Apply a function to an argument.
403403
--
404404
-- > NBinary NApp f x ~ f x
405-
deriving (Eq, Ord, Enum, Bounded, Generic, Typeable, Data, Show, Read,
406-
NFData, Hashable)
407-
408-
instance Serialise NBinaryOp
409-
410-
instance Binary NBinaryOp
411-
412-
instance ToJSON NBinaryOp
413-
instance FromJSON NBinaryOp
405+
deriving
406+
( Eq, Ord, Enum, Bounded, Generic
407+
, Typeable, Data, NFData, Serialise, Binary, ToJSON, FromJSON
408+
, Show, Read, Hashable
409+
)
414410

415411

416412
-- ** @NExprF@ - Nix expressions, base functor
@@ -613,7 +609,7 @@ stripPositionInfo = transport phi
613609
go (Inherit ms names _pos) = Inherit ms names nullPos
614610

615611
nullPos :: SourcePos
616-
nullPos = SourcePos "<string>" (mkPos 1) (mkPos 1)
612+
nullPos = on (SourcePos "<string>") mkPos 1 1
617613

618614
-- * Dead code
619615

0 commit comments

Comments
 (0)