Difference between revisions of "Extensible record"

From HaskellWiki
Jump to navigation Jump to search
(→‎Papers and libraries: fix broken link)
Line 10: Line 10:
 
* Mark P. Jones: [http://www.cs.sfu.ca/CourseCentral/SW/Haskell/hugs/TREX A prototype implementation of extensible records for Hugs]
 
* Mark P. Jones: [http://www.cs.sfu.ca/CourseCentral/SW/Haskell/hugs/TREX A prototype implementation of extensible records for Hugs]
 
* Didier Remy's [http://www.cs.uu.nl/wiki/Uhc/ErikKnoop#Typing_record_concatenation_for Typing record concatenation for free] on Erik Knoop's page
 
* Didier Remy's [http://www.cs.uu.nl/wiki/Uhc/ErikKnoop#Typing_record_concatenation_for Typing record concatenation for free] on Erik Knoop's page
* Benedict R. Gaster, Mark P. Jones: [http://citeseer.ist.psu.edu/gaster96polymorphic.html A Polymorphic Type System for Extensible Records and Variants]
+
* Benedict R. Gaster, Mark P. Jones: [http://web.cecs.pdx.edu/~mpj/pubs/polyrec.html A Polymorphic Type System for Extensible Records and Variants]
 
* [http://www.comp.nus.edu.sg/~sulzmann/chameleon/ Chameleon], a Haskell-like language, see its [http://www.comp.nus.edu.sg/~sulzmann/chameleon/download/haskell.html#record records] [dead link as of 2011-09-15]
 
* [http://www.comp.nus.edu.sg/~sulzmann/chameleon/ Chameleon], a Haskell-like language, see its [http://www.comp.nus.edu.sg/~sulzmann/chameleon/download/haskell.html#record records] [dead link as of 2011-09-15]
 
* [[Grapefruit]] contains the package grapefruit-records which implements a record system in Haskell with GHC extensions. This record system allows field selection and dropping of fields using pattern matching. It also supports defaulting.
 
* [[Grapefruit]] contains the package grapefruit-records which implements a record system in Haskell with GHC extensions. This record system allows field selection and dropping of fields using pattern matching. It also supports defaulting.

Revision as of 18:54, 20 June 2012

Proposals, implementations can be found on the FirstClassLabels page of Haskell' Wiki.

Papers and libraries

Applications

Declarative database management

Such systems can achieve more type safety (compared to direct SQL handling). They usually formulate a relational algebra concept in a declarative language.

HaskellDB

A problem where some concepts of extensible records could be useful is described in the HaskellDB project. More precisely, the problem is described in the paper downloadable from

HaskellDB uses its own extensible record system, but see also HaskellDB#Future.

CoddFish

CoddFish is another declarative, type safe database system. As for extensible record system, it uses HList --- a Haskell library for strongly typed heterogeneous collections.

Functional Reactive Programming

FRP often makes it necessary to deal with very large tuples as arrow inputs and outputs. For example, a GUI component would receive the behavior of all its writeable properties as its input. Extensible records can therefore make FRP more usable, especially if they provide defaulting.

Grapefruit

Grapefruit uses extensible records which support pattern matching and defaulting for functional reactive GUI programming.

Related concepts

Dependent type -- as an explanation for its relatedness here, see Why Dependent Types Matter written by Thorsten Altenkirch, Conor McBride, James McKinna -- or see at least its Conclusions section (section 8, pages 18--19).

Type arithmetic seems to me also a way yielding some tastes from dependent type theory.

Relational algebra implementations usually use extensible records.