2018
DOI: 10.1145/3236799
|View full text |Cite
|
Sign up to set email alerts
|

Generic zero-cost reuse for dependent types

Abstract: Dependently typed languages are well known for having a problem with code reuse. Traditional non-indexed algebraic datatypes (e.g. lists) appear alongside a plethora of indexed variations (e.g. vectors). Functions are often rewritten for both non-indexed and indexed versions of essentially the same datatype, which is a source of code duplication.We work in a Curry-style dependent type theory, where the same untyped term may be classified as both the non-indexed and indexed versions of a datatype. Many solution… Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
1
1
1
1

Citation Types

0
9
0

Year Published

2018
2018
2021
2021

Publication Types

Select...
3
3
1

Relationship

3
4

Authors

Journals

citations
Cited by 9 publications
(9 citation statements)
references
References 19 publications
0
9
0
Order By: Relevance
“…The ϕ axiom of equality allows us to define a type constructor Cast which internalizes the notion that the set of all elements of some type S is contained within the set of all elements of type T (note that Curry-style typing makes this relation nontrivial). We describe its axiomatic summary presented in Figure 2; for the full derivation, see Jenkins and Stump [16] (also Diehl et al [11]). The introduction form intrCast takes two erased term arguments, a function t 1 : S → T , and a proof that t 1 behaves extensionally as the identity function on its domain.…”
Section: Type Inclusionsmentioning
confidence: 99%
“…The ϕ axiom of equality allows us to define a type constructor Cast which internalizes the notion that the set of all elements of some type S is contained within the set of all elements of type T (note that Curry-style typing makes this relation nontrivial). We describe its axiomatic summary presented in Figure 2; for the full derivation, see Jenkins and Stump [16] (also Diehl et al [11]). The introduction form intrCast takes two erased term arguments, a function t 1 : S → T , and a proof that t 1 behaves extensionally as the identity function on its domain.…”
Section: Type Inclusionsmentioning
confidence: 99%
“…Such definitions often guide type-class resolution [Brady 2013;Devriese and Piessens 2011;Sozeau and Oury 2008], so precise control over their unfolding is important. Cedille includes zero-cost coercions [Diehl et al 2018] and Idris has recently added experimental support for typecase 5 . Because the design considerations of these languages differ from that of GHC, we compare our treatment of roles to modal dependent type theory in Section 8.…”
Section: Contributionmentioning
confidence: 99%
“…We adopted a Curry-style language design in this paper, where the syntax of terms includes only computationally relevant terms. This style of language makes a lot of sense for reasoning about representational equivalence [Diehl et al 2018]. It also simplifies our design process as we need not worry about propagating annotations at the same time as developing the semantics.…”
Section: St-coercementioning
confidence: 99%
See 1 more Smart Citation
“…The system has evolved from an initial version [26], to its current form [28]. Several other works demonstrate applications of the theory to derivation of inductive datatypes [6,7,27], and to zero-cost coercions between related datatypes [5]. The main metatheoretic property proved in previous work is logical consistency: there are types which are not inhabited.…”
Section: Cedille and Its Type Theorymentioning
confidence: 99%