Diffstat (limited to 'src/build.rs')
| -rw-r--r-- | src/build.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/build.rs b/src/build.rs index 16e1f95..bb210f8 100644 --- a/src/build.rs +++ b/src/build.rs @@ -1,7 +1,7 @@ use core::fmt::{Debug, Display}; pub mod builders; -use effectful::environment::{DynBind, EnvConfig, Environment, NativeForm}; +use effectful::{bound::SsBound, effective::Canonical, environment::Environment, DynBind}; use crate::protocol::AsVisitor; @@ -13,14 +13,14 @@ use crate::protocol::AsVisitor; /// /// There can be one canonical builder per mode. The mode is specified by the `M` generic and /// can be any type. It is only used as a type level tag. -pub trait Build<'ctx, M, E: Environment>: Sized { +pub trait Build<'lt, 'ctx, M, E: Environment>: Sized { /// The canonical builder for mode `M`. /// /// This builder will build values of type `Self`. - type Builder: Builder<'ctx, E, Value = Self>; + type Builder: Builder<'lt, 'ctx, E, Value = Self>; } -pub trait BuilderTypes<C: EnvConfig> { +pub trait BuilderTypes<C: SsBound> { type Seed: DynBind<C>; /// Error that can happen during filling the builder with data. @@ -47,10 +47,10 @@ pub trait BuilderTypes<C: EnvConfig> { /// the builder with data from it's walk. /// - Call [`Self::build()`] to finish building the value and get any errors /// that happened during filling it with data. -pub trait Builder<'ctx, E: Environment>: - DynBind<E> + AsVisitor<'ctx, E> + BuilderTypes<E> + Sized +pub trait Builder<'lt, 'ctx, E: Environment>: + DynBind<E> + AsVisitor<'lt, 'ctx, E> + BuilderTypes<E> + Sized { - fn from_seed<'a>(seed: Self::Seed) -> NativeForm<'a, Self, E> + fn from_seed<'a>(seed: Self::Seed) -> Canonical<'a, Self, E> where Self: 'a; @@ -58,7 +58,7 @@ pub trait Builder<'ctx, E: Environment>: /// /// If an error happened with the builder during the walk /// it will be reported here. - fn build<'a>(self) -> NativeForm<'a, Result<Self::Output, Self::Error>, E> + fn build<'a>(self) -> Canonical<'a, Result<Self::Output, Self::Error>, E> where Self: 'a; } |