System F with Type Equality Coercions

More goodness appears to be in store for GHC, the Haskell compiler:

We introduce a variant of System F that uses a single mechanism to enable the type preserving translation of generalised abstract data types (GADTs), type classes with associated types and functional dependencies, as well as closed type functions. The core idea is to pass around explicit evidence for type equalities, just like System F passes types explicitly. We use this evidence to justify type casts encoding non-syntactic type equalities induced by the mentioned source language features. In particular, we don't need special typing rules for pattern matching on GADTs, we can easily combine GADTs with type classes, and we can relax restrictions on programs involving associated types or functional dependencies.

From SPJ: "I intend to change GHC to use FC as its intermediate language."

Looking at it, from the very, very limited understand I have, it seems that the whole coercions being witnesses to type constraints looks similar to how proof witnesses are used in Epigram. Maybe someone more knowledgeable can explain the similarity?

By genneth at 2006年04月13日 19:32 | LtU Forum | previous forum topic | next forum topic | other blogs | 9739 reads

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Link to the paper

By Twan van Laarhoven at Thu, 2006年04月13日 21:12 | login or register to post comments

Doh!

My bad... managed to link everything but what's relevant... :$

By genneth at Thu, 2006年04月13日 21:14 | login or register to post comments

AltStyle によって変換されたページ (->オリジナル) /