%**Preface %*section %**~sheader \markboth{PREFACE}{PREFACE} \begin{center} {\Large \bf Preface} \end{center} \vspace{.2in} \begin{quote} ``{\em Some half dozen persons have written technically on combinatory logic, and most of these, including ourselves, have published something erroneous. Since some of our fellow sinners are among the most careful and competent logicians on the contemporary scene, we regard this as evidence that the subject is refractory. Thus fullness of exposition is necessary for accuracy; and excessive condensation would be false economy here, even more than it is ordinarily.}'' \begin{flushright} Haskell B.~Curry and Robert Feys \\ in the Preface to {\em Combinatory Logic} \cite{curry&feys:book}, May 31, 1956 \end{flushright} \end{quote} \vspace{.2in} \noindent In September of 1987 a meeting was held at the conference on Functional Programming Languages and Computer Architecture (FPCA~'87) in Portland, Oregon, to discuss an unfortunate situation in the functional programming community: there had come into being more than a dozen non-strict, purely functional programming languages, all similar in expressive power and semantic underpinnings. There was a strong consensus at this meeting that more widespread use of this class of functional languages\index{functional language} was being hampered by the lack of a common language. It was decided that a committee should be formed to design such a language, providing faster communication of new ideas, a stable foundation for real applications development, and a vehicle through which others would be encouraged to use functional languages. This document describes the result of that (and subsequent) committee's efforts: a purely functional programming language called \Haskell{}, \index{Haskell@@\Haskell{}} named after the logician Haskell B.~Curry\index{Curry, Haskell B.} whose work provides the logical basis for much of ours. \section*{Goals} The committee's primary goal was to design a language that satisfied these constraints: \begin{enumerate} \item It should be suitable for teaching, research, and applications, including building large systems. \item It should be completely described via the publication of a formal syntax and semantics. \item It should be freely available. Anyone should be permitted to implement the language and distribute it to whomever they please. \item It should be based on ideas that enjoy a wide consensus. \item It should reduce unnecessary diversity in functional programming languages. \end{enumerate} \section*{\Haskell{} Prime: language and libraries} The committee intended that \Haskell{} would serve as a basis for future research in language design, and hoped that extensions or variants of the language would appear, incorporating experimental features. \Haskell{} has indeed evolved continuously since its original publication. By the middle of 1997, there had been five versions of the language design (from \Haskell{} 1.0 -- 1.4). At the 1997 \Haskell{} Workshop in Amsterdam, it was decided that a stable variant of \Haskell{} was needed; this became ``\Haskell{} 98'' and was published in Februrary 1999. The fixing of minor bugs led to the \emph{Revised} \Haskell{} 98 Report in 2002. At the 2005 \Haskell{} Workshop, the consensus was that so many extensions to the official language were widely used (and supported by multiple implementations), that it was worthwhile to define another iteration of the language standard, essentially to codify (and legitimise) the status quo. \Haskell{} Prime was thus conceived as a relatively conservative extension of \Haskell{} 98, taking on board new features only where they were well understood and widely agreed upon. It too is intended to be a ``stable'' language, yet reflecting the considerable progress in research on language design in recent years. % {\em Implementors are committed to supporting \Haskell{} Prime % exactly as specified, for the foreseeable future}. %It provides a stable point of reference, so that those who %wish to write text books, or use \Haskell{} for teaching, can do so in %the knowledge that \Haskell{} Prime will continue to exist. The original \Haskell{} Report covered only the language, together with a standard library called the @Prelude@. By the time \Haskell{} 98 was stabilised, it had become clear that many programs need access to a larger set of library functions (notably concerning input/output and simple interaction with the operating system). If these programs were to be portable, a set of libraries would have to be standardised too. A separate effort was therefore begun by a distinct (but overlapping) committee to fix the \Haskell{} 98 Libraries. For \Haskell{} Prime, we have seen fit once again to separate the Libraries standardisation process from the Language. Libraries evolve much more rapidly than the language, and are governed by a looser community-led process. %\section*{Revising the \Haskell{} 98 Reports} % %After a year or two, many typographical errors and infelicities had been %spotted. I took on the role of gathering and acting on these corrections, %with the following goals: %\begin{itemize} %\item Correct typographical errors. %\item Clarify obscure passages. %\item Resolve ambiguities. %\item With reluctance, make small changes to make the overall language more %consistent. %\end{itemize} %This task turned out to be much, much larger than I had anticipated. %As \Haskell{} becomes more widely used, the Report has been scrutinised by more %and more people, and I have adopted hundreds of (mostly small) changes as %a result of their feedback. %The original committees ceased to exist when the original \Haskell{} 98 Reports were %published, so every change was instead proposed to the entire \Haskell{} mailing list. % %This document is the outcome of this process of refinement. %It includes both the \Haskell{} 98 Language Report and the Libraries Report, %and constitutes the official specification of both. %It is {\em not} a tutorial on programming in %\Haskell{} such as the `Gentle Introduction' \cite{tutorial}, and some %familiarity with functional languages is assumed. % %The entire text of both Reports is available online (see ``\Haskell{} resources'' below). % \section*{Extensions to \Haskell{} 98} The major language additions in \Haskell{} Prime, over and above \Haskell{} 98 are listed here: \begin{description} \item[Syntactic sugar,] including: \begin{itemize} \item pattern guards; %\item recursive do-notation; \item lexically scoped type variables; %\item meta-programming facilities; \end{itemize} \item[Type system innovations,] including: \begin{itemize} \item multi-parameter type classes; \item functional dependencies; \item existential types; \item local universal polymorphism and arbitrary rank-types; \end{itemize} \item[Control extensions,] including: \begin{itemize} \item monadic state; \item exceptions; \item concurrency; \end{itemize} \end{description} \section*{\Haskell{} Resources} \label{sect:resources} The \Haskell{} web site \bprog @ http://haskell.org @ \eprog gives access to many useful resources, including: \begin{itemize} \item Online versions of the language and library definitions. \item Tutorial material on \Haskell{}. \item Details of the \Haskell{} mailing list. \item Implementations of \Haskell{}. \item Contributed \Haskell{} tools and libraries. \item Applications of \Haskell{}. \item User-contributed wiki pages. \end{itemize} You are welcome to comment on, suggest improvements to, and criticise the language or its presentation in the report, via the \Haskell{} mailing list, or the \Haskell{} wiki. \section*{Building the language} \Haskell{} was created, and continues to be sustained, by an active community of researchers and application programmers. Those who served on the Language and Library committees, in particular, devoted a huge amount of time and energy to the language. Here they are, with their affiliation(s) for the relevant period: \begin{center} Arvind (MIT) \\ Lennart Augustsson (Chalmers University) \\ Dave Barton (Mitre Corp) \\ Brian Boutel (Victoria University of Wellington) \\ Warren Burton (Simon Fraser University) \\ Jon Fairbairn (University of Cambridge) \\ Joseph Fasel (Los Alamos National Laboratory) \\ Andy Gordon (University of Cambridge) \\ Maria Guzman (Yale University) \\ Kevin Hammond [editor] (University of Glasgow) \\ Ralf Hinze (University of Bonn) \\ Paul Hudak [editor] (Yale University) \\ John Hughes [editor] (University of Glasgow; Chalmers University) \\ Thomas Johnsson (Chalmers University) \\ Mark Jones (Yale University, University of Nottingham, Oregon Graduate Institute) \\ Dick Kieburtz (Oregon Graduate Institute) \\ John Launchbury (University of Glasgow; Oregon Graduate Institute) \\ Erik Meijer (Utrecht University) \\ Rishiyur Nikhil (MIT) \\ John Peterson [editor] (Yale University) \\ Simon Peyton Jones [editor] (University of Glasgow; Microsoft Research Ltd) \\ Mike Reeve (Imperial College) \\ Alastair Reid (University of Glasgow) \\ Colin Runciman (University of York) \\ Philip Wadler [editor] (University of Glasgow) \\ David Wise (Indiana University) \\ Jonathan Young (Yale University) \end{center} Those marked [editor] served as the co-ordinating editor for one or more revisions of the language. In addition, dozens of other people made helpful contributions, some small but many substantial. They are as follows: Kris Aerts, Hans Aberg, Sten Anderson, Richard Bird, Stephen Blott, Tom Blenko, Duke Briscoe, Paul Callaghan, Magnus Carlsson, Mark Carroll, Manuel Chakravarty, Franklin Chen, Olaf Chitil, Chris Clack, Guy Cousineau, Tony Davie, Craig Dickson, Chris Dornan, Laura Dutton, Chris Fasel, Pat Fasel, Sigbjorn Finne, Michael Fryers, Andy Gill, Mike Gunter, Cordy Hall, Mark Hall, Thomas Hallgren, Matt Harden, Klemens Hemm, Fergus Henderson, Dean Herington, Ralf Hinze, Bob Hiromoto, Nic Holt, Ian Holyer, Randy Hudson, Alexander Jacobson, Patrik Jansson, Robert Jeschofnik, Orjan Johansen, Simon B.~Jones, Stef Joosten, Mike Joy, Stefan Kahrs, Antti-Juhani Kaijanaho, Jerzy Karczmarczuk, Wolfram Kahl, Kent Karlsson, Richard Kelsey, Siau-Cheng Khoo, Amir Kishon, Feliks Kluzniak, Jan Kort, Marcin Kowalczyk, Jose Labra, Jeff Lewis, Mark Lillibridge, % The doubled "" is turned into one by the verbatim preprocessor % Bj\""{o}rn Lisper, Bjorn Lisper, Sandra Loosemore, Pablo Lopez, Olaf Lubeck, Ian Lynagh, Christian Maeder, Ketil Malde, Simon Marlow, Michael Marte, Jim Mattson, John Meacham, Sergey Mechveliani, Gary Memovich, Randy Michelsen, Rick Mohr, Andy Moran, Graeme Moss, Henrik Nilsson, Arthur Norman, Nick North, Chris Okasaki, Bjarte M. {\O}stvold, Paul Otto, Sven Panne, Dave Parrott, Ross Paterson, Larne Pekowsky, Rinus Plasmeijer, Ian Poole, Stephen Price, John Robson, Andreas Rossberg, George Russell, Patrick Sansom, Michael Schneider, Felix Schroeter, Julian Seward, Nimish Shah, Christian Sievers, Libor Skarvada, Jan Skibinski, Lauren Smith, Raman Sundaresh, Josef Svenningsson, Ken Takusagawa, Satish Thatte, Simon Thompson, Tom Thomson, Tommy Thorn, Dylan Thurston, Mike Thyer, Mark Tullsen, David Tweed, Pradeep Varma, Malcolm Wallace, Keith Wansbrough, Tony Warnock, Michael Webber, Carl Witty, Stuart Wray, and Bonnie Yantis. Finally, aside from the important foundational work laid by Church, Rosser, Curry, and others on the lambda calculus, it is right to acknowledge the influence of many noteworthy programming languages developed over the years. Although it is difficult to pinpoint the origin of many ideas, the following languages were particularly influential: Lisp (and its modern-day incarnations Common Lisp and Scheme); Landin's ISWIM; APL; Backus's FP \cite{back78}; ML and Standard ML; Hope and Hope$^{+}$; Clean; Id; Gofer; Sisal; and Turner's series of languages culminating in Miranda\footnote{{\rm Miranda} is a trademark of Research Software Ltd.}. Without these forerunners \Haskell{} would not have been possible. \vspace{1in} Simon Peyton Jones \\ Cambridge, September 2002 %**~sfooter