Skip to main content

A Systematic Translation of Guarded Recursive Data Types to Existential Types

Sulzmann, Martin and Wang, Meng (2004) A Systematic Translation of Guarded Recursive Data Types to Existential Types. Technical report. National University of Singapore (Unpublished)

Abstract

Guarded recursive data types (GRDTs) are a new language feature which allows to type check the different branches of case expressions under different type assumptions. We observe that GRDTs are pretty close in their typing behavior to type classes with existential types (TCET). We give a translation scheme from GRDTs to TCET. The translation to TCET might be ambiguous in the sense that common implementations such as the Glasgow Haskell Compiler (GHC) fail to accept the translated program. Hence, we provide for another translation from TCET to existential types (ET) which is accepted by GHC. To achieve this goal we combine an existing constraint solving procedure with a novel proof term construction method.

Item Type: Monograph (Technical report)
Uncontrolled keywords: Type systems, type-directed translation, proof-term construction, constraint solving.
Subjects: Q Science > QA Mathematics (inc Computing science) > QA 75 Electronic computers. Computer science
Q Science > QA Mathematics (inc Computing science) > QA 76 Software, computer programming,
Divisions: Faculties > Sciences > School of Computing > Programming Languages and Systems Group
Depositing User: Meng Wang
Date Deposited: 01 Mar 2015 13:47 UTC
Last Modified: 29 May 2019 14:17 UTC
Resource URI: https://kar.kent.ac.uk/id/eprint/47487 (The current URI for this page, for reference purposes)
  • Depositors only (login required):

Downloads

Downloads per month over past year