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

Tom Ellis tom-lists-haskell-cafe-2013 at jaguarpaw.co.uk
Sat Feb 6 12:20:49 UTC 2016


On Sat, Feb 06, 2016 at 11:59:20AM +0000, Tom Ellis wrote:
> On Fri, Feb 05, 2016 at 07:19:25PM +0000, Tom Ellis wrote:
> > On Fri, Feb 05, 2016 at 01:13:23PM -0500, Richard Eisenberg wrote:
> > > We're in a bit of a bind in all this. We really need the fancy type for
> > > ($) so that it can be used in all situations where it is used currently. 
> > 
> > Is there a list of situations where ($) is used currently that give rise to
> > this need?
> 
> Does anyone have any idea about this?  What is it about ($) that means it
> needs a new funky type whereas (apparently) nothing else does?

For example, why should maybe not be extended from

    maybe :: b -> (a -> b) -> Maybe a -> b

to
    maybe :: forall (r :: RuntimeRep) (a :: *) (b :: TYPE r). b -> (a -> b) -> Maybe a -> b

That's strictly more general, is it not?

Tom


More information about the Haskell-Cafe mailing list