
6 Aug
2007
6 Aug
'07
7:32 p.m.
Hi
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: http://neilmitchell.blogspot.com/2007/04/phantom-types-for-real-problems.htm... There are probably better references, but that's the easiest for me to find ;-) Thanks Neil