elm / elm-lang.org

Server and client code for the Elm website.
http://elm-lang.org/
BSD 3-Clause "New" or "Revised" License
1.99k stars 366 forks source link

Explain `import` early on guide.elm-lang.org #883

Open MatthewCroughan opened 1 year ago

MatthewCroughan commented 1 year ago

The import keyword seems magical. As a newcomer to Elm, I read https://korban.net/posts/elm/2019-11-17-elm-ui-introduction/, it explains that I should:

  1. elm install mdgriffith/elm-ui
  2. import Element exposing (..)

From these two steps, as a noob, I cannot possibly understand that Element is actually something that is derived from the src folder of elm-ui, other than by going to the Slack/Matrix channels and asking the question "Where does Element come from?"

ls ~/.elm/0.19.1/packages/mdgriffith/elm-ui/1.1.8/src/
Element  Element.elm  Internal

It would be helpful if the elm-guide could explain the import keyword early on, so that I can understand where import is searching for module names.