[Haskell-cafe] Capitalization and associated type families

Tillmann Rendel rendel at daimi.au.dk
Tue Aug 5 14:39:28 EDT 2008


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


More information about the Haskell-Cafe mailing list