avh4 / elm-format

elm-format formats Elm source code according to a standard set of rules based on the official Elm Style Guide
BSD 3-Clause "New" or "Revised" License
1.31k stars 146 forks source link

remove `\ ->` #774

Open lue-bird opened 1 year ago

lue-bird commented 1 year ago

For example, when one moves an argument from a lambda to the declaration level, some \ -> might remain. These have to be removed manually, while elm-format could remove those empty lambda arguments patterns automatically.

kutyel commented 1 year ago

@lue-bird can you provide a sample Elm code with the before/after how it should look? I might have time to try and fix this 😄

lue-bird commented 1 year ago
-description content = \ -> Ui.text content
+description content = Ui.text content
-|> List.map (\-> Ui.text)
+|> List.map Ui.text

Or are you looking for situations where one might remove lambda arguments?