The efficient representation of values make it difficult to write safe operations naturally, so we end up with functions like these:
ppValue :: Schema.Column -> Logical.Value -> Either JsonLogicalEncodeError Aeson.Value
I think @jystic has investigated a GADT encoding of values before. That plus some conversion to the existing ADT, à la Ghostbuster or Ornaments, should give us the best of both worlds.
A side benefit is, with the ornamented approach, the effort to introduce a GADT encoding will be incremental, so we need not convert the entire library to use it at once.
The efficient representation of values make it difficult to write safe operations naturally, so we end up with functions like these:
I think @jystic has investigated a GADT encoding of values before. That plus some conversion to the existing ADT, à la Ghostbuster or Ornaments, should give us the best of both worlds.