|
ABSTRACT
In this paper we illustrate the facilities for type debugging of Haskell programs in the Chameleon programming environment. Chameleon provides an extension to Haskell supporting advanced and programmable type extensions. Chameleon maps the typing problem for a program to a system of constraints each attached to program code that generates the constraints. We use reasoning about constraint satisfiability and implication to find minimal justifications of type errors, and to explain unexpected types that arise. Through an interactive process akin to declarative debugging, a user can track down exactly where a type error occurs. The approach handles Hindley/Milner types with Haskell-style overloading. The Chameleon system provides a full implementation of our flexible type debugging scheme which can be used as a front-end to any existing Haskell system.
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
|
S. Abdennadher. Operational semantics and confluence of constraint propagation rules. In Proc. of CP'97, volume 1330 of LNCS, pages 252--266. Springer-Verlag, 1997.
|
 |
2
|
|
 |
3
|
|
| |
4
|
B. Demoen, M. Garcia de la Banda, and P. J. Stuckey. Type constraint solving for parametric and ad-hoc polymorphism. In Proc. of the 22nd Australian Computer Science Conference, pages 217--228. Springer-Verlag, 1999.
|
| |
5
|
|
| |
6
|
|
 |
7
|
|
| |
8
|
K. Glynn, P. J. Stuckey, and M. Sulzmann. Type classes and constraint handling rules. In Workshop on Rule-Based Constraint Reasoning and Programming, 2000. http://xxx.lanl.gov/abs/cs.PL/0006034.
|
| |
9
|
C. Haack and J. B. Wells. Type error slicing in implicitly typed, higher-order languages. In Proc. of ESOP'03, volume 2618 of LNCS, pages 284--301. Springer-Verlag, 2003.
|
| |
10
|
Haskell 98 language report. http://research.microsoft.com/Users/simonpj/haskell98-revised/haskell98-report-html/.
|
| |
11
|
B. Heeren and J. Hage. Parametric type inferencing for Helium. Technical Report UU-CS-2002-035, Utrecht University, 2002.
|
| |
12
|
B. Heeren, J. Hage, and D. Swierstra. Generalizing Hindley-Milner type inference algorithms. Technical Report UU-CS-2002-031, Utrecht University, 2002.
|
| |
13
|
Helium home page. http://www.cs.uu.nl/~afie/helium/.
|
| |
14
|
F. Huch, O. Chitil, and A. Simon. Typeview: a tool for understanding type errors. In M. Mohnen and P. Koopman, editors, Proceedings of 12th International Workshop on Implementation of Functional Languages, pages 63--69. Aachner Informatik-Berichte,, 2000.
|
| |
15
|
Hugs home page. haskell.org/hugs/.
|
| |
16
|
M. P. Jones. Coherence for qualified types. Research Report YALEU/DCS/RR-989, Yale University, Department of Computer Science, September 1993.
|
| |
17
|
O. Lee and K. Yi. A generalized let-polymorphic type inference algorithm. Technical Memorandum ROPAS-2000-5, National Creative Research Center, Korea Advanced Institute of Science and Technology, March 2000.
|
| |
18
|
K. Marriott and P.J. Stuckey. Programming with Constraints: an Introduction. MIT Press, 1998.
|
| |
19
|
B.J. McAdam. Graphs for recording type information. Technical Report ECS-LFCS-99-415, The University of Edinburgh, 1999.
|
| |
20
|
|
| |
21
|
R. Milner. A theory of type polymorphism in programming. Journal of Computer and System Sciences, 17:348--375, Dec 1978.
|
| |
22
|
|
| |
23
|
|
 |
24
|
|
| |
25
|
|
| |
26
|
M. Sulzmann and J. Wazny. Chameleon. http://www.comp.nus.edu.sg/~sulzmann/chameleon.
|
 |
27
|
|
 |
28
|
|
| |
29
|
J. Yang, J. Wells, P. Trinder, and G. Michaelson. Improved type error reporting. In Proceedings of 12th International Workshop on Implementation of Functional Languages, pages 71--86, 2000.
|
|