[Haskell-cafe] Re: having fun with GADT's

Luke Palmer lrpalmer at gmail.com
Fri Oct 3 19:30:52 EDT 2008

On Tue, Sep 30, 2008 at 6:25 PM, Anatoly Yakovenko
<aeyakovenko at gmail.com> wrote:
> has the "with" syntax described in
>> <http://www.haskell.org/pipermail/haskell/2005-May/015815.html>
> been replaced with the "where" syntax?
> so
> data Foo a where
>  FooInt :: FooInt
> the same thing as
> data Foo A = FooInt with a = Int

I don't see any such syntax in the aforementioned message.  But yes,
the where syntax is currently the only way to do GADTs  (and I hope
that does *not* change, because I love the GADT syntax!):

  data Foo a where
    FooInt :: Foo Int


More information about the Haskell-Cafe mailing list