1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
//! `libspecr` is the standard library of specr lang.

#![warn(missing_docs)]

// We need nightly features since we want to imbue `NdResult` with `?` behavior,
// and we want to be able to call `Result`-returning functions from inside
// `NdResult` seamlessly.
#![feature(try_trait_v2)]
#![feature(try_trait_v2_yeet)]
#![feature(try_trait_v2_residual)]
#![feature(decl_macro)]
#![feature(iterator_try_collect)]
#![feature(step_trait)]

// Re-export the derive macro so reverse dependencies can use it
// without directly depending on gccompat_derive.
pub use gccompat_derive::GcCompat;

mod int;
pub use int::*;

mod option;

mod ndresult;
pub use ndresult::*;

mod ret;
pub use ret::*;

mod size;
pub use size::*;

mod align;
pub use align::*;

mod list;
pub use list::*;

mod set;
pub use set::*;

mod map;
pub use map::*;

mod write;
pub use write::*;

mod string;
pub use string::*;

mod name;
pub use name::*;

mod nondet;
pub use nondet::*;

mod distribution;
pub use distribution::*;

mod endianness;

mod mutability;

mod signedness;
use signedness::*;

mod gc;
use gc::*;

mod obj;
use obj::*;

#[doc(hidden)]
pub mod hidden {
    pub use crate::obj::*;
    pub use crate::gc::{GcCow, GcCompat, mark_and_sweep, clear};
}

/// The items from this module are automatically imported.
pub mod prelude {
    pub use crate::ret;
    pub use crate::Align;
    pub use crate::Size;
    pub use crate::Int;
    pub use crate::list::*;
    pub use crate::set::*;
    pub use crate::map::*;
    pub use crate::write::*;
    pub use crate::endianness::*;
    pub use crate::mutability::*;
    pub use crate::signedness::*;
    pub use crate::string::{String, format};
    pub use crate::nondet::{pick, predict};
    pub use crate::option::*;
}

// This exists so that `gccompat-derive` can use `libspecr::hidden::GcCompat` to address GcCompat,
// whether it's used within libspecr or not.
pub(crate) use crate as libspecr;