Building blocks for custom Haskell databases over mutable data-structures