Skip to content

Commit 61a5365

Browse files
committed
makeStorePath: Generalize toall named hash algorithms.
1 parent f2beabb commit 61a5365

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ import Data.Text.Encoding
1111
import System.Nix.Hash
1212
import System.Nix.StorePath
1313

14-
makeStorePath :: forall storeDir . (KnownStoreDir storeDir) => ByteString -> Digest 'SHA256 -> StorePathName -> StorePath storeDir
14+
makeStorePath :: forall storeDir hashAlgo . (KnownStoreDir storeDir, NamedAlgo hashAlgo) => ByteString -> Digest hashAlgo -> StorePathName -> StorePath storeDir
1515
makeStorePath ty h nm = StorePath storeHash nm
1616
where
1717
s = BS.intercalate ":"
1818
[ ty
19-
, encodeUtf8 $ algoName @'SHA256
19+
, encodeUtf8 $ algoName @hashAlgo
2020
, encodeUtf8 $ encodeBase16 h
2121
, storeDirVal @storeDir
2222
, encodeUtf8 $ unStorePathName nm

0 commit comments

Comments
 (0)