Copyright | (c) Petr Penzin 2015 |
---|---|
License | BSD2 |
Maintainer | penzin.dev@gmail.com |
Stability | experimental |
Portability | cross-platform |
Safe Haskell | Safe |
Language | Haskell98 |
A minimal support for Binary.Neko hashtable type needed for working with tables of fields
- type Hashtbl = Map Word32 String
- hash :: String -> Word32
- empty :: Hashtbl
- member :: Word32 -> Hashtbl -> Bool
- memberString :: String -> Hashtbl -> Bool
- insertString :: String -> Hashtbl -> Hashtbl
- lookup :: Word32 -> Hashtbl -> Maybe String
- toList :: Hashtbl -> [(Word32, String)]
- fromStringList :: [String] -> Hashtbl
- elems :: Hashtbl -> [String]
Documentation
type Hashtbl = Map Word32 String Source #
A minimal hashtable type. Binary.Neko supports hashing of all types, but we will focus on strings, since those are necessary for assembly and disassembly
member :: Word32 -> Hashtbl -> Bool Source #
Check whether there is a member for a given key, wrapper for corresponding Map function
lookup :: Word32 -> Hashtbl -> Maybe String Source #
Lookup a value by its key, wrapper for corresponding Map function
toList :: Hashtbl -> [(Word32, String)] Source #
Convert entire Hashtbl ot a list of key-value pairs, wrapper for corresponding Map function
fromStringList :: [String] -> Hashtbl Source #
Convert a list of strings into a Hashtbl, generating hash values for them