Tagged
A value of type B tagged with a phantom input type A, viewed as a profunctor.
Running an optic on a Tagged builds the whole from a focus: it is the profunctor behind reverseGet. Encoded as K3 with a phantom Unit, like Function1.
Instances: TaggedProfunctor, TaggedChoice, TaggedClosed, TaggedCostrong.
val choice = object : TaggedChoice {}
Tagged.narrow(choice.left<Int, Int, String>(Tagged(1))).value // Left(1)Content copied to clipboard