You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As part of our plan to fix cross-SDK dependencies (see #3606), we want to translate DAML typeclass to DAML-LF’s tuples (i.e. structural records). This poses a problem at the use site of a typeclass where we do not have access to the definition of a typeclass but only to its name. Therefore we cannot easily construct the structural record type during the conversion.
To sidestep this issue, we would like to extend DAML-LF with type synonyms of the form
synonym Name a b c = SomeTypeOverabc
This should also allow us to speed up typechecking of structural records a bit (which is going to become important once we start using it for typeclasses) since we can shortcircuit if we get the same synonym.
For the typechecker the type synonym and its definition are always interchangeable. Over the Ledger API, we always expand the type synonym. The interface reader will also always expand type synonyms.
As part of our plan to fix cross-SDK dependencies (see #3606), we want to translate DAML typeclass to DAML-LF’s tuples (i.e. structural records). This poses a problem at the use site of a typeclass where we do not have access to the definition of a typeclass but only to its name. Therefore we cannot easily construct the structural record type during the conversion.
To sidestep this issue, we would like to extend DAML-LF with type synonyms of the form
synonym Name a b c = SomeTypeOverabc
This should also allow us to speed up typechecking of structural records a bit (which is going to become important once we start using it for typeclasses) since we can shortcircuit if we get the same synonym.
For the typechecker the type synonym and its definition are always interchangeable. Over the Ledger API, we always expand the type synonym. The interface reader will also always expand type synonyms.
cc @gerolf-da @remyhaemmerle-da @hurryabit @associahedron
The text was updated successfully, but these errors were encountered: