purescript/purescript — pull request #526 by joneshf (2014-08-01 20:05:12+00:00)
Title: Inlining

The combination of inlining `pure` for `Eff` and `(<<<)`/`(>>>)` for `(->)` means that instead of this code:

```purescript
module Foo where
import Debug.Trace (print)

main = do
pure unit
print <<< ((<>) "1") $ "4"
```

generating this:

```javascript
var PS = PS || {};
PS.Foo = (function () {
"use strict";
var Prelude = PS.Prelude;
var Control_Monad_Eff = PS.Control_Monad_Eff;
var Debug_Trace = PS.Debug_Trace;
var main = function __do() {
Prelude.pure(Control_Monad_Eff.applicativeEff({}))(Prelude.unit)();
return Prelude["<<<"](Prelude.semigroupoidArr({}))(Debug_Trace.print(Prelude.showString({})))(Prelude["<>"](Prelude.semigroupString({}))("1"))("4")();
};
return {
main: main
};
})();
```

it now generates this:

```javascript
var PS = PS || {};
PS.Foo = (function () {
"use strict";
var Prelude = PS.Prelude;
var Control_Monad_Eff = PS.Control_Monad_Eff;
var Debug_Trace = PS.Debug_Trace;
var main = function __do() {
Prelude.unit;
return Debug_Trace.print(Prelude.showString({}))("1" + "4")();
};
return {
main: main
};
})();
```

Much more readable.