| Aspect-oriented programming with type classes |
| Full text |
Pdf
(468 KB)
|
| Source
|
FOAL; Vol. 268
archive
Proceedings of the 6th workshop on Foundations of aspect-oriented languages
table of contents
Vancouver, British Columbia, Canada
Pages: 65 - 74
Year of Publication: 2007
ISBN:1-59593-661-5
|
|
Authors
|
|
Martin Sulzmann
|
National University of Singapore, Singapore
|
|
Meng Wang
|
Oxford University Computing Laboratory, Oxford, UK
|
|
| Publisher |
|
| Bibliometrics |
Downloads (6 Weeks): 7, Downloads (12 Months): 72, Citation Count: 0
|
|
|
ABSTRACT
We consider the problem of adding aspects to a strongly typed language which supports type classes. We show that type classes as supported by the Glasgow Haskell Compiler can model an AOP style of programming via a simple syntax-directed transformation scheme where AOP programming idioms are mapped to type classes. The drawback of this approach is that we cannot easily advise functions in programs which carry type annotations. We sketch a more principled approach which is free of such problems by combining ideas from intentional type analysis with advanced overloading resolution strategies. Our results show that type-directed static weaving is closely related to type class resolution -- the process of typing and translating type class programs.
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
|
|
| |
3
|
T. Frühwirth. Constraint handling rules. In Constraint Programming: Basics and Trends, LNCS. Springer-Verlag, 1995.
|
| |
4
|
Glasgow haskell compiler home page. http://www.haskell.org/ghc/.
|
 |
5
|
|
 |
6
|
|
 |
7
|
|
 |
8
|
|
| |
9
|
|
| |
10
|
S. Peyton Jones, M. P. Jones, and E. Meijer. Type classes: an exploration of the design space. In Haskell Workshop, June 1997.
|
| |
11
|
|
 |
12
|
|
 |
13
|
|
 |
14
|
|
 |
15
|
Sheng Liang , Paul Hudak , Mark Jones, Monad transformers and modular interpreters, Proceedings of the 22nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.333-343, January 23-25, 1995, San Francisco, California, United States
[doi> 10.1145/199448.199528]
|
 |
16
|
|
| |
17
|
S. Peyton Jones, editor. Haskell 98 Language and Libraries: The Revised Report. Cambridge University Press, 2003.
|
 |
18
|
|
 |
19
|
|
| |
20
|
M. Sulzmann. AOP Haskell light: Aspect-oriented programming with type classes. http://www.comp.nus.edu.sg/~sulzmann/aophaskell.
|
 |
21
|
|
 |
22
|
|
 |
23
|
|
 |
24
|
|
 |
25
|
|
| |
26
|
M. Wang, K. Chen, and S. C. Khoo. On the pursuit of staticness and coherence. In FOAL '06: Foundations of Aspect-Oriented Languages, 2006.
|
 |
27
|
|
 |
28
|
|
|