From 35c48f033106c9f2d8a6a0e5ada7f5dcc5cc732e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Mon, 18 Dec 2023 20:55:02 +0100 Subject: Storage: export store and load helpers --- src/Erebos/Storage/List.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/Erebos/Storage/List.hs') diff --git a/src/Erebos/Storage/List.hs b/src/Erebos/Storage/List.hs index ef56c60..f0f8786 100644 --- a/src/Erebos/Storage/List.hs +++ b/src/Erebos/Storage/List.hs @@ -10,8 +10,6 @@ module Erebos.Storage.List ( -- TODO withStoredListItem, withStoredListItemS, ) where -import Control.Monad.Reader - import Data.List import Data.Maybe import qualified Data.Set as S @@ -35,7 +33,7 @@ instance Storable a => Storable (List a) where mapM_ (storeRef "item") $ listItem x mapM_ (storeRef "remove") $ listRemove x - load' = asks snd >>= \case + load' = loadCurrentObject >>= \case ZeroObject -> return ListNil _ -> loadRec $ ListItem <$> loadRefs "PREV" <*> loadMbRef "item" -- cgit v1.2.3