RE: Another Implicit Parameter Infelicity
4 Feb
2002
4 Feb
'02
10:01 a.m.
| p :: Maybe ((?param :: a) => a) | p = return g; 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! | Not only that, but they both complain about this: | | q :: b -> ((?param :: a) => a) | | ...even though it can only mean this: | | q :: (?param :: a) => b -> a Hmm. GHC is supposed to "hoist" for-alls that occur at the right hand end of function arrows (yet another non-std extension), but it obviously isn't quite working right. I'll look into that. Simon
8972
Age (days ago)
8972
Last active (days ago)
0 comments
1 participants
participants (1)
-
Simon Peyton-Jones