Skip to content

Instantly share code, notes, and snippets.

@bigjason
Created April 26, 2017 16:02
Show Gist options
  • Save bigjason/117b6c1cd0b23dec16238a0ea7ee19ee to your computer and use it in GitHub Desktop.
Save bigjason/117b6c1cd0b23dec16238a0ea7ee19ee to your computer and use it in GitHub Desktop.
implicit class EitherTCompanionExt(wrapper: scalaz.EitherT.type) {
class PinnedEitherT[F[_]] {
def apply[A,B](a: Future[A \/ B]): scalaz.EitherT[Future, A, B] = scalaz.EitherT[Future, A, B](a)
}
@inline def eitherTPinned[F[_]] = new PinnedEitherT[F]
@inline def eitherTFuture[A, B](a: Future[A \/ B]): scalaz.EitherT[Future, A, B] = eitherTPinned[Future](a)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment