Skip to content

Commit

Permalink
Fix implicits for scala 3
Browse files Browse the repository at this point in the history
  • Loading branch information
satabin committed Sep 25, 2023
1 parent 3d0ff43 commit b3d821e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions finite-state/shared/src/main/scala/fs2/data/esp/Rhs.scala
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ object Rhs {

def epsilon[OutTag]: Rhs[OutTag] = Epsilon

implicit def show[O: Show]: Show[Rhs[O]] = _ match {
implicit def show[O: Show]: Show[Rhs[O]] = Show.show[Rhs[O]] {
case Call(q, d, Nil) => show"q$q[$d]()"
case Call(q, d, params) => show"q$q[$d](${params.mkString_(", ")})"
case Call(q, d, params) => show"q$q[$d](${params.mkString_(", ")(show[O], implicitly)})"
case SelfCall(q, Nil) => show"q$q[0](x0)"
case SelfCall(q, params) => show"q$q[0](x0, ${params.mkString_(", ")})"
case SelfCall(q, params) => show"q$q[0](x0, ${params.mkString_(", ")(show[O], implicitly)})"
case Param(n) => show"y$n"
case Tree(tag, inner) => show"<$tag> { $inner }"
case CapturedTree(inner) => show"<%> { $inner }"
Expand Down
4 changes: 2 additions & 2 deletions finite-state/shared/src/main/scala/fs2/data/esp/Tag.scala
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ object Tag {
}

implicit def order[T: Order]: Order[Tag[T]] = Order.from {
case (Name(n1), Name(n2)) => n1.compare(n2)
case (Name(n1), Name(n2)) => Order[T].compare(n1, n2)
case (Name(_), _) => -1
case (Open, Name(_)) => 1
case (Open, _) => -1
case (Close, Name(_) | Open) => 1
case (Close, _) => -1
case (Value(_), Name(_) | Open | Close) => 1
case (Value(v1), Value(v2)) => v1.compare(v2)
case (Value(v1), Value(v2)) => Order[T].compare(v1, v2)
case (Value(_), Leaf) => -1
case (Leaf, Value(_) | Name(_) | Open | Close) => 1
case (Leaf, _) => -1
Expand Down

0 comments on commit b3d821e

Please sign in to comment.