[{"name":"Simplify","comment":" Reports when an expression can be simplified.\n\n🔧 Running with `--fix` will automatically remove all the reported errors.\n\n    config =\n        [ Simplify.rule Simplify.defaults\n        ]\n\n@docs rule\n@docs Configuration, defaults, expectNaN, ignoreCaseOfForTypes\n\n\n## Try it out\n\nYou can try this rule out by running the following command:\n\n```bash\nelm-review --template jfmengels/elm-review-simplify/example --rules Simplify\n```\n\n\n## Simplifications\n\nBelow is the list of all kinds of simplifications this rule applies.\n\n\n### Booleans\n\n    x || True\n    --> True\n\n    x || False\n    --> x\n\n    x && True\n    --> x\n\n    x && False\n    --> False\n\n    not True\n    --> False\n\n    not (not x)\n    --> x\n\n    -- for `<`, `>`, `<=`, `>=`, `==` and `/=`\n    not (a < b)\n    --> a >= b\n\n\n### Comparisons\n\n    x == True\n    --> x\n\n    x /= False\n    --> x\n\n    not x == not y\n    --> x == y\n\n    anything == anything\n    --> True\n\n    anything /= anything\n    --> False\n\n    { r | a = 1 } == { r | a = 2 }\n    --> False\n\n    x == []\n    --> List.isEmpty x\n\n    x /= []\n    --> not (List.isEmpty x)\n\n    x == Array.empty -- same for Dict or Set\n    --> Array.isEmpty x\n\n    1 < 2 -- same for >=, <=, < for any comparable operands\n    --> True\n\n    -- when `expectNaN` is not enabled\n    -- whenever number intervals for both sides are known to always pass or fail a comparison\n    List.length l >= min -1 n\n    --> True\n\n    n < n\n    --> False\n\n    -- when `expectNaN` is not enabled\n    n > n\n    --> False\n\n    -- when `expectNaN` is not enabled\n    n <= n\n    --> True\n\n    n >= n\n    --> True\n\n\n### If expressions\n\n    if True then x else y\n    --> x\n\n    if False then x else y\n    --> y\n\n    if condition then x else x\n    --> x\n\n    if condition then True else False\n    --> condition\n\n    if condition then False else True\n    --> not condition\n\n    if condition then\n        if not condition then\n            1\n        else\n            2\n    else\n        3\n    --> if condition then 2 else 3\n\n\n### Case expressions\n\n    case condition of\n        True -> x\n        False -> y\n    --> if condition then x else y\n\n    case condition of\n        False -> y\n        True -> x\n    --> if not condition then x else y\n\n    -- only when no variables are introduced in the pattern\n    -- and no custom types defined in the project are referenced\n    case value of\n        Just _ -> x\n        Nothing -> x\n    --> x\n\n    -- same with any variant, list or tuple containing either\n    case Just value of\n        Nothing -> a\n        Just (Ok b) -> c\n        Just (Err d) -> e\n    --> case value of\n    -->     Ok b -> c\n    -->     Err d -> e\n\nDestructuring using case expressions\n\n    case value of\n        ( x, y ) ->\n            x + y\n\n    -->\n    let\n        ( x, y ) =\n            value\n    in\n    x + y\n\n\n### Let expressions\n\n    let\n        a =\n            1\n    in\n    let\n        b =\n            1\n    in\n    a + b\n\n    -->\n    let\n        a =\n            1\n\n        b =\n            1\n    in\n    a + b\n\n\n### Record updates\n\n    { a | b = a.b }\n    --> a\n\n    { a | b = a.b, c = 1 }\n    --> { a | c = 1 }\n\n\n### Field access\n\n    { a = b }.a\n    --> b\n\n    { a | b = c }.b\n    --> c\n\n    { a | b = c }.d\n    --> a.d\n\n    (let a = b in c).d\n    --> let a = b in c.d\n\n    (Record first second).first\n    --> first\n\n\n### Basics functions\n\n    identity x\n    --> x\n\n    f >> identity\n    --> f\n\n    always x y\n    --> x\n\n    f >> always x\n    --> always x\n\n    toFloat 1\n    --> 1\n\n    round 1.1\n    --> 1\n\n    ceiling 0.9\n    --> 1\n\n    floor 1.1\n    --> 1\n\n    truncate 1.1\n    --> 1\n\n    round (toFloat n) -- same for ceiling, floor and truncate\n    --> n\n\n    abs 3\n    --> 3\n\n    abs (abs n)\n    --> abs n\n\n    abs -n\n    --> abs n\n\n    min n n\n    --> n\n\n    min n -n\n    --> -(abs n)\n\n    min (min n0 n1) n0\n    --> min n0 n1\n\n    min 3 4\n    --> 3\n\n    max n n\n    --> n\n\n    max n -n\n    --> abs n\n\n    max (max n0 n1) n0\n    --> max n0 n1\n\n    max 3 4\n    --> 4\n\n    -- when `expectNaN` is not enabled\n    compare n n\n    --> EQ\n\n    compare 3 4\n    --> LT\n\n\n### Lambdas\n\n    (\\_ -> x) data\n    --> x\n\n    (\\x -> x) data\n    --> data\n\n    (\\() y -> x) ()\n    --> (\\y -> x)\n\n    (\\_ y -> x) data\n    --> (\\y -> x)\n\n    (\\y _ -> x) data otherData\n    --> (\\y -> x)\n\n\n### Operators\n\n    (++) a b\n    --> a ++ b\n\n    a |> f >> g\n    --> a |> f |> g\n\n    (f >> g) a\n    --> g <| f a\n\n    (f >> g) <| a\n    --> g <| f <| a\n\n    a |> (g << f)\n    --> a |> g |> f\n\n\n### Numbers\n\n    n + 0\n    --> n\n\n    n - 0\n    --> n\n\n    0 - n\n    --> -n\n\n    n * 1\n    --> n\n\n    0 // n\n    --> 0\n\n    n // 0\n    --> 0\n\n    n // 1\n    --> n\n\n    n / 1\n    --> n\n\n    0 / n\n    --> 0\n\n    -(-n)\n    --> n\n\n    negate (negate n)\n    --> n\n\n    n - n\n    --> 0\n\n\n### Tuples\n\n    Tuple.pair a b\n    --> ( a, b )\n\n    Tuple.first ( a, b )\n    --> a\n\n    Tuple.first (Tuple.mapSecond changeFirst tuple)\n    --> Tuple.first tuple\n\n    Tuple.first (Tuple.mapFirst changeFirst tuple)\n    --> changeFirst (Tuple.first tuple)\n\n    Tuple.first (Tuple.mapBoth changeFirst changeSecond tuple)\n    --> changeFirst (Tuple.first tuple)\n\n    Tuple.second ( a, b )\n    --> b\n\n    Tuple.second (Tuple.mapFirst changeFirst tuple)\n    --> Tuple.second tuple\n\n    Tuple.second (Tuple.mapSecond changeSecond tuple)\n    --> changeSecond (Tuple.second tuple)\n\n    Tuple.second (Tuple.mapBoth changeFirst changeSecond tuple)\n    --> changeSecond (Tuple.second tuple)\n\n\n### Strings\n\n    \"a\" ++ \"\"\n    --> \"a\"\n\n    -- only when the end quotes of the left side and\n    -- the start quotes of the right side are on the same line\n    \"a\" ++ \"b\"\n    --> \"ab\"\n\n    String.fromList []\n    --> \"\"\n\n    String.fromList [ a ]\n    --> String.fromChar a\n\n    String.fromList (String.toList str)\n    --> str\n\n    String.toList (String.fromList list)\n    --> list\n\n    String.isEmpty \"\"\n    --> True\n\n    String.isEmpty \"a\"\n    --> False\n\n    -- same for String.reverse\n    String.isEmpty (String.map f str)\n    --> String.isEmpty str\n\n    String.isEmpty (String.fromList list)\n    --> List.isEmpty list\n\n    String.uncons \"\"\n    --> Nothing\n\n    String.concat []\n    --> \"\"\n\n    String.concat [ string ]\n    --> string\n\n    String.concat [ hello, \"\", world ]\n    --> String.concat [ hello, world ]\n\n    String.concat [ \"a\", String.concat [ b, c ], d ]\n    --> String.concat [ \"a\", b, c, d ]\n\n    String.concat (List.repeat n str)\n    --> String.repeat n str\n\n    String.concat (List.intersperse str strings)\n    --> String.join str strings\n\n    String.append \"\" str\n    --> str\n\n    String.append (String.fromList [ a, b ]) (String.fromList [ c, d ])\n    --> String.fromList [ a, b, c, d ]\n\n    String.join str []\n    --> \"\"\n\n    String.join \"\" list\n    --> String.concat list\n\n    String.length \"abc\"\n    --> 3\n\n    String.length str == 0\n    --> String.isEmpty str\n\n    String.length (String.reverse str)\n    --> String.length str\n\n    String.repeat n \"\"\n    --> \"\"\n\n    String.repeat 0 str\n    --> \"\"\n\n    String.repeat 1 str\n    --> str\n\n    String.replace x y \"\"\n    --> \"\"\n\n    String.replace x x z\n    --> z\n\n    String.replace \"x\" \"y\" \"z\"\n    --> \"z\" -- only when resulting string is unchanged\n\n    String.words \"\"\n    --> [ \"\" ]\n\n    String.lines \"\"\n    --> [ \"\" ]\n\n    String.toLower \"\"\n    --> \"\"\n\n    String.toLower (String.toLower str)\n    --> String.toLower str\n\n    String.toUpper \"\"\n    --> \"\"\n\n    String.toUpper (String.toUpper str)\n    --> String.toUpper str\n\n    String.reverse \"\"\n    --> \"\"\n\n    String.reverse (String.fromChar a)\n    --> String.fromChar a\n\n    String.reverse (String.reverse str)\n    --> str\n\n    String.trimLeft \"\"\n    --> \"\"\n\n    String.trimLeft (String.trimLeft str)\n    --> String.trimLeft str\n\n    String.trimLeft (String.trimRight str)\n    --> String.trim str\n\n    String.trimLeft (String.trim str)\n    --> String.trim str\n\n    String.trimRight \"\"\n    --> \"\"\n\n    String.trimRight (String.trimLeft str)\n    --> String.trim str\n\n    String.trimRight (String.trimRight str)\n    --> String.trimRight str\n\n    String.trimRight (String.trim str)\n    --> String.trim str\n\n    String.trim \"\"\n    --> \"\"\n\n    String.trim (String.trimLeft str)\n    --> String.trim str\n\n    String.trim (String.trimRight str)\n    --> String.trim str\n\n    String.trim (String.trim str)\n    --> String.trim str\n\n    String.slice n n str\n    --> \"\"\n\n    String.slice n 0 str\n    --> \"\"\n\n    String.slice a z \"\"\n    --> \"\"\n\n    String.left 0 str\n    --> \"\"\n\n    String.left -1 str\n    --> \"\"\n\n    String.left n \"\"\n    --> \"\"\n\n    String.left n (String.left n str)\n    --> String.left n str\n\n    String.right 0 str\n    --> \"\"\n\n    String.right -1 str\n    --> \"\"\n\n    String.right n \"\"\n    --> \"\"\n\n    String.right n (String.right n str)\n    --> String.right n str\n\n    -- The following simplifications for String.dropLeft also work for String.dropRight\n    String.dropLeft n \"\"\n    --> \"\"\n\n    String.dropLeft 0 str\n    --> str\n\n    String.dropLeft -1 str\n    --> str\n\n    String.dropLeft 10 \"Hello\"\n    --> \"\"\n\n    String.slice start end \"\"\n    --> \"\"\n\n    String.slice 2 1 str\n    --> \"\"\n\n    String.slice -1 -2 str\n    --> \"\"\n\n    String.filter f (String.filter f str)\n    --> String.filter f str\n\n    String.filter (always True) str\n    --> str\n\n    String.filter (always False) str\n    --> \"\"\n\n    String.filter f (String.reverse str)\n    --> String.reverse (String.filter f str)\n\n    String.map f \"\"\n    --> \"\"\n\n    String.map identity str\n    --> str\n\n    String.map f (String.repeat n (String.fromChar c))\n    --> String.repeat n (String.fromChar (f c))\n\n    String.any f \"\"\n    --> False\n\n    String.any (always False) str\n    -> False\n\n    String.any (always True) str\n    --> not (String.isEmpty str)\n\n    String.all f \"\"\n    --> True\n\n    String.all (always True) str\n    --> True\n\n    String.all (always False) str\n    --> String.isEmpty str\n\n    -- The following simplifications for String.foldl also work for String.foldr\n    String.foldl f initial \"\"\n    --> initial\n\n    String.foldl (\\_ soFar -> soFar) initial string\n    --> initial\n\n    String.fromInt 123\n    --> \"123\"\n\n    String.fromFloat 1.23\n    --> \"1.23\"\n\n\n### Maybes\n\n    Maybe.map identity x\n    --> x\n\n    Maybe.map f Nothing\n    --> Nothing\n\n    Maybe.map f (Just x)\n    --> Just (f x)\n\n    -- the following simplifications for map2 work for all Maybe.mapN\n    Maybe.map2 f firstMaybe Nothing\n    --> Nothing\n\n    Maybe.map2 f (Just a) (Just b)\n    --> Just (f a b)\n\n    Maybe.andThen f Nothing\n    --> Nothing\n\n    Maybe.andThen (always Nothing) x\n    --> Nothing\n\n    Maybe.andThen (\\a -> Just b) x\n    --> Maybe.map (\\a -> b) x\n\n    Maybe.andThen (\\a -> if condition a then Just b else Just c) x\n    --> Maybe.map (\\a -> if condition a then b else c) x\n\n    Maybe.andThen f (Just x)\n    --> f x\n\n    Maybe.withDefault x Nothing\n    --> x\n\n    Maybe.withDefault x (Just y)\n    --> y\n\n    Maybe.withDefault Nothing (Maybe.map f maybe)\n    --> Maybe.andThen f maybe\n\n\n### Results\n\n    Result.map identity x\n    --> x\n\n    Result.map f (Err x)\n    --> Err x\n\n    Result.map f (Ok x)\n    --> Ok (f x)\n\n    -- the following simplifications for map3 work for all Result.mapN\n    Result.map3 f (Ok a) (Ok b) (Ok c)\n    --> Ok (f a b c)\n\n    Result.map3 f (Ok a) (Err x) thirdResult\n    --> Err x\n\n    Result.map3 f firstResult (Err x) thirdResult\n    --> Result.map2 f firstResult (Err x)\n\n    Result.mapError identity x\n    --> x\n\n    Result.mapError f (Ok x)\n    --> Ok x\n\n    Result.mapError f (Err x)\n    --> Err (f x)\n\n    Result.andThen f (Err x)\n    --> Err x\n\n    Result.andThen f (Ok x)\n    --> f x\n\n    Result.andThen (\\a -> Ok b) x\n    --> Result.map (\\a -> b) x\n\n    Result.withDefault x (Err y)\n    --> x\n\n    Result.withDefault x (Ok y)\n    --> y\n\n    Result.fromMaybe x (Just a)\n    --> Ok a\n\n    Result.fromMaybe x Nothing\n    --> Err x\n\n    Result.toMaybe (Ok x)\n    --> Just x\n\n    Result.toMaybe (Err e)\n    --> Nothing\n\n    Result.toMaybe (Result.mapError f result)\n    --> Result.toMaybe result\n\n\n### Lists\n\n    a :: []\n    --> [ a ]\n\n    a :: [ b ]\n    --> [ a, b ]\n\n    [ a ] ++ list\n    --> a :: list\n\n    [] ++ list\n    --> list\n\n    [ a, b ] ++ [ c ]\n    --> [ a, b, c ]\n\n    List.append [] ys\n    --> ys\n\n    List.append [ a, b ] [ c ]\n    --> [ a, b, c ]\n\n    List.head []\n    --> Nothing\n\n    List.head [ a, b, c ]\n    --> Just a\n\n    List.head (a :: bToZ)\n    --> Just a\n\n    List.head (List.intersperse sep list)\n    --> List.head list\n\n    List.head (List.map f list)\n    --> Maybe.map f (List.head list)\n\n    List.head (List.repeat n a)\n    --> if n >= 1 then Just a else Nothing\n\n    List.tail []\n    --> Nothing\n\n    List.tail (a :: bToZ)\n    --> Just bToZ\n\n    List.member a []\n    --> False\n\n    List.member a [ a, b, c ]\n    --> True\n\n    List.member a ([a, b] ++ list)\n    --> True\n\n    List.member a [ b ]\n    --> a == b\n\n    List.member -999 [ 0, 1 ]\n    --> False\n\n    List.member needle (List.repeat n b)\n    --> n >= 1 && needle == b\n\n    List.map f [] -- same for most List functions like List.filter, List.filterMap, ...\n    --> []\n\n    List.map identity list\n    --> list\n\n    List.map f [ a ]\n    --> [ f a ]\n\n    List.map f (List.repeat n a)\n    --> List.repeat n (f a)\n\n    List.map Tuple.first (Array.toIndexedList array)\n    --> List.range 0 (Array.length array - 1)\n\n    List.filter f (List.filter f list)\n    --> List.filter f list\n\n    List.filter (always True) list\n    --> list\n\n    List.filter (always False) list\n    --> []\n\n    -- same for List.sort, List.sortBy, List.sortWith\n    List.filter f (List.reverse list)\n    --> List.reverse (List.filter f list)\n\n    List.filterMap Just list\n    --> list\n\n    List.filterMap (\\a -> if condition a then Just b else Just c) list\n    --> List.map (\\a -> if condition a then b else c) list\n\n    List.filterMap (always Nothing) list\n    --> []\n\n    List.filterMap identity (List.map f list)\n    --> List.filterMap f list\n\n    List.filterMap identity [ Just x, Just y ]\n    --> [ x, y ]\n\n    List.filterMap identity [ a, Nothing, b ]\n    --> List.filterMap identity [ a, b ]\n\n    List.concat [ [ a, b ], [ c ] ]\n    --> [ a, b, c ]\n\n    List.concat [ a, [ 1 ], [ 2 ] ]\n    --> List.concat [ a, [ 1, 2 ] ]\n\n    List.concat [ a, [], b ]\n    --> List.concat [ a, b ]\n\n    List.concat [ a, List.concat [ b, c ], d ]\n    --> List.concat [ a, b, c, d ]\n\n    List.concatMap identity list\n    --> List.concat list\n\n    List.concatMap (\\a -> [ b ]) list\n    --> List.map (\\a -> b) list\n\n    List.concatMap f [ x ]\n    --> f x\n\n    List.concatMap (always []) list\n    --> []\n\n    List.concat (List.map f list)\n    --> List.concatMap f list\n\n    List.indexedMap (\\_ value -> f value) list\n    --> List.map (\\value -> f value) list\n\n    List.intersperse a []\n    --> []\n\n    List.intersperse s [ a ]\n    --> [ a ]\n\n    List.isEmpty []\n    --> True\n\n    List.isEmpty [ a ]\n    --> False\n\n    List.isEmpty (x :: xs)\n    --> False\n\n    -- same for List.sort, List.sortBy, List.sortWith, List.map, List.indexedMap\n    List.isEmpty (List.reverse list)\n    --> List.isEmpty list\n\n    List.isEmpty (List.filter f list)\n    --> not (List.any f list)\n\n    List.isEmpty (List.filter (not << f) list)\n    --> List.all f list\n\n    List.isEmpty (String.toList string)\n    --> String.isEmpty string\n\n    List.sum []\n    --> 0\n\n    List.sum [ a ]\n    --> a\n\n    List.sum [ a, 0, b ]\n    --> List.sum [ a, b ]\n\n    -- when `expectNaN` is enabled\n    List.sum [ a, 0 / 0, b ]\n    --> 0 / 0\n\n    List.product []\n    --> 1\n\n    List.product [ a ]\n    --> a\n\n    List.product [ a, 1, b ]\n    --> List.product [ a, b ]\n\n    -- when `expectNaN` is not enabled\n    List.product [ a, 0, b ]\n    --> 0\n\n    -- when `expectNaN` is enabled\n    List.product [ a, 0 / 0, b ]\n    --> 0 / 0\n\n    List.minimum []\n    --> Nothing\n\n    List.minimum [ a ]\n    --> Just a\n\n    List.minimum (List.range 2 3)\n    --> Just 2\n\n    -- when expectNaN is not enabled, same for List.sort, List.sortBy, List.sortWith\n    List.minimum (List.reverse list)\n    --> List.minimum list\n\n    List.maximum []\n    --> Nothing\n\n    List.maximum [ a ]\n    --> Just a\n\n    List.maximum (List.range 2 3)\n    --> Just 3\n\n    -- when expectNaN is not enabled, same for List.sort, List.sortBy, List.sortWith\n    List.maximum (List.reverse list)\n    --> List.maximum list\n\n    List.foldr (++) \"\" list\n    --> String.concat list\n\n    List.foldr (++) [] list\n    --> List.concat list\n\n    List.foldr (::) [] list\n    --> list\n\n    List.foldl (::) [] list\n    --> List.reverse list\n\n    -- The following simplifications for List.foldl also work for List.foldr\n    List.foldl f x []\n    --> x\n\n    List.foldl (\\_ soFar -> soFar) x list\n    --> x\n\n    List.foldl (+) 0 list\n    --> List.sum list\n\n    List.foldl (+) initial list\n    --> initial + List.sum list\n\n    List.foldl (*) 1 list\n    --> List.product list\n\n    List.foldl (*) 0 list\n    --> 0\n\n    List.foldl (*) initial list\n    --> initial * List.product list\n\n    List.foldl (&&) True list\n    --> List.all identity list\n\n    List.foldl (&&) False list\n    --> False\n\n    List.foldl (||) False list\n    --> List.any identity list\n\n    List.foldl (||) True list\n    --> True\n\n    List.foldl f initial (List.reverse list)\n    --> List.foldr f initial list\n\n    List.foldl (\\( k, v ) -> f k v) init (Dict.toList dict)\n    --> Dict.foldl (\\k v -> f k v) init dict\n\n    Array.foldl f x (Array.fromList list)\n    --> List.foldl f x array\n\n    -- when `expectNaN` is not enabled\n    Set.member x (Set.fromList list)\n    --> List.member x list\n\n    List.all f []\n    --> True\n\n    List.all (always True) list\n    --> True\n\n    List.all (always False) list\n    --> List.isEmpty list\n\n    List.all identity [ a, False, b ]\n    --> False\n\n    List.all not [ a, True, b ]\n    --> False\n\n    List.all identity [ a, True, b ]\n    --> List.all identity [ a, b ]\n\n    List.all not [ a, False, b ]\n    --> List.all not [ a, b ]\n\n    List.all f (List.repeat n a)\n    --> n <= 0 || f a\n\n    List.all identity (List.map f list)\n    --> List.all f list\n\n    not (List.all (not << f) list)\n    --> List.any f list\n\n    List.any f []\n    --> False\n\n    List.any (always False) list\n    --> False\n\n    List.any (always True) list\n    --> not (List.isEmpty list)\n\n    List.any identity [ a, True, b ]\n    --> True\n\n    List.any not [ a, False, b ]\n    --> True\n\n    List.any identity [ a, False, b ]\n    --> List.any identity [ a, b ]\n\n    List.any not [ a, True, b ]\n    --> List.any not [ a, b ]\n\n    List.any ((==) x) list\n    --> List.member x list\n\n    List.any f (List.repeat n a)\n    --> n >= 1 && f a\n\n    List.any identity (List.map f list)\n    --> List.any f list\n\n    not (List.any (not << f) list)\n    --> List.all f list\n\n    List.range 6 3\n    --> []\n\n    List.range n n\n    --> [ n ]\n\n    List.length [ a, b, c ]\n    --> 3\n\n    -- same for List.sort, List.sortBy, List.sortWith, List.map, List.indexedMap\n    List.length (List.reverse list)\n    --> List.length list\n\n    List.repeat 0 x\n    --> []\n\n    List.repeat 1 x\n    --> List.singleton x\n\n    List.partition f []\n    --> ( [], [] )\n\n    List.partition (always True) list\n    --> ( list, [] )\n\n    List.partition (always False) list\n    --> ( [], list )\n\n    Tuple.first (List.partition f list)\n    --> List.filter f list\n\n    List.take 0 list\n    --> []\n\n    List.take n (List.take n list)\n    --> List.take n list\n\n    List.take n (List.map f list)\n    --> List.map f (List.take n list)\n\n    List.take n (List.indexedMap f list)\n    --> List.indexedMap f (List.take n list)\n\n    List.drop 0 list\n    --> list\n\n    List.drop 3 [ a, b ]\n    --> []\n\n    List.drop 2 [ a, b, c ]\n    --> [ c ]\n\n    List.drop n (List.map f list)\n    --> List.map f (List.drop n list)\n\n    List.reverse []\n    --> []\n\n    List.reverse [ a ]\n    --> [ a ]\n\n    List.reverse (List.repeat n a)\n    --> List.repeat n a\n\n    List.reverse (List.reverse list)\n    --> list\n\n    List.sort (List.sort list)\n    --> List.sort list\n\n    List.sort (List.repeat n a)\n    --> List.repeat n a\n\n    List.sort (Set.toList set)\n    --> Set.toList set\n\n    List.sort (Dict.toList dict)\n    --> Dict.toList dict\n\n    List.sortBy (always a) list\n    --> list\n\n    List.sortBy identity list\n    --> List.sort list\n\n    List.sortBy f (List.repeat n a)\n    --> List.repeat n a\n\n    List.sortBy f (List.sortBy f list)\n    --> List.sortBy f list\n\n    List.sortWith (\\_ _ -> LT) list\n    --> List.reverse list\n\n    List.sortWith (\\_ _ -> EQ) list\n    --> list\n\n    List.sortWith (\\_ _ -> GT) list\n    --> list\n\n    List.sortWith f (List.repeat n a)\n    --> List.repeat n a\n\n    -- The following simplifications for List.sort also work for List.sortBy f and List.sortWith f\n    List.sort []\n    --> []\n\n    List.sort [ a ]\n    --> [ a ]\n\n    -- same for up to List.map5 when any list is empty\n    List.map2 f xs []\n    --> []\n\n    List.map2 f [] ys\n    --> []\n\n    List.unzip []\n    --> ( [], [] )\n\n    List.length l == 0\n    --> List.isEmpty l\n\n    List.length l /= 0\n    --> not (List.isEmpty l)\n\n\n### Arrays\n\n    Array.fromList []\n    --> Array.empty\n\n    Array.fromList (Array.toList array)\n    --> array\n\n    Array.fromList (List.repeat n a)\n    --> Array.repeat n a\n\n    Array.fromList (List.range 0 n)\n    --> Array.initialize (n + 1) identity\n\n    Array.fromList (List.map f (List.range 0 n))\n    --> Array.initialize (n + 1) f\n\n    Array.toList (Array.fromList list)\n    --> list\n\n    Array.toList Array.empty\n    --> []\n\n    Array.toList (Array.repeat n a)\n    --> List.repeat n a\n\n    Array.map f Array.empty -- same for Array.filter, Array.indexedMap, ...\n    --> Array.empty\n\n    Array.map identity array\n    --> array\n\n    Array.map f (Array.repeat n a)\n    --> Array.repeat n (f a)\n\n    Array.map f (Array.initialize n identity)\n    --> Array.initialize n f\n\n    Array.indexedMap (\\_ value -> f value) array\n    --> Array.map (\\value -> f value) array\n\n    Array.isEmpty Array.empty\n    --> True\n\n    -- same for Array.indexedMap\n    Array.isEmpty (Array.map f array)\n    --> Array.isEmpty array\n\n    Array.repeat 0 x\n    --> Array.empty\n\n    Array.initialize 0 f\n    --> Array.empty\n\n    Array.initialize n (always a)\n    --> Array.repeat n a\n\n    Array.length Array.empty\n    --> 0\n\n    Array.length (Array.fromList [ a, b, c ])\n    --> 3\n\n    Array.length (Array.repeat 3 x)\n    --> 3\n\n    Array.length (Array.initialize 3 f)\n    --> 3\n\n    Array.length (Array.repeat n x)\n    --> max 0 n\n\n    Array.length (Array.initialize n f)\n    --> max 0 n\n\n    -- same for Array.indexedMap\n    Array.length (Array.map f array)\n    --> Array.length array\n\n    Array.filter f (Array.filter f array)\n    --> Array.filter f array\n\n    Array.filter (\\_ -> True) array\n    --> array\n\n    Array.filter (\\_ -> False) array\n    --> Array.empty\n\n    Array.append Array.empty array\n    --> array\n\n    Array.append (Array.fromList [ a, b ]) (Array.fromList [ c, d ])\n    --> Array.fromList [ a, b, c, d ]\n\n    Array.slice n n array\n    --> Array.empty\n\n    Array.slice n 0 array\n    --> Array.empty\n\n    Array.slice a z Array.empty\n    --> Array.empty\n\n    Array.slice 2 1 array\n    --> Array.empty\n\n    Array.slice -1 -2 array\n    --> Array.empty\n\n    Array.slice start end (Array.map f array)\n    --> Array.map f (Array.slice start end array)\n\n    Array.slice 0 end (Array.indexedMap f array)\n    --> Array.indexedMap f (Array.slice 0 end array)\n\n    Array.get n Array.empty\n    --> Nothing\n\n    Array.get 1 (Array.fromList [ a, b, c ])\n    --> Just b\n\n    Array.get 100 (Array.fromList [ a, b, c ])\n    --> Nothing\n\n    Array.get -1 array\n    --> Nothing\n\n    Array.get 2 (Array.repeat 10 x)\n    --> Just x\n\n    Array.get 100 (Array.repeat 10 x)\n    --> Nothing\n\n    Array.get 2 (Array.initialize 10 f)\n    --> Just (f 2)\n\n    Array.get 100 (Array.initialize 10 f)\n    --> Nothing\n\n    Array.get i (Array.map f array)\n    --> Maybe.map f (Array.get i array)\n\n    Array.set n x Array.empty\n    --> Array.empty\n\n    Array.set i v1 (Array.set i v0 array)\n    --> Array.set i v1 array\n\n    Array.set -1 x array\n    --> array\n\n    Array.set 1 x (Array.fromList [ a, b, c ])\n    --> Array.fromList [ a, x, c ]\n\n    Array.set 100 x (Array.fromList [ a, b, c ])\n    --> Array.fromList [ a, b, c ]\n\n    -- The following simplifications for Array.foldl also work for Array.foldr\n    Array.foldl f initial Array.empty\n    --> initial\n\n    Array.foldl (\\_ soFar -> soFar) initial array\n    --> initial\n\n    List.foldl f x (Array.toList array)\n    --> Array.foldl f x array\n\n    Array.toIndexedList Array.empty\n    --> []\n\n    List.map Tuple.second (Array.toIndexedList array)\n    --> Array.toList array\n\n    Array.length (Array.fromList list)\n    --> List.length list\n\n    -- The following simplification also works for Array.toIndexedList\n    List.length (Array.toList array)\n    --> Array.length array\n\n    -- The following simplification also works for Array.toIndexedList\n    List.isEmpty (Array.toList array)\n    --> Array.isEmpty array\n\n    Array.length a == 0\n    --> Array.isEmpty a\n\n    Array.length a /= 0\n    --> not (Array.isEmpty a)\n\n\n### Sets\n\n    Set.fromList []\n    --> Set.empty\n\n    Set.fromList [ a ]\n    --> Set.singleton a\n\n    Set.fromList (Set.toList set)\n    --> set\n\n    Set.fromList [ a, a ]\n    --> Set.fromList [ a ]\n\n    -- when expectNaN is not enabled, same for List.sort, List.sortBy, List.sortWith\n    Set.fromList (List.reverse list)\n    --> Set.fromList list\n\n    -- when expectNaN is not enabled\n    Set.fromList (List.repeat n a)\n    --> if n >= 1 then Set.singleton a else Set.empty\n\n    Set.map f Set.empty -- same for Set.filter, Set.remove...\n    --> Set.empty\n\n    Set.map identity set\n    --> set\n\n    Set.isEmpty Set.empty\n    --> True\n\n    Set.isEmpty (Set.fromList ([a] ++ list))\n    --> False\n\n    Set.isEmpty (Set.map f set)\n    --> Set.isEmpty set\n\n    Set.member x Set.empty\n    --> False\n\n    Set.member x (Set.singleton y)\n    --> x == y\n\n    Set.member x (Set.fromList [ y, x ])\n    --> True\n\n    Set.member -999 (Set.fromList [ 0, 1 ])\n    --> False\n\n    Set.toList Set.empty\n    --> []\n\n    Set.size Set.empty\n    --> 0\n\n    Set.intersect Set.empty set\n    --> Set.empty\n\n    Set.intersect set set\n    --> set\n\n    Set.intersect (Set.intersect set0 set1) set0\n    --> Set.intersect set0 set1\n\n    Set.diff Set.empty set\n    --> Set.empty\n\n    Set.diff set Set.empty\n    --> set\n\n    Set.union set Set.empty\n    --> set\n\n    Set.union set set\n    --> set\n\n    Set.union (Set.union set0 set1) set0\n    --> Set.union set0 set1\n\n    Set.union (Set.singleton a) set\n    --> Set.insert a set\n\n    Set.union set (Set.singleton a)\n    --> Set.insert a set\n\n    Set.union (Set.fromList [ a, b ]) (Set.fromList [ c, d ])\n    --> Set.fromList [ a, b, c, d ]\n\n    Set.insert x Set.empty\n    --> Set.singleton x\n\n    Set.insert k (Set.insert k set)\n    --> Set.insert k set\n\n    Set.remove k (Set.remove k set)\n    --> Set.remove k set\n\n    -- same for foldr\n    List.foldl f x (Set.toList set)\n    --> Set.foldl f x set\n\n    List.member x (Set.toList set)\n    --> Set.member x set\n\n    Set.filter f (Set.filter f set)\n    --> Set.filter f set\n\n    Set.filter (\\_ -> True) set\n    --> set\n\n    Set.filter (\\_ -> False) set\n    --> Set.empty\n\n    -- when `expectNaN` is not enabled\n    Set.filter (\\k -> k /= specificKey) set\n    --> Set.remove specificKey set\n\n    Set.partition f Set.empty\n    --> ( Set.empty, Set.empty )\n\n    Set.partition (always True) set\n    --> ( set, Set.empty )\n\n    Tuple.first (Set.partition f set)\n    --> Set.filter f set\n\n    Set.foldr (::) [] set\n    --> Set.toList set\n\n    -- The following simplifications for Set.foldl also work for Set.foldr\n    Set.foldl f initial Set.empty\n    --> initial\n\n    Set.foldl (\\_ soFar -> soFar) initial set\n    --> initial\n\n    -- when `expectNaN` is not enabled\n    Set.foldl Set.insert Set.empty set\n    --> set\n\n    List.length (Set.toList set)\n    --> Set.size set\n\n    List.isEmpty (Set.toList set)\n    --> Set.isEmpty set\n\n    Set.size set == 0\n    --> Set.isEmpty set\n\n    Set.size set /= 0\n    --> not (Set.isEmpty set)\n\n\n### Dict\n\n    Dict.fromList []\n    --> Dict.empty\n\n    Dict.fromList (Dict.toList dict)\n    --> dict\n\n    Dict.fromList [ a, a ]\n    --> Dict.fromList [ a ]\n\n    Dict.fromList [ ( key, a ), ( key, b ) ]\n    --> Dict.fromList [ ( key, b ) ]\n\n    -- when expectNaN is not enabled\n    Dict.fromList (List.repeat n a)\n    --> if n >= 1 then Dict.fromList [ a ] else Dict.empty\n\n    Dict.isEmpty Dict.empty\n    --> True\n\n    Dict.isEmpty (Dict.map f dict)\n    --> Dict.isEmpty dict\n\n    Dict.toList Dict.empty\n    --> []\n\n    Dict.size Dict.empty\n    --> 0\n\n    Dict.size (Dict.map f dict)\n    --> Dict.size dict\n\n    Dict.member x Dict.empty\n    --> False\n\n    Dict.member x (Dict.fromList [ ( y, v0 ), ( x, v1 ) ])\n    --> True\n\n    Dict.member -999 (Dict.fromList [ ( 0, v0 ), ( 1, v1 ) ])\n    --> False\n\n    -- when `expectNaN` is not enabled\n    Dict.member x (Dict.fromList list)\n    --> List.any (Tuple.first >> (==) x) list\n\n    Dict.insert k v1 (Dict.insert k v0 dict)\n    --> Dict.insert k v1 dict\n\n    Dict.remove k Dict.empty\n    --> Dict.empty\n\n    Dict.remove k (Dict.remove k dict)\n    --> Dict.remove k dict\n\n    Dict.remove k (Dict.map f dict)\n    --> Dict.map f (Dict.remove k dict)\n\n    Dict.update k identity dict\n    --> dict\n\n    Dict.update k (\\_ -> Nothing) dict\n    --> Dict.remove k dict\n\n    Dict.update k (\\_ -> Just v) dict\n    --> Dict.insert k v dict\n\n    Dict.filter f Dict.empty\n    --> Dict.empty\n\n    Dict.filter f (Dict.filter f dict)\n    --> Dict.filter f dict\n\n    Dict.filter (\\_ _ -> True) dict\n    --> dict\n\n    Dict.filter (\\_ _ -> False) dict\n    --> Dict.empty\n\n    Dict.filter (\\k _ -> f k) (Dict.map g dict)\n    --> Dict.map g (Dict.filter (\\k _ -> f k) dict)\n\n    -- when `expectNaN` is not enabled\n    Dict.filter (\\k _ -> k /= specificKey) dict\n    --> Dict.remove specificKey dict\n\n    Dict.map f Dict.empty\n    --> Dict.empty\n\n    Dict.map (\\_ value -> value) dict\n    --> dict\n\n    Dict.intersect Dict.empty dict\n    --> Dict.empty\n\n    Dict.intersect dict dict\n    --> dict\n\n    Dict.intersect (Dict.intersect dict0 dict1) dict0\n    --> Dict.intersect dict0 dict1\n\n    Dict.diff Dict.empty dict\n    --> Dict.empty\n\n    Dict.diff dict Dict.empty\n    --> dict\n\n    Dict.diff dict (Dict.map f remove)\n    --> Dict.diff dict remove\n\n    Dict.diff (Dict.map f dict) remove\n    --> Dict.map f (Dict.diff dict remove)\n\n    Dict.union dict Dict.empty\n    --> dict\n\n    Dict.union dict dict\n    --> dict\n\n    Dict.union (Dict.union dict0 dict1) dict0\n    --> Dict.union dict0 dict1\n\n    Dict.union (Dict.singleton k v) dict\n    --> Dict.insert k v dict\n\n    Dict.union (Dict.fromList [ a, b ]) (Dict.fromList [ c, d ])\n    --> Dict.fromList [ c, d, a, b ]\n\n    Dict.partition f Dict.empty\n    --> ( Dict.empty, Dict.empty )\n\n    Dict.partition (\\_ _ -> True) dict\n    --> ( dict, Dict.empty )\n\n    Dict.partition (\\_ _ -> False) dict\n    --> ( Dict.empty, dict )\n\n    Tuple.first (Dict.partition f dict)\n    --> Dict.filter f dict\n\n    List.map Tuple.first (Dict.toList dict)\n    --> Dict.keys dict\n\n    List.map Tuple.second (Dict.toList dict)\n    --> Dict.values dict\n\n    Dict.foldr (\\k _ ks -> k :: ks) [] dict\n    --> Dict.keys dict\n\n    Dict.foldr (\\_ v vs -> v :: vs) [] dict\n    --> Dict.values dict\n\n    Dict.foldr (\\k v kvs -> ( k, v ) :: kvs) [] dict\n    --> Dict.toList dict\n\n    -- The following foldl simplifications also work for foldr\n    Dict.foldl f initial Dict.empty\n    --> initial\n\n    Dict.foldl (\\_ soFar -> soFar) initial dict\n    --> initial\n\n    -- when `expectNaN` is not enabled\n    Dict.foldl Dict.insert Dict.empty dict\n    --> dict\n\n    List.foldl (\\v s -> f v s) init (Dict.values dict)\n    --> Dict.foldl (\\_ v s -> f v s) init dict\n\n    List.foldl (\\k s -> f k s) init (Dict.keys dict)\n    --> Dict.foldl (\\k _ s -> f k s) init dict\n\n    -- The following simplification also works for Dict.keys, Dict.values\n    List.length (Dict.toList dict)\n    --> Dict.size dict\n\n    -- The following simplification also works for Dict.keys, Dict.values\n    List.isEmpty (Dict.toList dict)\n    --> Dict.isEmpty dict\n\n    Dict.size dict == 0\n    --> Dict.isEmpty dict\n\n    Dict.size dict /= 0\n    --> not (Dict.isEmpty dict)\n\n\n### Cmd / Sub\n\nAll of these also apply for `Sub`.\n\n    Cmd.batch []\n    --> Cmd.none\n\n    Cmd.batch [ a ]\n    --> a\n\n    Cmd.batch [ a, Cmd.none, b ]\n    --> Cmd.batch [ a, b ]\n\n    Cmd.batch [ a, Cmd.batch [ b, c ], d ]\n    --> Cmd.batch [ a, b, c, d ]\n\n    Cmd.map identity cmd\n    --> cmd\n\n    Cmd.map f Cmd.none\n    --> Cmd.none\n\n\n### Task\n\n    Task.map identity task\n    --> task\n\n    Task.map f (Task.fail x)\n    --> Task.fail x\n\n    Task.map f (Task.succeed a)\n    --> Task.succeed (f a)\n\n    -- the following simplifications for map3 work for all Task.mapN\n    Task.map3 f (Task.succeed a) (Task.succeed b) (Task.succeed c)\n    --> Task.succeed (f a b c)\n\n    Task.map3 f (Task.succeed a) (Task.fail x) thirdTask\n    --> Task.fail x\n\n    Task.map3 f firstTask (Task.fail x) thirdTask\n    --> Task.map2 f firstTask (Task.fail x)\n\n    Task.andThen f (Task.fail x)\n    --> Task.fail x\n\n    Task.andThen f (Task.succeed a)\n    --> f a\n\n    Task.andThen Task.succeed task\n    --> task\n\n    Task.andThen (\\a -> Task.succeed b) task\n    --> Task.map (\\a -> b) task\n\n    Task.mapError identity task\n    --> task\n\n    Task.mapError f (Task.succeed a)\n    --> Task.succeed a\n\n    Task.mapError f (Task.fail x)\n    --> Task.fail (f x)\n\n    Task.onError f (Task.succeed a)\n    --> Task.succeed a\n\n    Task.onError f (Task.fail x)\n    --> f x\n\n    Task.onError Task.fail task\n    --> task\n\n    Task.onError (\\x -> Task.fail y) task\n    --> Task.mapError (\\x -> y) x\n\n    Task.sequence [ Task.succeed a, Task.succeed b ]\n    --> Task.succeed [ a, b ]\n\n    Task.sequence [ Task.succeed a, Task.fail x ]\n    --> Task.fail x\n\n    Task.sequence [ a, Task.fail x, b ]\n    --> Task.sequence [ a, Task.fail x ]\n\n    Task.sequence [ task ]\n    --> Task.map List.singleton task\n\n    Task.attempt identity (Task.map f task)\n    --> Task.attempt f task\n\n    Task.perform identity (Task.map f task)\n    --> Task.perform f task\n\n    Cmd.map f (Task.perform identity task)\n    --> Task.perform f task\n\n    Cmd.map f (Task.attempt identity task)\n    --> Task.attempt f task\n\n\n### Html.Attributes\n\n    Html.Attributes.classList [ x, y, ( z, False ) ]\n    --> Html.Attributes.classList [ x, y ]\n\n    Html.Attributes.classList [ ( onlyOneThing, True ) ]\n    --> Html.Attributes.class onlyOneThing\n\n\n### Json.Encode\n\n    Json.Encode.list f (Array.toList array)\n    --> Json.Encode.array f array\n\n    Json.Encode.array identity (Array.map f array)\n    --> Json.Encode.array f array\n\n    Json.Encode.array f (Array.fromList list)\n    --> Json.Encode.list f list\n\n    Json.Encode.list identity (List.map f list)\n    --> Json.Encode.list f list\n\n    Json.Encode.list f (Set.toList set)\n    --> Json.Encode.set f set\n\n    Json.Encode.set identity (Set.map f set)\n    --> Json.Encode.set f set\n\n\n### Json.Decode\n\n    Json.Decode.map identity decoder\n    --> decoder\n\n    Json.Decode.map f (Json.Decode.fail x)\n    --> Json.Decode.fail x\n\n    Json.Decode.map f (Json.Decode.succeed a)\n    --> Json.Decode.succeed (f a)\n\n    -- the following simplifications for map3 work for all Json.Decode.mapN\n    Json.Decode.map3 f (Json.Decode.succeed a) (Json.Decode.succeed b) (Json.Decode.succeed c)\n    --> Json.Decode.succeed (f a b c)\n\n    Json.Decode.map3 f (Json.Decode.succeed a) (Json.Decode.fail x) thirdDecoder\n    --> Json.Decode.fail x\n\n    Json.Decode.map3 f firstDecoder (Json.Decode.fail x) thirdDecoder\n    --> Json.Decode.map2 f firstDecoder (Json.Decode.fail x)\n\n    Json.Decode.andThen f (Json.Decode.fail x)\n    --> Json.Decode.fail x\n\n    Json.Decode.andThen f (Json.Decode.succeed a)\n    --> f a\n\n    Json.Decode.andThen Json.Decode.succeed decoder\n    --> decoder\n\n    Json.Decode.andThen (\\a -> Json.Decode.succeed b) decoder\n    --> Json.Decode.map (\\a -> b) decoder\n\n    Json.Decode.oneOf [ a ]\n    --> a\n\n\n### Parser\n\n    Parser.oneOf [ a ]\n    --> a\n\n\n### Random\n\n    Random.uniform a []\n    --> Random.constant a\n\n    Random.weighted ( weight, a ) []\n    --> Random.constant a\n\n    Random.weighted tuple []\n    --> Random.constant (Tuple.first tuple)\n\n    Random.list 0 generator\n    --> Random.constant []\n\n    Random.list 1 generator\n    --> Random.map List.singleton generator\n\n    Random.list n (Random.constant el)\n    --> Random.constant (List.repeat n el)\n\n    Random.map identity generator\n    --> generator\n\n    Random.map (always a) generator\n    --> Random.constant a\n\n    Random.map f (Random.constant x)\n    --> Random.constant (f x)\n\n    Random.andThen f (Random.constant x)\n    --> f x\n\n    Random.andThen Random.constant generator\n    --> generator\n\n    Random.andThen (\\a -> Random.constant b) generator\n    --> Random.map (\\a -> b) generator\n\n    Random.andThen (always thenGenerator) generator\n    --> thenGenerator\n\n\n### Test\n\n    Test.concat [ test ]\n    --> test\n\n    Test.concat [ test0, Test.concat [ test1, test2 ], test3 ]\n    --> Test.concat [ test0, test1, test2, test3 ]\n\n","unions":[{"name":"Configuration","comment":" Configuration for this rule. Create a new one with [`defaults`](#defaults) and use [`ignoreCaseOfForTypes`](#ignoreCaseOfForTypes) and [`expectNaN`](#expectNaN) to alter it.\n","args":[],"cases":[]}],"aliases":[],"values":[{"name":"defaults","comment":" Default configuration for this rule.\n\nThe rule aims tries to improve the code through simplifications that don't impact the behavior. An exception to this are\nwhen the presence of `NaN` values\n\nUse [`expectNaN`](#expectNaN) if you want to opt out of changes that can impact the behaviour of your code if you expect to work with `NaN` values.\n\nUse [`ignoreCaseOfForTypes`](#ignoreCaseOfForTypes) if you want to prevent simplifying case expressions that work on custom types defined in dependencies.\n\n    config =\n        [ Simplify.rule Simplify.defaults\n        ]\n\n    -- or\n    config =\n        [ Simplify.defaults\n            |> Simplify.expectNaN\n            |> Simplify.ignoreCaseOfForTypes [ \"Module.Name.Type\" ]\n            |> Simplify.rule\n        ]\n\n","type":"Simplify.Configuration"},{"name":"expectNaN","comment":" Usually, `elm-review-simplify` will only suggest simplifications that are safe to apply without risk of changing the original behavior.\nHowever, when encountering [`NaN`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN)\nvalues, some simplifications can actually impact behavior.\n\nFor instance, the following expression will evaluate to `True`:\n\n    x == x\n    --> True\n\nHowever, if `x` is `NaN` or a value containing `NaN` then the expression will evaluate to `False`:\n\n    -- given x = NaN\n    x == x\n    --> False\n\n    -- given x = { a = ( NaN, 0 ) }\n    x == x\n    --> False\n\nGiven the potential presence of `NaN`, some simplifications become unsafe to apply:\n\n  - `x == x` to `True`\n  - `List.member x [ x ]` to `True`\n  - `n * 0` to `0`\n\nThis special value is hard to recreate in Elm code both intentionally and unintentionally,\nand it's therefore unlikely to be found in your application,\nwhich is why the rule applies these simplifications by defaults.\n\nIf you somehow expect to create and encounter `NaN` values in your codebase, then you can use this function to disable these simplifications altogether.\n\n    config =\n        [ Simplify.defaults\n            |> Simplify.expectNaN\n            |> Simplify.rule\n        ]\n\n","type":"Simplify.Configuration -> Simplify.Configuration"},{"name":"ignoreCaseOfForTypes","comment":" Ignore some reports about types from dependencies used in case expressions.\n\nThis rule simplifies the following construct:\n\n    module Module.Name exposing (..)\n\n    case value of\n        Just _ -> x\n        Nothing -> x\n    --> x\n\n(Since `v2.0.19`) it will not try to simplify the case expression when some of the patterns references custom types constructors\ndefined in the project. It will only do so for custom types that are defined in dependencies (including `elm/core`).\n\nIf you do happen to want to disable this simplification for a type `Module.Name.Type`, you can configure the rule like this:\n\n    config =\n        [ Simplify.defaults\n            |> Simplify.ignoreCaseOfForTypes [ \"Module.Name.Type\" ]\n            |> Simplify.rule\n        ]\n\nI personally don't recommend to use this function too much, because this could be a sign of premature abstraction, and because\nI think that often [You Aren't Gonna Need this code](https://jfmengels.net/safe-dead-code-removal/#yagni-you-arent-gonna-need-it).\n\nPlease let me know by opening an issue if you do use this function, I am very curious to know;\n\n","type":"List.List String.String -> Simplify.Configuration -> Simplify.Configuration"},{"name":"rule","comment":" Rule to simplify Elm code.\n","type":"Simplify.Configuration -> Review.Rule.Rule"}],"binops":[]}]