Add import statements to a given module.
For example, to add import Foo.Bar to the Frontend module, you can use the following configuration:
Install.Import.config "Frontend"
[ module_ "Foo.Bar" ]
|> Install.Import.makeRuleTo add the statement import Foo.Bar as FB exposing (a, b, c) to the Frontend module, do this:
Install.Import.config "Frontend" [ module_ "Foo.Bar" |> withAlias "FB" |> withExposedValues = [ "a", "b", "c" ] ]
|> Install.Import.makeRuleThere is a short cut for importing modules with no alias or exposed values
Install.Import.qualified "Frontend" [ module_ "Foo.Bar", module_ "Baz.Qux" ]
|> Install.Import.makeRuleThe functions config and module_ returns values of this type; The functions withAlias and withExposedValues transform values of this type.
Create a module to import with no alias or exposed values
Add an alias to a module to import
Add exposed values to a module to import
Initialize the configuration for the rule.
Create a rule that adds a list of imports for given modules in a given module. See above for examples.
Initialize the configuration for the rule.