Skip to content

Instantly share code, notes, and snippets.

@robhinds
Created March 21, 2020 21:08
Show Gist options
  • Save robhinds/5bb86823bc2f98c339eb953a81be3090 to your computer and use it in GitHub Desktop.
Save robhinds/5bb86823bc2f98c339eb953a81be3090 to your computer and use it in GitHub Desktop.
sealed trait DefaultValidation extends Poly1 {
implicit def default[T] = at[T](x => true)
}
object validates extends DefaultValidation {
implicit def caseValidated[A](implicit v: ValidatorTypeClass[A]) = at[A](x => v.validate(x))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment