Haskell Type Constraints Unleashed

  • Dominic Orchard
  • Tom Schrijvers
Conference paper

DOI: 10.1007/978-3-642-12251-4_6

Part of the Lecture Notes in Computer Science book series (LNCS, volume 6009)
Cite this paper as:
Orchard D., Schrijvers T. (2010) Haskell Type Constraints Unleashed. In: Blume M., Kobayashi N., Vidal G. (eds) Functional and Logic Programming. FLOPS 2010. Lecture Notes in Computer Science, vol 6009. Springer, Berlin, Heidelberg


The popular Glasgow Haskell Compiler extends the Haskell 98 type system with several powerful features, leading to an expressive language of type terms. In contrast, constraints over types have received much less attention, creating an imbalance in the expressivity of the type system. In this paper, we rectify the imbalance, transferring familiar type-level constructs, synonyms and families, to the language of constraints, providing a symmetrical set of features at the type-level and constraint-level. We introduce constraint synonyms and constraint families, and illustrate their increased expressivity for improving the utility of polymorphic EDSLs in Haskell, amongst other examples. We provide a discussion of the semantics of the new features relative to existing type system features and similar proposals, including details of termination.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Dominic Orchard
    • 1
  • Tom Schrijvers
    • 2
  1. 1.Computer LaboratoryUniversity of Cambridge 
  2. 2.Katholieke Universiteit Leuven 

Personalised recommendations