2009/11/12 Ryan Ingram <ryani.s...@gmail.com>: > On Thu, Nov 12, 2009 at 2:50 AM, Eugene Kirpichov <ekirpic...@gmail.com> > wrote: >> But that's not an issue of semantics of forall, just of which part of >> the rather broad and universal semantics is captured by which language >> extensions. > > The forall for existential type quantification is wierd. > >> data Top = forall a. Any a -- existential >> data Bottom = All (forall a. a) -- rank 2 >
Hm, you're right. I didn't even remember you could define existential types without GADT syntax. I also find the GADT syntax much better for teaching people what an ADT is. > I think it makes much more sense in GADT syntax: > >> data Top where >> Any :: forall a. a -> Top >> data Bottom where >> All :: (forall a. a) -> Bottom > > where it's clear the forall is scoping the type of the constructor. > > -- ryan > -- Eugene Kirpichov Web IR developer, market.yandex.ru _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe