https://github.com/kit-ty-kate/labrys
A toy language based on LLVM that implements the System Fω type-system
https://github.com/kit-ty-kate/labrys
compiler language llvm ocaml programming-language type-system
Last synced: 10 days ago
JSON representation
A toy language based on LLVM that implements the System Fω type-system
- Host: GitHub
- URL: https://github.com/kit-ty-kate/labrys
- Owner: kit-ty-kate
- License: mit
- Created: 2013-08-01T15:05:23.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2023-08-14T20:27:19.000Z (over 1 year ago)
- Last Synced: 2025-04-12T14:15:00.276Z (13 days ago)
- Topics: compiler, language, llvm, ocaml, programming-language, type-system
- Language: OCaml
- Homepage:
- Size: 4.48 MB
- Stars: 107
- Watchers: 10
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Labrys is a toy language based on LLVM that implements the System Fω type-system.
### Features
* Effects
* Checked exceptions (via effects)
* LLVM backend
* Higher-order polymorphism### Runtime requirements
* A C compiler: `cc` is used by default
### Build-time requirements
* The latest OPAM and the latest OCaml (https://opam.ocaml.org/)
* Ott (for building documentation only)
* Rubber (for building documentation only)### Installation
```
$ opam pin add labrys .
```### Usage
Examples of the syntax or features can be seen in the `examples` directory
To compile an example you have to use the following command:
```
$ labrys build-program examples/Hello.sfw
```Just replace `Hello` by the name of the module you want to compile (such as `NativeFact` or `Fact`)
Then you can execute the resulting program with:
```
$ ./a.out
```To know more about the compiler options, use the `--help` argument like:
```
$ labrys --help
$ labrys build-program --help
```Enjoy !