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
//! Hazardflow standard library.
//!
//! # Notable APIs
//!
//! This section lists out notable APIs of the Hazardflow standard library.
//!
//! ## Builtin value types
//!
//! - [`HOption<T>`]
//! - [`Array<V, N>`]
//! - [`U<N>`]
//! - [`BoundedU<MAX, WIDTH>`]
//!
//! ## Hazards and interfaces
//!
//! ### Traits
//!
//! - [`Hazard`]
//! - [`Interface`]
//!
//! ### Hazard interfaces
//!
//! - Interface [`I<H, D>`]
//!     - [`Dep`]
//! - Hazard [`AndH<H>`]
//!     - [`Ready<R>`]
//! - Hazard [`ValidH<P, R>`]
//! - Hazard [`VrH<P, R>`]
//!
//! ### Valid interface
//!
//! - Interface [`Valid<P>`]
//!
//! ### Valid-ready interface
//!
//! - Interface [`Vr<P, D>`]
//!
//! ## Module functions
//!
//! - See [`module`] for general module functions.
//! - See [`valid_ready`] for module funtions for modules with `VrH` hazard or valid-ready interfaces.
//!
//! ## Combinators
//!
//! - See [`combinators`] for combinator documentation and implementations.
//!
//! ## Utility functions and macros
//!
//! - See [`utils`] for utility functions.
//! - [`display`](crate::display!)
//! - [`hassert`](crate::hassert!)
//! - [`hpanic`](crate::hpanic!)

pub mod combinators;
pub mod hazard;
pub mod interface;
pub mod module;
pub mod utils;
pub mod valid;
pub mod valid_ready;
pub mod value;

use core::marker::*;
use core::ops::*;

pub use combinators::*;
pub use hazard::*;
pub use interface::*;
pub use module::*;
pub use utils::*;
pub use valid::*;
pub use valid_ready::*;
pub use value::*;

/// Indicates that the function is implemented as a compiler magic.
#[macro_export]
macro_rules! compiler_magic {
    ($($msg:expr)?) => {
        todo!($($msg)?)
    };
}

/// Indicates that the function is implemented as a FFI.
#[macro_export]
macro_rules! ffi {
    ($($msg:expr)?) => {
        todo!($($msg)?)
    };
}