[Haskell-cafe] The difference between ($) and application

Jon Cast jcast at ou.edu
Tue Dec 14 17:02:35 EST 2004


Derek Elkins <ddarius at hotpop.com> wrote:

> Personally, I would mind ($) being magical.  One of the nice things
> about Haskell is there is practically no magic.  The last thing I want
> is Haskerl (http://www.dcs.gla.ac.uk/~partain/haskerl.html).  runST
> simply had a rank-2 type that is not expressible in Haskell 98, it
> seems getting ($) to "work" would be qualitatively different.

No.  All that is needed for ($) to work is impredicativity (or, more
precisely, for the foralls in ($)'s type to be impredicative).  That is
something that could easily be implemented in a compiler.  I'm not clear
on why it hasn't been, but the type system, in relation to an
arbitrary-rank predicative system, is no more of a jump that higher-rank
types were.

Jonathan Cast


More information about the Haskell-Cafe mailing list