packages feed

cas-hashable 1.0.0 → 1.0.1

raw patch · 3 files changed

+1/−43 lines, 3 filesdep −storePVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependencies removed: store

API changes (from Hackage documentation)

- Data.CAS.ContentHashable: instance Data.Store.Impl.Store Data.CAS.ContentHashable.ContentHash
- Data.CAS.ContentHashable: instance Data.Store.Impl.Store Data.CAS.ContentHashable.ExternallyAssuredDirectory
- Data.CAS.ContentHashable: instance Data.Store.Impl.Store Data.CAS.ContentHashable.ExternallyAssuredFile
- Data.CAS.StoreOrphans: instance Data.Store.Impl.Store (Path.Internal.Path Path.Posix.Abs Path.Posix.Dir)
- Data.CAS.StoreOrphans: instance Data.Store.Impl.Store (Path.Internal.Path Path.Posix.Abs Path.Posix.File)
- Data.CAS.StoreOrphans: instance Data.Store.Impl.Store (Path.Internal.Path Path.Posix.Rel Path.Posix.Dir)
- Data.CAS.StoreOrphans: instance Data.Store.Impl.Store (Path.Internal.Path Path.Posix.Rel Path.Posix.File)

Files

cas-hashable.cabal view
@@ -1,5 +1,5 @@ Name:                cas-hashable-Version:             1.0.0+Version:             1.0.1 Synopsis:            A hashing class for content-addressed storage Description:             A hashing class for content-addressed storage. Content can be hashed either by value or through an IO action. Part of the funflow ecosystem.@@ -23,7 +23,6 @@    default-language:  Haskell2010     Exposed-modules:  Data.CAS.ContentHashable-                   , Data.CAS.StoreOrphans    Build-depends:                  base                    >= 4.6 && <5                , aeson                   >= 1.2.3.0@@ -39,7 +38,6 @@                , path-io                , safe-exceptions                , scientific-               , store                , text                , time                , unix
src/Data/CAS/ContentHashable.hs view
@@ -68,9 +68,7 @@ import           Data.ByteString.Builder.Extra    (defaultChunkSize) import qualified Data.ByteString.Char8            as C8 import qualified Data.ByteString.Lazy             as BSL-import           Data.CAS.StoreOrphans            () import           Data.Foldable                    (foldlM)-import           Data.Functor.Contravariant import qualified Data.Hashable import qualified Data.HashMap.Lazy                as HashMap import qualified Data.HashSet                     as HashSet@@ -81,7 +79,6 @@ import qualified Data.Map                         as Map import           Data.Ratio import           Data.Scientific-import           Data.Store                       (Store (..), peekException) import qualified Data.Text                        as T import qualified Data.Text.Array                  as TA import qualified Data.Text.Encoding               as TE@@ -136,13 +133,6 @@     . showString "\""     where app_prec = 10 -instance Store ContentHash where-  size = contramap toBytes size-  peek = fromBytes <$> peek >>= \case-    Nothing -> peekException "Store ContentHash: Illegal digest"-    Just x -> return x-  poke = poke . toBytes- toBytes :: ContentHash -> BS.ByteString toBytes = convert . unContentHash @@ -488,7 +478,6 @@  instance Aeson.FromJSON ExternallyAssuredFile instance Aeson.ToJSON ExternallyAssuredFile-instance Store ExternallyAssuredFile  instance ContentHashable IO ExternallyAssuredFile where   contentHashUpdate ctx (ExternallyAssuredFile fp) = do@@ -518,7 +507,6 @@  instance Aeson.FromJSON ExternallyAssuredDirectory instance Aeson.ToJSON ExternallyAssuredDirectory-instance Store ExternallyAssuredDirectory  instance ContentHashable IO ExternallyAssuredDirectory where   contentHashUpdate ctx0 (ExternallyAssuredDirectory dir0) = do
− src/Data/CAS/StoreOrphans.hs
@@ -1,28 +0,0 @@-{-# OPTIONS_GHC -fno-warn-orphans #-}-{-# LANGUAGE FlexibleInstances #-}---- | Dedicated module for orphan instances.-module Data.CAS.StoreOrphans where--import           Data.Functor.Contravariant-import           Data.Store                 (Store)-import qualified Data.Store                 as Store-import qualified Path                       as Path-import qualified Path.Internal--instance Store (Path.Path Path.Abs Path.File) where-  size = contramap (\(Path.Internal.Path fp) -> fp) Store.size-  peek = Path.Internal.Path <$> Store.peek-  poke = Store.poke . (\(Path.Internal.Path fp) -> fp)-instance Store (Path.Path Path.Abs Path.Dir) where-  size = contramap (\(Path.Internal.Path fp) -> fp) Store.size-  peek = Path.Internal.Path <$> Store.peek-  poke = Store.poke . (\(Path.Internal.Path fp) -> fp)-instance Store (Path.Path Path.Rel Path.File) where-  size = contramap (\(Path.Internal.Path fp) -> fp) Store.size-  peek = Path.Internal.Path <$> Store.peek-  poke = Store.poke . (\(Path.Internal.Path fp) -> fp)-instance Store (Path.Path Path.Rel Path.Dir) where-  size = contramap (\(Path.Internal.Path fp) -> fp) Store.size-  peek = Path.Internal.Path <$> Store.peek-  poke = Store.poke . (\(Path.Internal.Path fp) -> fp)