Transporting functions across ornaments. Issue 2 (May 2014)
- Record Type:
- Journal Article
- Title:
- Transporting functions across ornaments. Issue 2 (May 2014)
- Main Title:
- Transporting functions across ornaments
- Authors:
- DAGAND, PIERRE-ÉVARISTE
McBRIDE, CONOR - Abstract:
- <abstract abstract-type="normal"> <title>Abstract</title> <p>Programming with dependent types is a blessing and a curse. It is a blessing to be able to bake invariants into the definition of datatypes: We can finally write correct-by-construction software. However, this extreme accuracy is also a curse: A datatype is the combination of a structuring medium together with a special purpose logic. These domain-specific logics hamper any attempt to reuse code across similarly structured data. In this paper, we capitalise on the structural invariants of datatypes. To do so, we first adapt the notion of ornament to our universe of inductive families. We then show how code reuse can be achieved by ornamenting functions. Using these functional ornaments, we capture the relationship between functions such as the addition of natural numbers and the concatenation of lists. With this knowledge, we demonstrate how the implementation of the former informs the implementation of the latter: The users can ask the definition of addition to be lifted to lists and they will only be asked the details necessary to carry on adding lists rather than numbers. Our presentation is formalised in the type theory with a universe of datatypes and all our constructions have been implemented as generic programs, requiring no extension to the type theory.</p> </abstract>
- Is Part Of:
- Journal of functional programming. Volume 24:Issue 2/3(2014)
- Journal:
- Journal of functional programming
- Issue:
- Volume 24:Issue 2/3(2014)
- Issue Display:
- Volume 24, Issue 2/3 (2014)
- Year:
- 2014
- Volume:
- 24
- Issue:
- 2/3
- Issue Sort Value:
- 2014-0024-NaN-0000
- Page Start:
- 316
- Page End:
- 383
- Publication Date:
- 2014-05
- Subjects:
- Functional programming (Computer science) -- Periodicals
- Journal URLs:
- http://journals.cambridge.org/action/displayJournal?jid=JFP ↗
http://firstsearch.oclc.org ↗ - DOI:
- 10.1017/S0956796814000069 ↗
- Languages:
- English
- ISSNs:
- 0956-7968
- Deposit Type:
- Legaldeposit
- View Content:
- Available online (eLD content is only available in our Reading Rooms) ↗
- Physical Locations:
- British Library STI - ELD Digital store
- Ingest File:
- 4138.xml