Models a binding of a value to a typed name, and is passed into the REPL so it can re-create the bindings inside the REPL's scope
Fake for-comprehension generator to catch errors and turn them into Res.Failures
A set of colors used to highlight the miscellanious bits of the REPL.
Exception for reporting script compilation failures
Represents the importing of a single name in the Ammonite REPL, of the form
Represents the importing of a single name in the Ammonite REPL, of the form
import $prefix.{$fromName => $toName}
All imports are reduced to this form; import $prefix.$name
is results in
the fromName
and toName
being the same, while import $prefix._
or
import $prefix.{foo, bar, baz}
are split into multiple distinct
ImportData objects.
Note that imports can be of one of three distinct ImportType
s: importing
a type, a term, or both. This lets us properly deal with shadowing correctly
if we import the type and term of the same name from different places
Represents the imports that occur before a piece of user code in the Ammonite REPL.
Represents the imports that occur before a piece of user code in the
Ammonite REPL. It's basically a Seq[ImportData]
, except we really want
it to be always in a "canonical" form without shadowed/duplicate imports.
Thus we only expose an apply
method which performs this de-duplication,
and a ++
operator that combines two sets of imports while performing
de-duplication.
Contains the various entry points to the Ammonite REPL.
Contains the various entry points to the Ammonite REPL.
Configuration of the basic REPL is done by passing in arguments when constructing the Main instance, and the various entrypoints such as run runScript and so on are methods on that instance.
It is more or less equivalent to the Repl object itself, and has a similar set of parameters, but does not have any of the Repl's implementation-related code and provides a more convenient set of entry-points that a user can call.
Note that the instantiateRepl function generates a new Repl every time it is called!
Any additional code you want to run before the REPL session
starts. Can contain multiple blocks separated by @
s
Do you want to include the "standard" predef imports
provided by Ammonite? These include tools like time
,
grep
, the |
||
|?
pipes from ammonite-ops, and
other helpers. Can be disabled to give a clean
namespace for you to fill using your own predef.
Where will all of Ammonite's persistent data get
stored? Things like any predef.scala
file,
compilation/ivy caches, etc.. Defaults include
Storage.Folder and Storage.InMemory, though
you can create your own.
The working directory of the REPL; when it load scripts, where the scripts will be considered relative to when assigning them packages
Encapsulates the ways the Ammonite REPL prints things.
Encapsulates the ways the Ammonite REPL prints things. Does not print a trailing newline by default; you have to add one yourself.
How you want it to print streaming fragments of stdout
How you want it to print a compile warning
How you want it to print a compile error
How you want to print compile info logging. *Not* the same
as out
, which is used to print runtime output.
The result of a single pass through the ammonite REPL.
The result of a single pass through the ammonite REPL. Results in a single T, or of one of a fixed number of failures that are common for anyone who is evaluating code via the REPL.
Encapsulates a read-write cell that can be passed around
Trait for the interface of common persistent storage.
Trait for the interface of common persistent storage. This handles history and persistent caches. Right now it is not threadsafe nor does it handle the mutual exclusion of files between processes. Mutexes should be added to be able to run multiple Ammonite processes on the same system.
Nice pattern matching for chained exceptions
Code used to de-serialize command-line arguments when calling an Ammonite script.
Code used to de-serialize command-line arguments when calling an Ammonite script. Basically looks for a scopt.Read for the type of each argument and uses that to de-serialize the given String into that argument.
Needs a bit of macro magic to work.
Everything to do with the interaction of the Ammonite REPL with the user and the terminal.
Everything to do with the interaction of the Ammonite REPL with the user and the terminal. Interfacing with ammonite-terminal (or with JLine)
What actually lets us compile and execute code in the Ammonite REPL; deals with the Scala compiler, preprocessing the strings, JVM classloaders, etc.
Things that are available inside the Ammonite REPL, are really convenient to have available.
A set of colors used to highlight the miscellanious bits of the REPL. Re-used all over the place in PPrint, TPrint, syntax highlighting, command-echoes, etc. in order to keep things consistent
The command prompt
Definition of top-level identifiers
Strings, integers and other literal expressions
The Seq/Foo when printing a Seq(...) or case class Foo(...)
The color of text selected in the line-editor
The color used to print error messages of all kinds