I want to build an alternate Winery schema decoder. So I had a look at some of the encoded schemas:
*Codec.Winery> B.unpack $ serialiseSchema $ schema (Proxy :: Proxy Void)
[4,5,0]
*Codec.Winery> B.unpack $ serialiseSchema $ schema (Proxy :: Proxy Bool)
[4,6]
*Codec.Winery> B.unpack $ serialiseSchema $ schema (Proxy :: Proxy Int)
[4,16]
*Codec.Winery> B.unpack $ serialiseSchema $ schema (Proxy :: Proxy Integer)
[4,16]
*Codec.Winery> B.unpack $ serialiseSchema $ schema (Proxy :: Proxy Void)
[4,5,0]
*Codec.Winery> B.unpack $ serialiseSchema $ schema (Proxy :: Proxy ())
[4,3,0]
I know the first number is the schema version. I understand that the Int can be encoded as an Integer since it is strictly smaller. But what about the others?
I tried to compare it to the indexed of the types mentioned in bookstrapSchema
but they don't seem to match.
How can I make sense of these numbers?