Skip to content

Commit

Permalink
Simplify refined instances
Browse files Browse the repository at this point in the history
  • Loading branch information
danslapman committed Jan 2, 2024
1 parent 3bdbcb0 commit 6b94e7b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ given [T, P, F[_, _]](using BsonDecoder[T], Validate[T, P], RefType[F]): BsonDec
case Failure(exc) => Failure(exc)
}

given [T, P, F[_, _]](using BsonEncoder[T], Validate[T, P], RefType[F]): BsonEncoder[F[T, P]] with
given [T, P, F[_, _]](using BsonEncoder[T], RefType[F]): BsonEncoder[F[T, P]] with
extension (value: F[T, P]) def bson: BsonValue = RefType[F].unwrap(value).bson

given [T, P, F[_, _]](using BsonKeyDecoder[T], Validate[T, P], RefType[F]): BsonKeyDecoder[F[T, P]] with
Expand All @@ -38,5 +38,5 @@ given [T, P, F[_, _]](using BsonKeyDecoder[T], Validate[T, P], RefType[F]): Bson
case Failure(exc) => Failure(exc)
}

given [T, P, F[_, _]](using BsonKeyEncoder[T], Validate[T, P], RefType[F]): BsonKeyEncoder[F[T, P]] with
given [T, P, F[_, _]](using BsonKeyEncoder[T], RefType[F]): BsonKeyEncoder[F[T, P]] with
def encode(t: F[T, P]): String = BsonKeyEncoder[T].encode(RefType[F].unwrap(t))

0 comments on commit 6b94e7b

Please sign in to comment.