Tour · 20 of 25
A folder's mod.hd lists what the folder offers, and another package is one more root
A folder of files becomes a module when it holds a mod.hd: src/shop/ is
shop, and src/shop/cart.hd is shop.cart. The mod.hd is the folder's
index. Its pub use lines name what pkg.shop offers, so the rest of the
package imports from the folder, not from whichever file a name lives in
today. A name it does not list is not part of pkg.shop, even when it is
pub in cart.hd. Another package works the same way under one more
root: after hd add ../money, its public names are dep.money. Open the
shop/mod.hd and shop/cart.hd tabs to see the folder.
Run: Ctrl+Enter · Pages: Alt+← Alt+→