with summoning syntax

This commit is contained in:
Mark Canlas 2022-09-07 11:25:33 -04:00
parent 28d945c8f1
commit 63bcfbd282
2 changed files with 8 additions and 0 deletions

View File

@ -6,3 +6,7 @@ trait Load[A]:
// from register
def from: String
object Load:
def apply[A : Load]: Load[A] =
summon[Load[A]]

View File

@ -2,3 +2,7 @@ package com.htmlism.scratchpad
trait Store[A]:
def to: String
object Store:
def apply[A: Store]: Store[A] =
summon[Store[A]]