diff options
author | Joel Kronqvist <joel.kronqvist@iki.fi> | 2025-08-04 23:50:46 +0300 |
---|---|---|
committer | Joel Kronqvist <joel.kronqvist@iki.fi> | 2025-08-04 23:50:46 +0300 |
commit | fdae943090463526423f5e43e72cd2f0e8147a1b (patch) | |
tree | 5a7212555d8511df16fe6bbcc54b863ec9463b46 /README.md | |
parent | 36d2818d39e61b752923e253f8455f50510cb428 (diff) | |
download | myslip-fdae943090463526423f5e43e72cd2f0e8147a1b.tar.gz myslip-fdae943090463526423f5e43e72cd2f0e8147a1b.zip |
Added repl and some documentation. Improved error messages. Removed dead code.
* Removed same_variant in parse::parsetree
* Added SExp::multistep (for use of the repl)
Improved error messages:
* Added parenthesis around types
* Changed how errors propagate inferring generics:
added the error variant ArgumentsDontMatchGeneric,
implemented the displaying of it, added tests for
it.
* Had to change some tests to match for the new changes
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..55a1c9a --- /dev/null +++ b/README.md @@ -0,0 +1,63 @@ + + +myslip README +============= + +Below is a short introduction to this programming language +and instructions on setting it up. +`TUTORIAL.md` may help getting familiar with the language. + + +Language introduction +--------------------- +STILL TODO (or to modify) +how functional is it? +myslip is a lisp-inspired language, but a bit different +(mostly, because I have never really written lisp except + for in emacs, so I have no clue of what lisp usually is + like). +Valid myslip s-expressions may be atoms of different types +or lists of them, though not all syntactically valid +myslip expressions are ones that can be evaluated. + +S-expression := Atom | List +Atom := TODO +List := (S-expression ... S-expression) + +The myslip interpreter performs type checking on +s-expressions and evaluates them according to polish +notation, ie. the first S-expression of a list is taken to +be the operator that is passed the rest of the expressions +as arguments. + + +Running the project +------------------- + +myslip can be built using cargo 1.88.0. Instructions to +install cargo can be found online: +https://doc.rust-lang.org/cargo/getting-started/installation.html + +If you are having trouble due to having a different version +and you used rustup for your cargo installation, you can +follow these instructions on how to change the rust version +https://rust-lang.github.io/rustup/overrides.html + +TODO: system requirements? try it out on debian +```console +TODO +$ sudo apt install curl git +$ curl ??? | sh ??? +$ git clone ??? +$ cd myslip +``` +and then the interpreter can be accessed either via +`cargo run`, or then you can add it to your path: +```console +TODO +$ cargo build +$ ln ??? ??? +$ myslip +``` + + |