summaryrefslogtreecommitdiff
path: root/src/Erebos/Storage
diff options
context:
space:
mode:
Diffstat (limited to 'src/Erebos/Storage')
-rw-r--r--src/Erebos/Storage/Graph.hs2
-rw-r--r--src/Erebos/Storage/Head.hs2
-rw-r--r--src/Erebos/Storage/Internal.hs17
-rw-r--r--src/Erebos/Storage/Key.hs4
-rw-r--r--src/Erebos/Storage/Merge.hs3
5 files changed, 6 insertions, 22 deletions
diff --git a/src/Erebos/Storage/Graph.hs b/src/Erebos/Storage/Graph.hs
index 79e25bc..1312941 100644
--- a/src/Erebos/Storage/Graph.hs
+++ b/src/Erebos/Storage/Graph.hs
@@ -40,7 +40,7 @@ import Data.Set qualified as S
import System.IO.Unsafe (unsafePerformIO)
import Erebos.Object
-import Erebos.Storable
+import Erebos.Storable.Internal
import Erebos.Storage.Internal
import Erebos.Util
diff --git a/src/Erebos/Storage/Head.hs b/src/Erebos/Storage/Head.hs
index 285902d..87212f0 100644
--- a/src/Erebos/Storage/Head.hs
+++ b/src/Erebos/Storage/Head.hs
@@ -30,7 +30,7 @@ import Data.Bifunctor
import Data.Typeable
import Erebos.Object
-import Erebos.Storable
+import Erebos.Storable.Internal
import Erebos.Storage.Backend
import Erebos.Storage.Internal
import Erebos.UUID qualified as U
diff --git a/src/Erebos/Storage/Internal.hs b/src/Erebos/Storage/Internal.hs
index 70a69b4..c7255ef 100644
--- a/src/Erebos/Storage/Internal.hs
+++ b/src/Erebos/Storage/Internal.hs
@@ -19,7 +19,6 @@ module Erebos.Storage.Internal (
Generation(..),
HeadID(..), HeadTypeID(..),
- Stored(..), storedStorage,
) where
import Control.Arrow
@@ -35,7 +34,6 @@ import Data.ByteArray qualified as BA
import Data.ByteString (ByteString)
import Data.ByteString.Char8 qualified as BC
import Data.ByteString.Lazy qualified as BL
-import Data.Function
import Data.HashTable.IO qualified as HT
import Data.Hashable
import Data.Kind
@@ -238,21 +236,6 @@ newtype HeadID = HeadID UUID
newtype HeadTypeID = HeadTypeID UUID
deriving (Eq, Ord)
-data Stored a = Stored
- { storedRef' :: Ref
- , storedObject' :: a
- }
- deriving (Show)
-
-instance Eq (Stored a) where
- (==) = (==) `on` (refDigest . storedRef')
-
-instance Ord (Stored a) where
- compare = compare `on` (refDigest . storedRef')
-
-storedStorage :: Stored a -> Storage
-storedStorage = refStorage . storedRef'
-
type Complete = Identity
type Partial = Either RefDigest
diff --git a/src/Erebos/Storage/Key.hs b/src/Erebos/Storage/Key.hs
index b615f16..85ebded 100644
--- a/src/Erebos/Storage/Key.hs
+++ b/src/Erebos/Storage/Key.hs
@@ -11,7 +11,9 @@ import Control.Monad.IO.Class
import Data.ByteArray
import Data.Typeable
-import Erebos.Storable
+import Erebos.Error
+import Erebos.Object.Internal
+import Erebos.Storable.Internal
import Erebos.Storage.Internal
class Storable pub => KeyPair sec pub | sec -> pub, pub -> sec where
diff --git a/src/Erebos/Storage/Merge.hs b/src/Erebos/Storage/Merge.hs
index 9de212f..ebb14bd 100644
--- a/src/Erebos/Storage/Merge.hs
+++ b/src/Erebos/Storage/Merge.hs
@@ -24,9 +24,8 @@ module Erebos.Storage.Merge (
import Data.Kind
import Erebos.Object
-import Erebos.Storable
+import Erebos.Storable.Internal
import Erebos.Storage.Graph
-import Erebos.Storage.Internal
class Storable (Component a) => Mergeable a where