Modules revisited
Every Spicy file specifies the module it declares.
module foo;
Other modules can be imported with the import
keyword.
Typically, to refer to a type, function or variable in another module, it needs to be declared public.
# file: foo.spicy
module foo;
public global A = 47;
public const B = 11;
global const C = 42;
# file: bar.spicy
module bar;
import foo;
print foo::A, foo::B;
# Rejected: 'foo::C' has not been declared public
# print foo::C;