2017
DOI: 10.1145/3156695.3122967
|View full text |Cite
|
Sign up to set email alerts
|

Quantified class constraints

Abstract: Quantified class constraints have been proposed many years ago to raise the expressive power of type classes from Horn clauses to the universal fragment of Hereditiary Harrop logic. Yet, while it has been much asked for over the years, the feature was never implemented or studied in depth. Instead, several workarounds have been proposed, all of which are ultimately stopgap measures.This paper revisits the idea of quantified class constraints and elaborates it into a practical language design. We show the merit… Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
1
1
1
1

Citation Types

0
16
0

Year Published

2018
2018
2019
2019

Publication Types

Select...
3
1
1

Relationship

3
2

Authors

Journals

citations
Cited by 8 publications
(16 citation statements)
references
References 29 publications
(22 reference statements)
0
16
0
Order By: Relevance
“…We cannot illustrate this with COCHIS as, to keep its definition small, it is not equipped with higher-kinded types. The interested reader can find examples in the work of Bottu et al (2017).…”
Section: An Overview Of Cochismentioning
confidence: 99%
See 1 more Smart Citation
“…We cannot illustrate this with COCHIS as, to keep its definition small, it is not equipped with higher-kinded types. The interested reader can find examples in the work of Bottu et al (2017).…”
Section: An Overview Of Cochismentioning
confidence: 99%
“…Nevertheless, if retaining global uniqueness is desired, that can be modelled by the subset of COCHIS without local declarations. In fact, based on the resolution algorithm of an early version of COCHIS, the Glasgow Haskell compiler (GHC) has been recently extended with quantified class constraints (Bottu et al, 2017;GHC, 2017b). Quantified class constraints enable higher-order rules in a setting with global scoping.…”
mentioning
confidence: 99%
“…composes partial functions (left-to-right), captured by Kleisli arrows of the Maybe monad. The constraint ForallF Functor p captures a universally quantified constraint [6]: for all types u then p u has an instance of the Functor class. 4 The requirement for comap to take partial functions is in response to the frequent need to restrict the domain of bidirectional transformations.…”
Section: Definitionmentioning
confidence: 99%
“…Not only is the size of the constraint bigger than the one we started with, but the axiom can also be applied infinitely many times (to capture that all nested list types are instances of Eq): the resolution tree now contains infinite paths. Thus, even a backtracking approach (such as the one used by Bottu et al [2017]) cannot handle bidirectional instances in an obvious way: bidirectional axioms need to be used selectively to ensure the termination of type inference.…”
Section: Challenge 2: Termination Of Type Inferencementioning
confidence: 99%
“…Elaboration of terms, types, and constraints for our core calculus is also standard and can be found in prior work (see for example the work of Bottu et al [2017]). The signatures of the corresponding judgments are the following:…”
Section: Elaboration Of Terms Types and Constraintsmentioning
confidence: 99%