
Tom Ellis
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?
The first (albeit rather unconvincing) example I can think of is be something like, getI# :: Int -> Int# getI# (I# n#) = n# n# :: Int# n# = getI# $ 5 + 8 Richard likely has something a bit less contrived though. This does raise the question of why ($) is generalized, yet (.) is not, (.) :: forall (l :: Levity) a b (c :: TYPE l). (b -> c) -> (a -> b) -> (a -> c) (.) f g x = f (g x) Cheers, - Ben