Loading...
Please wait, while we are loading the content...
Similar Documents
Modular Type Classes (2006)
| Content Provider | CiteSeerX |
|---|---|
| Author | Chakravarty, Manuel M. T. Harper, Robert Dreyer, Derek |
| Abstract | ML modules and Haskell type classes have proven to be highly effective tools for program structuring. Modules emphasize explicit configuration of program components and the use of data abstraction. Type classes emphasize implicit program construction and ad hoc polymorphism. In this paper, we show how the implicitlytyped style of type class programming may be supported within the framework of an explicitly-typed module language by viewing type classes as a particular mode of use of modules. This view offers a harmonious integration of modules and type classes, where type class features, such as class hierarchies and associated types, arise naturally as uses of existing module-language constructs, such as module hierarchies and type components. In addition, programmers have explicit control over which type class instances are available for use by type inference in a given scope. We formalize our approach as a Harper-Stone-style elaboration relation, and provide a sound type inference algorithm as a guide to implementation. |
| File Format | |
| Publisher Date | 2006-01-01 |
| Access Restriction | Open |
| Subject Keyword | Program Component Explicitly-typed Module Language Type Component Type Class Instance Ml Module Sound Type Inference Algorithm Implicit Program Construction Haskell Type Class Module-language Construct Module Hierarchy Explicit Configuration Ad Hoc Polymorphism Type Class Feature Harmonious Integration Program Structuring Modular Type Class Particular Mode Implicitlytyped Style Harper-stone-style Elaboration Relation Type Class Programming |
| Content Type | Text |