Interface Types for Haskell
نویسندگان
چکیده
Interface types are a useful concept in object-oriented programming languages like Java or C#. A clean programming style advocates relying on interfaces without revealing their implementation. Haskell’s type classes provide a closely related facility for stating an interface separately from its implementation. However, there are situations in which no simple mechanism exists to hide the identity of the implementation type of a type class. This work provides such a mechanism through the integration of lightweight interface types into Haskell. The extension is non-intrusive as no additional syntax is needed and no existing programs are affected. The implementation extends the treatment of higher-rank polymorphism in production Haskell compilers.
منابع مشابه
Haskell XML-RPC
A Haskell library implementing the client and server functionality of XML-RPC has been developed. The library provides a simple and easy to use interface to XML-RPC, where conversion to and from XML-RPC types is done automatically. A CGI-based server implementation is provided.
متن کاملMCORBA: A CORBA Binding for Mercury
MCORBA is a binding to the CORBA distributed object framework for the purely declarative logic/functional language Mercury. The binding preserves the referential transparency of the language, and has several advantages over similar bindings for other strongly typed declarative languages. As far as we know, it is the rst such binding to be bidirectional; it allows a Mercury program both to opera...
متن کاملAutomatic Graphical User Interface Form Generation Using Template Haskell
This paper presents AutoGUI, a Template Haskell library for automatic form generation. A form is a part of graphical user interface (GUI) restricted to displaying a value and allowing the user to modify it and then either accept changes or abandon them. The library is built on top of medium-level GUI library wxHaskell. The Template Haskell and Haskell type system allow the forms to be built ful...
متن کاملPolytypic Functional Programming
Structural polymorphism is a generic programming technique known within the functional programming community under the names of polytypic or datatype-generic programming. In this thesis we show that such a technique conflicts with the principle of data abstraction and propose a solution for reconciliation. More concretely, we show that popular polytypic extensions of the functional programming ...
متن کاملHaskell - the craft of functional programming
data types 16.1 Type representations 16.2 The Haskell abstract data type mechanism 16.3 Queues 16.4 Design 16.5 Simulation 16.6 Implementing the simulation 16.7 Search trees 16.8 Sets 16.9 Relations and graphs 16.1 0 Commentary The Haskell module system allows definitions of functions and other objects to be hidden when one file i s included in another. Those definitions hidden are only of use ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2008