This repository has been archived by the owner on Jul 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Implement type inference for JsonLogic #1
Comments
CharString
added a commit
that referenced
this issue
Nov 9, 2023
CharString
added a commit
that referenced
this issue
Nov 9, 2023
Vendor the meat of https://github.com/domdomegg/hindley-milner-typescript-minimal Implementations for - Algorithm W L. Damas and R. Milner, "Principal type-schemes for functional programs", Proceedings of the 9th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages - POPL '82, 1982. https://doi.org/10.1145/582153.582176 - Algorithm M O. Lee and K. Yi, "Proofs about a folklore let-polymorphic type inference algorithm", ACM Transactions on Programming Languages and Systems, vol. 20, no. 4, p. 707-723, 1998. https://doi.org/10.1145/291891.291892 Vendoring, because we will need to tailor the models to the JsonLogic language. Code in this commit is an exact copy; just reformated with prettier.
CharString
added a commit
that referenced
this issue
Nov 9, 2023
About a third of these don't typecheck.
CharString
added a commit
that referenced
this issue
Nov 9, 2023
Adds - default Context with type annotations of JsonLogic operations - parser for JsonLogic "rules" - parser for JsonLogic "data" - Number and String literal to the models - Rename and extend the TypeFunctions - handling of Number and String to W
CharString
added a commit
that referenced
this issue
Nov 9, 2023
Changes "if", "filter", "and" and "or" to take any type as arguments but the return types should still align. This change just assumes an implicit "!!" call around the boolean arguments.
CharString
added a commit
that referenced
this issue
Nov 9, 2023
- Flag some error messages as TODO - Add variadic "if" (which is a chain of elifs) - Add "?:" - Handle more "var" error cases
CharString
added a commit
that referenced
this issue
Nov 13, 2023
Adds - default Context with type annotations of JsonLogic operations - parser for JsonLogic "rules" - parser for JsonLogic "data" - Number and String literal to the models - Rename and extend the TypeFunctions - handling of Number and String to W
CharString
added a commit
that referenced
this issue
Nov 13, 2023
Changes "if", "filter", "and" and "or" to take any type as arguments but the return types should still align. This change just assumes an implicit "!!" call around the boolean arguments.
CharString
added a commit
that referenced
this issue
Nov 13, 2023
- Flag some error messages as TODO - Add variadic "if" (which is a chain of elifs) - Add "?:" - Handle more "var" error cases
Type inference feature was cancelled due to implementation difficulties vs benefits. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: