
20 Dec
2004
20 Dec
'04
3:37 a.m.
| Would it help to stick the quantifier at the beginning of | the type declaration? | | > forall a b . g :: Foo a b => [a] -> [a] | > g = ... Since GHC already allows explicit quantifiers, I had indeed wondered about saying that a type sig only brings type variables into scope if it has an explicit quantifier. Thus g :: forall a b. Foo a b => [a] -> [a] g = ... would bring a & b into scope in the "...", but g :: Foo a b => [a] -> [a] g = ... would not. I guess that has the merit that adding the feature would break fewer programs. I'm not keen on putting the foralls before the function name. Simon