diff options
| author | Roman Smrž <roman.smrz@seznam.cz> | 2026-08-12 21:41:28 +0200 |
|---|---|---|
| committer | Roman Smrž <roman.smrz@seznam.cz> | 2026-08-14 22:08:15 +0200 |
| commit | 3bd3dbaaf6c840e05b90da8a8fd1e051cf473255 (patch) | |
| tree | 53372e6abc58abf09f0277a7729b0cf038001032 /src/Erebos/Storable | |
| parent | 127036f4f7fc295b5815503f4f27e4f2827e02f1 (diff) | |
Key handling in MonadStorage class
Diffstat (limited to 'src/Erebos/Storable')
| -rw-r--r-- | src/Erebos/Storable/Internal.hs | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/Erebos/Storable/Internal.hs b/src/Erebos/Storable/Internal.hs index 70b5fdc..72b70e1 100644 --- a/src/Erebos/Storable/Internal.hs +++ b/src/Erebos/Storable/Internal.hs @@ -10,8 +10,6 @@ module Erebos.Storable.Internal ( unsafeMapStored, collectObjects, collectStoredObjects, - - MonadStorage(..), ) where import Control.Monad.Reader @@ -20,9 +18,8 @@ import Data.Function import Data.Set (Set) import Data.Set qualified as S -import Erebos.Storage.Internal - import Erebos.Object.Internal +import Erebos.Storage.Internal data Stored a = Stored @@ -88,16 +85,3 @@ collectOtherStored seen (Rec items) = foldr helper ( [], seen ) $ map snd items in ((o : xs') ++ xs, s') helper _ ( xs, s ) = ( xs, s ) collectOtherStored seen _ = ( [], seen ) - - -class Monad m => MonadStorage m where - getStorage :: m Storage - mstore :: Storable a => a -> m (Stored a) - - default mstore :: MonadIO m => Storable a => a -> m (Stored a) - mstore x = do - st <- getStorage - wrappedStore st x - -instance MonadIO m => MonadStorage (ReaderT Storage m) where - getStorage = ask |