johnhungerford / generic-schema

2 stars 1 forks source link

Add singleton schema type #46

Closed johnhungerford closed 2 years ago

johnhungerford commented 2 years ago

Represents a single value. I don't think this value needs to be encoded in the schema type as a single type.

Basically it should allow us to encode a case object as a single value or message rather than as an empty product (which it currently does). This will require an update to product deriver to narrow it to MirroredElemTypes <: NonEmptyTuple, and make a new deriver with MirroredElemTypes =:= EmptyTuple that generates a singleton as a string of the name.

johnhungerford commented 2 years ago

closed with #55