[Haskell-cafe] namespaces for values, types, and classes

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Fri Nov 27 15:04:12 EST 2009


On Nov 27, 2009, at 06:42 , Martijn van Steenbergen wrote:
> Sebastian Fischer wrote:
>> Does anyone know why types and values are in separate namespaces  
>> but classes and types are not?
>
> Good question. I don't know the answer, but it is interesting to  
> note that the report explicitly mentions this decision (but provides  
> no reason):
>
> "An identifier must not be used as the name of a type constructor  
> and a class in the same scope."


My guess is to make it easier to catch the error of using a class name  
as a type.

-- 
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH


-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20091127/acaa6a79/PGP.bin


More information about the Haskell-Cafe mailing list