Imports

You can import elements from other modules using the from and import keywords.

For internal modules which are part of the same project, use unquoted imports:

src/Main/main.metro
from Utils import greet
fn main() {
greet("World")
}

This will look for an exported greet function declared somewhere in the src/Util directory:

src/Util/greet.metro
from "fmt" import printlnf
export fn greet(name String) {
printlnf("Hello, %s!", name)
}

To import external modules, for example from the standard library or from GitHub, use quoted imports:

from "os" import argv
from "github.com/somebody/something" import (
Something
SOME_CONSTANT
)