[Haskell-cafe] New type of ($) operator in GHC 8.0 is problematic

Bardur Arantsson spam at scientician.net
Sat Feb 13 11:08:02 UTC 2016

On 02/13/2016 11:39 AM, Manuel Gómez wrote:
> On Sat, Feb 13, 2016 at 5:11 AM, Bardur Arantsson <spam at scientician.net> wrote:
>> Basically it _can_ subsume type classes, but using it for that purpose
>> is unbelievably verbose and it doesn't get you global coherence.
> If it doesn’t get you global coherence, then it does not subsume type
> classes, as that is most of the reason type classes are useful.

That's a fair observation, but I meant subsume in a slightly different
way, i.e. you can do everything with ML modules that you could possibly
do with type classes... and more! But of course we're talking Turing
Complete languages so that may be a moot point in terms of "power" wrt.
computability (etc.), but it sure isn't in terms of daily practice! ML
modules are truly one of the features of O'Caml that I miss most...
still I'm using Haskell in preference to O'Caml now, so it can't be
_that_ bad, right? :)

Btw, technically even Haskell-as-implemented-by-GHC doesn't give you
coherent instances because -XIncoherentInstances (and maybe
OverlappingInstances?). I know that's _slightly_ unfair, but if we're
arguing techincalities...


More information about the Haskell-Cafe mailing list