Generic Haskell: Applications

Generic Haskell is an extension of Haskell that supports the construction of generic programs. These lecture notes discuss three advanced generic programming applications: generic dictionaries, compressing XML documents, and the zipper: a data structure used to represent a tree together with a subtree that is the focus of attention, where that focus may move left, right, up or down the tree. When describing and implementing these examples, we will encounter some advanced features of Generic Haskell, such as type-indexed data types, dependencies between and generic abstractions of generic functions, adjusting a generic function using a default case, and generic functions with a special case for a particular constructor.

[1]  Richard S. Bird,et al.  Arithmetic Coding with Folds and Unfolds , 2002, Advanced Functional Programming.

[2]  Sudarshan S. Chawathe,et al.  Comparing Hierarchical Data in External Memory , 1999, VLDB.

[3]  Chris Okasaki,et al.  Fast Mergeable Integer Maps , 1998 .

[4]  Andres Löh,et al.  Generic H∀SKELL, Specifically , 2003 .

[5]  Johan Jeuring,et al.  Polytypic data conversion programs , 2002, Sci. Comput. Program..

[6]  Erik Meijer,et al.  Type-indexed rows , 2001, POPL '01.

[7]  Maarten M. Fokkinga,et al.  Functional Programming with Bananas, Lenses, Envelopes and Barbed Wire , 1991, FPCA.

[8]  Ralf Lämmel,et al.  Scrap your boilerplate: a practical approach to generic programming , 2003 .

[9]  James Cheney Compressing XML with multiplexed hierarchical PPM models , 2001, Proceedings DCC 2001. Data Compression Conference.

[10]  Ralf Hinze,et al.  Generic Haskell: Practice and Theory , 2003, Generic Programming.

[11]  Conor McBride The Derivative of a Regular Type is its Type of One-Hole Contexts , 2001 .

[12]  Johan Jeuring Polytypic pattern matching , 1995, FPCA '95.

[13]  Michael Franz,et al.  Generic Adaptive Syntax-Directed Compression for Mobile Code , 2001 .

[14]  J W Ballard,et al.  Data on the web? , 1995, Science.

[15]  Johan Jeuring,et al.  Polytypic Unification , 1998, J. Funct. Program..

[16]  Abraham Lempel,et al.  A universal algorithm for sequential data compression , 1977, IEEE Trans. Inf. Theory.

[17]  Jan Vitek,et al.  Mobile Object Systems Towards the Programmable Internet , 1996, Lecture Notes in Computer Science.

[18]  Simon L. Peyton Jones,et al.  Scrap your boilerplate: a practical design pattern for generic programming , 2003, TLDI '03.

[19]  Philip Wadler XQuery: A Typed Functional Language for Querying XML , 2002, Advanced Functional Programming.

[20]  Rene De La Briandais File searching using variable length keys , 1959, IRE-AIEE-ACM Computer Conference.

[21]  Alexander A. Stepanov,et al.  Generic Programming , 1988, ISSAC.

[22]  Robert D. Cameron Source encoding using syntactic information source models , 1988, IEEE Trans. Inf. Theory.

[23]  Erik Meijer,et al.  XMlambda - A Functional Language for Constructing and Manipulating XML Documents , 2000 .

[24]  Neel Sundaresan,et al.  Millau: an encoding format for efficient representation and exchange of XML over the Web , 2000, Comput. Networks.

[25]  Ralf Hinze,et al.  Generalizing generalized tries , 2000, Journal of Functional Programming.

[26]  Andres Löh,et al.  Generic Haskell, Specifically , 2002, Generic Programming.

[27]  Ralf Hinze,et al.  A new approach to generic functional programming , 2000, POPL '00.

[28]  Donald E. Knuth,et al.  The Art of Computer Programming: Volume 3: Sorting and Searching , 1998 .

[29]  Gérard P. Huet,et al.  The Zipper , 1997, Journal of Functional Programming.

[30]  Ralf Hinze,et al.  Generic Programs and Proofs , 2000 .

[31]  Ralf Hinze,et al.  The Generic Haskell user's guide , 2001 .

[32]  Jayant R. Haritsa,et al.  XGrind: a query-friendly XML compressor , 2002, Proceedings 18th International Conference on Data Engineering.

[33]  Marinus J. Plasmeijer,et al.  Gast: Generic Automated Software Testing , 2002, IFL.

[34]  G. Malcolm,et al.  Data Structures and Program Transformation , 1990, Sci. Comput. Program..

[35]  Chris Okasaki,et al.  Purely functional data structures , 1998 .

[36]  Dan Suciu,et al.  XMill: an efficient compressor for XML data , 2000, SIGMOD '00.

[37]  Mario Cannataro,et al.  Semantic Lossy Compression of XML Data , 2001, KRDB.

[38]  M. V. Wilkes,et al.  The Art of Computer Programming, Volume 3, Sorting and Searching , 1974 .

[39]  Christopher W. Fraser,et al.  Bytecode compression via profiled grammar rewriting , 2001, PLDI '01.

[40]  Jérôme Siméon,et al.  YATL: a Functional and Declarative Language for XML , 2000 .

[41]  Ralf Hinze,et al.  Type-indexed data types , 2004, Sci. Comput. Program..

[42]  Johan Jeuring,et al.  Polytypic Compact Printing and Parsing , 1999, ESOP.

[43]  Thorsten Altenkirch,et al.  Derivatives of Containers , 2003, TLCA.

[44]  F. Lockwood Morris,et al.  A generalization of the trie data structure , 1995, Mathematical Structures in Computer Science.

[45]  Colin Runciman,et al.  Haskell and XML: generic combinators or type-based translation? , 1999, ICFP '99.

[46]  Peter Flynn,et al.  Understanding SGML and XML Tools , 1998, Springer US.

[47]  Ralf Hinze,et al.  Haskell 98 — A Non−strict‚ Purely Functional Language , 1999 .

[48]  Michael Franz Adaptive Compression of Syntax Trees and Iterative Dynamic Code Optimization: Two Basic Technologies for Mobile Object Systems , 1996, Mobile Object Systems.

[49]  Roland Carl Backhouse,et al.  Generic Programming: An Introduction , 1998, Advanced Functional Programming.

[50]  Koen Claessen,et al.  Testing and Tracing Lazy Functional Programs Using QuickCheck and Hat , 2002, Advanced Functional Programming.

[51]  Lambert G. L. T. Meertens,et al.  Paramorphisms , 2005, Formal Aspects of Computing.

[52]  Johan Jeuring,et al.  A Framework for Polytypic Programming on Terms, with an Application to Rewriting , 2000 .

[53]  Benjamin C. Pierce,et al.  Xduce: a typed xml processing language , 1997 .

[54]  Grant Malcolm,et al.  Algebraic Data Types and Program Transformation , 1990 .

[55]  Erich J. Neuhold,et al.  Jedi: extracting and synthesizing information from the Web , 1998, Proceedings. 3rd IFCIS International Conference on Cooperative Information Systems (Cat. No.98EX122).

[56]  Ralf Hinze,et al.  Polytypic values possess polykinded types , 2000, Sci. Comput. Program..