reorder imports
This commit is contained in:
parent
f66d1f7039
commit
03a4556138
@ -1 +1 @@
|
||||
Subproject commit f6e04d75bab4a8dec916cc98a6dc18d26616888e
|
||||
Subproject commit e93fbb3b9703ee4dc31745a771207e873be43dd0
|
@ -1 +1 @@
|
||||
Subproject commit 1a04d7f90a095be464c8b155856f2ef922582d4e
|
||||
Subproject commit 223c6205ac5fb8b2c6a66cb0f34aa2adce4e295a
|
@ -1,8 +1,3 @@
|
||||
pub mod avl;
|
||||
pub mod balancing;
|
||||
pub mod bound;
|
||||
pub mod bounds;
|
||||
|
||||
use std::fmt::Display;
|
||||
|
||||
use crate::flow::comparator::*;
|
||||
@ -10,6 +5,11 @@ use crate::func::{context::*, *};
|
||||
|
||||
use super::keyed::*;
|
||||
|
||||
pub mod avl;
|
||||
pub mod balancing;
|
||||
pub mod bound;
|
||||
pub mod bounds;
|
||||
|
||||
pub type Split<BT> = (
|
||||
<BT as BinaryTrees>::Tree,
|
||||
<BT as BinaryTrees>::Tree,
|
||||
|
@ -1,7 +1,6 @@
|
||||
use super::avl::*;
|
||||
use super::bounds::*;
|
||||
use super::*;
|
||||
use crate::func::context::*;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct Bound<A, T> {
|
||||
|
@ -1,12 +1,12 @@
|
||||
//! Traversible binary trees.
|
||||
|
||||
pub mod algorithms;
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use crate::flow::comparator::*;
|
||||
use crate::func::*;
|
||||
|
||||
pub mod algorithms;
|
||||
|
||||
pub type Split<'a, T, A, D> = (
|
||||
Arc<dyn TraversibleBinaryTree<'a, T, A, D>>,
|
||||
Arc<dyn TraversibleBinaryTree<'a, T, A, D>>,
|
||||
|
@ -7,6 +7,10 @@
|
||||
//! * <https://hackage.haskell.org/package/base-4.18.0.0/docs/Control-Applicative.html>
|
||||
//! * <https://hackage.haskell.org/package/base-4.18.0.0/docs/Control-Monad.html>
|
||||
|
||||
use self::applicative_select::ApplicativeSelect;
|
||||
use self::controlflow::{ControlFlow, Iterative};
|
||||
pub use self::extensions::MonadExt;
|
||||
|
||||
pub mod applicative_select;
|
||||
pub mod class_prelude;
|
||||
pub mod context;
|
||||
@ -23,10 +27,6 @@ pub mod test_suite;
|
||||
pub mod tests;
|
||||
pub mod weakfunctorany;
|
||||
|
||||
use self::applicative_select::ApplicativeSelect;
|
||||
use self::controlflow::{ControlFlow, Iterative};
|
||||
pub use self::extensions::MonadExt;
|
||||
|
||||
/// Part of Haskell's `Functor f` responsible for having `f a`.
|
||||
///
|
||||
/// <https://hackage.haskell.org/package/base-4.18.0.0/docs/Data-Functor.html>
|
||||
|
@ -9,6 +9,8 @@
|
||||
#![cfg_attr(doc, deny(rustdoc::invalid_rust_codeblocks))]
|
||||
#![cfg_attr(doc, deny(rustdoc::bare_urls))]
|
||||
|
||||
extern crate self as radn;
|
||||
|
||||
pub mod atomic;
|
||||
pub mod flow;
|
||||
pub mod func;
|
||||
@ -18,5 +20,3 @@ pub mod rcore;
|
||||
pub mod rstd;
|
||||
#[cfg(test)]
|
||||
mod testing;
|
||||
|
||||
extern crate self as radn;
|
||||
|
12
src/mode.rs
12
src/mode.rs
@ -13,12 +13,6 @@
|
||||
//! [`InliningAtomic`]: crate::atomic::InliningAtomic
|
||||
//! [`read_all`]: Deserializer::read_all
|
||||
|
||||
mod inlining;
|
||||
mod regular;
|
||||
mod serialization;
|
||||
mod slice_deserializer;
|
||||
mod stream;
|
||||
|
||||
use std::marker::PhantomData;
|
||||
|
||||
pub use self::inlining::InliningMode;
|
||||
@ -27,6 +21,12 @@ pub use self::serialization::{Deserializer, DeserializerExt, Serializable, Seria
|
||||
pub use self::slice_deserializer::SliceDeserializer;
|
||||
pub use self::stream::{FromRef, Stream, StreamExt, StreamResultExt};
|
||||
|
||||
mod inlining;
|
||||
mod regular;
|
||||
mod serialization;
|
||||
mod slice_deserializer;
|
||||
mod stream;
|
||||
|
||||
/// See [`ModeResult`].
|
||||
pub type ParseSuccess<M, A, I> = <M as Mode>::ParseSuccess<A, I>;
|
||||
|
||||
|
38
src/rcore.rs
38
src/rcore.rs
@ -2,25 +2,6 @@
|
||||
//! Brings [`Mentionable`]/[`Factory`]/[`Origin`] concepts from the original implementation in Python.
|
||||
//! Allows for more generic behaviour via [`Context`], as opposed to original async-only.
|
||||
|
||||
mod addresses;
|
||||
mod context;
|
||||
mod dectx;
|
||||
mod demoted;
|
||||
mod diagnostic;
|
||||
mod hashing;
|
||||
mod inctx;
|
||||
mod inlining;
|
||||
mod modes;
|
||||
mod origin;
|
||||
mod point;
|
||||
mod points;
|
||||
mod regular;
|
||||
mod resolution;
|
||||
mod resolver_origin;
|
||||
mod singular;
|
||||
mod to_hex;
|
||||
mod topology;
|
||||
|
||||
use std::{error::Error, sync::Arc};
|
||||
|
||||
use crate::func::context::*;
|
||||
@ -47,6 +28,25 @@ pub use self::singular::{SingularError, SingularResolution};
|
||||
pub use self::to_hex::hex;
|
||||
pub use self::topology::{MentionableTop, TopoVec, Topology};
|
||||
|
||||
mod addresses;
|
||||
mod context;
|
||||
mod dectx;
|
||||
mod demoted;
|
||||
mod diagnostic;
|
||||
mod hashing;
|
||||
mod inctx;
|
||||
mod inlining;
|
||||
mod modes;
|
||||
mod origin;
|
||||
mod point;
|
||||
mod points;
|
||||
mod regular;
|
||||
mod resolution;
|
||||
mod resolver_origin;
|
||||
mod singular;
|
||||
mod to_hex;
|
||||
mod topology;
|
||||
|
||||
/// Helper alias for [`WeakFunctor::F`] of [`FunctorContext::T`].
|
||||
///
|
||||
/// [`WeakFunctor::F`]: crate::func::WeakFunctor::F
|
||||
|
12
src/rstd.rs
12
src/rstd.rs
@ -2,6 +2,12 @@
|
||||
//!
|
||||
//! [`rcore`]: crate::rcore
|
||||
|
||||
use std::{error::Error, fmt::Display, sync::Arc};
|
||||
|
||||
use crate::func::*;
|
||||
use crate::mode::*;
|
||||
use crate::rcore::*;
|
||||
|
||||
pub mod atomic;
|
||||
pub mod atomic_object;
|
||||
pub mod collections;
|
||||
@ -16,12 +22,6 @@ pub mod tracing;
|
||||
pub mod typeless;
|
||||
mod wrapped_origin;
|
||||
|
||||
use std::{error::Error, fmt::Display, sync::Arc};
|
||||
|
||||
use crate::func::*;
|
||||
use crate::mode::*;
|
||||
use crate::rcore::*;
|
||||
|
||||
impl Display for Address {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "{}@{}", hex(&self.point), self.index)
|
||||
|
@ -1,9 +1,9 @@
|
||||
use std::error::Error;
|
||||
use std::fmt::Display;
|
||||
|
||||
use crate::{atomic::*, mode::*};
|
||||
|
||||
pub mod array;
|
||||
pub mod au64;
|
||||
pub mod boolean;
|
||||
pub mod plain;
|
||||
|
||||
use crate::{atomic::*, mode::*};
|
||||
|
@ -1,15 +1,15 @@
|
||||
use crate::atomic::*;
|
||||
pub mod context;
|
||||
|
||||
use std::{error::Error, fmt::Display, marker::PhantomData};
|
||||
|
||||
use crate::{
|
||||
atomic::*,
|
||||
flow::binary::*,
|
||||
mode::*,
|
||||
rcore::*,
|
||||
rstd::{atomic::au64::*, nullable::*, point::*},
|
||||
};
|
||||
|
||||
pub mod context;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum TreeParseError<E> {
|
||||
HeightParse(IntParseError),
|
||||
|
@ -1,13 +1,13 @@
|
||||
//! Traits to better express parsing semantics.
|
||||
|
||||
pub mod static_pair;
|
||||
|
||||
use crate::atomic::*;
|
||||
use crate::mode::*;
|
||||
use crate::rcore::*;
|
||||
|
||||
use super::{atomic_object::*, *};
|
||||
|
||||
pub mod static_pair;
|
||||
|
||||
/// This factory always reads the same amount of bytes or returns error.
|
||||
pub trait FixedSizeFactory<'a, Ctx: Context<'a>>: InliningFactory<'a, Ctx> {
|
||||
/// For [`ConstSizeFactory`] this must return [`ConstSizeFactory::SIZE`].
|
||||
|
@ -3,8 +3,6 @@
|
||||
|
||||
use std::ops::Deref;
|
||||
|
||||
use crate::rstd::*;
|
||||
|
||||
use super::*;
|
||||
|
||||
/// Trait to represent serialisation of object's data.
|
||||
|
@ -1,11 +1,5 @@
|
||||
//! Structures for tracing the execution flow of [Monad]s.
|
||||
|
||||
mod rendered;
|
||||
mod rendered_display;
|
||||
mod trace;
|
||||
mod traceable;
|
||||
mod traced;
|
||||
|
||||
use crate::rcore::*;
|
||||
|
||||
use super::*;
|
||||
@ -17,6 +11,12 @@ use self::trace::*;
|
||||
pub use self::traceable::Traceable;
|
||||
pub use self::traced::Traced;
|
||||
|
||||
mod rendered;
|
||||
mod rendered_display;
|
||||
mod trace;
|
||||
mod traceable;
|
||||
mod traced;
|
||||
|
||||
/// [`Diagnostic`] for [Traced] objects.
|
||||
///
|
||||
/// [`Diagnostic::after`]/[`Diagnostic::before`] are represented in [`RenderedCommon::Event`].
|
||||
|
@ -1,7 +1,7 @@
|
||||
pub mod render;
|
||||
|
||||
use std::{cmp::max, fmt::Display};
|
||||
|
||||
pub mod render;
|
||||
|
||||
#[derive(Debug)]
|
||||
enum Trace {
|
||||
Pure,
|
||||
|
@ -3,7 +3,6 @@
|
||||
//! [`rcore`]: crate::rcore
|
||||
|
||||
use super::{tcast::*, wrapped_origin::*, *};
|
||||
use crate::mode::*;
|
||||
|
||||
type TypelessSerialize<'a> = dyn 'a + Send + Sync + Fn(&mut dyn Serializer);
|
||||
|
||||
|
@ -1,6 +1,3 @@
|
||||
pub mod counted;
|
||||
pub mod traced;
|
||||
|
||||
use std::{error::Error, fmt::Display, sync::Arc};
|
||||
|
||||
use sha2::{Digest, Sha256};
|
||||
@ -9,6 +6,9 @@ use crate::func::{context::*, *};
|
||||
use crate::rcore::*;
|
||||
use crate::rstd::{inject::*, typeless::*};
|
||||
|
||||
pub mod counted;
|
||||
pub mod traced;
|
||||
|
||||
pub struct NoDiagnostic;
|
||||
|
||||
impl<'a, T: Monad<'a>> Diagnostic<'a, T> for NoDiagnostic {
|
||||
|
Loading…
Reference in New Issue
Block a user