1use std::ops::AsyncFnOnce;
2
3pub use fxhash::FxHashMap as Map;
4pub use fxhash::FxHashSet as Set;
5pub use imstr::ImString as Text;
6pub type IndexMap<K, V> = indexmap::IndexMap<K, V, fxhash::FxBuildHasher>;
7
8pub type Fallible<T> = anyhow::Result<T>;
9
10pub use anyhow::Context;
11pub use anyhow::Error;
12pub use anyhow::anyhow;
13pub use anyhow::bail;
14
15pub use dada_util_procmacro::*;
16
17pub mod typedvec;
18pub mod vecset;
19
20pub mod fixed_depth_json;
21
22#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
23pub enum Never {}
24
25unsafe impl salsa::Update for Never {
26 unsafe fn maybe_update(_old_pointer: *mut Self, _new_value: Self) -> bool {
27 unreachable!()
28 }
29}
30
31pub mod arena;
32
33pub mod log;
34
35pub async fn indirect<T>(op: impl AsyncFnOnce() -> T) -> T {
36 let boxed_future = futures::future::FutureExt::boxed_local(op());
37 boxed_future.await
38}
39
40pub mod vecext;