Skip to content

Commit ae210ea

Browse files
committed
move instance Binary NAtom to the parent
1 parent b58a85b commit ae210ea

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/Nix/Atoms.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@ import Codec.Serialise
1111
#endif
1212
import Control.DeepSeq
1313
import Data.Data
14-
import Data.Fixed (mod')
14+
import Data.Fixed ( mod' )
1515
import Data.Hashable
1616
import Data.Text ( Text
1717
, pack
1818
)
1919
import GHC.Generics
20+
import Data.Binary ( Binary )
2021

2122
-- | Atoms are values that evaluate to themselves. This means that
2223
-- they appear in both the parsed AST (in the form of literals) and
@@ -40,6 +41,8 @@ data NAtom
4041
instance Serialise NAtom
4142
#endif
4243

44+
instance Binary NAtom
45+
4346
-- | Translate an atom into its nix representation.
4447
atomText :: NAtom -> Text
4548
atomText (NURI t) = t

src/Nix/Expr/Types.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,6 @@ instance Binary Pos where
530530
instance Binary SourcePos
531531
instance Binary a => Binary (NKeyName a)
532532
instance Binary a => Binary (Params a)
533-
instance Binary NAtom
534533
instance Binary NUnaryOp
535534
instance Binary NBinaryOp
536535
instance Binary NRecordType

0 commit comments

Comments
 (0)