This document is currently a draft, it means it will change anytime.
Importing code from other files¶
Suppose the following file structure:
1 2 3
- myFoler - math.pine - app.pine
1 2 3 4 5 6
// File math.pine def (this Number).square -> Number pass def (this Number).inverse -> Number pass
1 2 3 4 5
// File app.pine import "./math.pine" def .main let x = 2.square
Every function defined in
math.pine is now exposed in
Importing code from Github¶
You must specify the version.
By default, the imported modules of an imported module will not be exposed to the importer.
Consider the following scenario
// Filename: math.pine def
If A imported B, and B imported C, the declarations from C will not be exposed in A.