[Haskell-cafe] Type without a data constructor?

Neil Mitchell ndmitchell at gmail.com
Mon Aug 6 19:32:27 EDT 2007


> I by mistake defined a type which did not specify a data constructor
> So the question is what are types with no constructors good for? A
> simple example would be appreciated.

They are called phantom types, and can be used for ensuring properties
at the type level.

I wrote about them in a blog post:


There are probably better references, but that's the easiest for me to find ;-)



More information about the Haskell-Cafe mailing list