@@ -16,6 +16,7 @@ module System.Nix.Store
1616import Crypto.Hash (Digest )
1717import Crypto.Hash.Truncated (Truncated )
1818import Crypto.Hash.Algorithms (SHA256 )
19+ import qualified Data.ByteString.Lazy as BS
1920import qualified Data.ByteArray as B
2021import Data.Text (Text )
2122import Text.Regex.Base.RegexLike (makeRegex , matchTest )
@@ -49,7 +50,7 @@ data StoreEffects rootedPath validPath m =
4950 , -- | Project out the underlying 'rootedPath' from a 'validPath'
5051 fromValidPath :: ! (validPath -> rootedPath )
5152 , -- | Which of the given paths are valid?
52- validPaths :: ! (HashSet rootedPath -> HashSet validPath )
53+ validPaths :: ! (HashSet rootedPath -> m ( HashSet validPath ) )
5354 , -- | Get the paths that refer to a given path.
5455 referrers :: ! (validPath -> m (HashSet Path ))
5556 , -- | Get a root to the 'Path'.
@@ -66,4 +67,6 @@ data StoreEffects rootedPath validPath m =
6667 , -- | Get a full 'Path' corresponding to a given 'Digest'.
6768 pathFromHashPart :: ! (Digest PathHashAlgo -> m Path )
6869 , narEffects :: NarEffects m
70+ , -- | Add a non-nar file to the store
71+ addFile :: ! (BS. ByteString -> m validPath )
6972 }
0 commit comments