module Data.HashTable.ST.Swiss.Instance where import Data.HashTable.Class import Data.HashTable.IO (IOHashTable) import qualified Data.HashTable.ST.Swiss as S instance HashTable S.Table where new :: ST s (Table s k v) new = ST s (Table s k v) forall s k v. ST s (Table s k v) S.new newSized :: Int -> ST s (Table s k v) newSized = Int -> ST s (Table s k v) forall s k v. Int -> ST s (Table s k v) S.newSized insert :: Table s k v -> k -> v -> ST s () insert = Table s k v -> k -> v -> ST s () forall k s v. (Hashable k, Eq k) => Table s k v -> k -> v -> ST s () S.insert delete :: Table s k v -> k -> ST s () delete = Table s k v -> k -> ST s () forall k s v. (Hashable k, Eq k) => Table s k v -> k -> ST s () S.delete lookup :: Table s k v -> k -> ST s (Maybe v) lookup = Table s k v -> k -> ST s (Maybe v) forall k s a. (Hashable k, Eq k) => Table s k a -> k -> ST s (Maybe a) S.lookup foldM :: (a -> (k, v) -> ST s a) -> a -> Table s k v -> ST s a foldM = (a -> (k, v) -> ST s a) -> a -> Table s k v -> ST s a forall a k v s. (a -> (k, v) -> ST s a) -> a -> Table s k v -> ST s a S.foldM mapM_ :: ((k, v) -> ST s b) -> Table s k v -> ST s () mapM_ = ((k, v) -> ST s b) -> Table s k v -> ST s () forall k v s b. ((k, v) -> ST s b) -> Table s k v -> ST s () S.mapM_ lookupIndex :: Table s k v -> k -> ST s (Maybe Word) lookupIndex = [Char] -> Table s k v -> k -> ST s (Maybe Word) forall a. HasCallStack => [Char] -> a error [Char] "not implemented" nextByIndex :: Table s k v -> Word -> ST s (Maybe (Word, k, v)) nextByIndex = [Char] -> Table s k v -> Word -> ST s (Maybe (Word, k, v)) forall a. HasCallStack => [Char] -> a error [Char] "not implemented" computeOverhead :: Table s k v -> ST s Double computeOverhead = [Char] -> Table s k v -> ST s Double forall a. HasCallStack => [Char] -> a error [Char] "not implemented" mutate :: Table s k v -> k -> (Maybe v -> (Maybe v, a)) -> ST s a mutate = Table s k v -> k -> (Maybe v -> (Maybe v, a)) -> ST s a forall k s v a. (Eq k, Hashable k) => Table s k v -> k -> (Maybe v -> (Maybe v, a)) -> ST s a S.mutate mutateST :: Table s k v -> k -> (Maybe v -> ST s (Maybe v, a)) -> ST s a mutateST = Table s k v -> k -> (Maybe v -> ST s (Maybe v, a)) -> ST s a forall k s v a. (Eq k, Hashable k) => Table s k v -> k -> (Maybe v -> ST s (Maybe v, a)) -> ST s a S.mutateST type SwissHashTable k v = IOHashTable S.Table k v