Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/Frege/frege-repl

Frege REPL
https://github.com/Frege/frege-repl

Last synced: about 1 month ago
JSON representation

Frege REPL

Lists

README

        

# Frege REPL [![Build Status](https://travis-ci.org/Frege/frege-repl.svg)](https://travis-ci.org/Frege/frege-repl)

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](https://github.com/Frege/frege-repl/releases).
1. Extract the archive
1. 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-/bin/frege-repl

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

As of late, the REPL is included in [frege releases](https://github.com/Frege/frege/releases).


## Build from sources ##

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

## Continuous Integration

[Travis](https://travis-ci.org/Frege/frege-repl/)

[Sonatype](https://oss.sonatype.org/content/groups/public/org/frege-lang/)