Diffstat (limited to 'src/walk/walkers/core/key_value.rs')
| -rw-r--r-- | src/walk/walkers/core/key_value.rs | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/walk/walkers/core/key_value.rs b/src/walk/walkers/core/key_value.rs index 71af08f..6469203 100644 --- a/src/walk/walkers/core/key_value.rs +++ b/src/walk/walkers/core/key_value.rs @@ -1,5 +1,6 @@ +use effectful::{environment::{Environment, NativeForm}, forward_send_sync}; + use crate::{ - effect::{Effect, EffectExt as _, Effective, EffectiveExt as _, ErasedEffective}, never::Never, protocol::{ visitor::{tags, visit_tag, EffectiveVisitExt as _, TagConst, TagError, TagKind}, @@ -14,6 +15,8 @@ pub struct KeyValueWalker<T, K, V> { _tag: T, } +forward_send_sync!({T, K, V} {} KeyValueWalker<T, K, V>); + impl<T, K, V> KeyValueWalker<T, K, V> { #[inline(always)] pub fn new(tag: T, key_walker: K, value_walker: V) -> Self { @@ -36,10 +39,12 @@ enum KeyValueErrorKind<K, V> { #[derive(Debug)] pub struct KeyValueError<K, V>(KeyValueErrorKind<K, V>); +forward_send_sync!({K, V} {} KeyValueError<K, V>); + impl<'ctx, T, K, V, E> crate::Walker<'ctx, E> for KeyValueWalker<T, K, V> where - E: Effect, - T: TagKind, + E: Environment, + T: TagKind<E>, K: crate::Walker<'ctx, E> + 'ctx, V: crate::Walker<'ctx, E> + 'ctx, { @@ -50,8 +55,8 @@ where #[inline(always)] fn walk<'b: 'c, 'c>( self, - visitor: DynVisitor<'b, 'ctx>, - ) -> ErasedEffective<'c, Result<Self::Output, Self::Error>, E> { + visitor: DynVisitor<'b, 'ctx, E>, + ) -> NativeForm<'c, Result<Self::Output, Self::Error>, E> { let Self { key_walker, value_walker, |