Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ornamented logical values #136

Open
tranma opened this issue Sep 28, 2017 · 1 comment
Open

Ornamented logical values #136

tranma opened this issue Sep 28, 2017 · 1 comment

Comments

@tranma
Copy link
Contributor

tranma commented Sep 28, 2017

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.

@tranma
Copy link
Contributor Author

tranma commented Sep 28, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant