-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Description
Notice that scalac attempts to resolve an implicit for MonoidK[Option[String]] whereas it should be trying to resolve MonoidK[Option] -
Welcome to Scala 2.12.4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_131).
Type in expressions for evaluation. Or try :help.
scala> import shapeless._, cats._, cats.implicits._
scala> object polyEmpty extends Poly0 {
| implicit def cases[F[_], V](implicit F: MonoidK[F]): ProductCase.Aux[HNil, F[V]] =
| at[F[V]](F.empty)
| }
defined object polyEmpty
scala> HList.fillWith[Option[String] :: HNil](polyEmpty)
<console>:22: this.polyEmpty.cases is not a valid implicit value for shapeless.poly.Case0.Aux[polyEmpty.type,Option[String]] because:
hasMatchingSymbol reported error: could not find implicit value for parameter F: cats.MonoidK[Option[String]]
HList.fillWith[Option[String] :: HNil](polyEmpty)
^
<console>:22: hlist.this.FillWith.hconsFill is not a valid implicit value for shapeless.ops.hlist.FillWith[polyEmpty.type,Option[String] :: shapeless.HNil] because:
hasMatchingSymbol reported error: could not find implicit value for parameter hc: shapeless.poly.Case0.Aux[polyEmpty.type,Option[String]]
HList.fillWith[Option[String] :: HNil](polyEmpty)
^
<console>:22: error: could not find implicit value for parameter fillWith: shapeless.ops.hlist.FillWith[polyEmpty.type,Option[String] :: shapeless.HNil]
HList.fillWith[Option[String] :: HNil](polyEmpty)
^Metadata
Metadata
Assignees
Labels
No labels