[Haskell] is $ a no-op?

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Wed Oct 13 19:29:33 EDT 2004

Johannes Waldmann <waldmann at imn.htwk-leipzig.de> writes:

> I liked to think of it as just a syntactical convention (for years ...)
> but is it really at no cost? It does introduce extra function calls,
> that is, extra closures etc.? Can these be removed by ghc's optimizer?

It is inlined by GHC when optimization is turned on.

In general it doesn't have to be optimized out - it's just a function -
but it's easy to inline and eliminate, if the compiler performs any
inlining at all.

   __("<         Marcin Kowalczyk
   \__/       qrczak at knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/

More information about the Haskell mailing list