English
Related papers

Related papers: Variations on Variants

200 papers

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

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

Chunked codes are efficient random linear network coding (RLNC) schemes with low computational cost, where the input packets are encoded into small chunks (i.e., subsets of the coded packets). During the network transmission, RLNC is…

Information Theory · Computer Science 2015-03-27 Bin Tang , Shenghao Yang , Baoliu Ye , Yitong Yin , Sanglu Lu

Statically typed languages offer significant advantages, such as bug prevention, enhanced code quality, and reduced maintenance costs. However, these benefits often come at the expense of a steep learning curve and a slower development…

Human-Computer Interaction · Computer Science 2024-05-22 Shuai Fu , Tim Dwyer , Peter J. Stuckey , John Grundy

Haskell, as implemented in the Glasgow Haskell Compiler (GHC), has been adding new type-level programming features for some time. Many of these features---chiefly: generalized algebraic datatypes (GADTs), type families, kind polymorphism,…

Programming Languages · Computer Science 2017-08-15 Richard A. Eisenberg

Liquid typing provides a decidable refinement inference mechanism that is convenient but subject to two major issues: (1) inference is global and requires top-level annotations, making it unsuitable for inference of modular code components…

Programming Languages · Computer Science 2019-10-31 Niki Vazou , Éric Tanter , David Van Horn

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

Recently an extension to higher-order logic -- called DHOL -- was introduced, enriching the language with dependent types, and creating a powerful extensional type theory. In this paper we propose two ways how choice can be added to DHOL.…

Logic in Computer Science · Computer Science 2024-10-14 Daniel Ranalter , Chad E. Brown , Cezary Kaliszyk

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

When scripts in untyped languages grow into large programs, maintaining them becomes difficult. A lack of explicit type annotations in typical scripting languages forces programmers to must (re)discover critical pieces of design information…

Programming Languages · Computer Science 2011-06-15 Sam Tobin-Hochstadt , Matthias Felleisen

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

Type inference is an application domain that is a natural fit for logic programming (LP). LP systems natively support unification, which serves as a basic building block of typical type inference algorithms. In particular, polymorphic type…

Programming Languages · Computer Science 2017-09-13 Ki Yung Ahn

Many language generation models are now available for a wide range of generation tasks, including machine translation and summarization. Combining such diverse models may lead to further progress, but ensembling generation models is…

Computation and Language · Computer Science 2022-10-31 Jungo Kasai , Keisuke Sakaguchi , Ronan Le Bras , Hao Peng , Ximing Lu , Dragomir Radev , Yejin Choi , Noah A. Smith

Large language models (LLMs) call for extension of context to handle many critical applications. However, the existing approaches are prone to expensive costs and inferior quality of context extension. In this work, we propose Extensible…

Computation and Language · Computer Science 2024-02-20 Ninglu Shao , Shitao Xiao , Zheng Liu , Peitian Zhang

The fact that Applicative type class allows one to express simple parsers in a variable-less combinatorial style is well appreciated among Haskell programmers for its conceptual simplicity, ease of use, and usefulness for semi-automated…

Programming Languages · Computer Science 2019-05-28 Jan Malakhovski , Sergei Soloviev

We report on an experience to support multiple views of programs to solve the tyranny of the dominant decomposition in a functional setting. We consider two possible architectures in Haskell for the classical example of the expression…

Software Engineering · Computer Science 2011-02-01 Julien Cohen , Rémi Douence

Neural networks are typically represented as data structures that are traversed either through iteration or by manual chaining of method calls. However, a deeper analysis reveals that structured recursion can be used instead, so that…

Programming Languages · Computer Science 2022-09-30 Minh Nguyen , Nicolas Wu

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…

Programming Languages · Computer Science 2007-05-23 Peter J Stuckey , Martin Sulzmann , Jeremy Wazny

Bernardy et al. [2018] proposed a linear type system $\lambda^q_\to$ as a core type system of Linear Haskell. In the system, linearity is represented by annotated arrow types $A \to_m B$, where $m$ denotes the multiplicity of the argument.…

Programming Languages · Computer Science 2020-02-20 Kazutaka Matsuda

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