CovariantFunctor for testing classes

This commit is contained in:
AF 2023-04-27 05:30:04 +00:00
parent 73e9b9efb3
commit b5d55fe672
2 changed files with 2 additions and 0 deletions

View File

@ -22,6 +22,7 @@ pub use self::traced::*;
pub struct TracedDiagnostic; pub struct TracedDiagnostic;
/// Implementation of [`Monad`] for [Traced] objects. /// Implementation of [`Monad`] for [Traced] objects.
#[derive(CovariantFunctor)]
pub struct TracedClass; pub struct TracedClass;
trait WithTrace: Sized { trait WithTrace: Sized {

View File

@ -21,6 +21,7 @@ impl Context for TestContextCounted {
} }
} }
#[derive(CovariantFunctor)]
pub struct CountedClass; pub struct CountedClass;
pub struct Counted<A> { pub struct Counted<A> {