Skip to main content

scheme_rs/
lib.rs

1#![doc = include_str!("docs.md")]
2
3extern crate self as scheme_rs;
4
5pub(crate) mod ast;
6pub(crate) mod character;
7pub(crate) mod cps;
8pub(crate) mod enumerations;
9pub mod env;
10pub mod eval;
11pub mod exceptions;
12pub(crate) mod expand;
13pub mod gc;
14pub mod hashtables;
15pub mod lists;
16pub mod num;
17pub mod ports;
18pub mod proc;
19pub mod records;
20pub mod registry;
21pub mod runtime;
22pub mod strings;
23pub mod symbols;
24pub mod syntax;
25pub mod value;
26pub mod vectors;
27
28/// Internal `Either` type
29#[derive(Debug, Clone)]
30enum Either<L, R> {
31    Left(L),
32    Right(R),
33}
34
35impl<L, R> Either<L, R> {
36    pub fn left_or(self, default: L) -> L {
37        if let Self::Left(l) = self { l } else { default }
38    }
39}
40
41#[cfg(feature = "tokio")]
42pub mod futures;
43
44// Require tokio (for now) if the async feature is enabled
45#[cfg(all(feature = "async", not(feature = "tokio")))]
46compile_error!("async features requires the tokio feature to be enabled");
47
48#[cfg(target_pointer_width = "32")]
49compile_error!("32 bit architectures are currently not supported");