Derek Elkins wrote:
>Andrew Pimlott wrote:
>>I think this post should go under the heading "($) considered
>>harmful". I've been bitten by this, and I never use ($) anymore in
>>place of parentheses because it's too tempting to think of it as
>>syntax.
>
>I find this position ridiculous. [...] If you ever make a mistake
>one way the type checker will tell you.

For what it's worth, this is not true in the presence of implicit parameters:

   f :: ((?p :: Int) => Int) -> Int
   f g = let ?p = 1 in g

   x,y :: Int
   x = let ?p = 2 in (f ?p)       ==> 1
   y = let ?p = 2 in (f $ ?p)     ==> 2

I wouldn't mind ($) being magical, along the lines of the magical runST in a rank-1 type system. It would be nice to be able to use it in patterns too.

-- Ben

_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to