Replace a function in a given module with a new implementation.
-- code for ReviewConfig.elm:
rule =
Install.Function.ReplaceFunction.config
"Frontend"
"view"
"""view model =
Html.text "This is a test\""""
|> Install.Function.ReplaceFunction.makeRuleRunning this rule will replace the function view in the module Frontend with the provided implementation.
The form of the rule is the same for nested modules:
rule =
Install.Function.ReplaceFunction.config
"Foo.Bar"
"earnInterest"
"hoho model = { model | interest = 1.03 * model.interest }"
|> Install.Function.ReplaceFunction.makeRuleInitialize the configuration for the rule.
Configuration for rule: replace a function in a specified module with a new implementation.