jfmengels / elm-review-simplify

Provides elm-review rules to simplify your Elm code
https://package.elm-lang.org/packages/jfmengels/elm-review-simplify/latest/
BSD 3-Clause "New" or "Revised" License
19 stars 9 forks source link

Automate composition simplifications #246

Closed jfmengels closed 11 months ago

jfmengels commented 1 year ago

In PRs like #245, we specify composition checks that we already do in plain function calls.

I wonder if we could have a way to specify compositions in one place and then automatically derive the same simplification for plain function calls, so that we get two simplifications for the price of one.

I haven't put in much thought about a system like this yet, but the thought has crossed my mind several times, so I wanted to put it in writing so that we could potentially start designing around this.