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
For interfaces and exceptions we add DatatypeContexts/"stupid theta" tags during parsing/desugaring so we can identify them later during LFConversion:
exception E desugars to data DamlException => E
interface I desugars to data DamlInterface => I
But for historical reasons we don't do that with templates. Instead, template types are unmarked, and we detect them based on the presence of a HasSignatory instance. We're now running into issues with this approach, because we want to implement HasSignatory for interfaces. It would be nice if, instead, we desugared templates the same way:
template T desugars to data DamlTemplate => T
And then only use that in LFConversion to detect template types. This would be a damlc-internal change. It does not affect Daml LF, in any way, and is backward-compatible with Daml.
The text was updated successfully, but these errors were encountered:
For interfaces and exceptions we add DatatypeContexts/"stupid theta" tags during parsing/desugaring so we can identify them later during LFConversion:
exception E
desugars todata DamlException => E
interface I
desugars todata DamlInterface => I
But for historical reasons we don't do that with templates. Instead, template types are unmarked, and we detect them based on the presence of a
HasSignatory
instance. We're now running into issues with this approach, because we want to implementHasSignatory
for interfaces. It would be nice if, instead, we desugared templates the same way:template T
desugars todata DamlTemplate => T
And then only use that in LFConversion to detect template types. This would be a damlc-internal change. It does not affect Daml LF, in any way, and is backward-compatible with Daml.
The text was updated successfully, but these errors were encountered: