| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.Text.PgpWordlist.Internal.Word8Bimap
Description
Bimap between Word8 an an arbitrary (ordered) type. Values of type
Word8Bimap have to be constructed carefully to contain values for
all 256 Word8 values, or the API will not be safe to use.
Synopsis
- data Word8Bimap a
- unsafeConstruct :: Ord a => [(Word8, a)] -> Word8Bimap a
- lookupL :: Word8Bimap a -> Word8 -> a
- lookupR :: Ord a => Word8Bimap a -> a -> Maybe Word8
Documentation
data Word8Bimap a Source #
Bimap where one of the keys is (of the size of) a Word8.
unsafeConstruct :: Ord a => [(Word8, a)] -> Word8Bimap a Source #
Create a Word8Bimap from an association list.
The list must contain all Word8 in order to make the API operating on
the result safe.
lookupL :: Word8Bimap a -> Word8 -> a Source #
Get the value corresponding to an index.