First-Class Phantom Types

James Cheney, Ralf Thomas Walter Hinze · eCommons (Cornell University) · 2003

Abstract. Phantom types are data types with type constraints associated with different cases. Examples of phantom types include typed type representations and typed higher-order abstract syntax trees. These types can be used to support typed generic functions, dynamic typing, and staged compilation in higher-order, statically typed languages such as Haskell or Standard ML. In our system, type constraints can be equations between type constructors as well as type functions of higher-order kinds. We prove type soundness and decidability for a Haskell-like language extended by phantom types. 1

Read the paper · More papers on PaperTik