From 776201985f93417a04bd2504a9de589b7beb4be7 Mon Sep 17 00:00:00 2001 From: Valdemar Grange Date: Mon, 4 Mar 2024 04:55:39 +0100 Subject: [PATCH] remove monadic dependency --- modules/core/src/main/scala/hxl/Hxl.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/core/src/main/scala/hxl/Hxl.scala b/modules/core/src/main/scala/hxl/Hxl.scala index fb9553a..7ea420b 100644 --- a/modules/core/src/main/scala/hxl/Hxl.scala +++ b/modules/core/src/main/scala/hxl/Hxl.scala @@ -81,8 +81,8 @@ object Hxl { } } - def runPar[F[_]: Parallel, A](node: Hxl[F, A])(implicit F: Monad[F]): F[A] = - node.foldMap(parallelRunner[F]) + def runPar[F[_]: Parallel, A](node: Hxl[F, A]): F[A] = + node.foldMap(parallelRunner[F])(Parallel[F].monad) def runSequential[F[_]: Monad, A](node: Hxl[F, A]): F[A] = { implicit val P: Parallel[F] = Parallel.identity[F] @@ -222,10 +222,10 @@ object instances { * Consider the difference between parallel composition of the Batch axis and the lifted effect axis * Which one of the following do you want: * Hxl[F, A] | F[A] - * Batch | Seq * Batch | Par - * Seq | Seq + * Batch | Seq * Seq | Par + * Seq | Seq * * With Hxl (applicative) then the Hxl axis is Batch, and ap / parAp controls the effect axis * With HxlM (monad) then the Hxl axis is Seq and the effect axis is ambigious