File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -100,8 +100,8 @@ module Database.LSMTree (
100100 ) where
101101
102102import Control.DeepSeq
103- import Control.Exception (throw )
104103import Control.Monad
104+ import Control.Monad.Class.MonadThrow
105105import Data.Bifunctor (Bifunctor (.. ))
106106import Data.Coerce (coerce )
107107import Data.Kind (Type )
@@ -454,11 +454,11 @@ retrieveBlobs ::
454454 -> m (V. Vector b )
455455retrieveBlobs (Internal. Session' (sesh :: Internal. Session m h )) refs =
456456 V. map Internal. deserialiseBlob <$>
457- Internal. retrieveBlobs sesh ( V. imap checkBlobRefType refs)
457+ ( Internal. retrieveBlobs sesh =<< V. imapM checkBlobRefType refs)
458458 where
459459 checkBlobRefType _ (BlobRef (ref :: Internal. WeakBlobRef m h' ))
460- | Just Refl <- eqT @ h @ h' = ref
461- checkBlobRefType i _ = throw (Internal. ErrBlobRefInvalid i)
460+ | Just Refl <- eqT @ h @ h' = pure ref
461+ checkBlobRefType i _ = throwIO (Internal. ErrBlobRefInvalid i)
462462
463463{- ------------------------------------------------------------------------------
464464 Snapshots
Original file line number Diff line number Diff line change @@ -112,8 +112,8 @@ module Database.LSMTree.Normal (
112112 ) where
113113
114114import Control.DeepSeq
115- import Control.Exception (throw )
116115import Control.Monad
116+ import Control.Monad.Class.MonadThrow
117117import Data.Bifunctor (Bifunctor (.. ))
118118import Data.Kind (Type )
119119import Data.Typeable (eqT , type (:~: ) (Refl ))
@@ -625,11 +625,11 @@ retrieveBlobs ::
625625 -> m (V. Vector b )
626626retrieveBlobs (Internal. Session' (sesh :: Internal. Session m h )) refs =
627627 V. map Internal. deserialiseBlob <$>
628- Internal. retrieveBlobs sesh ( V. imap checkBlobRefType refs)
628+ ( Internal. retrieveBlobs sesh =<< V. imapM checkBlobRefType refs)
629629 where
630630 checkBlobRefType _ (BlobRef (ref :: Internal. WeakBlobRef m h' ))
631- | Just Refl <- eqT @ h @ h' = ref
632- checkBlobRefType i _ = throw (Internal. ErrBlobRefInvalid i)
631+ | Just Refl <- eqT @ h @ h' = pure ref
632+ checkBlobRefType i _ = throwIO (Internal. ErrBlobRefInvalid i)
633633
634634{- ------------------------------------------------------------------------------
635635 Snapshots
You can’t perform that action at this time.
0 commit comments