[Haskell-cafe] Fwd: Increasing Haskell modularity

Daniel Trstenjak daniel.trstenjak at gmail.com
Thu Oct 2 08:50:18 UTC 2014

Hi Gesh,

On Thu, Oct 02, 2014 at 12:44:25AM +0300, Gesh wrote:
> Correct, although that's not what I said. I just said that a case could
> be made for saying the design of programs around global uniqueness was
> poorly thought out.

I think the problem is, that for some type classes global uniqueness is
a very good idea and for some it might not be that relevant.

If there's e.g. a PrettyPrint type class, then one might argue, that
it's a good idea to be able to change the pretty printing of a data type
depending on the context.

But for a type class represeting the equality of a data type it might be
more harmful then good, to be able to change it.

One could argue now, that it's in the responsibility of the programmer
to do the right thing, but I like it very much, that Haskell does most
of the time the right thing for me.

I'm also not quite sure how much harder the reasoning of code gets, if
instances can be overloaded.


More information about the Haskell-Cafe mailing list