
5 Aug
2008
5 Aug
'08
2:39 p.m.
Brian Hulley wrote:
class Foo a where
f :: a -> b -> (a, b)
Here there is no capitalization distinction in the type of (f) but the implementation can still insert the "forall b." since (a) is already in scope. Therefore similarly, if type constructors like "List" were instead written using lowercase, since they would already be in scope it would be clear even without explicit quantifiers that (a) and (b), but not (list), were to be quantified in the type of (map) (assuming of course that there was no top level data decl for (a) or (b)).
So adding b to the export list of an imported module would change the type of f? Tillmann