class Ven::Master
- Ven::Master
- Reference
- Object
Overview
An abstraction over an implicit collection of Input
s.
Implements Ven module system (e.g., distinct
and expose
).
Note that all files in the current directory (CD), as well
as the files of #homes
, are made into Input
s. But only
those that were expose
d are compiled and executed.
master = Master.new
master.load("a", "x = 1 + 1")
master.load("b", "y = 2 + x")
master.load("c", "say(x, y)") # STDOUT: 2 \n 4
Included Modules
Defined in:
ven/master.crConstructors
Instance Method Summary
-
#debug(message : String)
Prints a colorized debug message if
#verbosity
allows. -
#gather
Searches for '.ven' files in this Master's homes.
-
#homes : Array(String)
Directories where this Master will search for '.ven' files.
-
#import(expose : Distinct)
Imports a distinct expose.
-
#inspect : Bool
See
Input.inspect
. -
#inspect=(inspect : Bool)
See
Input.inspect
. -
#load(file : String, source : String)
Reads, compiles and executes source under filename file.
-
#measure : Bool
See
Input.measure
. -
#measure=(measure : Bool)
See
Input.measure
. -
#passes : Int32
The amount of optimization passes.
-
#passes=(passes : Int32)
The amount of optimization passes.
-
#timetable : Machine::Timetable | Nil
The timetable produced by the latest
#load
. - #to_s(io)
-
#verbosity : Int32
Currently, there are several levels of verbosity: -
0
: totally quiet; -1
: only issue warnings (default); -2
: issue warnings and debug prints. -
#verbosity=(verbosity : Int32)
Currently, there are several levels of verbosity: -
0
: totally quiet; -1
: only issue warnings (default); -2
: issue warnings and debug prints. -
#warn(warning : String)
Prints a colorized warning if
#verbosity
allows.
Constructor Detail
Instance Method Detail
Searches for '.ven' files in this Master's homes.
A new Input
is added to the repository for each '.ven'
file. A warning will be shown if it cannot be read (if
allowed by #verbosity
).
Imports a distinct expose.
This method will only work if all Input
s are being
evaluated in a common environment.
Currently, there are several levels of verbosity:
0
: totally quiet;1
: only issue warnings (default);2
: issue warnings and debug prints.
Currently, there are several levels of verbosity:
0
: totally quiet;1
: only issue warnings (default);2
: issue warnings and debug prints.