Miguel Mitrofanov wrote: > Your data type GridWidget doesn't have a parameter, yet you use it like > it has one. > >> data GridWidget = forall widget. (WidgetClass widget) => GridWidget >> widget > ^ > | > NB:-------------+
This is allowed as long as you have enabled the ExistentialTypes extension. This declares a so-called existential type, see the wiki for details, http://www.haskell.org/haskellwiki/Existential_types . Note that the second occurrence of "GridWidget" defines a data constructor, not a type constructor. Cheers, Jochem -- Jochem Berndsen | joc...@functor.nl GPG: 0xE6FABFAB _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe