English
Related papers

Related papers: Equational Reasoning for MTL Type Classes

200 papers

We present techniques for reasoning about constructor classes that (like the monad class) fix polymorphic operations and assert polymorphic axioms. We do not require a logic with first-class type constructors, first-class polymorphism, or…

Logic in Computer Science · Computer Science 2012-07-16 Brian Huffman

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

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

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

Monadic programming presents a significant challenge for many programmers. In light of category theory, we offer a new perspective on the use of monads in functional programming. This perspective is clarified through numerous examples coded…

Programming Languages · Computer Science 2024-10-14 Fethi Kadhi

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

Equational reasoning is one of the key features of pure functional languages such as Haskell. To date, however, such reasoning always took place externally to Haskell, either manually on paper, or mechanised in a theorem prover. This…

Programming Languages · Computer Science 2018-06-12 Niki Vazou , Joachim Breitner , Will Kunkel , David Van Horn , Graham Hutton

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

A number of domain specific languages, such as circuits or data-science workflows, are best expressed as diagrams of boxes connected by wires. Unfortunately, functional languages have traditionally been ill-equipped to embed this sort of…

Programming Languages · Computer Science 2021-07-23 Jean-Philippe Bernardy , Arnaud Spiwack

One can perform equational reasoning about computational effects with a purely functional programming language thanks to monads. Even though equational reasoning for effectful programs is desirable, it is not yet mainstream. This is partly…

Logic in Computer Science · Computer Science 2025-01-15 Reynald Affeldt , Jacques Garrigue , Takafumi Saikawa

Refinement type checkers are a powerful way to reason about functional programs. For example, one can prove properties of a slow, specification implementation, porting the proofs to an optimized implementation that behaves the same. Without…

Programming Languages · Computer Science 2022-07-20 Niki Vazou , Michael Greenberg

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

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

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

Elaboration-based type class resolution, as found in languages like Haskell, Mercury and PureScript, is generally nondeterministic: there can be multiple ways to satisfy a wanted constraint in terms of global instances and locally given…

Programming Languages · Computer Science 2019-07-16 Gert-Jan Bottu , Ningning Xie , Koar Marntirosian , Tom Schrijvers

Type classes are a popular tool for implementing generic algorithms and data structures without loss of efficiency, bridging the gap between parametric and ad-hoc polymorphism. Since their initial development in Haskell, they now feature…

Programming Languages · Computer Science 2025-03-03 Dimi Racordon , Eugene Flesselle , Cao Nguyen Pham

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

Functors with an instance of the Traversable type class can be thought of as data structures which permit a traversal of their elements. This has been made precise by the correspondence between traversable functors and finitary containers…

Logic in Computer Science · Computer Science 2022-07-21 Gershom Bazerman

Differentiable logics are a family of quantitative logics originated in the machine learning literature. Because of their origin, differentiable logics often come equipped with analytic properties that guarantee that they are…

Logic in Computer Science · Computer Science 2026-03-02 Reynald Affeldt , Alessandro Bruni , Ekaterina Komendantskaya , Natalia Ślusarz , Kathrin Stark

Pattern-matching programming is an example of a rule-based programming style developed in functional languages. This programming style is intensively used in dialects of ML but is restricted to algebraic data-types. This restriction limits…

Programming Languages · Computer Science 2009-12-25 Julien Cohen
‹ Prev 1 2 3 10 Next ›