[Haskell-cafe] Type safety in foreign pointer

Stuart Cook scook0 at gmail.com
Wed Oct 15 10:56:04 EDT 2008

On Thu, Oct 16, 2008 at 12:53 AM, Bulat Ziganshin
<bulat.ziganshin at gmail.com> wrote:
> data SomeStruct = SomeStruct

You can even go one step further and do

  data SomeStruct

which will prevent you from accidentally trying to the dummy
constructor. However, you'll need

  {-# LANGUAGE EmptyDataDecls #-}

or the equivalent compiler flag to make it work, since it's not
Haskell 98 syntax.


More information about the Haskell-Cafe mailing list