diff options
author | Malte Voos <git@mal.tc> | 2024-07-08 22:01:42 +0200 |
---|---|---|
committer | Malte Voos <git@mal.tc> | 2024-07-08 22:01:42 +0200 |
commit | 97f84ccace4e634b4e02178a702818e69292dc9f (patch) | |
tree | 9cef95c62e3fa078db256c7fe657732fecef40a8 /README.md | |
parent | 57de10d8728f51942f676b68f1f3ea29d9b78e6e (diff) | |
download | toytt-97f84ccace4e634b4e02178a702818e69292dc9f.tar.gz toytt-97f84ccace4e634b4e02178a702818e69292dc9f.zip |
implement top-level definitions
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/README.md b/README.md index 80cc8ba..4fa6bc7 100644 --- a/README.md +++ b/README.md @@ -13,24 +13,30 @@ it probably has lots of bugs as well. ## example +the file `test/bool.toytt` defines some elementary functions on booleans. + ``` -$ dune exec toytt -(\b -> bool-elim b at x -> bool [ true => false, false => true ] :: (b : bool) -> bool) false +toytt> not false +true : bool +toytt> and false +\y -> false : bool -> bool +toytt> xor true false true : bool +toytt> or true bool + → error[E302] + 1 | or true bool + ^ type mismatch: + expected: bool + found: type ``` -at the moment the interface is a broken REPL which exits if you make a mistake -(TODO). the above example illustrates the syntax for lambdas, boolean -intro & elim, inline type annotations (`::`) and pi types with the boolean -not-function applied to `false` (which evaluates to `true`). - ## todo list (in descending order of importance and/or realizability) - [x] figure out how to recover variable names in pretty-printing so we don't have to print de bruijn indices all the time - [x] build a better repl - [x] improve error messages -- [ ] implement top-level definitions +- [x] implement top-level definitions - [x] implement less aggrevating syntax for non-dependent function & pair types - [ ] add a type of natural numbers - [ ] replace type-in-type with a proper (cumulative?) hierarchy of universes |