Added type clarification to the docs
Getty Ritter
9 years ago
| 51 | 51 | command (or its operator synonym `=:`) and retrieved using the `get` |
| 52 | 52 | command. |
| 53 | 53 | |
| 54 | ~~~.haskell | |
| 55 | -- set a key to a value | |
| 56 | set :: (Serialize k, Serialize v) => k -> v -> Tansu () | |
| 57 | ||
| 58 | -- infix alias for set | |
| 59 | (=:) :: (Serialize k, Serialize v) => k -> v -> Tansu () | |
| 60 | ||
| 61 | -- get a value, failing if it does not exist | |
| 62 | get :: (Serialize k, Serialize v) => k -> Tansu v | |
| 63 | ||
| 64 | -- get a value, returning Nothing if it does not exist | |
| 65 | getMb :: (Serialize k, Serialize v) => k -> Tansu (Maybe v) | |
| 66 | ||
| 67 | -- run a Tansu computation | |
| 68 | run :: TansuDb -> Tansu a -> IO (Either TansuError a) | |
| 69 | ~~~ | |
| 70 | ||
| 54 | 71 | A value of type `TansuDb` should be supplied by a _backend_, which can |
| 55 | 72 | correspond to any storage medium capable of storing a key-value store. |
| 56 | 73 | The `tansu` library only defines two trivial storage backends—one that |