Modules and imports
Re-exporting with pub import
pub import: importing names and passing them on, to give a package one front door.
pub import imports names and makes them public from the importing module, so a module can gather names from several places and offer them from one.
shapes/circle.pel:
pub fn area(r: int) -> int = 3 * r * rutil.pel:
pub import { area } = .shapes.circlemain.pel:
import { area } = util
fn main() {
print(area(2))
}pelago run . prints:
12main imported area from util, which got it from shapes.circle; main never mentions the inner module. Use this to keep a folder's layout private while exposing a stable set of names.