diff --git a/src/flow/binary/balancing.rs b/src/flow/binary/balancing.rs index 928374d..87539c2 100644 --- a/src/flow/binary/balancing.rs +++ b/src/flow/binary/balancing.rs @@ -37,10 +37,6 @@ impl<'a, BT: FunctorContext<'a>> FunctorContext<'a> for BalancedTrees { type T = BT::T; } -impl<'a, BT: MonadContext<'a>> MonadContext<'a> for BalancedTrees { - type _Tm = Self::T; -} - #[derive(Debug)] pub enum BalancingError { Height(HeightError), diff --git a/src/flow/binary/bound.rs b/src/flow/binary/bound.rs index 86c297c..2903595 100644 --- a/src/flow/binary/bound.rs +++ b/src/flow/binary/bound.rs @@ -43,10 +43,6 @@ impl<'a, BT: FunctorContext<'a>> FunctorContext<'a> for BoundTrees { type T = BT::T; } -impl<'a, BT: MonadContext<'a>> MonadContext<'a> for BoundTrees { - type _Tm = Self::T; -} - pub trait BinaryTreesBindable<'a>: MonadTrees<'a> { fn bounds_error(&self, error: BoundsError) -> BTWrap<'a, Self, T>; diff --git a/src/func/context.rs b/src/func/context.rs index 7a42260..d0d3301 100644 --- a/src/func/context.rs +++ b/src/func/context.rs @@ -10,6 +10,13 @@ pub trait MonadContext<'a>: FunctorContext<'a, T = Self::_Tm> { type _Tm: Monad<'a>; } +impl<'a, Ctx: FunctorContext<'a>> MonadContext<'a> for Ctx +where + Ctx::T: Monad<'a>, +{ + type _Tm = Ctx::T; +} + pub trait FunctorContextExt<'a>: FunctorContext<'a> { fn fmap( fa: WrapC<'a, A, Self>, diff --git a/src/mrds/trees/heighted.rs b/src/mrds/trees/heighted.rs index 4736559..2fd7e9a 100644 --- a/src/mrds/trees/heighted.rs +++ b/src/mrds/trees/heighted.rs @@ -86,10 +86,6 @@ impl<'a, A: 'a + Send> FunctorContext<'a> for Trees { type T = instances::solo::SoloInstance; } -impl<'a, A: 'a + Send> MonadContext<'a> for Trees { - type _Tm = Self::T; -} - impl BinaryTrees for Trees { type Node = Node; type Reference = Reference; diff --git a/src/rstd/collections/tree/context.rs b/src/rstd/collections/tree/context.rs index 7a79bdf..476212a 100644 --- a/src/rstd/collections/tree/context.rs +++ b/src/rstd/collections/tree/context.rs @@ -69,17 +69,6 @@ impl< type T = FallibleMonad<'a, Ctx, TreeContextError<'a, Ctx, A, E>>; } -impl< - 'a, - Ctx: Context<'a>, - A: Mentionable<'a, Ctx> + Clone, - C: 'a + Comparator, - E: 'a + Send, - > MonadContext<'a> for TreeContext2<'a, Ctx, A, C, E> -{ - type _Tm = Self::T; -} - impl< 'a, Ctx: Context<'a>, diff --git a/src/testing.rs b/src/testing.rs index b120b32..883344c 100644 --- a/src/testing.rs +++ b/src/testing.rs @@ -72,10 +72,6 @@ impl<'a> FallibleCtx<'a> for TestContextPlain { type Fallible = instances::result::ResultFailAny; } -impl<'a> MonadContext<'a> for TestContextPlain { - type _Tm = Self::T; -} - impl<'a> Context<'a> for TestContextPlain { type D = NoDiagnostic; diff --git a/src/testing/counted.rs b/src/testing/counted.rs index b42c6ae..a4b8302 100644 --- a/src/testing/counted.rs +++ b/src/testing/counted.rs @@ -15,10 +15,6 @@ impl<'a> FallibleCtx<'a> for TestContextCounted { type Fallible = instances::result::ResultFailOver; } -impl<'a> MonadContext<'a> for TestContextCounted { - type _Tm = Self::T; -} - impl<'a> Context<'a> for TestContextCounted { type D = NoDiagnostic; diff --git a/src/testing/traced.rs b/src/testing/traced.rs index 6049df4..f0f0c69 100644 --- a/src/testing/traced.rs +++ b/src/testing/traced.rs @@ -14,10 +14,6 @@ impl<'a> FallibleCtx<'a> for TestContextTraced { type Fallible = instances::result::ResultFailOver; } -impl<'a> MonadContext<'a> for TestContextTraced { - type _Tm = Self::T; -} - impl<'a> Context<'a> for TestContextTraced { type D = TracedDiagnostic;