7.5. Data types with no constructors

With the -fglasgow-exts flag, GHC lets you declare a data type with no constructors. For example:

  data S      -- S :: *
  data T a    -- T :: * -> *

Syntactically, the declaration lacks the "= constrs" part. The type can be parameterised, but only over ordinary types, of kind *; since Haskell does not have kind signatures, you cannot parameterise over higher-kinded types.

Such data types have only one value, namely bottom. Nevertheless, they can be useful when defining "phantom types".