Modules
Modules are organised along the lines of folders. You can import a module with import
import foo::bar
would import foo/bar.ey. There is currently no visibility system for modules, so all symbols from bar.ey are imported and added to the foo::bar namespace. For example if you had a function square in bar.ey you would refer to it as bar::square
Exporting
By default no symbol is exported from its module. To alter this you should add the export keyword as the first part of the definition. For example
export cpu fn double(val: f64) f64 {
...
}
would be exported. Similarly, placing the export keyword before a struct makes it available outside that module
Convention
Some conventions with the standard library rather:
stdwill be kept as stable as is reasonably possible up until 1.0, and not change after. This is for core standard library functionality of Eyotstdxis an experimental variant ofstd. APIs can potentially change with each version of Eyot while they are in here, but the intention is to stabilise them over time and move them tostd