elm / error-message-catalog

A catalog of broken Elm programs / data to improve error messages
BSD 3-Clause "New" or "Revised" License
174 stars 17 forks source link

Display a warning when no js is emitted #309

Open sebsheep opened 4 years ago

sebsheep commented 4 years ago

When compiling a valid but "useless" elm file like the following:

module A exposing (a)

a = 1

The compiler says Success! Compiled 1 module.. However, the emitted file is empty! I've been trapped multiple by searching what I was doing wrong. It would be nice to have to have a little warning like:

Success! Compiled 1 module.
WARNING: this module did not contain a main function, hence I did not emit a file.