PLDI '91 Proceedings of the ACM SIGPLAN 1991 conference on Programming language design and implementation
Algebra of programming
A type-theoretic interpretation of standard ML
Proof, language, and interaction
Guarded recursive datatype constructors
POPL '03 Proceedings of the 30th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Journal of Functional Programming
Proceedings of the 15th ACM SIGPLAN international conference on Functional programming
CSL'10/EACSL'10 Proceedings of the 24th international conference/19th annual conference on Computer science logic
When is a type refinement an inductive type?
FOSSACS'11/ETAPS'11 Proceedings of the 14th international conference on Foundations of software science and computational structures: part of the joint European conferences on theory and practice of software
Realizability and parametricity in pure type systems
FOSSACS'11/ETAPS'11 Proceedings of the 14th international conference on Foundations of software science and computational structures: part of the joint European conferences on theory and practice of software
Secure distributed programming with value-dependent types
Proceedings of the 16th ACM SIGPLAN international conference on Functional programming
Modularising inductive families
Proceedings of the seventh ACM SIGPLAN workshop on Generic programming
Indexed induction and coinduction, fibrationally
CALCO'11 Proceedings of the 4th international conference on Algebra and coalgebra in computer science
A few constructions on constructors
TYPES'04 Proceedings of the 2004 international conference on Types for Proofs and Programs
Proceedings of the 18th ACM SIGPLAN international conference on Functional programming
Relational algebraic ornaments
Proceedings of the 2013 ACM SIGPLAN workshop on Dependently-typed programming
A Categorical Treatment of Ornaments
LICS '13 Proceedings of the 2013 28th Annual ACM/IEEE Symposium on Logic in Computer Science
Hi-index | 0.00 |
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 effort of code reuse among similarly structured data. In this paper, we exorcise our datatypes by adapting 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 user can ask the definition of addition to be lifted to lists and she will only be asked the details necessary to carry on adding lists rather than numbers. Our presentation is formalised in a type theory with a universe of datatypes and all our constructions have been implemented as generic programs, requiring no extension to the type theory.