elm / compiler

Compiler for Elm, a functional language for reliable webapps.
https://elm-lang.org/
BSD 3-Clause "New" or "Revised" License
7.52k stars 661 forks source link

Use a better error when using `true` and `false` instead of `True` and `False` #2280

Open SkyfallWasTaken opened 1 year ago

SkyfallWasTaken commented 1 year ago

Quick Summary: ??? When using true instead of True, you get this error:

> true
-- NAMING ERROR ---------------------------------------------------------- /repl

I cannot find a `true` variable:

3|   true
     ^^^^
These names seem close though:

    e
    tan
    turns
    abs

Hint: Read <https://elm-lang.org/0.19.1/imports> to see how `import`
declarations work in Elm.

It should probably recommend using True or False instead.

SSCCE

True

Additional Details

N/A

github-actions[bot] commented 1 year ago

Thanks for reporting this! To set expectations:

Finally, please be patient with the core team. They are trying their best with limited resources.

lue-bird commented 1 year ago

In general, recommending imported exposed variants as well is helpful