English
Related papers

Related papers: Type variables in patterns

200 papers

Extensible variants improve the modularity and expressiveness of programming languages: they allow program functionality to be decomposed into independent blocks, and allow seamless extension of existing code with both new cases of existing…

Programming Languages · Computer Science 2016-12-28 J. Garrett Morris

Type classes in Haskell are used to implement ad-hoc polymorphism, i.e. a way to ensure both to the programmer and the compiler that a set of functions are defined for a specific data type. All instances of such type classes are expected to…

Programming Languages · Computer Science 2018-08-20 Andreas Arvidsson , Moa Johansson , Robin Touche

Linear type systems have a long and storied history, but not a clear path forward to integrate with existing languages such as OCaml or Haskell. In this paper, we study a linear type system designed with two crucial properties in mind:…

Programming Languages · Computer Science 2017-11-09 Jean-Philippe Bernardy , Mathieu Boespflug , Ryan R. Newton , Simon Peyton Jones , Arnaud Spiwack

Type classes are an elegant extension to traditional, Hindley-Milner based typing systems. They are used in modern, typed languages such as Haskell to support controlled overloading of symbols. Haskell 98 supports only single-parameter and…

Programming Languages · Computer Science 2007-05-23 Kevin Glynn , Martin Sulzmann , Peter J. Stuckey

Type classes are one of Haskell's most popular features and extend its type system with ad-hoc polymorphism. Since their conception, there were useful features that could not be offered because of the desire to offer two correctness…

Programming Languages · Computer Science 2018-07-31 Thomas Winant , Dominique Devriese

Refinement types decorate types with assertions that enable automatic verification. Like assertions, refinements are limited to binders that are in scope, and hence, cannot express higher-order specifications. Ghost variables circumvent…

Programming Languages · Computer Science 2021-05-06 Anish Tondwalkar , Matthew Kolosick , Ranjit Jhala

Linear constraints are the linear counterpart of Haskell's class constraints. Linearly typed parameters allow the programmer to control resources such as file handles and manually managed memory as linear arguments. Indeed, a linear type…

Programming Languages · Computer Science 2026-04-24 Arnaud Spiwack , Csongor Kiss , Jean-Philippe Bernardy , Nicolas Wu , Richard A. Eisenberg

In recent years, languages like Haskell have seen a dramatic surge of new features that significantly extends the expressive power of their type systems. With these features, the challenge of kind inference for datatype declarations has…

Programming Languages · Computer Science 2019-11-15 Ningning Xie , Richard A. Eisenberg , Bruno C. d. S. Oliveira

A linear parameter must be consumed exactly once in the body of its function. When declaring resources such as file handles and manually managed memory as linear arguments, a linear type system can verify that these resources are used…

Programming Languages · Computer Science 2022-07-25 Arnaud Spiwack , Csongor Kiss , Jean-Philippe Bernardy , Nicolas Wu , Richard Eisenberg

We propose an amortized analysis that approximates the resource usage of a Haskell expression. Using the plugin API of GHC, we convert the Haskell code into a simplified representation called GHC Core. We then apply a type-based system…

Programming Languages · Computer Science 2019-08-20 Franz Siglmüller

We present an approach to support partiality in type-level computation without compromising expressiveness or type safety. Existing frameworks for type-level computation either require totality or implicitly assume it. For example, type…

Programming Languages · Computer Science 2017-06-30 J. Garrett Morris , Richard Eisenberg

Haskell is a popular choice for hosting deeply embedded languages. A recurring challenge for these embeddings is how to seamlessly integrate user defined algebraic data types. In particular, one important, convenient, and expressive feature…

Programming Languages · Computer Science 2022-08-01 Trevor L. McDonell , Joshua D. Meredith , Gabriele Keller

As originally proposed, type classes provide overloading and ad-hoc definition, but can still be understood (and implemented) in terms of strictly parametric calculi. This is not true of subsequent extensions of type classes. Functional…

Programming Languages · Computer Science 2016-12-28 J. Garrett Morris

We consider the application of Constraint Handling Rules (CHR) for the specification of type inference systems, such as that used by Haskell. Confluence of CHR guarantees that the answer provided by type inference is correct and consistent.…

Programming Languages · Computer Science 2020-02-19 Gregory J. Duck , Remy Haemmerle , Martin Sulzmann

Logic programming languages present clear advantages in terms of declarativeness and conciseness. However, the ideas of logic programming have been met with resistance in other programming communities, and have not generally been adopted by…

Programming Languages · Computer Science 2026-01-08 Ivan Perez , Angel Herranz

Context. An extension method is a method declared in a package other than the package of its host class. Thanks to extension methods, developers can adapt to their needs classes they do not own: adding methods to core classes is a typical…

Programming Languages · Computer Science 2017-08-08 Guillermo Polito , Camille Teruel , Stéphane Ducasse , Luc Fabresse

Dependently typed programming languages allow sophisticated properties of data to be expressed within the type system. Of particular use in dependently typed programming are indexed types that refine data by computationally useful…

Logic in Computer Science · Computer Science 2015-07-01 Robert Atkey , Patricia Johann , Neil Ghani

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

Haskell provides type-class-bounded and parametric polymorphism as opposed to subtype polymorphism of object-oriented languages such as Java and OCaml. It is a contentious question whether Haskell 98 without extensions, or with common…

Programming Languages · Computer Science 2007-05-23 Oleg Kiselyov , Ralf Laemmel

We present a statically typed embedding of relational programming (specifically a dialect of miniKanren with disequality constraints) in Haskell. Apart from handling types, our dialect extends standard relational combinator repertoire with…

Programming Languages · Computer Science 2024-09-02 Nikolai Kudasov , Artem Starikov
‹ Prev 1 2 3 10 Next ›