Skip to content

Frege/frege-repl

Repository files navigation

Frege REPL Build Status

This is the command line REPL for Frege. Frege code snippets can be entered on the prompt to get them evaluated. In addition to Frege code, the following commands are supported:

Command Description
:type <expression> Display the type of an expression
:browse <moduleName> Display the names in a module if a module name is provided otherwise display the names in the default REPL module
:java View Java translation of last compiled Frege source
:load <url or file> Load Frege code snippets from an URL or file
:r Reload the last script URL or file
:set prompt promptString Set prompt to `promptString`
:set multiline-prompt promptString Set prompt for multi-line mode.
:set show-limit Set number of characters to show in the output string (Default: 80).
:set compilerOption Set compiler options such as 'hints', 'nowarn', 'inline', 'O', 'comments', 'ascii', 'greek', 'fraktur', 'latin'.
:unset compilerOption Unset compiler option.
:{ Start multiline definitions
:} End multiline definitions
:history Display the source history for definitions in the default REPL module
:reset Reset the REPL discarding all the evaluated scripts
:version Display Frege version
:help <name> Display the documentation for the given name. If the name is not provided, display this help message
:q or :quit Quit REPL

How to run?

  1. Download Frege REPL archive from releases.

  2. Extract the archive

  3. Run the following command: (JDK 8 or above required. Note that JDK is required, not just JRE as Frege is compiled to Java which is then compiled to byte code using the Java compiler available in the JDK)

       $ frege-repl-<version>/bin/frege-repl
    

    or if you want to customize JVM parameters: java -cp "frege-repl-<version>/lib/*" frege.repl.FregeRepl

As of late, the REPL is included in frege releases.

Build from sources

  1. ~/workspace$ git clone https://github.com/Frege/frege-repl.git
  2. ~/workspace/frege-repl$ ./gradlew install
  3. To run, ~/workspace/frege-repl$ ./gradlew --no-daemon --console plain :frege-repl-core:run.

Continuous Integration

Travis

Sonatype