File tree Expand file tree Collapse file tree 4 files changed +9
-14
lines changed Expand file tree Collapse file tree 4 files changed +9
-14
lines changed Original file line number Diff line number Diff line change 11{-# LANGUAGE CPP #-}
22
33module System.Nix.Internal.Base
4+ ( BaseEncoding (Base16 ,NixBase32 ,Base64 )
5+ , encodeWith
6+ , decodeWith
7+ )
48where
59
610import qualified Data.Text as T
Original file line number Diff line number Diff line change @@ -25,10 +25,6 @@ import Data.List (foldl')
2525import Data.Text (Text )
2626import qualified Data.Text as T
2727import System.Nix.Internal.Base
28- ( BaseEncoding (Base16 ,NixBase32 ,Base64 )
29- , encodeWith
30- , decodeWith
31- )
3228import Data.Coerce (coerce )
3329import 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
141137hashLazy bsl =
142138 finalize $ foldl' (update @ a ) (initialize @ a ) (BSL. toChunks bsl)
143139
Original file line number Diff line number Diff line change 1- {-# LANGUAGE TypeApplications #-}
21{-|
32Description : 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
1313module System.Nix.Internal.StorePath where
1414import System.Nix.Internal.Hash ( HashAlgorithm (SHA256 )
@@ -35,10 +35,7 @@ import qualified Data.Attoparsec.Text.Lazy as Parser.Text.Lazy
3535import qualified System.FilePath as FilePath
3636import Data.Hashable ( Hashable (.. ) )
3737import Data.HashSet ( HashSet )
38- import System.Nix.Internal.Base ( BaseEncoding (.. )
39- , encodeWith
40- , decodeWith
41- )
38+ import System.Nix.Internal.Base
4239import Data.Coerce ( coerce )
4340
4441-- | A path in a Nix store.
Original file line number Diff line number Diff line change @@ -19,9 +19,7 @@ import Test.Tasty.QuickCheck
1919import System.Nix.Hash
2020import System.Nix.StorePath
2121import Arbitrary
22- import System.Nix.Internal.Base ( decodeWith
23- , encodeWith
24- )
22+ import System.Nix.Internal.Base
2523import Data.Coerce ( coerce )
2624
2725spec_hash :: Spec
You can’t perform that action at this time.
0 commit comments