English
Related papers

Related papers: First-Class Subtypes

200 papers

While generalized algebraic datatypes (\GADTs) are now considered well-understood, adding them to a language with a notion of subtyping comes with a few surprises. What does it mean for a \GADT parameter to be covariant? The answer turns…

Programming Languages · Computer Science 2013-01-15 Gabriel Scherer , Didier Rémy

In functional programming languages, generalized algebraic data types (GADTs) are very useful as the unnecessary pattern matching over them can be ruled out by the failure of unification of type arguments. In dependent type systems, this is…

Programming Languages · Computer Science 2021-07-07 Tesla Zhang

While generalized abstract datatypes (GADT) are now considered well-understood, adding them to a language with a notion of subtyping comes with a few surprises. What does it mean for a GADT parameter to be covariant? The answer turns out to…

Programming Languages · Computer Science 2012-10-23 Gabriel Scherer , Didier Rémy

Generic programming (GP) is an increasingly important trend in programming languages. Well-known GP mechanisms, such as type classes and the C++0x concepts proposal, usually combine two features: 1) a special type of interfaces; and 2)…

Programming Languages · Computer Science 2012-03-21 Bruno C. d. S. Oliveira , Tom Schrijvers , Wontae Choi , Wonchan Lee , Kwangkeun Yi

We present modular implicits, an extension to the OCaml language for ad-hoc polymorphism inspired by Scala implicits and modular type classes. Modular implicits are based on type-directed implicit module parameters, and elaborate…

Programming Languages · Computer Science 2015-12-08 Leo White , Frédéric Bour , Jeremy Yallop

Many programming languages in the OO tradition now support pattern matching in some form. Historical examples include Scala and Ceylon, with the more recent additions of Java, Kotlin, TypeScript, and Flow. But pattern matching on generic…

Programming Languages · Computer Science 2023-02-24 Aleksander Boruch-Gruszecki , Radosław Waśko , Yichen Xu , Lionel Parreaux

Existential types are reconstructed in terms of small reflective subuniverses and dependent sums. The folklore decomposition detailed here gives rise to a particularly simple account of first-class modules as a mode of use of traditional…

Programming Languages · Computer Science 2022-10-04 Jonathan Sterling

GADTs were introduced in Haskell's eco-system more than a decade ago, but their interaction with several mainstream features such as type classes and functional dependencies has a lot of room for improvement. More specifically, for some…

Programming Languages · Computer Science 2019-07-02 Koen Pauwels , Georgios Karachalias , Michiel Derhaeg , Tom Schrijvers

Developing and maintaining software commonly requires (1) adding new data type constructors to existing applications, but also (2) adding new functions that work on existing data. Most programming languages have native support for defining…

Programming Languages · Computer Science 2023-09-27 Cas van der Rest , Casper Bach Poulsen

Compared to functions in mathematics, functions in programming languages seem to be under classified. Functional programming languages based on the lambda calculus famously treat functions as first-class values. Object-oriented languages…

Programming Languages · Computer Science 2025-07-02 Lloyd Allison

We report on implementing graph grammars for intelligence analysis in OCaml. Graph grammars are represented as elements of an algebraic data type in OCaml. In addition to algebraic data types, we use other concepts from functional…

Programming Languages · Computer Science 2016-06-06 Rod Moten , Kemafor Anyanwu-Ogan , Sahibi Miranshah

Interaction nets constitute a visual programming language grounded in graph transformation. Owing to their distinctive properties, they inherently facilitate parallelism in the rewriting step. This paper showcases a simple and concise…

Programming Languages · Computer Science 2025-03-27 Nikolaus Huber , Wang Yi

The introduction of first-class type classes in the Coq system calls for re-examination of the basic interfaces used for mathematical formalization in type theory. We present a new set of type classes for mathematics and take full advantage…

Logic in Computer Science · Computer Science 2011-02-08 Bas Spitters , Eelis van der Weegen

First order formulas in a relational signature can be considered as operations on the relations of an underlying set, giving rise to multisorted algebras we call first order algebras. We present universal axioms so that an algebra satisfies…

Logic · Mathematics 2015-08-03 Lawrence Valby

Students introduced to programming using a design-based approach and a functional programming language become familiar with first-class functions. They rarely, however, connect first-class functions to objects and object-oriented program…

Computers and Society · Computer Science 2022-08-15 Marco T. Morazán

Polymorphic variants are a useful feature of the OCaml language whose current definition and implementation rely on kinding constraints to simulate a subtyping relation via unification. This yields an awkward formalization and results in a…

Programming Languages · Computer Science 2016-07-06 Giuseppe Castagna , Tommaso Petrucciani , Kim Nguyen

Proof assistants and programming languages based on type theories usually come in two flavours: one is based on the standard natural deduction presentation of type theory and involves eliminators, while the other provides a syntax in…

Logic in Computer Science · Computer Science 2015-07-30 Nicolas Guenot , Daniel Gustafsson

Recently we presented a concise survey of the formulation of the induction and coinduction principles, and some concepts related to them, in programming languages type theory and four other mathematical disciplines. The presentation in type…

Logic in Computer Science · Computer Science 2019-03-14 Moez A. AbdelGawad

We show that the class of representable substitution algebras is characterized by a set of universal first order sentences. In addition, it is shown that a necessary and sufficient condition for a substitution algebra to be representable is…

Logic · Mathematics 2015-03-05 Norman Feldman

This paper explores the relationship between C++ templates and partial evaluation. Templates were designed to support generic programming, but unintentionally provided the ability to perform compile-time computations and code generation.…

Programming Languages · Computer Science 2007-05-23 Todd L. Veldhuizen
‹ Prev 1 2 3 10 Next ›