We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
No description provided.
The text was updated successfully, but these errors were encountered:
you can reference functions by its module and name using fully qualified names
fun main(): void = { support::env::printf("number is %d", 1) }
Or you can import the whole module and the names will be available locally
import support::env fun main(): void = { printf("number is %d", 1) }
The fully::qualified::names represent the path of the module starting at the root of the project / standard library.
So if you have a structure like:
// lib/folder/file.lys struct NumberWrapper(number: i32) fun add(a: NumberWrapper, b: NumberWrapper): NumberWrapper = NumberWrapper(a.number + b.number)
// lib/main.lys import lib::folder::file fun main(): i32 = add(NumberWrapper(1), NumberWrapper(2))
which is the same as
fun main(): i32 = lib::folder::file::add( lib::folder::file::NumberWrapper(1), lib::folder::file::NumberWrapper(2) )
Sorry, something went wrong.
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: