interfaces: Add requires in DefInterface protobuf (#11986)

Part of #11978

changelog_begin
changelog_end
This commit is contained in:
Sofia Faro 2021-12-07 00:38:59 +00:00 committed by GitHub
parent 349d812482
commit 9430ee3131
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 6 deletions

View File

@ -1005,10 +1005,11 @@ encodeDefInterface :: DefInterface -> Encode P.DefInterface
encodeDefInterface DefInterface{..} = do
defInterfaceLocation <- traverse encodeSourceLoc intLocation
defInterfaceTyconInternedDname <- encodeDottedNameId unTypeConName intName
defInterfaceParamInternedStr <- encodeNameId unExprVarName intParam
defInterfaceFixedChoices <- encodeNameMap encodeTemplateChoice intFixedChoices
let defInterfaceRequires = V.empty -- TODO https://github.com/digital-asset/daml/issues/11978
defInterfaceMethods <- encodeNameMap encodeInterfaceMethod intMethods
defInterfaceParamInternedStr <- encodeNameId unExprVarName intParam
defInterfacePrecond <- encodeExpr intPrecondition
defInterfaceFixedChoices <- encodeNameMap encodeTemplateChoice intFixedChoices
pure $ P.DefInterface{..}
encodeInterfaceMethod :: InterfaceMethod -> Encode P.InterfaceMethod

View File

@ -1532,12 +1532,13 @@ message InterfaceMethod {
message DefInterface {
Location location = 1;
int32 tycon_interned_dname = 2;
repeated InterfaceMethod methods = 3;
repeated TypeConName requires = 3;
repeated InterfaceMethod methods = 4;
// Binder for interface value ("this") in fixed choices.
int32 param_interned_str = 4;
repeated TemplateChoice fixed_choices = 5;
// Binder for interface value ("this") in precond and fixed choices.
int32 param_interned_str = 5;
Expr precond = 6;
repeated TemplateChoice fixed_choices = 7;
}
// Exception definition