This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait PostgresExtension { | |
val ctx: QuillCtx | |
import ctx._ | |
implicit val jsonDecoder: Decoder[JsonObject] = | |
decoder( | |
(index, row) => | |
io.circe.parser.decode[JsonObject](row.getObject(index).toString) match { | |
case Left(failure) => throw failure |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import magnolia._ | |
object MagnoliaTest { | |
trait TCA[T] { | |
def showA: String | |
} | |
trait TCB[T] { | |
def showB: String | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//simplified logger from scala-logging | |
trait LoggerTakingImplicit[T] { | |
def log(msg: String)(implicit ev: CanLog[T]) | |
} | |
trait CanLog[T] { | |
def logMessage(originalMsg: String, a: T): String | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io._ | |
import io.circe._ | |
import scala.collection.mutable.ListBuffer | |
import scala.io.Source | |
import scala.language.higherKinds | |
import scala.util.{Failure, Success, Try} | |
trait Codec[T] { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import BasicAuthAlgebra.Credentials | |
trait Algebra { | |
type Endpoint[Req, Resp] | |
type Request[T] | |
type RequestHeaders[T] | |
type Path[T] | |
type RequestBody[T] | |
type Method | |
type Response[T] |
NewerOlder