Academic Journal
A generic deriving mechanism for Haskell
العنوان: | A generic deriving mechanism for Haskell |
---|---|
المؤلفون: | José Pedro Magalhães, Atze Dijkstra, Johan Jeuring, Andres Löh |
المساهمون: | The Pennsylvania State University CiteSeerX Archives |
المصدر: | http://www.dreixel.net/research/pdf/gdmh.pdf. |
سنة النشر: | 2010 |
المجموعة: | CiteSeerX |
الوصف: | Haskell’s deriving mechanism supports the automatic generation of instances for a number of functions. The Haskell 98 Report only specifies how to generate instances for the Eq, Ord, Enum, Bounded, Show, and Read classes. The description of how to generate instances is largely informal. The generation of instances imposes restrictions on the shape of datatypes, depending on the particular class to derive. As a consequence, the portability of instances across different compilers is not guaranteed. We propose a new approach to Haskell’s deriving mechanism, which allows users to specify how to derive arbitrary class instances using standard datatype-generic programming techniques. Generic functions, including the methods from six standard Haskell 98 derivable classes, can be specified entirely within Haskell 98 plus multi-parameter type classes, making them lightweight and portable. We can also express Functor, Typeable, and many other derivable classes with our technique. We implemented our deriving mechanism together with many new derivable classes in the Utrecht |
نوع الوثيقة: | text |
وصف الملف: | application/pdf |
اللغة: | English |
Relation: | http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.366.3603; http://www.dreixel.net/research/pdf/gdmh.pdf |
الاتاحة: | http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.366.3603 http://www.dreixel.net/research/pdf/gdmh.pdf |
Rights: | Metadata may be used without restrictions as long as the oai identifier remains attached to it. |
رقم الانضمام: | edsbas.1B73BBC4 |
قاعدة البيانات: | BASE |
الوصف غير متاح. |