Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Vault – Type-Safe Heterogeneous Map

Lean: Hale.Vault | Haskell: vault

Type-safe heterogeneous container keyed by Key α tokens. Backed by Std.HashMap mapping unique Nat IDs to type-erased values.

Key Types

TypeDescription
Key αTyped key (globally unique)
VaultHeterogeneous map

Axiom-Dependent Properties

  • Type safety of lookup depends on axiom that unsafeCast is safe when the original value was of type α

Files

  • Hale/Vault/Data/Vault.lean – Key, Vault, insert, lookup, delete