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

Richard Eisenberg eir at cis.upenn.edu
Sun Feb 7 15:15:49 UTC 2016


On Feb 7, 2016, at 10:11 AM, Tom Ellis <tom-lists-haskell-cafe-2013 at jaguarpaw.co.uk> wrote:
> 
> No one has suggested anything less contrived, so I'm going to assume this
> encompasses all use cases for the new type.  in which case may I make a
> counter proposal:
> 
>    Give Prelude.($) a truthful type of '(a -> b) -> a -> b' and put the
>    generalized version in a separate module, at least for now?

I would agree with this... except that the version of ($) in base in 7.8 and 7.10 already *was* generalized in this way. But no one got as itchy about the OpenKind that appears in 7.10's `:i $` as they are about the guck that appears in 8.0's `:t ($)`. So moving it out now would break code in the wild like https://ghc.haskell.org/trac/ghc/ticket/8739

Just to amplify this point: the generalization of ($) that we are debating **is not new**. The way it's rendered in GHCi is new, however.

Richard


More information about the Haskell-Cafe mailing list