[Haskell-cafe] namespaces for values, types, and classes
Sebastian Fischer
sebf at informatik.uni-kiel.de
Fri Nov 27 05:07:20 EST 2009
Dear Café,
types and values are in separate namespaces. So, we can write
data Name = Name
where the first `Name` is a type and the second is a value. However,
classes are in the same namespace as types. We cannot write
class Name a where ...
instance Name Name where ...
Class contexts and types appear in different contexts just like types
and values (unless I'm missing something). I googled for the reason of
this design choice but found nothing.
Does anyone know why types and values are in separate namespaces but
classes and types are not?
Cheers,
Sebastian
--
Underestimating the novelty of the future is a time-honored tradition.
(D.G.)
More information about the Haskell-Cafe
mailing list