GHC treats implicit parameters as a type scheme, not a type. As it happens, John Hughes's message to the list today discusses exactly this point.
Simon | -----Original Message----- | From: Ashley Yakeley [mailto:[EMAIL PROTECTED]] | Sent: 04 February 2002 21:14 | To: Simon Peyton-Jones; Haskell List | Subject: RE: Another Implicit Parameter Infelicity | | | At 2002-02-04 02:01, Simon Peyton-Jones wrote: | | >Neither GHC nor Hugs allow a polymorphic type variable | >(the argument of Maybe) to be instantiated to a polymorphic type. | >Systems which do are called 'impredicative' (or is it the other way | >around?). Going impredicative has big negative implications | for type | >inference, and I have always steered well clear! | | That's not what's happening here with implicit parameters, is | it? No type | variable is being instantiated. | | I'm pretty sure this does not need impredicativeness: | | p :: forall a. Maybe ((?param :: a) => a) | p = return g; | | It's more or less equivalent to this: | | p :: forall a. Maybe (a -> a) | p = return g; | | ...and not to be confused with this: | | p :: Maybe (forall a. a -> a) | p = return g; | | Or am I misunderstanding something? | | -- | Ashley Yakeley, Seattle WA | | _______________________________________________ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
