I'm running through a tutorial, and I'm trying to import the Maybe
module, but am getting the below error:
I found multiple modules named 'Maybe'.
Module 'Main' is trying to import it.
Modules with that name were found in the following locations:
directory ././Maybe.elm
package elm-lang/core
How do I point at one of the above packages?
The Maybe
module from the elm-lang/core
package is imported by default, so if that's what you're trying to import, there's no need to do so.
I can't be sure what is causing the name collision without seeing which packages you have installed, but if you've created your own module called Maybe
, I suggest renaming it. Module name patterns such as NameOfDirectory.NameOfModule
are common in Elm (in fact, I think they're somewhat enforced).