Foundations of Information Technology in the Era of Network and Mobile Computing 2002
DOI: 10.1007/978-0-387-35608-2_37
|View full text |Cite
|
Sign up to set email alerts
|

Phantom Types and Subtyping

Abstract: We investigate a technique from the literature, called the phantom types technique, that uses parametric polymorphism, type constraints, and unification of polymorphic types to model a subtyping hierarchy. Hindley-Milner type systems, such as the one found in ML, can be used to enforce the subtyping relation. We show that this technique can be used to encode any finite subtyping hierarchy (including hierarchies arising from multiple interface inheritance). We then formally demonstrate the suitability of the ph… Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
1
1
1
1

Citation Types

0
21
0

Year Published

2002
2002
2014
2014

Publication Types

Select...
5
2
1

Relationship

1
7

Authors

Journals

citations
Cited by 18 publications
(21 citation statements)
references
References 14 publications
0
21
0
Order By: Relevance
“…Finally, recent work in phantom types (Hinze, 2003;Fluet & Pucella, 2002;Leijen & Meijer, 1999), where "phantom" type parameters only purpose is to enforce well-formedness constraints, directly aligns with our approach.…”
Section: Related Workmentioning
confidence: 99%
“…Finally, recent work in phantom types (Hinze, 2003;Fluet & Pucella, 2002;Leijen & Meijer, 1999), where "phantom" type parameters only purpose is to enforce well-formedness constraints, directly aligns with our approach.…”
Section: Related Workmentioning
confidence: 99%
“…It would be possible to capture many of these invariants using either phantom types (Fluet and Pucella 2002) or GADTs (Peyton Jones et al 2006). However, for simplicity, we choose not to.…”
Section: Dslmentioning
confidence: 99%
“…One approach is the use of phantom types (Fluet and Pucella 2002), for example a safe variant of tail can be written as in Figure 15 and Unknown are phantom types -they exist only at the type level, and have no corresponding value.…”
Section: Type System Safetymentioning
confidence: 99%