[Haskell-cafe] Fwd: Increasing Haskell modularity

Daniel Trstenjak daniel.trstenjak at gmail.com
Thu Oct 2 09:53:05 UTC 2014


Hi Dominique,

On Thu, Oct 02, 2014 at 11:29:43AM +0200, Dominique Devriese wrote:
> Consider for example the Ord type class.  The fact that we sometimes
> want to use different orderings for the same data types is clearly
> evidenced by the existence of functions such as sortBy and all of the
> "comparing ..." stuff in Data.Ord.

I consider the Ord type class a particular bad example for allowing
to overload instances, because it will IMHO make reasoning about code harder:

   sort :: Ord a => [a] -> [a]


Greetings,
Daniel


More information about the Haskell-Cafe mailing list