Skip to content

Commit

Permalink
Add Kleisli syntax compilation check
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcardell committed May 19, 2022
1 parent 3130456 commit cea086f
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package org.typelevel.log4cats.extras.syntax

import cats._
import cats.data.Kleisli
import org.typelevel.log4cats.LoggerFactory

object LoggerFactorySyntaxCompilation {
def loggerFactorySyntaxMapK[F[_]: Functor, G[_]](lf: LoggerFactory[F])(
fk: F ~> G
): LoggerFactory[G] =
lf.mapK[G](fk)

def loggerFactoryKleisliLiftK[F[_]: Functor, A](
lf: LoggerFactory[F]
): LoggerFactory[Kleisli[F, A, *]] =
lf.mapK(Kleisli.liftK[F, A])
}

0 comments on commit cea086f

Please sign in to comment.