ABSTRACT
Many programming languages provide means to split large programs into smaller modules. The module system of a language specifies what constitutes a module and how modules interact.This paper presents a formal specification of the module system for the functional programming language Haskell. Although many aspects of Haskell have been subjected to formal analysis, the module system has, to date, been described only informally as part of the Haskell language report. As a result, some aspects of it are not well understood or are under-specified; this causes difficulties in reasoning about Haskell programs, and leads to practical problems such as inconsistencies between different implementations. One significant aspect of our work is that the specification is written in Haskell, which means that it can also be used as an executable test-bed, and as a starting point for Haskell implementers.
- B. A. Davey and H. A. Priestley. Introduction to Lattices and Order. Cambridge University Press, 1990.Google Scholar
- K.-F. Faxén. A Static Semantics for Haskell. Journal of Functional Programming, 2002. To appear. Google ScholarDigital Library
- T. Hallgren. Home Page of the Proof Editor Alfa. http://www.cs.chalmers.se/~hallgren/Alfa/, 1996-2002.Google Scholar
- R. Harper and M. Lillibridge. A type-theoretic approach to higher-order modules with sharing. In Proc. of 1994 ACM Symposium on Principles of Programming Languages, pages 123-137, Portland, OR, January 1994. Google ScholarDigital Library
- M. P. Jones. Typing Haskell in Haskell. In Proceedings of the 3rd Haskell Workshop, Paris, France, October 1999.Google Scholar
- X. Leroy. A modular module system. Journal of Functional Programming, 10(3):269-303, 2000. Google ScholarDigital Library
- D. B. MacQueen. Using dependent types to express modular structure. In Proc. of 1986 ACM Symposium on Principles of Programming Languages, pages 277-286, January 1986. St. Petersburg. Google ScholarDigital Library
- R. Milner, M. Tofte, R. Harper, and D. MacQueen. The Definition of Standard ML (Revised). The MIT Press, 1997. Google ScholarDigital Library
- S. Peyton Jones and J. Hughes (editors). Report on the programming language Haskell 98. Technical Report YALEU/DCS/RR-1106, Yale University, CS Dept., Feb. 1999.Google Scholar
- S. Peyton Jones and P. Wadler. A static semantics for Haskell. Unpublished draft, 1992.Google Scholar
- S. Peyton Jones (editor). Report on the programming language Haskell 98. http://research.microsoft.com/~simonpj/haskell98-revised/, March 2002.Google Scholar
- M. Shields and S. Peyton Jones. First class modules for Haskell. In 9th International Conference on Foundations of Object-Oriented Languages (FOOL 9), Portland, Oregon, pages 28-40, Jan. 2002.Google Scholar
- The GHC team. The Glasgow Haskell Compiler user's guide version 5.04. http://haskell.org/ghc/, July 2002.Google Scholar
Index Terms
- A formal specification of the Haskell 98 module system
Recommendations
Formal specification of a JavaScript module system
OOPSLA '12: Proceedings of the ACM international conference on Object oriented programming systems languages and applicationsThe JavaScript programming language, originally developed as a simple scripting language, is now the language of choice for web applications. All the top 100 sites on the web use JavaScript and its use outside web pages is rapidly growing. However, ...
Formal specification of a JavaScript module system
OOPSLA '12The JavaScript programming language, originally developed as a simple scripting language, is now the language of choice for web applications. All the top 100 sites on the web use JavaScript and its use outside web pages is rapidly growing. However, ...
The Intel labs Haskell research compiler
Haskell '13The Glasgow Haskell Compiler (GHC) is a well supported optimizing compiler for the Haskell programming language, along with its own extensions to the language and libraries. Haskell's lazy semantics imposes a runtime model which is in general difficult ...
Comments