[Haskell-cafe] programming style...and type classes...

Will Yager will.yager at gmail.com
Fri Nov 4 17:16:01 UTC 2016



> On Nov 4, 2016, at 10:10, Tobias Dammers <tdammers at gmail.com> wrote:
> 
> However, in the case of Ord, there is
> little harm in defining a default instance and using more specialized
> sorting functions that take an explicit ordering functions; 

I disagree. This is the purpose of newtype wrappers. There are few scenarios where it's syntactically more convenient to pass around a bunch of random functions rather than just define a newtype with the behavior you want. GeneralizedNewtypeDeriving makes this trivial. 

Will


More information about the Haskell-Cafe mailing list