Skip to content

Commit 8d7d241

Browse files
committed
Core: Internal.Base: explicit export list
1 parent 0f0b7fc commit 8d7d241

File tree

4 files changed

+9
-14
lines changed

4 files changed

+9
-14
lines changed

hnix-store-core/src/System/Nix/Internal/Base.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{-# LANGUAGE CPP #-}
22

33
module System.Nix.Internal.Base
4+
( BaseEncoding(Base16,NixBase32,Base64)
5+
, encodeWith
6+
, decodeWith
7+
)
48
where
59

610
import qualified Data.Text as T

hnix-store-core/src/System/Nix/Internal/Hash.hs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ import Data.List (foldl')
2525
import Data.Text (Text)
2626
import qualified Data.Text as T
2727
import System.Nix.Internal.Base
28-
( BaseEncoding(Base16,NixBase32,Base64)
29-
, encodeWith
30-
, decodeWith
31-
)
3228
import Data.Coerce (coerce)
3329
import System.Nix.Internal.Truncation
3430
(truncateInNixWay)
@@ -137,7 +133,7 @@ mkStorePathHash bs =
137133
--
138134
-- Use is the same as for 'hash'. This runs in constant space, but
139135
-- forces the entire bytestring.
140-
hashLazy :: forall a.ValidAlgo a => BSL.ByteString -> Digest a
136+
hashLazy :: forall a . ValidAlgo a => BSL.ByteString -> Digest a
141137
hashLazy bsl =
142138
finalize $ foldl' (update @a) (initialize @a) (BSL.toChunks bsl)
143139

hnix-store-core/src/System/Nix/Internal/StorePath.hs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
{-# LANGUAGE TypeApplications #-}
21
{-|
32
Description : Representation of Nix store paths.
43
-}
4+
{-# LANGUAGE TypeApplications #-}
55
{-# LANGUAGE OverloadedStrings #-}
66
{-# LANGUAGE ConstraintKinds #-}
77
{-# LANGUAGE RecordWildCards #-}
88
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
99
{-# LANGUAGE ScopedTypeVariables #-}
1010
{-# LANGUAGE AllowAmbiguousTypes #-}
11-
{-# LANGUAGE TypeInType #-} -- Needed for GHC 8.4.4 for some reason
11+
{-# LANGUAGE DataKinds #-}
1212

1313
module System.Nix.Internal.StorePath where
1414
import System.Nix.Internal.Hash ( HashAlgorithm(SHA256)
@@ -35,10 +35,7 @@ import qualified Data.Attoparsec.Text.Lazy as Parser.Text.Lazy
3535
import qualified System.FilePath as FilePath
3636
import Data.Hashable ( Hashable(..) )
3737
import Data.HashSet ( HashSet )
38-
import System.Nix.Internal.Base ( BaseEncoding(..)
39-
, encodeWith
40-
, decodeWith
41-
)
38+
import System.Nix.Internal.Base
4239
import Data.Coerce ( coerce )
4340

4441
-- | A path in a Nix store.

hnix-store-core/tests/Hash.hs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ import Test.Tasty.QuickCheck
1919
import System.Nix.Hash
2020
import System.Nix.StorePath
2121
import Arbitrary
22-
import System.Nix.Internal.Base ( decodeWith
23-
, encodeWith
24-
)
22+
import System.Nix.Internal.Base
2523
import Data.Coerce ( coerce )
2624

2725
spec_hash :: Spec

0 commit comments

Comments
 (0)