A Role for Dependent Types in Haskell (Extended version)

05/31/2019
by   Stephanie Weirich, et al.
0

Modern Haskell supports zero-cost coercions, a mechanism where types that share the same run-time representation may be freely converted between. To make sure such conversions are safe and desirable, this feature relies on a mechanism of roles to prohibit invalid coercions. In this work, we show how to integrate roles with dependent type systems and prove, using the Coq proof assistant, that the resulting system is sound. We have designed this work as a foundation for the addition of dependent types to the Glasgow Haskell Compiler, but we also expect that it will be of use to designers of other dependently-typed languages who might want to adopt Haskell's safe coercions feature.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/12/2018

Typed Closure Conversion for the Calculus of Constructions

Dependently typed languages such as Coq are used to specify and verify t...
research
04/01/2021

Idris 2: Quantitative Type Theory in Practice

Dependent types allow us to express precisely what a function is intende...
research
09/21/2023

The Undecidability of Third Order Pattern Matching in Calculi with Dependent Types or Type Constructors

We prove the undecidability of the third order pattern matching problem ...
research
04/30/2018

Proof-relevant Horn Clauses for Dependent Type Inference and Term Synthesis

First-order resolution has been used for type inference for many years, ...
research
10/30/2020

Type safety of rewrite rules in dependent types

The expressiveness of dependent type theory can be extended by identifyi...
research
08/17/2017

Towards Algorithmic Typing for DOT

The Dependent Object Types (DOT) calculus formalizes key features of Sca...

Please sign up or login with your details

Forgot password? Click here to reset