Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

describe importing types and values #34

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -1,6 +1,7 @@
<h2>Functions</h2>
<p>
Normally functions from other modules are used in a qualified fashion, with
the module qualifier before function name. For example,
the module qualifier before the function name. For example,
<code>io.println("Hello!")</code>.
</p>
<p>
Expand All @@ -13,3 +14,9 @@
Generally it is best to use qualified imports, as this makes it clear where
the function is defined, making the code easier to read.
</p>
<h2>Values and Types </h2>
<p>
Values are imported in a manner similar to functions. However, the `type`
keyword must precede the name of an imported type. See here for
[code showing types and values being imported](https://tour.gleam.run/standard-library/option-module/).
Copy link
Member

@lpil lpil Feb 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks the flow of the tour as it makes people jump forwards. All lessons should be self contained and build on previous lessons, so we'll have to show a type being imported.

I'm not sure what type would be best. Do you have any thoughts?

</p>