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

Constrained type families

Abstract: 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 families in Haskell provide a powerful, modular means of de ning type-level computation. However, their current design implicitly assumes that type families are total, introducing nonsensical types and signi cantly complicating the metatheory of type families and their extensio… Show more

Help me understand this report
View preprint versions

Search citation statements

Order By: Relevance

Paper Sections

Select...
1
1
1

Citation Types

0
3
0

Year Published

2019
2019
2022
2022

Publication Types

Select...
2
1

Relationship

1
2

Authors

Journals

citations
Cited by 3 publications
(3 citation statements)
references
References 33 publications
0
3
0
Order By: Relevance
“…Yet, the work of Hall et al does not cover an algorithm for type inference and elaboration; we do so here (Section 5.5). Morris and Eisenberg [2017] recently provided compelling arguments for the replacement of open type families with the so-called Constrained Type Families. Constrained type families, similarly to associated type families, use the generic notion of qualified types [Jones 1992] to capture the domain of a type family within a predicate, thus simplifying the meta-theory of type families and their extensions.…”
Section: Related Work and Discussionmentioning
confidence: 99%
“…Yet, the work of Hall et al does not cover an algorithm for type inference and elaboration; we do so here (Section 5.5). Morris and Eisenberg [2017] recently provided compelling arguments for the replacement of open type families with the so-called Constrained Type Families. Constrained type families, similarly to associated type families, use the generic notion of qualified types [Jones 1992] to capture the domain of a type family within a predicate, thus simplifying the meta-theory of type families and their extensions.…”
Section: Related Work and Discussionmentioning
confidence: 99%
“…We extend his system in two directions. First, we extend the typing of expressions to account for the partiality of type constructors; we use qualified kinding, extending the approach of Morris and Eisenberg [2017], accounting for the role of predicates in types just as qualified typing accounts for the role of predicates on types. Second, we describe the interaction between datatype declarations and well-definedness constraints: when type declarations are themselves well-defined, how definedness axioms are inferred from type declarations, and how they are used in the typing of terms.…”
Section: A Theory Of Partial Type Constructorsmentioning
confidence: 99%
“…The center of Figure 1 gives our qualified kinding relation P | Δ ⊢ : . Unlike standard kinding relations, which need only track the kinds of type variables Δ, but like the formation rules of Morris and Eisenberg [2017], we also track a predicate context P. The predicate context comes into play in two kinding rules.…”
Section: Kinding Environmentsmentioning
confidence: 99%