pub use self::{block::*, core::*, mat::*};
mod block;
mod core;
mod mat;
#[derive(Ord, PartialOrd, Eq, PartialEq, Copy, Clone, Debug, Hash)]
pub enum Simpl {
Yes,
No,
}
impl From<bool> for Simpl {
fn from(b: bool) -> Self {
if b {
Simpl::Yes
} else {
Simpl::No
}
}
}
impl Into<bool> for Simpl {
fn into(self) -> bool {
match self {
Simpl::Yes => true,
Simpl::No => false,
}
}
}
impl Default for Simpl {
fn default() -> Self {
Simpl::No
}
}
impl std::ops::Add for Simpl {
type Output = Self;
fn add(self, rhs: Self) -> Self::Output {
match self {
Simpl::Yes => Simpl::Yes,
Simpl::No => rhs,
}
}
}
pub type RedM<Ok, Err> = Result<(Simpl, Ok), Err>;
#[cfg(test)]
mod tests;