Cupid

Reference

Further reading

Documents about the language Cupid accepts, the system it descends from and the ideas its implementation is built on.

The language

Learning Haskell

  • Paul Hudak, John Peterson and Joseph Fasel, A Gentle Introduction to Haskell, version 98. A short tour of the language for readers who have programmed before. It predates Applicative, so a Monad instance written as it shows needs Functor and Applicative instances as well.
  • haskell.org lists current books, courses and tutorials.

Hugs and Gofer

Hugs is no longer developed, but its documentation is still online. It describes Hugs 98, not Cupid: Differences from Hugs 98 says what changed.

Types and classes

  • Mark P. Jones, Qualified Types: Theory and Practice (Cambridge University Press, 1994). The theory behind the type checker's predicates and evidence; see How types are inferred.
  • Mark P. Jones, A system of constructor classes: overloading and implicit higher-order polymorphism (FPCA 1993; Journal of Functional Programming, 1995). Classes over type constructors, first implemented in Gofer, which Functor and Monad rest on.
  • Mark P. Jones, Simplifying and improving qualified types (FPCA 1995). Improvement, which the solver uses for functional dependencies.
  • Simon Peyton Jones, Mark Jones and Erik Meijer, Type classes: an exploration of the design space (Haskell Workshop, 1997). The choices behind multi-parameter classes and flexible contexts and instances.
  • Mark P. Jones, Type Classes with Functional Dependencies (ESOP 2000). Functional dependencies as Cupid implements them; see How constraints are solved.
  • Mark P. Jones, Typing Haskell in Haskell (Haskell Workshop, 1999). A Haskell 98 type checker written as a Haskell program, by the author of the one in Cupid. Shorter than the C, and a useful companion to it.

Compiling and running

  • Simon L. Peyton Jones, The Implementation of Functional Programming Languages (Prentice Hall, 1987). The G-machine, pattern-matching compilation and lambda lifting that How code is compiled and run follows.

Edit this page on GitHub