replpp

package replpp

Members list

Packages

package replpp.util

Type members

Classlikes

enum Colors

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class Config(predefFiles: Seq[Path], nocolors: Boolean, verbose: Boolean, dependencies: Seq[String], resolvers: Seq[String], remoteJvmDebugEnabled: Boolean, prompt: Option[String], greeting: String, onExitCode: Option[String], maxHeight: Option[Int], scriptFile: Option[Path], command: Option[String], params: Map[String, String])

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Config

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Config.type
object Dependencies

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
class DottyReplDriver(settings: Array[String], out: PrintStream, maxHeight: Option[Int], classLoader: Option[ClassLoader])(using x$5: Colors) extends Driver

Based on https://github.com/lampepfl/dotty/blob/3.3.0-RC5/compiler/src/dotty/tools/repl/ReplDriver.scala Main REPL instance, orchestrating input, compilation and presentation

Based on https://github.com/lampepfl/dotty/blob/3.3.0-RC5/compiler/src/dotty/tools/repl/ReplDriver.scala Main REPL instance, orchestrating input, compilation and presentation

Attributes

Supertypes
class Driver
class Object
trait Matchable
class Any
Known subtypes

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
class JLineTerminal extends Closeable

Based on https://github.com/lampepfl/dotty/blob/3.3.0-RC6/compiler/src/dotty/tools/repl/JLineTerminal.scala and adapted for our needs

Attributes

Supertypes
trait Closeable
trait AutoCloseable
class Object
trait Matchable
class Any
object Main

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Main.type
object Operators

Operators to redirect output to files or pipe them into external commands / processes, inspired by unix shell redirection and pipe operators: >, >> and |. Naming convention: similar to scala.sys.process we prefix all operators with # to avoid naming clashes with more basic operators like > for greater-than-comparisons.

Operators to redirect output to files or pipe them into external commands / processes, inspired by unix shell redirection and pipe operators: >, >> and |. Naming convention: similar to scala.sys.process we prefix all operators with # to avoid naming clashes with more basic operators like > for greater-than-comparisons.

They are declared as extension types for Any and pretty-print the results using our PPrinter. List types (IterableOnce, java.lang.Iterable, Array, ...) are being unwrapped (only at the root level).

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Operators.type
object PPrinter

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
PPrinter.type
object Rendering

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Rendering.type
class ReplDriver(args: Array[String], out: PrintStream, onExitCode: Option[String], greeting: Option[String], prompt: String, maxHeight: Option[Int], classLoader: Option[ClassLoader])(using x$8: Colors) extends ReplDriverBase

Attributes

Supertypes
class Driver
class Object
trait Matchable
class Any
Show all
abstract class ReplDriverBase(args: Array[String], out: PrintStream, maxHeight: Option[Int], classLoader: Option[ClassLoader])(using x$5: Colors) extends DottyReplDriver

Attributes

Supertypes
class Driver
class Object
trait Matchable
class Any
Known subtypes
class ReplDriver

Based on https://github.com/lampepfl/dotty/blob/3.3.0-RC6/compiler/src/dotty/tools/dotc/printing/SyntaxHighlighting.scala * and adapted for our needs

Based on https://github.com/lampepfl/dotty/blob/3.3.0-RC6/compiler/src/dotty/tools/dotc/printing/SyntaxHighlighting.scala * and adapted for our needs

This object provides functions for syntax highlighting in the REPL

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Value members

Concrete methods

def allPredefCode(config: Config): String
def allPredefLines(config: Config): Seq[String]
def classpath(config: Config, quiet: Boolean): String

Concatenates the classpath from multiple sources, each are required for different scenarios:

Concatenates the classpath from multiple sources, each are required for different scenarios:

  • java.class.path system property
  • dependency artifacts as passed via (command-line) configuration
  • jars from current class loader (recursively)

To have reproducable results, we order the classpath entries. This may interfere with the user's deliberate choice of order, but since we need to concatenate the classpath from different sources, the user can't really depend on the order anyway.

Attributes

def compilerArgs(config: Config): Array[String]
def resolveFile(base: Path, pathStr: String): Path

resolve absolute or relative paths to an absolute path

resolve absolute or relative paths to an absolute path

  • if given pathStr is an absolute path, just take that
  • if it's a relative path, use given base path to resolve it to an absolute path

Attributes

def verboseEnabled(config: Config): Boolean

verbose mode can either be enabled via the config, or the environment variable SCALA_REPL_PP_VERBOSE=true

verbose mode can either be enabled via the config, or the environment variable SCALA_REPL_PP_VERBOSE=true

Attributes

Concrete fields

val VerboseEnvVar: String
lazy val globalPredefFile: Path
lazy val globalPredefFileMaybe: Option[Path]
lazy val home: Path

The user's home directory

The user's home directory

Attributes

val pathSeparator: String
lazy val pwd: Path

The current working directory for this process.

The current working directory for this process.

Attributes