awakesecurity / proto3-suite

Haskell Protobuf Implementation
https://hackage.haskell.org/package/proto3-suite
Other
80 stars 55 forks source link

Fix bug in instance "Eq (Enumerated a)". #241

Closed j6carey closed 1 year ago

j6carey commented 1 year ago

Modify "Eq (Enumerated a)" and "Ord (Enumerated a)" to identify "Enumerated (Right e)" with "Enumerated (Left (fromProtoEnum e))" because those two values encode to the same octet sequence. They are already equivalent as arguments to "isDefault @(Enumerated e)".

Also increase the major version because this bug fix might break existing applications or test suites.