• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

src/Data/H03-May-2022-297184

CHANGELOG.mdH A D09-Sep-20011.3 KiB6335

LICENSEH A D09-Sep-20011.5 KiB3124

README.mdH A D09-Sep-20011.5 KiB4826

Setup.hsH A D09-Sep-200146 32

vault.cabalH A D09-Sep-20012.2 KiB6959

README.md

1[![Build Status](https://travis-ci.org/HeinrichApfelmus/vault.png)](https://travis-ci.org/HeinrichApfelmus/vault)
2
3
4*Vault* is a tiny library that provides a single data structure called *vault*.
5
6A *vault* is a type-safe, persistent storage for values of arbitrary types. Like `IORef`, I want to be able to store values of any type in it, but unlike `IORef`, I want the storage space to behave like a persistent, first-class data structure, as appropriate for a purely functional language.
7
8It is analogous to a bank vault, where you can access different bank boxes with different keys; hence the name.
9
10In other words, a vault is an abstract data type with the following basic signature
11
12    data Key a
13    data Vault
14
15    newKey :: IO (Key a)
16    empty  :: Vault
17    lookup :: Key a -> Vault -> Maybe a
18    insert :: Key a -> a -> Vault -> Vault
19    delete :: Key a -> Vault -> Vault
20
21A few common functions for finite maps, like `adjust` and `union`, are provided as well.
22
23
24This library was created thanks to the feedback on my blog post [Vault - a persistent store for values of arbitrary types][1].
25
26  [1]: http://apfelmus.nfshost.com/blog/2011/09/04-vault.html
27
28
29Installation
30============
31The whole thing is [available on hackage][hackage], so you just have to type
32
33    cabal update
34    cabal install vault
35
36  [hackage]: http://hackage.haskell.org/package/vault
37
38Feedback
39========
40Use the [issue tracker][2] or send an [email to the maintainer][3].
41
42  [2]: https://github.com/HeinrichApfelmus/vault/issues
43  [3]: mailto:apfelmus@quantentunnel.de
44
45
46
47
48