title: How to use circe with generic case class that extends a sealed trait
body: <p>I have this minimal example, I want to create encoders/decoders with circe semi-automatic derivation for the generic case class <code>A[T]</code></p>
  <pre><code>import io.circe.{Decoder, Encoder}
  import io.circe.generic.semiauto._
  import io.circe.syntax._
  
  sealed trait MyTrait
  object MyTrait {
    implicit val encoder: Encoder[MyTrait] = deriveEncoder
    implicit val decoder: Decoder[MyTrait] = deriveDecoder
  }
  
  case class A[T](value: T) extends MyTrait
  object A {
    implicit def encoder[T: Encoder]: Encoder[A[T]] = deriveEncoder
    implicit def decoder[T: Decoder]: Decoder[A[T]] = deriveDecoder
  }
  </code></pre>
  <p>This codes does not compile and instead outputs this error</p>
  <pre><code>could not find Lazy implicit value of type io.circe.generic.encoding.DerivedAsObjectEncoder[A]
  </code></pre>
  <p>And the same for the decoder</p>
  <p>What Am I doing wrong here and how can I get it working?</p>