[{"name":"Upgrade","comment":" Reports when an outdated function/type can be replaced.\n\n🔧 Running with `--fix` will automatically remove all the reported errors.\n\n    config =\n        [ Upgrade.rule\n            [ Upgrade.reference { old = ( \"MyUtil\", \"findMap\" ), new = ( \"List.Extra\", \"findMap\" ) }\n            , Upgrade.application\n                { oldName = ( \"Array.Extra\", \"apply\" )\n                , oldArgumentNames = [ \"functions\", \"arguments\" ]\n                , oldArgumentsToNew =\n                    \\oldArguments ->\n                        case oldArguments of\n                            [ functions, arguments ] ->\n                                Upgrade.call ( \"Array.Extra\", \"andMap\" )\n                                    [ arguments, functions ]\n                                    |> Just\n\n                            _ ->\n                                Nothing\n                }\n            ]\n        ]\n\n@docs rule, Upgrade, batch\n\n\n## function/value\n\n@docs reference, application, call, pipeInto, ReplacementPipeline\n\n\n## type\n\n@docs typeReference, type_\n\n\n## safe internals\n\n@docs UpgradeSingle\n\n","unions":[{"name":"UpgradeSingle","comment":" An upgrade for a single function/value/type. A bunch of them are one [`Upgrade`](#Upgrade)\n","args":[],"cases":[["Application",["{ oldName : ( String.String, String.String ), oldArgumentNames : List.List String.String, oldArgumentsToNew : List.List Elm.Syntax.Expression.Expression -> Maybe.Maybe Upgrade.ReplacementPipeline }"]],["Type",["{ oldName : ( String.String, String.String ), oldArgumentsToNew : List.List Elm.Syntax.TypeAnnotation.TypeAnnotation -> Maybe.Maybe Elm.Syntax.TypeAnnotation.TypeAnnotation }"]]]}],"aliases":[{"name":"ReplacementPipeline","comment":" A bunch of functions run in sequence after an initial call.\nUse [`call`](#call) to start one and [`pipeInto`](#pipeInto) to `|>` it further.\n","args":[],"type":"( { name : ( String.String, String.String ), arguments : List.List Elm.Syntax.Expression.Expression }, List.List { name : ( String.String, String.String ), arguments : List.List Elm.Syntax.Expression.Expression } )"},{"name":"Upgrade","comment":" Describes a bunch of transformations to your code. To create one:\n\n  - [`Upgrade.reference`](#reference), [`Upgrade.application`](#application)\n  - [`Upgrade.typeReference`](#reference), [`Upgrade.type_`](#application)\n\nTo group a few of them together, use [`Upgrade.batch`](#batch)\n\n","args":[],"type":"Rope.Rope Upgrade.UpgradeSingle"}],"values":[{"name":"application","comment":" Flexible [`Upgrade`](#Upgrade) for a transformation from usage of a given function/value reference\nto a [pipeline](#pipeInto) or a [call](#call).\n\nFor example to describe the transformation\n\n    Expect.true onFalseDescription actualBool\n    --> Expect.equal True actualBool |> Expect.onFail onFalseDescription\n\nas an [`Upgrade.application`](#application):\n\n    Upgrade.application\n        { oldName = ( \"Expect\", \"true\" )\n        , oldArgumentNames = [ \"onFalseDescription\", \"actualBool\" ]\n        , oldArgumentsToNew =\n            \\oldArguments ->\n                case oldArguments of\n                    [ onFalseDescriptionArgument, boolArgument ] ->\n                        Upgrade.call ( \"Expect\", \"equal\" )\n                            [ Elm.CodeGen.fqVal [ \"Basics\" ] \"True\"\n                            , boolArgument\n                            ]\n                            |> Upgrade.pipeInto ( \"Expect\", \"onFail\" )\n                                [ onFalseDescriptionArgument ]\n                            |> Just\n\n                    _ ->\n                        Nothing\n        }\n\nHere's another example:\n\n    Array.Extra.call funs arguments\n    --> Array.Extra.andMap arguments funs\n\nas an [`Upgrade.application`](#application):\n\n    Upgrade.application\n        { oldName = ( \"Array.Extra\", \"call\" )\n        , oldArgumentNames = [ \"functions\", \"arguments\" ]\n        , oldArgumentsToNew =\n            \\oldArguments ->\n                case oldArguments of\n                    [ functionsArgument, argumentsArgument ] ->\n                        Upgrade.application ( \"Array.Extra\", \"andMap\" )\n                            [ argumentsArgument, functionsArgument ]\n                            |> Just\n\n                    _ ->\n                        Nothing\n        }\n\nYou can also use any expression as arguments to the functions in the pipeline.\nTo construct these, use [`elm-syntax-dsl`](https://dark.elm.dmy.fr/packages/the-sett/elm-syntax-dsl/latest/)\nor [`elm-syntax`](https://dark.elm.dmy.fr/packages/stil4m/elm-syntax/latest/) directly.\n\n","type":"{ oldName : ( String.String, String.String ), oldArgumentNames : List.List String.String, oldArgumentsToNew : List.List Elm.Syntax.Expression.Expression -> Maybe.Maybe Upgrade.ReplacementPipeline } -> Upgrade.Upgrade"},{"name":"batch","comment":" Group multiple individual [`Upgrade`](#Upgrade)s as one [`Upgrade`](#Upgrade).\n\n    Upgrade.rule\n        [ testVersion1To2\n        , elmcraftCoreExtraVersion1To2\n        , myInternalAPIChange\n        ]\n\n    testVersion1To2 : Upgrade\n    testVersion1To2 =\n        Upgrade.batch\n            [ Upgrade.reference { old = ( \"Fuzz\", \"tuple\" ), new = ( \"Fuzz\", \"pair\" ) }\n            , Upgrade.reference { old = ( \"Fuzz\", \"tuple3\" ), new = ( \"Fuzz\", \"triple\" ) }\n            , ..etc..\n            ]\n\n    elmcraftCoreExtraVersion1To2 : Upgrade\n    elmcraftCoreExtraVersion1To2 =\n        Upgrade.batch [ ... ]\n\n    myInternalAPIChange : Upgrade\n    myInternalAPIChange =\n        Upgrade.batch [ ... ]\n\nHelps keep the upgrades a bit more tidy, less `List.concat`s and such.\n\n","type":"List.List Upgrade.Upgrade -> Upgrade.Upgrade"},{"name":"call","comment":" Construct an application as the transformed replacement value of an [`Upgrade.application`](Upgrade#application).\nUse [`pipeInto`](#pipeInto) if you want to use its result as the input of a pipeline.\n","type":"( String.String, String.String ) -> List.List Elm.Syntax.Expression.Expression -> Upgrade.ReplacementPipeline"},{"name":"pipeInto","comment":" Extend the transformed value by `|> anotherFunction plus arguments`.\nFor example to get\n\n    List.map mapper |> List.reverse\n\n→\n\n    Upgrade.call ( \"List\", \"map\" ) [ mapperArgument ]\n        |> Upgrade.pipeInto ( \"List\", \"reverse\" ) []\n\n","type":"( String.String, String.String ) -> List.List Elm.Syntax.Expression.Expression -> Upgrade.ReplacementPipeline -> Upgrade.ReplacementPipeline"},{"name":"reference","comment":" [`Upgrade`](#Upgrade) only the name of the value/function.\nFor example to replace every `MyUtil.findMap` with `List.Extra.findMap`:\n\n    Upgrade.reference { old = \"MyUtil\", \"findMap\" ), new = ( \"List.Extra\", \"findMap\" ) }\n\n","type":"{ old : ( String.String, String.String ), new : ( String.String, String.String ) } -> Upgrade.Upgrade"},{"name":"rule","comment":" The rule performing the given [`Upgrade`](#Upgrade)\n","type":"List.List Upgrade.Upgrade -> Review.Rule.Rule"},{"name":"typeReference","comment":" [`Upgrade`](#Upgrade) only the name of the type.\nFor example to replace every `Web.ProgramConfig` with `Web.Program.Config`:\n\n    Upgrade.typeReference\n        { old = \"Web\", \"ProgramConfig\" )\n        , new = ( \"Web.Program\", \"Config\" )\n        }\n\n","type":"{ old : ( String.String, String.String ), new : ( String.String, String.String ) } -> Upgrade.Upgrade"},{"name":"type_","comment":" Flexible [`Upgrade`](#Upgrade) for a transformation of a given type constructor\nto an equivalent type.\n\nFor example to do describe the transformation\n\n    Endo from to\n    --> (from -> to) -> from -> to\n\nas a [`Upgrade.type_`](#type_):\n\n    Upgrade.type_\n        { oldName = ( \"Endo\", \"Endo\" )\n        , oldArgumentsToNew =\n            \\oldArguments ->\n                case oldArguments of\n                    [ from, to ] ->\n                        Elm.CodeGen.funAnn\n                            (Elm.CodeGen.funAnn from to)\n                            (Elm.CodeGen.funAnn from to)\n                            |> Just\n\n                    _ ->\n                        Nothing\n        }\n\nYou can use any types in the replacement type.\nTo construct these, use [`elm-syntax-dsl`](https://dark.elm.dmy.fr/packages/the-sett/elm-syntax-dsl/latest/)\nor [`elm-syntax`](https://dark.elm.dmy.fr/packages/stil4m/elm-syntax/latest/) directly.\n\n","type":"{ oldName : ( String.String, String.String ), oldArgumentsToNew : List.List Elm.Syntax.TypeAnnotation.TypeAnnotation -> Maybe.Maybe Elm.Syntax.TypeAnnotation.TypeAnnotation } -> Upgrade.Upgrade"}],"binops":[]}]