Closed jfmengels closed 12 months ago
Nevermind, I was comparing with older versions and got confused. All of my examples get fixed.
For instance, List.singleton 1 ++ List.singleton 2
gets fixed to 1 :: List.singleton 2
.
One thing that feels missing though and I'm thinking we should push it further is 1 :: List.singleton 2
should probably be fixed to [ 1, 2 ]
, as that is a lot more idiomatic Elm code.
Currently, the following simplification is applied:
and there are more and more checks where we consider
[ 1 ]
the same asList.singleton 1
. But we don't support the following simplification:I guess we could also do
but I could understand some push-back on that.