-- | Representation of 'Disk' as an object-like record — -- this allows multiple storage space implementations. module System.Mem.Disk.DiskApi where import Data.ByteString ( ByteString ) import Data.Int ( Int64 ) {----------------------------------------------------------------------------- Disk ------------------------------------------------------------------------------} -- | Represents the on-disk storage where -- t'System.Mem.Disk.DiskBytes' are stored. data Disk = Disk { Disk -> ByteString -> IO Int64 put :: ByteString -> IO Int64 , Disk -> Int64 -> IO ByteString get :: Int64 -> IO ByteString , Disk -> Int64 -> IO () delete :: Int64 -> IO () , Disk -> IO Integer getDiskSize :: IO Integer -- ^ Rough estimate of the current size of the 'Disk', in bytes. }