2016
DOI: 10.1017/s0956796816000150
|View full text |Cite
|
Sign up to set email alerts
|

Safe zero-cost coercions for Haskell

Abstract: Generative type abstractions -present in Haskell, OCaml, and other languages -are useful concepts to help prevent programmer errors. They serve to create new types that are distinct at compile time but share a run-time representation with some base type. We present a new mechanism that allows for zero-cost conversions between generative type abstractions and their representations, even when such types are deeply nested. We prove type safety in the presence of these conversions and have implemented our work in … Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
1
1
1

Citation Types

0
40
0

Year Published

2017
2017
2021
2021

Publication Types

Select...
7
1

Relationship

5
3

Authors

Journals

citations
Cited by 18 publications
(40 citation statements)
references
References 22 publications
0
40
0
Order By: Relevance
“…3 Generic lambda encoding for codata Figures 4,5,and 6 give the complete derivation of coinductive data in Cedille. This derivation is generic, in that it works for any monotone type scheme F of kind (I → ⋆) → I → ⋆ (where monotonicity is expressed as evidence cm of type Mono · I · F).…”
Section: Coalgebras and Coiteration Schemesmentioning
confidence: 99%
“…3 Generic lambda encoding for codata Figures 4,5,and 6 give the complete derivation of coinductive data in Cedille. This derivation is generic, in that it works for any monotone type scheme F of kind (I → ⋆) → I → ⋆ (where monotonicity is expressed as evidence cm of type Mono · I · F).…”
Section: Coalgebras and Coiteration Schemesmentioning
confidence: 99%
“…Though this language has full-spectrum dependent types, it is not a standard dependent type theory: it admits logical inconsistency and the ⋆ : ⋆ axiom, along with support for equality assumptions and type erasure. System DR extends System D with roles, based on the existing design [Breitner et al 2016] as it must be realizable in GHC.…”
Section: Contributionmentioning
confidence: 99%
“…Inside the defining module, a newtype is a translucent abstraction: you can see through it with effort. The safe coercions [Breitner et al 2016] extension to the Glasgow Haskell Compiler (GHC) reduces this effort through the availability of the coerce primitive. For example, as HTML and String are represented by the same bits in memory, so are the lists [HTML] and [String].…”
mentioning
confidence: 99%
“…Before describing the novelty of CFC, we take a quick tour of the grounds. Novel components are indicated in the following discussion; the rest of System CFC follows previous work (e.g., (Breitner et al 2016;).…”
Section: System Cfcmentioning
confidence: 99%