Skip to content

Follow up to Seq Instances #3622

Closed
Closed
@djspiewak

Description

@djspiewak

They don't appear to be working quite correctly? Follow up to #3620

scala> import cats._
import cats._

scala> import cats.syntax.all._
import cats.syntax.all._

scala> Seq(1, 2, 3) |+| Seq(3, 4, 5)
<console>:21: error: value |+| is not a member of Seq[Int]
       Seq(1, 2, 3) |+| Seq(3, 4, 5)
                    ^

scala> def foo[F[_]: Monad, A](fa: F[A]) = ()
foo: [F[_], A](fa: F[A])(implicit evidence$1: cats.Monad[F])Unit

scala> foo(Seq(1, 2, 3))
<console>:19: error: Could not find an instance of Monad for Seq
       foo(Seq(1, 2, 3))
          ^

scala> import cats.instances.seq._
import cats.instances.seq._

scala> foo(Seq(1, 2, 3))
<console>:22: error: Could not find an instance of Monad for Seq
       foo(Seq(1, 2, 3))
          ^

I'm guessing we need to add some tests here and see if we can introspect what's going on, but I would have expected this to work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions