Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sourcedennis/rust-pi-forall
A partial re-implementation of pi-forall in Rust
https://github.com/sourcedennis/rust-pi-forall
dependent-types
Last synced: 1 day ago
JSON representation
A partial re-implementation of pi-forall in Rust
- Host: GitHub
- URL: https://github.com/sourcedennis/rust-pi-forall
- Owner: sourcedennis
- Created: 2022-09-20T14:35:53.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2022-10-05T14:40:16.000Z (about 2 years ago)
- Last Synced: 2024-05-22T22:30:42.015Z (6 months ago)
- Topics: dependent-types
- Language: Rust
- Homepage:
- Size: 77.1 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-rust-formalized-reasoning - Rust pi-forall - forall/blob/2022/doc/oplss.pdf) - partial re-implementation of pi-forall. (Programming Language / Libraries)
README
# Rust pi-forall
An implementation of [pi-forall](https://github.com/sweirich/pi-forall) in [Rust](https://www.rust-lang.org).
## Motivation
pi-forall is a demo dependently-typed programming language. Its reference implementation is written in [Haskell](https://www.haskell.org), which is accompanied by lecture notes. In this repository, I replicate that work in Rust.
I replicate the `full/` variant of pi-forall presented at OPLSS [2022](https://github.com/sweirich/pi-forall/tree/2022). Though, I only reimplemented *a subset* of features that I consider interesting. Also keep in mind that idiomatic Rust has a vastly different structure from idiomatic Haskell; No monads, nor its transformers.
## Features
Currently, we support:
* Equality
* IrrelevanceThat roughly corresponds with `version3/`. Datatypes are still missing. (Though, the parser supports `case` statements)
## Running
First, [install Rust](https://www.rust-lang.org/tools/install). Then, run (in this directory):
```sh
cargo run --release -- pi/Lec1.pi
```That typechecks `pi/Lec1.pi`.