Credence.Semantic.UndefinedLocalFunction
(credence v0.4.5)
Copy Markdown
Fixes compiler errors about undefined local functions with known replacements.
LLMs sometimes hallucinate local functions that don't exist in Elixir, often translating idioms from other languages. This rule maintains a mapping of known corrections.
Example
# Error: undefined function infinity/0
Enum.reduce(nums, {-infinity(), -infinity()}, fn ...)
# Fixed:
Enum.reduce(nums, {-:math.inf(), -:math.inf()}, fn ...)