hashed-storage 0.5.5 → 0.5.6
raw patch · 2 files changed
+17/−1 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Storage.Hashed.Monad: findFileM :: (Monad m, Functor m) => Tree m -> AnchoredPath -> m (Maybe (Blob m))
+ Storage.Hashed.Monad: findM :: (Monad m, Functor m) => Tree m -> AnchoredPath -> m (Maybe (TreeItem m))
+ Storage.Hashed.Monad: findTreeM :: (Monad m, Functor m) => Tree m -> AnchoredPath -> m (Maybe (Tree m))
Files
- Storage/Hashed/Monad.hs +16/−0
- hashed-storage.cabal +1/−1
Storage/Hashed/Monad.hs view
@@ -14,6 +14,7 @@ , currentDirectory , tree, TreeState, TreeMonad, TreeIO, runTreeMonad , initialState, replaceItem+ , findM, findFileM, findTreeM ) where import Prelude hiding ( readFile, writeFile )@@ -263,3 +264,18 @@ tr <- gets tree let item = find tr from' unless (isNothing item) $ modifyItem to item++findM' :: forall m a e. (Monad m, Functor m)+ => (Tree m -> AnchoredPath -> a) -> Tree m -> AnchoredPath -> m a+findM' what t path = fst <$> virtualTreeMonad (look path) t+ where look :: AnchoredPath -> TreeMonad m a+ look = expandTo >=> \p' -> flip what p' <$> gets tree++findM :: (Monad m, Functor m) => Tree m -> AnchoredPath -> m (Maybe (TreeItem m))+findM = findM' find++findTreeM :: (Monad m, Functor m) => Tree m -> AnchoredPath -> m (Maybe (Tree m))+findTreeM = findM' findTree++findFileM :: (Monad m, Functor m) => Tree m -> AnchoredPath -> m (Maybe (Blob m))+findFileM = findM' findFile
hashed-storage.cabal view
@@ -1,5 +1,5 @@ name: hashed-storage-version: 0.5.5+version: 0.5.6 synopsis: Hashed file storage support code. description: Support code for reading and manipulating hashed file storage