
28 Jul
2008
28 Jul
'08
9:53 p.m.
On Mon, Jul 28, 2008 at 08:48:23PM -0500, Galchin, Vasili wrote:
what does a datatype with no constructors mean?
E.g.
data RSAStruct data EVP_PKEY data EVP_CIPHER data EVP_CIPHER_CTX data EVP_MD_CTX data EVP_MD data BIGNUM
It's simply a datatype that can never have a value - a so-called 'phantom type'. They're useful when you need a type (eg as the argument for a ForeignPointer) but no need for an actual value. You can of course create values of these types using 'undefined', 'error' and friends, but this is perhaps not very useful most of the time :)