Exploring the regular tree types

  • Authors:
  • Peter Morris;Thorsten Altenkirch;Conor McBride

  • Affiliations:
  • School of Computer Science and Information Technology, University of Nottingham;School of Computer Science and Information Technology, University of Nottingham;School of Computer Science and Information Technology, University of Nottingham

  • Venue:
  • TYPES'04 Proceedings of the 2004 international conference on Types for Proofs and Programs
  • Year:
  • 2004

Quantified Score

Hi-index 0.00

Visualization

Abstract

In this paper we use the Epigram language to define the universe of regular tree types—closed under empty, unit, sum, product and least fixpoint. We then present a generic decision procedure for Epigram's in-built equality at each type, taking a complementary approach to that of Benke, Dybjer and Jansson [7]. We also give a generic definition of map, taking our inspiration from Jansson and Jeuring [21]. Finally, we equip the regular universe with the partial derivative which can be interpreted functionally as Huet's notion of ‘zipper', as suggested by McBride in [27] and implemented (without the fixpoint case) in Generic Haskell by Hinze, Jeuring and Löh [18]. We aim to show through these examples that generic programming can be ordinary programming in a dependently typed language.