Skip to content

Conversation

@human154
Copy link
Contributor

@human154 human154 commented Feb 27, 2024

No description provided.

<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?

@lpil
Copy link
Member

lpil commented Feb 27, 2024

Thank you! I've left a note inline.

@human154
Copy link
Contributor Author

human154 commented Feb 29, 2024

(abandoning what I've done above)...How about if I inserted a new page called "Importing types" after the "Custom types" page in the "Data types" section? ..and change the existing titled "Unqualified imports" to "Importing functions" (leaving the content there as it's published now)? That would place the intro to type in import statements well before it's used in the "Option module" page.

@human154
Copy link
Contributor Author

...how about using Order to demo the syntax?

@lpil
Copy link
Member

lpil commented Mar 5, 2024

Order sounds like a good idea! I don't want to change the name of the existing lesson though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants