Diffstat (limited to 'src/protocol/visitor/recoverable.rs')
| -rw-r--r-- | src/protocol/visitor/recoverable.rs | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/protocol/visitor/recoverable.rs b/src/protocol/visitor/recoverable.rs index 7ad36bf..f1a597f 100644 --- a/src/protocol/visitor/recoverable.rs +++ b/src/protocol/visitor/recoverable.rs @@ -1,8 +1,5 @@ use effectful::{ - effective::Effective, - environment::{DynBind, EnvConfig, Environment, InEnvironment, NativeForm}, - higher_ranked::Rank1, - SendSync, + effective::{Canonical, Effective}, environment::{Environment, InEnvironment}, higher_ranked::Rank1, DynBind, SendSync }; use crate::{ @@ -18,7 +15,7 @@ pub trait Recoverable<'ctx, E: Environment>: DynBind<E> { fn visit<'a>( &'a mut self, scope: DynRecoverableScope<'a, 'ctx, E>, - ) -> NativeForm<'a, VisitResult, E>; + ) -> Canonical<'a, VisitResult, E>; } const _: () = { @@ -46,22 +43,22 @@ const _: () = { }; pub trait RecoverableScope<'ctx, E: Environment>: DynBind<E> { - fn new_walk<'this: 'effect, 'visitor: 'effect, 'effect>( + fn new_walk<'this: 'effect, 'visitor: 'effect, 'lt: 'effect, 'effect>( &'this mut self, - visitor: DynVisitor<'visitor, 'ctx, E>, - ) -> NativeForm<'effect, Status, E>; + visitor: DynVisitor<'visitor, 'lt, 'ctx, E>, + ) -> Canonical<'effect, Status, E>; } pub type DynRecoverableScope<'a, 'ctx, E> = &'a mut (dyn RecoverableScope<'ctx, E> + 'a); -pub fn visit_recoverable<'a, 'ctx, E: Environment>( - visitor: DynVisitor<'a, 'ctx, E>, +pub fn visit_recoverable<'a, 'lt, 'ctx, E: Environment>( + visitor: DynVisitor<'a, 'lt, 'ctx, E>, scope: DynRecoverableScope<'a, 'ctx, E>, -) -> NativeForm<'a, VisitResult, E> { +) -> Canonical<'a, VisitResult, E> { if let Some(object) = visitor .0 .cast_mut() - .upcast_mut::<dyn Recoverable<'ctx, E> + 'a>() + .upcast_mut::<dyn Recoverable<'ctx, E> + 'lt>() { // Allow the visitor to give a hint if it wants. object.visit(scope) |