Abstract
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 input-output 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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Pads, http://www.padsproj.org ( [Online]; accessed June 22, 2008)
Pcap, http://www.tcpdump.org/pcap.htm ( [Online]; accessed October 10, 2008)
Back, G.: DataScript - A specification and scripting language for binary data. In: Batory, D., Blum, A., Taha, W. (eds.) GPCE 2002. LNCS, vol. 2487, pp. 66–77. Springer, Heidelberg (2002)
Fernández, M.F., Fisher, K., Foster, J.N., Greenberg, M., Mandelbaum, Y.: A Generic Programming Toolkit for PADS/ML: First-Class Upgrades for Third-Party Developers. In: Hudak, P., Warren, D.S. (eds.) PADL 2008. LNCS, vol. 4902, pp. 133–149. Springer, Heidelberg (2008)
Fisher, K., Gruber, R.: Pads: a domain-specific language for processing ad hoc data. In: PLDI 2005: Proceedings of the 2005 ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 295–304. ACM Press, New York (2005)
Fisher, K., Mandelbaum, Y., Walker, D.: The next 700 data description languages. In: POPL 2006, pp. 2–15. ACM Press, New York (2006)
Fisher, K., Walker, D., Zhu, K.Q., White, P.: From dirt to shovels: fully automatic tool generation from ad hoc data. In: POPL 2008, pp. 421–434. ACM, New York (2008)
Hughes, J.: The design of a pretty-printing library. In: First International Spring School on Advanced Functional Programming Techniques-Tutorial Text, pp. 53–96. Springer, London (1995)
Hutton, G., Meijer, E.: Monadic parsing in Haskell. Journal of Functional Programming 8(4), 437–444 (1998)
Kennedy, A.J.: Pickler combinators. Journal of Functional Programming 14(6), 727–739 (2004)
Leijen, D., Meijer, E.: Parsec: Direct style monadic parser combinators for the real world. Tech. Rep. UU-CS-2001-27, Department of Computer Science, Universiteit Utrecht (2001)
McCann, P.J., Chandra, S.: Packet types: Abstract specification of network protocol messages. SIGCOMM Comput. Commun. Rev. 30(4), 321–333 (2000)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2011 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Wang, Y., Gaspes, V. (2011). A Library for Processing Ad hoc Data in Haskell. In: Scholz, SB., Chitil, O. (eds) Implementation and Application of Functional Languages. IFL 2008. Lecture Notes in Computer Science, vol 5836. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-24452-0_10
Download citation
DOI: https://doi.org/10.1007/978-3-642-24452-0_10
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-24451-3
Online ISBN: 978-3-642-24452-0
eBook Packages: Computer ScienceComputer Science (R0)