Skip to content

Commit 631b26e

Browse files
committed
core: clean saltine CPP overloads
One year late hah. Thanks Anton!
1 parent 541abd1 commit 631b26e

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

hnix-store-core/src/System/Nix/Signature.hs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{-# LANGUAGE CPP #-}
21
{-|
32
Description : Nix-relevant interfaces to NaCl signatures.
43
-}
@@ -16,24 +15,15 @@ import GHC.Generics (Generic)
1615
import qualified Data.ByteString
1716
import qualified Data.Coerce
1817

19-
-- 2021-05-30: NOTE: Please, clean-up these overloads in ~2022
20-
#if MIN_VERSION_saltine(0,2,0)
2118
import qualified Crypto.Saltine.Internal.Sign as NaClSizes
22-
#else
23-
import qualified Crypto.Saltine.Internal.ByteSizes as NaClSizes
24-
#endif
2519

2620
-- | A NaCl signature.
2721
newtype Signature = Signature ByteString
2822
deriving (Eq, Generic, Ord, Show)
2923

3024
instance IsEncoding Signature where
3125
decode s
32-
#if MIN_VERSION_saltine(0,2,0)
3326
| Data.ByteString.length s == NaClSizes.sign_bytes = Just $ Signature s
34-
#else
35-
| Data.ByteString.length s == NaClSizes.sign = Just $ Signature s
36-
#endif
3727
| otherwise = Nothing
3828
encode = Data.Coerce.coerce
3929

0 commit comments

Comments
 (0)