Merge branch 'master' of github.com:haskell-nix/hnix-store

This commit is contained in:
Greg Hale 2018-04-30 03:06:07 -07:00
commit 9b673371a6
2 changed files with 5 additions and 2 deletions

View File

@ -25,6 +25,6 @@ library
binary,
bytestring, containers, cryptonite, memory, foundation, basement,
text, regex-base, regex-tdfa-text,
hashable, unordered-containers
hashable, unordered-containers, bytestring
hs-source-dirs: src
default-language: Haskell2010

View File

@ -16,6 +16,7 @@ module System.Nix.Store
import Crypto.Hash (Digest)
import Crypto.Hash.Truncated (Truncated)
import Crypto.Hash.Algorithms (SHA256)
import qualified Data.ByteString.Lazy as BS
import qualified Data.ByteArray as B
import Data.Text (Text)
import Text.Regex.Base.RegexLike (makeRegex, matchTest)
@ -49,7 +50,7 @@ data StoreEffects rootedPath validPath m =
, -- | Project out the underlying 'rootedPath' from a 'validPath'
fromValidPath :: !(validPath -> rootedPath)
, -- | Which of the given paths are valid?
validPaths :: !(HashSet rootedPath -> HashSet validPath)
validPaths :: !(HashSet rootedPath -> m (HashSet validPath))
, -- | Get the paths that refer to a given path.
referrers :: !(validPath -> m (HashSet Path))
, -- | Get a root to the 'Path'.
@ -66,4 +67,6 @@ data StoreEffects rootedPath validPath m =
, -- | Get a full 'Path' corresponding to a given 'Digest'.
pathFromHashPart :: !(Digest PathHashAlgo -> m Path)
, narEffects :: NarEffects m
, -- | Add a non-nar file to the store
addFile :: !(BS.ByteString -> m validPath)
}