Reports case expressions on Maybe that can be simplified.
config =
[ PreferMaybeChaining.rule
]
Fail
case maybeValue of
Nothing ->
Nothing
Just x ->
Just (f x)
case maybeValue of
Nothing ->
Nothing
Just x ->
lookup x
case maybeValue of
Nothing ->
defaultValue
Just x ->
x
Reports case expressions on Maybe that can be simplified.
Fail
Success
Try it out
You can try this rule out by running the following command: