Ad hoc data formats, i.e. semistructured non-standard data formats, are pervasive in many domains that need software tools -- bioinformatics, demographic surveys, geophysics and network software are just a few. Building tools becomes easier if parsing and other standard inputoutput processing can be automated. Modern approaches for dealing with ad hoc data formats consist of domain specific languages based on type systems. Compilers for these languages generate data structures and parsing functions in a target programming language in which tools and applications are then written. We present a monadic library in Haskell that implements a data description language. Using our library, Haskell programmers have access to data description primitives that can be used for parsing and that can be integrated with other libraries and application programs without the need of yet another compiler.
['Yan Wang', 'Verónica Gaspes']
A library for processing ad hoc data in Haskell: embedding a data description language