Skip to content

Commit 3347932

Browse files
committed
move instance Binary NAtom to the parent
1 parent f649ff8 commit 3347932

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
@@ -524,7 +524,6 @@ instance Binary Pos where
524524
instance Binary SourcePos
525525
instance Binary a => Binary (NKeyName a)
526526
instance Binary a => Binary (Params a)
527-
instance Binary NAtom
528527
instance Binary NUnaryOp
529528
instance Binary NBinaryOp
530529
instance Binary NRecordType

0 commit comments

Comments
 (0)