File Download
There are no files associated with this item.
Links for fulltext
(May Require Subscription)
- Publisher Website: 10.1145/1088348.1088358
- Scopus: eid_2-s2.0-32144449570
Supplementary
-
Citations:
- Scopus: 0
- Appears in Collections:
Conference Paper: TypeCase: A design pattern for type-indexed functions
Title | TypeCase: A design pattern for type-indexed functions |
---|---|
Authors | |
Keywords | Generic Programming Type Classes Type-Indexed Functions |
Issue Date | 2005 |
Citation | Haskell'05 - Proceedings Of The Acm Sigplan 2005 Haskell Workshop, 2005, p. 98-109 How to Cite? |
Abstract | A type-indexed function is a function that is defined for each member of some family of types. Haskell's type class mechanism provides collections of open type-indexed functions, in which the indexing family can be extended by defining a new type class instance but the collection of functions is fixed. The purpose of this paper is to present TypeCase: a design pattern that allows the definition of closed type-indexed functions, in which the index family is fixed but the collection of functions is extensible. It is inspired by Cheney and Hinze's work on lightweight approaches to generic programming. We generalise their techniques as a design pattern. Furthermore, we show that type-indexed functions with type-indexed types, and consequently generic functions with generic types, can also be encoded in a lightweight manner, thereby overcoming one of the main limitations of the lightweight approaches. Copyright © 2005 ACM. |
Persistent Identifier | http://hdl.handle.net/10722/188477 |
References |
DC Field | Value | Language |
---|---|---|
dc.contributor.author | Oliveira, BCDS | en_US |
dc.contributor.author | Gibbons, J | en_US |
dc.date.accessioned | 2013-09-03T04:08:36Z | - |
dc.date.available | 2013-09-03T04:08:36Z | - |
dc.date.issued | 2005 | en_US |
dc.identifier.citation | Haskell'05 - Proceedings Of The Acm Sigplan 2005 Haskell Workshop, 2005, p. 98-109 | en_US |
dc.identifier.uri | http://hdl.handle.net/10722/188477 | - |
dc.description.abstract | A type-indexed function is a function that is defined for each member of some family of types. Haskell's type class mechanism provides collections of open type-indexed functions, in which the indexing family can be extended by defining a new type class instance but the collection of functions is fixed. The purpose of this paper is to present TypeCase: a design pattern that allows the definition of closed type-indexed functions, in which the index family is fixed but the collection of functions is extensible. It is inspired by Cheney and Hinze's work on lightweight approaches to generic programming. We generalise their techniques as a design pattern. Furthermore, we show that type-indexed functions with type-indexed types, and consequently generic functions with generic types, can also be encoded in a lightweight manner, thereby overcoming one of the main limitations of the lightweight approaches. Copyright © 2005 ACM. | en_US |
dc.language | eng | en_US |
dc.relation.ispartof | Haskell'05 - Proceedings of the ACM SIGPLAN 2005 Haskell Workshop | en_US |
dc.subject | Generic Programming | en_US |
dc.subject | Type Classes | en_US |
dc.subject | Type-Indexed Functions | en_US |
dc.title | TypeCase: A design pattern for type-indexed functions | en_US |
dc.type | Conference_Paper | en_US |
dc.identifier.email | Oliveira, BCDS: oliveira@comp.nus.edu.sg | en_US |
dc.identifier.authority | Oliveira, BCDS=rp01786 | en_US |
dc.description.nature | link_to_subscribed_fulltext | en_US |
dc.identifier.doi | 10.1145/1088348.1088358 | en_US |
dc.identifier.scopus | eid_2-s2.0-32144449570 | en_US |
dc.relation.references | http://www.scopus.com/mlt/select.url?eid=2-s2.0-32144449570&selection=ref&src=s&origin=recordpage | en_US |
dc.identifier.spage | 98 | en_US |
dc.identifier.epage | 109 | en_US |
dc.identifier.scopusauthorid | Oliveira, BCDS=12239474400 | en_US |
dc.identifier.scopusauthorid | Gibbons, J=7201472851 | en_US |