jsuder-xx/elm-review-reducible-lambdas/2.0.0

NOTE: the latest version is 2.0.1

elm-review-reducible-lambdas

Provides elm-review rules to detect reducible lambda expressions using different techniques.

Provided rules

  • NoEtaReducibleLambdas - Reports when arguments can be removed from a lambda through the process of Eta Reduction (part of the lambda calculus). For example, the following reductions are possible
    • \x -> f x reduces to f
    • \x y -> f x y reduces to f
    • \x -> f a x reduces to f a
    • \a b -> f (g a) b reduces to \a -> f (g a)

Configuration

module ReviewConfig exposing (config)

import NoEtaReducibleLambdas
import Review.Rule exposing (Rule)

config : List Rule
config =
    [ NoEtaReducibleLambdas.rule NoEtaReducibleLambdas.AlwaysRemoveLambdaWhenPossible
    ]

Try it out

You can try the example configuration above out by running the following command:

elm-review --template jsuder-xx/elm-review-reducible-lambdas/example