Created
April 1, 2016 07:54
-
-
Save dabd/fe3e43ef81d974ad4d0153a9d71ff729 to your computer and use it in GitHub Desktop.
This file contains 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 shapeless.tag | |
import shapeless.tag._ | |
implicit def toTaggedType[U, T](u: U): U @@ T = tag[T](u) | |
//implicit def toTaggedString[T](s: String): String @@ T = tag[T](s) | |
trait MyTag | |
def foo(s: String @@ MyTag): String @@ MyTag = s | |
foo("bar") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment