Difference between revisions of "Extensible record"

From HaskellWiki
Jump to navigation Jump to search
(→‎CoddFish: new section added (referring to CoddFish), and as a consequence, restructuring section strucure, adding table of contents)
m (→‎Papers and libraries: Updated link to HList paper)
(20 intermediate revisions by 8 users not shown)
Line 4: Line 4:
   
 
== Papers and libraries ==
 
== Papers and libraries ==
  +
* [[CTRex]] Extensible records as a library using closed type families and type literals.
* [http://homepages.cwi.nl/~ralf/HList/ HList --- a Haskell library for strongly typed heterogeneous collections] includes also extensible records. Its relatedness to database programming is described in the articles, se also its [http://hackage.haskell.org/trac/summer-of-code/ticket/33 possible] relatedness to [[Libraries and tools/Database interfaces/HaskellDB|HaskellDB]] project.
+
* [http://www.researchgate.net/publication/234806693_Strongly_typed_heterogeneous_collections/file/72e7e51e92fd6109e3.pdf HList a Haskell library for strongly typed heterogeneous collections] includes also extensible records. Its relatedness to database programming is described in the articles, see also its [http://hackage.haskell.org/trac/summer-of-code/ticket/33 possible] relatedness to [[Libraries and tools/Database interfaces/HaskellDB|HaskellDB]] project.
* Daan Leijen: [http://www.cs.uu.nl/~daan/pubs.html#fclabels First-class labels for extensible rows]. See also the description of the Haskell-like language [http://www.cs.uu.nl/~daan/morrow/ Morrow], it is based on the concepts of the article.
+
* Daan Leijen: [http://www.cs.uu.nl/~daan/pubs.html#fclabels First-class labels for extensible rows]. See also the description of the Haskell-like language [http://www.cs.uu.nl/~daan/morrow/ Morrow], it is based on the concepts of the article. And [http://www.cs.uu.nl/~daan/pubs.html#scopedlabels Extensible records with scoped labels]: "We describe a natural approach to typing polymorphic and extensible records that is simple, easy to use in practice, and straightforward to implement."
 
* Simon Peyton Jones and Greg Morrisett: [http://research.microsoft.com/~simonpj/Haskell/records.html A proposal for records in Haskell]
 
* Simon Peyton Jones and Greg Morrisett: [http://research.microsoft.com/~simonpj/Haskell/records.html A proposal for records in Haskell]
 
* Mark Jones and Simon Peyton Jones: [http://research.microsoft.com/~simonpj/Papers/records.htm Lightweight Extensible Records for Haskell]
 
* Mark Jones and Simon Peyton Jones: [http://research.microsoft.com/~simonpj/Papers/records.htm Lightweight Extensible Records for Haskell]
 
* 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]
+
* [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.
  +
* [http://www.informatik.tu-cottbus.de/~jeltsch/research/ppdp-2010-paper.pdf Generic Record Combinators with Static Type Checking] describes a record system with several novel features, which is provided by the [http://hackage.haskell.org/package/records records package]. It is derived from the record system of [[Grapefruit]].
  +
  +
=== Libraries on hackage ===
  +
  +
* [http://hackage.haskell.org/package/extensible-data extensible-data]
  +
* [http://hackage.haskell.org/package/has has]
  +
* [http://hackage.haskell.org/package/HList HList]
  +
* [http://hackage.haskell.org/package/named-records named-records]
  +
* [http://hackage.haskell.org/package/records records] / [http://hackage.haskell.org/package/grapefruit-records grapefruit-records]
  +
* [http://hackage.haskell.org/package/vinyl vinyl]
   
 
== Applications ==
 
== Applications ==
Line 17: Line 29:
 
=== Declarative database management ===
 
=== Declarative database management ===
   
Such systems can achive more type safety (compared to direct SQL handling).
+
Such systems can achieve more type safety (compared to direct SQL handling).
  +
They usually formulate a [[relational algebra]] concept in a declarative language.
   
 
==== HaskellDB ====
 
==== HaskellDB ====
Line 23: Line 36:
 
A problem where some concepts of extensible records could be useful is described in the [[Libraries and tools/Database interfaces/HaskellDB|HaskellDB]] project. More precisely, the problem is described in the paper downloadable from
 
A problem where some concepts of extensible records could be useful is described in the [[Libraries and tools/Database interfaces/HaskellDB|HaskellDB]] project. More precisely, the problem is described in the paper downloadable from
 
* [http://haskelldb.sourceforge.net/ Chalmers version of HaskellDB] (see ''Papers'' subsection on [http://haskelldb.sourceforge.net/#documentation Documentation])
 
* [http://haskelldb.sourceforge.net/ Chalmers version of HaskellDB] (see ''Papers'' subsection on [http://haskelldb.sourceforge.net/#documentation Documentation])
* which presupposes reading also paper on the [http://www.haskell.org/haskellDB/ Daam Leijen's original HaskellDB] page (see [http://www.haskell.org/haskellDB/doc.html Documentation subpage], PostScript version)
+
* which presupposes reading also paper on the [http://www.haskell.org/haskellDB/ Daan Leijen's original HaskellDB] page (see [http://www.haskell.org/haskellDB/doc.html Documentation subpage], PostScript version)
   
[[Libraries and tools/Database interfaces/HaskellDB|HaskellDB]] uses its own extensible record sytem, but see also [[Libraries and tools/Database interfaces#Future/HaskellDB|HaskellDB#Future]].
+
[[Libraries and tools/Database interfaces/HaskellDB|HaskellDB]] uses its own extensible record system, but see also [[Libraries and tools/Database interfaces/HaskellDB#Future|HaskellDB#Future]].
   
 
==== CoddFish ====
 
==== CoddFish ====
   
[[Libraries and tools/Database interfaces/CoddFish|CoddFish]] is another declaratice, type safe database system. As for extensible record system, it uses [http://homepages.cwi.nl/~ralf/HList/ HList --- a Haskell library for strongly typed heterogeneous collections].
+
[[Libraries and tools/Database interfaces/CoddFish|CoddFish]] is another declarative, type safe database system. As for extensible record system, it uses [http://homepages.cwi.nl/~ralf/HList/ HList --- a Haskell library for strongly typed heterogeneous collections].
  +
  +
=== Functional Reactive Programming ===
  +
  +
[[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 [http://www.dcs.st-andrews.ac.uk/~james/RESEARCH/ydtm-submitted.pdf 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.
   
 
[[Category:Proposals]]
 
[[Category:Proposals]]

Revision as of 23:52, 7 August 2014

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

Papers and libraries

Libraries on hackage

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.