|
ABSTRACT
We propose a type system for locating the source of type errors in an applied lambda calculus with ML-style polymorphism. The system is based on discriminative sum types---known from work on soft typing---with annotation subtyping and recursive types. This way, type clashes can be registered in the type for later reporting. The annotations track the potential producers and consumers for each value so that clashes can be traced to their cause.Every term is typeable in our system and type inference is decidable. A type derivation in our system describes all type errors present in the program, so that a principal derivation yields a principal description of all type errors present. Error messages are derived from completed type derivations. Thus, error messages are independent of the particular algorithm used for type inference, provided it constructs such a derivation.
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
|
Martín Abadi , Butler Lampson , Jean-Jacques Lévy, Analysis and caching of dependencies, Proceedings of the first ACM SIGPLAN international conference on Functional programming, p.83-91, May 24-26, 1996, Philadelphia, Pennsylvania, United States
|
| |
2
|
ACM. Proc. of the 13th Annual ACM Symposium on Principles of Programming Languages, St. Petersburg, Florida, 1986.
|
 |
3
|
Alexander Aiken , Edward L. Wimmers , T. K. Lakshman, Soft typing with conditional types, Proceedings of the 21st ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.163-173, January 16-19, 1994, Portland, Oregon, United States
[doi> 10.1145/174675.177847]
|
| |
4
|
|
| |
5
|
H. P. Barendregt. The Lambda Calculus --- Its Syntax and Semantics. North-Holland, 1984.
|
 |
6
|
|
 |
7
|
|
 |
8
|
|
 |
9
|
Dominique Clément , Thierry Despeyroux , Gilles Kahn , Joëlle Despeyroux, A simple applicative language: mini-ML, Proceedings of the 1986 ACM conference on LISP and functional programming, p.13-27, August 1986, Cambridge, Massachusetts, United States
[doi> 10.1145/319838.319847]
|
| |
10
|
Luis Damas. Type Assignment in Programming Languages. PhD thesis, Computer Science Department, Edinburgh University, 1985. report CST-33-85.
|
 |
11
|
|
| |
12
|
|
 |
13
|
|
| |
14
|
Christian Haack and Joe Wells. Type error slicing in implicitly typed, higher-order languages. In Proc. 12th European Symposium on Programming, Lecture Notes in Computer Science, Warsaw, Poland, April 2003. Springer-Verlag.
|
| |
15
|
Bastiaan Heeren, Johan Jeuring, Doaitse Swierstra, and Pablo Azero Alcocer. Improving type-error messages in functional languages. Technical Report UU-CS-2002-009, Institute of Information and Computing Science, University Utrecht, Netherlands, February 2002. Technical Report.
|
| |
16
|
|
| |
17
|
|
 |
18
|
|
| |
19
|
|
 |
20
|
|
| |
21
|
|
| |
22
|
Robin Milner. A theory of type polymorphism in programming. Journal of Computer and System Sciences, 17:348--375, 1978.
|
| |
23
|
|
| |
24
|
John C. Mitchell. Type inference with simple subtypes. Journal of Functional Programming, 13):245--286, July 1991.
|
| |
25
|
|
 |
26
|
|
 |
27
|
|
| |
28
|
|
 |
29
|
|
 |
30
|
|
| |
31
|
|
| |
32
|
Christian Skalka and Scott Smith. Set types and applications. Electronic Notes in Theoretical Computer Science, 75, 2003.
|
 |
33
|
|
 |
34
|
|
| |
35
|
|
| |
36
|
|
| |
37
|
|
 |
38
|
|
|