tancore/lib.rs
1pub mod uuid;
2
3use tan::context::Context;
4use uuid::setup_lib_uuid;
5
6// #todo Move all the code from tan/library.
7
8// #todo helper function or macro for arithmetic operations!
9// #todo also eval 'if', 'do', 'for' and other keywords here!
10// #todo use macros to monomorphise functions? or can we leverage Rust's generics? per viariant? maybe with cost generics?
11// #todo support overloading,
12// #todo make equality a method of Expr?
13// #todo support non-Int types
14// #todo support multiple arguments.
15// #todo helper function or macro for arithmetic operations!
16
17// #todo primitives, builtins
18// #todo cannot be implemented with Expr::ForeignFunc as the args are pre-evaluated.
19
20// #insight special-form != primitive ? special form requires special case in the interpreter?
21
22// #todo consider removing the `std` prefix from module paths, like haskell.
23// #todo find a better prefix than setup_
24// #todo use Rc/Arc consistently
25// #todo some helpers are needed here, to streamline the code.
26
27// #todo only setup non-prelude libs on demand!pub mod http_server;
28
29// #todo call the foreign setup from the actual tan module file.
30
31// #todo find a good name for this.
32pub fn setup_lib(context: &mut Context) {
33 setup_lib_uuid(context);
34}