|
ABSTRACT
Generalized algebraic data types (GADTs), sometimes known as "guarded recursive data types" or "first-class phantom types", are a simple but powerful generalization of the data types of Haskell and ML. Recent works have given compelling examples of the utility of GADTs, although type inference is known to be difficult. Our contribution is to show how to exploit programmer-supplied type annotations to make the type inference task almost embarrassingly easy. Our main technical innovation is wobbly types, which express in a declarative way the uncertainty caused by the incremental nature of typical type-inference algorithms.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
 |
1
|
|
| |
2
|
Lennart Augustsson and Kent Petersson. Silly type families. Available as http://www.cs.pdx.edu/~sheard/papers/silly. pdf, 1994.
|
 |
3
|
|
| |
4
|
Luca Cardelli. Basic polymorphic typechecking. Polymorphism, 2(1), January 1985.
|
| |
5
|
James Cheney and Ralf Hinze. First-class phantom types. CUCIS TR2003-1901, Cornell University, 2003.
|
| |
6
|
Thierry Coquand. Pattern matching with dependent types. In Proceedings of the Workshop on Types for Proofs and Program, pages 66--79, Baastad, Sweden, June 1992.
|
| |
7
|
|
| |
8
|
Ralf Hinze. Fun with phantom types. In Jeremey Gibbons and Oege de Moor, editors, The fun of programming, pages 245--262. Palgrave, 2003.
|
 |
9
|
|
| |
10
|
Lena Magnusson. The implementation of ALF - a proof editor based on Martin-Löf's monomorhic type theory with explicit substitution. PhD thesis, Chalmers University, 1994.
|
| |
11
|
|
| |
12
|
Erik Meijer and Koen Claessen. The design and implementation of Mondrian. In John Launchbury, editor, Haskell workshop, Amsterdam, Netherlands, 1997.
|
| |
13
|
|
| |
14
|
Simon Peyton Jones, Geoffrey Washburn, and Stephanie Weirich. Wobbly types: type inference for generalised algebraic data types. Microsoft Research, 2004.
|
 |
15
|
|
 |
16
|
|
 |
17
|
|
| |
18
|
Tim Sheard and Emir Pasalic. Meta-programming with built-in type equality. In Proceedings of the Fourth International Workshop on Logical Frameworks and Meta-languaegs (LFM'04), Cork, July 2004.
|
| |
19
|
Peter Stuckey and Martin Sulzmann. Type inference for guarded recursive data types. Technical report, National University of Singapore, 2005.
|
| |
20
|
Martin Sulzmann. A Haskell programmer's guide to Chameleon. Available at http://www.comp.nus.edu.sg/sulzmann/chameleon/download/haskell. html, 2003.
|
| |
21
|
Martin Sulzmann, JeremyWazny, and Peter Stuckey. A framework for extended algebraic data types. Technical report, National University of Singapore, 2005.
|
 |
22
|
|
| |
23
|
Dimitrios Vytiniotis, Stephanie Weirich, and Simon Peyton Jones. Simple unification-based type inference for GADTs, Technical Appendix. Technical Report MS-CIS-05-22, University of Pennsylvania, April 2006.
|
| |
24
|
Hongwei Xi. Applied type system. In Proceedings of TYPES 2003, volume 3085 of Lecture Notes in Computer Science, pages 394--408. Springer Verlag, 2004.
|
 |
25
|
Hongwei Xi , Chiyan Chen , Gang Chen, Guarded recursive datatype constructors, Proceedings of the 30th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.224-235, January 15-17, 2003, New Orleans, Louisiana, USA
|
 |
26
|
|
| |
27
|
|
CITED BY 33
|
|
|
|
|
|
|
|
|
|
|
Martin Sulzmann , Manuel M. T. Chakravarty , Simon Peyton Jones , Kevin Donnelly, System F with type equality coercions, Proceedings of the 2007 ACM SIGPLAN international workshop on Types in languages design and implementation, January 16-16, 2007, Nice, Nice, France
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Marcos Viera , S. Doaitse Swierstra , Eelco Lempsink, Haskell, do you read me?: constructing and composing efficient top-down parsers at runtime, Proceedings of the first ACM SIGPLAN symposium on Haskell, September 25-25, 2008, Victoria, BC, Canada
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Limin Jia , Jeffrey A. Vaughan , Karl Mazurak , Jianzhou Zhao , Luke Zarko , Joseph Schorr , Steve Zdancewic, AURA: a programming language for authorization and audit, ACM SIGPLAN Notices, v.43 n.9, September 2008
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Julien Brunel , Damien Doligez , René Rydhof Hansen , Julia L. Lawall , Gilles Muller, A foundation for flow-based program matching: using temporal logic and model checking, Proceedings of the 36th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages, January 21-23, 2009, Savannah, GA, USA
|
|