-
Notifications
You must be signed in to change notification settings - Fork 11
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
builtin parity with OPA #224
Comments
Guess my awk'ing was a bit flawed here. There's an |
OPA has a capabilities JSON doc now that could be used instead. I believe it would also be nice if fregot exported one of those. |
✔️ Updated the issue, using the capabilities doc. |
The capabilities doc is really neat. I think we should be able to support that. One annoyance is that there's issues serializing the types of builtins in Getting something out where we either drop the types or we just have |
We used to have two indications of a builtins type: - `Sig i o`, which just provided the arity - `BuiltinType i`, which is a closure that checks the type However, since `Sig` just indicates the arity, it doesn't give us quite enough information to render the capabilities doc as described in #224. In this refactor, I extended `Sig` to `TypeRepr` and made it hold more information: an actual deep embedding of the types. I also moved this new type into `BuiltinType` (which is now a record). This allows convenient construction of _both_ `TypeRepr` and the checker closure using `🡒` and `out`.
We used to have two indications of a builtins type: - `Sig i o`, which just provided the arity - `BuiltinType i`, which is a closure that checks the type However, since `Sig` just indicates the arity, it doesn't give us quite enough information to render the capabilities doc as described in #224. In this refactor, I extended `Sig` to `TypeRepr` and made it hold more information: an actual deep embedding of the types. I also moved this new type into `BuiltinType` (which is now a record). This allows convenient construction of _both_ `TypeRepr` and the checker closure using `🡒` and `out`.
@srenatus fregot now also exports a capabilities document: https://github.com/fugue/fregot/blob/master/extra/capabilities-v0.12.3.json. My previous comment was wrong: due to the refactoring in #250 fregot can now also export the same type description format as OPA. |
@jaspervdj-luminal that's cool, it made it so much easier to check supported builtins across the implementations. Updated the issue above. 🎉 |
Hey all! Are there any plans to include |
Made using this command:
using the capabilities file of OPA v0.24.0.
The text was updated successfully, but these errors were encountered: