You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 23, 2018. It is now read-only.
I was working through the online tutorial, and when playing with the random example, I stumbled upon a weird compiler issue when trying to run the file through elm-reactor
I found multiple modules named 'Random'.
Module 'Main' is trying to import it.
Modules with that name were found in the following locations:
directory ././Random.elm
package elm-lang/core
I realized the file I was trying to run was named random.elm, which seems to cause a conflict when if the file contains the line import Random.
It took me a few minutes to understand what was happening (mostly because I'm an absolute beginner and don't know much about elm), but based on the excellent compiler error that elm uses, I thought that this could be something that could be improved.
It seems like if one of the import statements matches the current file, a warning (or an error) could be issued.
We could also maybe make the line directory ././Random.elm a little bit more explicit to illustrate that it references the current file.
Those are just my current thoughts, there could obviously be better options.
I would be happy to work on those improvements (if they are deemed valid), but I'm not exactly sure how the compiler really works. All I found so far is this file, that seems to be involved in the process.
It could be a good reason for me to start learning some haskell!
PS: Really loving elm so far, thank you so much for everything!
Using elm 0.17.0 on mac OS
The text was updated successfully, but these errors were encountered:
Hi,
I was working through the online tutorial, and when playing with the random example, I stumbled upon a weird compiler issue when trying to run the file through
elm-reactor
I realized the file I was trying to run was named
random.elm
, which seems to cause a conflict when if the file contains the lineimport Random
.It took me a few minutes to understand what was happening (mostly because I'm an absolute beginner and don't know much about elm), but based on the excellent compiler error that elm uses, I thought that this could be something that could be improved.
It seems like if one of the
import
statements matches the current file, a warning (or an error) could be issued.We could also maybe make the line
directory ././Random.elm
a little bit more explicit to illustrate that it references the current file.Those are just my current thoughts, there could obviously be better options.
I would be happy to work on those improvements (if they are deemed valid), but I'm not exactly sure how the compiler really works. All I found so far is this file, that seems to be involved in the process.
It could be a good reason for me to start learning some haskell!
PS: Really loving elm so far, thank you so much for everything!
Using elm 0.17.0 on mac OS
The text was updated successfully, but these errors were encountered: