jxxcarlson/elm-review-codeinstaller/7.0.0

NOTE: the latest version is 13.0.0

Install.Type

Install.Type provides a rule that checks if a type is present in the given module and if not, it adds it right after the imports.

For example, the rule

      Install.Type.makeRule "Frontend" "Magic" [ "Inactive", "Wizard String", "Spell String Int"]

results in insertion the text below in the module "Frontend":

      type Magic
          = Inactive
          | Wizard String
          | Spell String Int
makeRule : String -> String -> List String -> Rule

Rule to add a type to a module if it is not present