Generic storage in Haskell

  • Authors:
  • Sebastiaan Visser;Andres Löh

  • Affiliations:
  • Utrecht University, Utrecht, Netherlands;Utrecht University, Utrecht, Netherlands

  • Venue:
  • Proceedings of the 6th ACM SIGPLAN workshop on Generic programming
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

We present a framework for constructing functional data structures that can be stored on disk. The data structures reside in a heap saved in a binary file. Operations read and write only the parts of the data structure that are actually needed. The framework is based on expressing datatypes as fixed points of functors and then annotating the recursive positions with additional information. We explain how functions, if expressed in terms of standard recursion patterns, can be easily lifted from a pure setting to an effectful, annotated scenario. As a running example, we sketch how to implement a persistent library of finite maps based on binary search trees.