#![no_std]
#![warn(missing_docs)]
use core::cmp::Ordering;
macro_rules! impl_derivable {
($Type: ty) => (
impl ::core::cmp::PartialEq for $Type {
fn eq(&self, _: &Self) -> bool { match *self {} }
}
impl ::core::cmp::Eq for $Type { }
impl ::core::cmp::PartialOrd for $Type {
fn partial_cmp(&self, _: &Self) -> Option<::core::cmp::Ordering> { match *self {} }
}
impl ::core::cmp::Ord for $Type {
fn cmp(&self, _: &Self) -> ::core::cmp::Ordering { match *self {} }
}
impl ::core::clone::Clone for $Type {
fn clone(&self) -> Self { match *self {} }
}
impl ::core::marker::Copy for $Type {}
impl ::core::hash::Hash for $Type {
fn hash<H>(&self, _: &mut H) where H: ::core::hash::Hasher { match *self {} }
}
impl ::core::default::Default for $Type {
fn default() -> Self { unreachable!() }
}
impl ::core::fmt::Debug for $Type {
fn fmt(&self, _: &mut ::core::fmt::Formatter) -> ::core::result::Result<(), ::core::fmt::Error> {
match *self {}
}
}
);
}
pub mod consts;
pub mod bit;
pub mod uint;
pub mod int;
pub mod private;
pub mod marker_traits;
pub mod type_operators;
pub mod operator_aliases;
pub use consts::*;
pub use marker_traits::{NonZero, Ord, Bit, Unsigned, Integer};
pub use type_operators::{Cmp, Pow, Same};
pub use operator_aliases::{And, Or, Xor, Shleft, Shright, Sum, Diff, Prod, Quot, Mod, Negate, Exp, Add1, Sub1, Square, Cube, Compare};
pub use bit::{B0, B1};
pub use uint::{UInt, UTerm};
pub use int::{NInt, PInt};
pub enum Greater {}
impl_derivable!{Greater}
pub enum Less {}
impl_derivable!{Less}
pub enum Equal {}
impl_derivable!{Equal}
impl Ord for Greater {
#[inline]
fn to_ordering() -> Ordering {
Ordering::Greater
}
}
impl Ord for Less {
#[inline]
fn to_ordering() -> Ordering {
Ordering::Less
}
}
impl Ord for Equal {
#[inline]
fn to_ordering() -> Ordering {
Ordering::Equal
}
}