@@ -49,7 +49,6 @@ import System.Nix.Hash ( NamedAlgo(..)
4949 )
5050import System.Nix.StorePath ( StorePath
5151 , StorePathName
52- , StorePathSet
5352 , StorePathHashPart
5453 )
5554import System.Nix.StorePathMetadata ( StorePathMetadata (.. )
@@ -99,10 +98,10 @@ addToStore name source recursive repair = do
9998-- Reference accepts repair but only uses it
10099-- to throw error in case of remote talking to nix-daemon.
101100addTextToStore
102- :: Text -- ^ Name of the text
103- -> Text -- ^ Actual text to add
104- -> StorePathSet -- ^ Set of `StorePath`s that the added text references
105- -> RepairFlag -- ^ Repair flag, must be `False` in case of remote backend
101+ :: Text -- ^ Name of the text
102+ -> Text -- ^ Actual text to add
103+ -> HashSet StorePath -- ^ Set of `StorePath`s that the added text references
104+ -> RepairFlag -- ^ Repair flag, must be `False` in case of remote backend
106105 -> MonadStore StorePath
107106addTextToStore name text references' repair = do
108107 when (unRepairFlag repair)
@@ -138,7 +137,7 @@ addTempRoot pn = do
138137-- | Build paths if they are an actual derivations.
139138--
140139-- If derivation output paths are already valid, do nothing.
141- buildPaths :: StorePathSet -> BuildMode -> MonadStore ()
140+ buildPaths :: HashSet StorePath -> BuildMode -> MonadStore ()
142141buildPaths ps bm = do
143142 storeDir <- getStoreDir
144143 void $ simpleOpArgs BuildPaths $ do
@@ -198,22 +197,22 @@ isValidPathUncached p = do
198197
199198-- | Query valid paths from set, optionally try to use substitutes.
200199queryValidPaths
201- :: StorePathSet -- ^ Set of `StorePath`s to query
200+ :: HashSet StorePath -- ^ Set of `StorePath`s to query
202201 -> SubstituteFlag -- ^ Try substituting missing paths when `True`
203- -> MonadStore StorePathSet
202+ -> MonadStore ( HashSet StorePath )
204203queryValidPaths ps substitute = do
205204 storeDir <- getStoreDir
206205 runOpArgs QueryValidPaths $ do
207206 putPaths storeDir ps
208207 putBool (unSubstituteFlag substitute)
209208 sockGetPaths
210209
211- queryAllValidPaths :: MonadStore StorePathSet
210+ queryAllValidPaths :: MonadStore ( HashSet StorePath )
212211queryAllValidPaths = do
213212 runOp QueryAllValidPaths
214213 sockGetPaths
215214
216- querySubstitutablePaths :: StorePathSet -> MonadStore StorePathSet
215+ querySubstitutablePaths :: HashSet StorePath -> MonadStore ( HashSet StorePath )
217216querySubstitutablePaths ps = do
218217 storeDir <- getStoreDir
219218 runOpArgs QuerySubstitutablePaths $ putPaths storeDir ps
@@ -262,25 +261,25 @@ queryPathInfoUncached path = do
262261
263262 pure $ StorePathMetadata {.. }
264263
265- queryReferrers :: StorePath -> MonadStore StorePathSet
264+ queryReferrers :: StorePath -> MonadStore ( HashSet StorePath )
266265queryReferrers p = do
267266 storeDir <- getStoreDir
268267 runOpArgs QueryReferrers $ putPath storeDir p
269268 sockGetPaths
270269
271- queryValidDerivers :: StorePath -> MonadStore StorePathSet
270+ queryValidDerivers :: StorePath -> MonadStore ( HashSet StorePath )
272271queryValidDerivers p = do
273272 storeDir <- getStoreDir
274273 runOpArgs QueryValidDerivers $ putPath storeDir p
275274 sockGetPaths
276275
277- queryDerivationOutputs :: StorePath -> MonadStore StorePathSet
276+ queryDerivationOutputs :: StorePath -> MonadStore ( HashSet StorePath )
278277queryDerivationOutputs p = do
279278 storeDir <- getStoreDir
280279 runOpArgs QueryDerivationOutputs $ putPath storeDir p
281280 sockGetPaths
282281
283- queryDerivationOutputNames :: StorePath -> MonadStore StorePathSet
282+ queryDerivationOutputNames :: StorePath -> MonadStore ( HashSet StorePath )
284283queryDerivationOutputNames p = do
285284 storeDir <- getStoreDir
286285 runOpArgs QueryDerivationOutputNames $ putPath storeDir p
@@ -297,13 +296,13 @@ queryPathFromHashPart storePathHash = do
297296 sockGetPath
298297
299298queryMissing
300- :: StorePathSet
299+ :: ( HashSet StorePath )
301300 -> MonadStore
302- ( StorePathSet -- Paths that will be built
303- , StorePathSet -- Paths that have substitutes
304- , StorePathSet -- Unknown paths
305- , Integer -- Download size
306- , Integer -- Nar size?
301+ ( HashSet StorePath -- Paths that will be built
302+ , HashSet StorePath -- Paths that have substitutes
303+ , HashSet StorePath -- Unknown paths
304+ , Integer -- Download size
305+ , Integer -- Nar size?
307306 )
308307queryMissing ps = do
309308 storeDir <- getStoreDir
0 commit comments