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
participants (1)
-
Ashley Yakeley