Import Upstream version 20180207
[hcoop/debian/mlton.git] / doc / guide / src / PhantomType.adoc
CommitLineData
7f918cf1
CE
1PhantomType
2===========
3
4A phantom type is a type that has no run-time representation, but is
5used to force the type checker to ensure invariants at compile time.
6This is done by augmenting a type with additional arguments (phantom
7type variables) and expressing constraints by choosing phantom types
8to stand for the phantom types in the types of values.
9
10== Also see ==
11
12* <!Cite(Blume01)>
13** dimensions
14** C type system
15* <!Cite(FluetPucella06)>
16** subtyping
17* socket module in <:BasisLibrary:Basis Library>