Skip to content

Instantly share code, notes, and snippets.

View little-inferno's full-sized avatar
🍭

Danil Zasypkin little-inferno

🍭
  • Yekaterinburg
  • 16:15 (UTC +05:00)
View GitHub Profile
@SystemFw
SystemFw / Conversions.scala
Last active April 23, 2021 07:53
Typed schema conversion with shapeless
object Conversions {
import cats._, implicits._, data.ValidatedNel
import mouse._, string._, option._
import shapeless._, labelled._
private type Result[A] = ValidatedNel[ParseFailure, A]
case class ParseFailure(error: String)
trait Convert[V] {