October commit

- custom parser support and infra
- type-tagging and traits (untested)
- match expressions
This commit is contained in:
2023-10-24 22:17:37 +01:00
parent c961506a3a
commit f77e4fd90a
73 changed files with 1904 additions and 558 deletions

View File

@@ -5,7 +5,7 @@ const folder_view := (path, next) => do{
cps println $ "Contents of " ++ fs::os_print path;
cps entries = async::block_on $ fs::read_dir path;
cps list::enumerate entries
|> list::map (pass \id. pass \name. \is_dir.
|> list::map ((t[id, t[name, is_dir]]) =>
println $ to_string id ++ ": " ++ fs::os_print name ++ if is_dir then "/" else ""
)
|> list::chain;
@@ -17,7 +17,7 @@ const folder_view := (path, next) => do{
|> tuple::pick 0 2;
next parent_path
} else do {
cps subname, is_dir = to_uint choice
let t[subname, is_dir] = to_uint choice
|> (list::get entries)
|> option::unwrap;
let subpath = fs::join_paths path subname;