-
Notifications
You must be signed in to change notification settings - Fork 205
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
PoC for interface hierarchies #11978
Comments
Idea is to have interfaces declare that other interfaces that are required, e.g.
So that when a template
In LF, this means adding a repeated "requires" field in the interface definition, and checking that the required interface is correctly. Additionally, we want to change
Then in daml we expose everything as nicely as we can via typeclasses. E.g. we make sure that |
Part of #11978 changelog_begin changelog_end
Part of #11978 changelog_begin changelog_end
Part of #11978 changelog_begin changelog_end
Part of #11978. Adds typechecking for this on the interface and implementation side. changelog_begin changelog_end
Part of #11978. Adds typechecking for this field on the interface side, and enforces that any template that implements A must implement B if A requires B. CHANGELOG_BEGIN CHANGELOG_END
Part of #11978 changelog_begin changelog_end
* interfaces: Add "requires" field in Haskell AST. Part of #11978. Adds typechecking for this on the interface and implementation side. changelog_begin changelog_end * Fix all the errors
Part of #11978. Adds typechecking for this field on the interface side, and enforces that any template that implements A must implement B if A requires B. CHANGELOG_BEGIN CHANGELOG_END
Part of #11978 changelog_begin changelog_end
Part of #11978. Adds typechecking for those primitives. CHANGELOG_BEGIN CHANGELOG_END
Part of #11978. Adds typechecking for those primitives. CHANGELOG_BEGIN CHANGELOG_END
Part of #11978. CHANGELOG_BEGIN CHANGELOG_END
Part of #11978. CHANGELOG_BEGIN CHANGELOG_END
Part of #11978. CHANGELOG_BEGIN CHANGELOG_END
Adds EToRequiredInterface and EFromRequiredInterface in the Haskell AST, and the typechecker. Part of #11978 changelog_begin changelog_end
Adds EToRequiredInterface and EFromRequiredInterface in the Haskell AST, and the typechecker. Part of #11978 changelog_begin changelog_end
Part of #11978. Adds a test that "requires" is enforced. changelog_begin changelog_end
Part of #11978. Adds a test that "requires" is enforced. changelog_begin changelog_end
Updates the haskell side to be more strict about requirements: - requirements must be transitively closed, so if A requires B, and B requires C, then A requires C. - no circular requirements allowed The logic for circular requirements is a bit duplicated to get a better error message. Part of #11978 changelog_begin changelog_end
* interfaces: Prevent circular and non-closed reqs Updates the haskell side to be more strict about requirements: - requirements must be transitively closed, so if A requires B, and B requires C, then A requires C. - no circular requirements allowed The logic for circular requirements is a bit duplicated to get a better error message. Part of #11978 changelog_begin changelog_end * Update compiler/daml-lf-tools/src/DA/Daml/LF/TypeChecker/Check.hs Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org> * take a list in NotClosed error Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
Part of #11978 changelog_begin changelog_end
Part of #11978. Adds a test that "requires" is enforced. changelog_begin changelog_end
* interfaces: Prevent circular and non-closed reqs Updates the haskell side to be more strict about requirements: - requirements must be transitively closed, so if A requires B, and B requires C, then A requires C. - no circular requirements allowed The logic for circular requirements is a bit duplicated to get a better error message. Part of #11978 changelog_begin changelog_end * Update compiler/daml-lf-tools/src/DA/Daml/LF/TypeChecker/Check.hs Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org> * take a list in NotClosed error Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
part of: #11978 ghc counterpart: digital-asset/ghc#92 changelog_begin changelog_end
Part of #11978 changelog_begin changelog_end
* interfaces: Implement 'requires' syntax part of: #11978 ghc counterpart: digital-asset/ghc#92 changelog_begin changelog_end * . * ... * ... * .... * .... * update bazel-haskell-deps * use requires syntax in tests * ....... * ....... * update bazel-haskell-deps * update InterfaceDesugared * ......... * update bazel-haskell-deps * ........... * update bazel-haskell-depos * update compile.yml * update bazel-haskell-deps
Part of #11978 changelog_begin changelog_end
This proof-of-concept has been implemented. |
No description provided.
The text was updated successfully, but these errors were encountered: