Theoretical Computer Science - Special issue: Fourth workshop on mathematical foundations of programming semantics, Boulder, CO, May 1988
FPCA '93 Proceedings of the conference on Functional programming languages and computer architecture
Shortcut deforestation in calculational form
FPCA '95 Proceedings of the seventh international conference on Functional programming languages and computer architecture
Dependent types in practical programming
Proceedings of the 26th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Shortcut fusion for accumulating parameters & zip-like functions
Proceedings of the seventh ACM SIGPLAN international conference on Functional programming
Guarded recursive datatype constructors
POPL '03 Proceedings of the 30th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
A Generalization of Short-Cut Fusion and its Correctness Proof
Higher-Order and Symbolic Computation
Inductively Defined Types in the Calculus of Constructions
Proceedings of the 5th International Conference on Mathematical Foundations of Programming Semantics
MPC '98 Proceedings of the Mathematics of Program Construction
de Bruijn notation as a nested datatype
Journal of Functional Programming
Disciplined, efficient, generalised folds for nested datatypes
Formal Aspects of Computing
Monadic augment and generalised short cut fusion
Proceedings of the tenth ACM SIGPLAN international conference on Functional programming
Initial algebra semantics is enough!
TLCA'07 Proceedings of the 8th international conference on Typed lambda calculi and applications
Epigram: practical programming with dependent types
AFP'04 Proceedings of the 5th international conference on Advanced Functional Programming
Journal of Functional Programming
Type checking with open type functions
Proceedings of the 13th ACM SIGPLAN international conference on Functional programming
Initial Algebra Semantics for Cyclic Sharing Structures
TLCA '09 Proceedings of the 9th International Conference on Typed Lambda Calculi and Applications
Generic programming with fixed points for mutually recursive datatypes
Proceedings of the 14th ACM SIGPLAN international conference on Functional programming
A principled approach to programming with nested types in Haskell
Higher-Order and Symbolic Computation
Higher-order Algebras and Coalgebras from Parameterized Endofunctors
Electronic Notes in Theoretical Computer Science (ENTCS)
Parametricity, type equality, and higher-order polymorphism
Journal of Functional Programming
Proceedings of the 6th ACM SIGPLAN workshop on Generic programming
Fibrational induction rules for initial algebras
CSL'10/EACSL'10 Proceedings of the 24th international conference/19th annual conference on Computer science logic
Factorising folds for faster functions
Journal of Functional Programming
A typical synergy: dynamic types and generalised algebraic datatypes
IFL'09 Proceedings of the 21st international conference on Implementation and application of functional languages
Generic programming for indexed datatypes
Proceedings of the seventh ACM SIGPLAN workshop on Generic programming
A foundation for GADTs and inductive families: dependent polynomial functor approach
Proceedings of the seventh ACM SIGPLAN workshop on Generic programming
Proceedings of the seventh ACM SIGPLAN workshop on Generic programming
Kan extensions for program optimisation or: art and dan explain an old trick
MPC'12 Proceedings of the 11th international conference on Mathematics of Program Construction
Typed tagless final interpreters
SSGIP'10 Proceedings of the 2010 international spring school conference on Generic and Indexed Programming
Extending Type Inference to Variational Programs
ACM Transactions on Programming Languages and Systems (TOPLAS)
Adjoint folds and unfolds-An extended study
Science of Computer Programming
Early detection of type errors in C++ templates
Proceedings of the ACM SIGPLAN 2014 Workshop on Partial Evaluation and Program Manipulation
Hi-index | 0.00 |
GADTs are at the cutting edge of functional programming and becomemore widely used every day. Nevertheless, the semantic foundations underlying GADTs are not well understood. In this paper we solve this problem by showing that the standard theory of data types as carriers of initial algebras of functors can be extended from algebraic and nested data types to GADTs. We then use this observation to derivean initial algebra semantics for GADTs, thus ensuring that all of the accumulated knowledge about initial algebras can be brought to bear on them. Next, we use our initial algebra semantics for GADTs to derive expressive and principled tools --- analogous to the well-known and widely-used ones for algebraic and nested data types---for reasoning about, programming with, and improving the performance of programs involving, GADTs; we christen such a collection of tools for a GADT an initial algebra package. Along the way, we give a constructive demonstration that every GADT can be reduced to one which uses only the equality GADT and existential quantification. Although other such reductions exist in the literature, ours is entirely local, is independent of any particular syntactic presentation of GADTs, and can be implemented in the host language, rather than existing solely as a metatheoretical artifact. The main technical ideas underlying our approach are (i) to modify the notion of a higher-order functor so that GADTs can be seen as carriers of initial algebras of higher-order functors, and (ii) to use left Kan extensions to trade arbitrary GADTs for simpler-but-equivalent ones for which initial algebra semantics can bederived.