中文
相关论文

相关论文: Type Classes and Constraint Handling Rules

200 篇论文

Linear and substructural types are powerful tools, but adding them to standard functional programming languages often means introducing extra annotations and typing machinery. We propose a lightweight substructural type system design that…

编程语言 · 计算机科学 2015-02-18 Edward Gan , Jesse A. Tov , Greg Morrisett

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…

编程语言 · 计算机科学 2018-08-20 Andreas Arvidsson , Moa Johansson , Robin Touche

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…

编程语言 · 计算机科学 2016-12-28 J. Garrett Morris

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…

编程语言 · 计算机科学 2026-04-24 Arnaud Spiwack , Csongor Kiss , Jean-Philippe Bernardy , Nicolas Wu , Richard A. Eisenberg

Ability to use definitions occurring in the code directly in equational reasoning is one of the key strengths of functional programming. This is impossible in the case of Haskell type class methods unless a particular instance type is…

编程语言 · 计算机科学 2020-07-02 Härmel Nestra

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…

编程语言 · 计算机科学 2017-06-30 J. Garrett Morris , Richard Eisenberg

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…

编程语言 · 计算机科学 2025-03-03 Dimi Racordon , Eugene Flesselle , Cao Nguyen Pham

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…

编程语言 · 计算机科学 2007-05-23 Oleg Kiselyov , Ralf Laemmel

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…

编程语言 · 计算机科学 2019-07-02 Koen Pauwels , Georgios Karachalias , Michiel Derhaeg , Tom Schrijvers

We describe an application of Prolog: a type checking tool for the Q functional language. Q is a terse vector processing language, a descendant of APL, which is getting more and more popular, especially in financial applications. Q is a…

编程语言 · 计算机科学 2011-12-19 János Csorba , Zsolt Zombori , Péter Szeredi

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:…

编程语言 · 计算机科学 2017-11-09 Jean-Philippe Bernardy , Mathieu Boespflug , Ryan R. Newton , Simon Peyton Jones , Arnaud Spiwack

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…

编程语言 · 计算机科学 2022-07-25 Arnaud Spiwack , Csongor Kiss , Jean-Philippe Bernardy , Nicolas Wu , Richard Eisenberg

We consider type inference in the Hindley/Milner system extended with type annotations and constraints with a particular focus on Haskell-style type classes. We observe that standard inference algorithms are incomplete in the presence of…

编程语言 · 计算机科学 2007-05-23 Peter J Stuckey , Martin Sulzmann , Jeremy Wazny

This paper presents \tdl, a typed feature-based representation language and inference system. Type definitions in \tdl\ consist of type and feature constraints over the boolean connectives. \tdl\ supports open- and closed-world reasoning…

cmp-lg · 计算机科学 2019-08-15 Hans-Ulrich Krieger , Ulrich Schäfer

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…

编程语言 · 计算机科学 2019-11-15 Ningning Xie , Richard A. Eisenberg , Bruno C. d. S. Oliveira

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…

编程语言 · 计算机科学 2016-12-28 J. Garrett Morris

Large language models (LLMs) have achieved notable success in code generation. However, they still frequently produce uncompilable output because their next-token inference procedure does not model formal aspects of code. Although…

机器学习 · 计算机科学 2025-05-09 Niels Mündler , Jingxuan He , Hao Wang , Koushik Sen , Dawn Song , Martin Vechev

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.…

编程语言 · 计算机科学 2020-02-19 Gregory J. Duck , Remy Haemmerle , Martin Sulzmann

Creating good type error messages for constraint-based type inference systems is difficult. Typical type error messages reflect implementation details of the underlying constraint-solving algorithms rather than the specific factors leading…

编程语言 · 计算机科学 2024-02-21 Ishan Bhanuka , Lionel Parreaux , David Binder , Jonathan Immanuel Brachthäuser

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…

计算机科学中的逻辑 · 计算机科学 2011-02-08 Bas Spitters , Eelis van der Weegen
‹ 上一页 1 2 3 10 下一页 ›