Does anyone know why types and values are in separate namespaces but
classes and types are not?

I think it's because you cannot currently distinguish them in module
import/exports.

Ah, good point. For constructors there is special syntax which allows to distinguish them in im/exports. Even if you have

    data One = Uno
    data Two = One | Two

and you want to im/export only the constructor `One` but neither the type `One` nor the constructor `Two` you can write `Two(One)` to refer to it.

So, my assumption that class names and type names always appear in different contexts was wrong when it comes to im/exports and there doesn't seem to be an easy way to fix that.

Thank you for clarifying!

Sebastian

--
Underestimating the novelty of the future is a time-honored tradition.
(D.G.)



_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to