// Built-in functions #pragma once #include #include #include "datatypes.h" #include "types.h" extern bool USE_COLOR; extern Text_t TOMO_VERSION_TEXT; void tomo_configure(void); void tomo_init(void); void tomo_at_cleanup(Closure_t fn); void tomo_cleanup(void); __attribute__((nonnull)) void start_inspect(const char *filename, int64_t start, int64_t end); void end_inspect(const void *expr, const TypeInfo_t *type); #define inspect(type, expr, typeinfo, start, end) \ { \ start_inspect(__SOURCE_FILE__, start, end); \ type _expr = expr; \ end_inspect(&_expr, typeinfo); \ } #define inspect_void(expr, typeinfo, start, end) \ { \ start_inspect(__SOURCE_FILE__, start, end); \ expr; \ end_inspect(NULL, typeinfo); \ } void say(Text_t text, bool newline); Text_t ask(Text_t prompt, bool bold, bool force_tty); _Noreturn void tomo_exit(Text_t text, int32_t status); Closure_t spawn(Closure_t fn); void sleep_seconds(double seconds); OptionalText_t getenv_text(Text_t name); void setenv_text(Text_t name, Text_t value);