| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.ByteString.Interned.Internal
Description
This module keeps a persistent bimap between ByteStrings and
Ints.
Synopsis
- type InternedBimap = Bimap (HashMap ByteString Int) (Vector ByteString)
- ibsBimap :: IORef InternedBimap
- ibsBimapAdd :: ByteString -> Int
- ibsBimapLookupInt :: Int -> ByteString
Documentation
type InternedBimap = Bimap (HashMap ByteString Int) (Vector ByteString) Source #
ibsBimapAdd :: ByteString -> Int Source #
Add UTF8 ByteString and return Int key. Will return key for
existing string and thereby serves for lookup in left-to-right
direction.
ibsBimapLookupInt :: Int -> ByteString Source #
Lookup based on an Int key. Unsafe totality assumption.