Phantom type
Jump to navigation
Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
A phantom type is a type the values of which are never used, the type being used only to construct other types. They are used in type arithmetic.
An extension to Haskell 98 supported by GHC allows you to define datatypes without any constructors (and therefore no values other than bottom):
data MyType
This helps distinguish phantom types.