[{"name":"Install.ClauseInCase","comment":" Add a clause to a case expression in a specified function\nin a specified module. For example, if you put the code below in your\n`ReviewConfig.elm` file, running `elm-review --fix` will add the clause\n`ResetCounter` to the `updateFromFrontend` function in the `Backend` module.\n\n    -- code for ReviewConfig.elm:\n    Install.ClauseInCase.init \"Backend\" \"updateFromFrontend\" \"ResetCounter\" \"( { model | counter = 0 }, broadcast (CounterNewValue 0 clientId) )\"\n        |> Install.ClauseInCase.makeRule\n\n    Thus we will have\n\n    updateFromFrontend : SessionId -> ClientId -> ToBackend -> Model -> ( Model, Cmd BackendMsg )\n    updateFromFrontend sessionId clientId msg model =\n        case msg of\n            CounterIncremented ->\n            ...\n            CounterDecremented ->\n            ...\n            ResetCounter ->\n                ( { model | counter = 0 }, broadcast (CounterNewValue 0 clientId) )\n\n    You also can add the clause after another clause of choice with the `withInsertAfter` function:\n        Install.ClauseInCase.init \"Backend\" \"updateFromFrontend\" \"ResetCounter\" \"( { model | counter = 0 }, broadcast (CounterNewValue 0 clientId) )\"\n            |> Install.ClauseInCase.withInsertAfter \"CounterIncremented\"\n            |> Install.ClauseInCase.makeRule\n\n    In this case we will have\n        updateFromFrontend : SessionId -> ClientId -> ToBackend -> Model -> ( Model, Cmd BackendMsg )\n        updateFromFrontend sessionId clientId msg model =\n            case msg of\n                CounterIncremented ->\n                ...\n                ResetCounter ->\n                    ( { model | counter = 0 }, broadcast (CounterNewValue 0 clientId) )\n\n                CounterDecremented ->\n                ...\n    You can also customize the error message with the `withCustomErrorMessage` function:\n        Install.ClauseInCase.init \"Backend\" \"updateFromFrontend\" \"ResetCounter\" \"( { model | counter = 0 }, broadcast (CounterNewValue 0 clientId) )\"\n            |> Install.ClauseInCase.withCustomErrorMessage \"Add handler for ResetCounter\" []\n            |> Install.ClauseInCase.makeRule\n\n@docs init, makeRule, withInsertAfter, withCustomErrorMessage, Config, CustomError\n\n","unions":[{"name":"Config","comment":" Configuration for makeRule: add a clause to a case expression in a specified function in a specified module.\n","args":[],"cases":[]},{"name":"CustomError","comment":" Custom error message to be displayed when running `elm-review --fix` or `elm-review --fix-all`\n","args":[],"cases":[]}],"aliases":[],"values":[{"name":"init","comment":" Basic config to add a new clause to a case expression. If you just need to add a new clause at the end of the case, you can simply use it with the `makeRule` function like this:\n\n    Install.ClauseInCase.init \"Backend\" \"updateFromFrontend\" \"ResetCounter\" \"( { model | counter = 0 }, broadcast (CounterNewValue 0 clientId) )\"\n        |> Install.ClauseInCase.makeRule\n    If you need additional configuration, check the `withInsertAfter` and `withCustomErrorMessage` functions.\n\n","type":"String.String -> String.String -> String.String -> String.String -> Install.ClauseInCase.Config"},{"name":"makeRule","comment":" Create a makeRule that adds a clause to a case expression in a specified function. You can use it like this:\n\n    Install.ClauseInCase.init \"Backend\" \"updateFromFrontend\" \"ResetCounter\" \"( { model | counter = 0 }, broadcast (CounterNewValue 0 clientId) )\"\n        |> Install.ClauseInCase.makeRule\n\n","type":"Install.ClauseInCase.Config -> Review.Rule.Rule"},{"name":"withCustomErrorMessage","comment":" Customize the error message that will be displayed when running `elm-review --fix` or `elm-review --fix-all`\n","type":"String.String -> List.List String.String -> Install.ClauseInCase.Config -> Install.ClauseInCase.Config"},{"name":"withInsertAfter","comment":" Add a clause after another clause of choice in a case expression. If the clause to insert after is not found, the new clause will be inserted at the end.\n\n\n## Example\n\nGiven the following module:\n\n    module Philosopher exposing (Philosopher(..), stringToPhilosopher)\n\n    type Philosopher\n        = Socrates\n        | Plato\n        | Aristotle\n\n    stringToPhilosopher : String -> Maybe Philosopher\n    stringToPhilosopher str =\n        case str of\n            \"Socrates\" ->\n                Just Socrates\n\n            \"Plato\" ->\n                Just Plato\n\n            \"Aristotle\" ->\n                Just Aristotle\n\n            _ ->\n                Nothing\n\nTo add the clause `Aspasia` after the clause `Aristotle`, you can use the following configuration:\n\n    Install.ClauseInCase.init \"Philosopher\" \"stringToPhilosopher\" \"Aspasia\" \"Just Aspasia\"\n        |> Install.ClauseInCase.withInsertAfter \"Aristotle\"\n        |> Install.ClauseInCase.makeRule\n\nThis will add the clause `Aspasia` after the clause `Aristotle` in the `stringToPhilosopher` function, resulting in:\n\n    stringToPhilosopher : String -> Maybe Philosopher\n    stringToPhilosopher str =\n        case str of\n            \"Socrates\" ->\n                Just Socrates\n\n            \"Plato\" ->\n                Just Plato\n\n            \"Aristotle\" ->\n                Just Aristotle\n\n            \"Aspasia\" ->\n                Just Aspasia\n\n            _ ->\n                Nothing\n\n","type":"String.String -> Install.ClauseInCase.Config -> Install.ClauseInCase.Config"}],"binops":[]},{"name":"Install.FieldInTypeAlias","comment":" Add a field to specified type alias\nin a specified module. For example, if you put the code below in your\n`ReviewConfig.elm` file, running `elm-review` will add the field\n`quot: String` to the type alias `FrontendModel` in the `Types` module.\n\n    -- code for ReviewConfig.elm:\n    Install.FieldInTypeAlias.makeRule \"Types\" \"FrontendModel\" \"quot: String\"\n\nThus we will have\n\n    type alias FrontendModel =\n        { counter : Int\n        , clientId : String\n        , quot : String\n        }\n\n@docs makeRule\n\n","unions":[],"aliases":[],"values":[{"name":"makeRule","comment":" Create a rule that adds a field to a type alias in a specified module.\n","type":"String.String -> String.String -> String.String -> Review.Rule.Rule"}],"binops":[]},{"name":"Install.Initializer","comment":" Add a field to the body of a function like `init` in which the\nthe return value is of the form `( Model, Cmd msg )`. As in\nthe `ReviewConfig` item below, you specify the module name, the function\nname, as well as the field name and value to be added to the function:\n\n    -- code for ReviewConfig.elm:\n    Install.Initializer.makeRule \"Backend\" \"init\" \"message\" \"\\\"hohoho!\\\"\"\n\nThus we will have\n\n     init : ( Model, Cmd BackendMsg )\n     init =\n         ( { counter = 0\n           , message = \"hohoho!\"\n           }\n         , Cmd.none\n         )\n\n@docs makeRule\n\n","unions":[],"aliases":[],"values":[{"name":"makeRule","comment":" Create a rule that adds a field to the body of a function like\n`init` in which the return value is of the form `( Model, Cmd msg )`.\nAs in the `ReviewConfig` item below, you specify\nthe module name, the function name, as well as the\nfield name and value to be added to the function:\n\n    Install.Initializer.makeRule \"Backend\" \"init\" \"message\" \"\\\"hohoho!\\\"\"}\n\n","type":"String.String -> String.String -> String.String -> String.String -> Review.Rule.Rule"}],"binops":[]},{"name":"Install.TypeVariant","comment":" Add a variant to a given type in a given module. As in\nthe `ReviewConfig` item below, you specify the module name, the type\nname, and the type of the new variant.\n\n    Install.TypeVariant.makeRule \"Types\" \"ToBackend\" \"ResetCounter\"\n\nThen you will have\n\n     type ToBackend\n         = CounterIncremented\n         | CounterDecremented\n         | ResetCounter\n\nwhere the last variant is the one added.\n\n@docs makeRule\n\n","unions":[],"aliases":[],"values":[{"name":"makeRule","comment":" Create a rule that adds a variant to a type in a specified module:\n\n    Install.TypeVariant.makeRule \"Types\" \"ToBackend\" \"ResetCounter\"\n\n","type":"String.String -> String.String -> String.String -> Review.Rule.Rule"}],"binops":[]}]