diff --git a/compiler/damlc/daml-lf-conversion/src/DA/Daml/LFConversion.hs b/compiler/damlc/daml-lf-conversion/src/DA/Daml/LFConversion.hs index 0b1504d402..1f0e3fb7bb 100644 --- a/compiler/damlc/daml-lf-conversion/src/DA/Daml/LFConversion.hs +++ b/compiler/damlc/daml-lf-conversion/src/DA/Daml/LFConversion.hs @@ -608,7 +608,8 @@ convertBind2 env (NonRec name x) , is name `elem` internals = pure [] -- NOTE(MH): Desugaring `template X` will result in a type class - -- `XInstance` which has methods `createX`, `fetchX` and `exerciseXY` + -- `XInstance` which has methods `_createX`, `_fetchX`, `_exerciseXY`, + -- `_fetchByKeyX` and `_lookupByKeyX` -- (among others). The implementations of these methods are replaced -- with DAML-LF primitives in `convertGenericChoice` below. As part of -- this rewriting we also need to erase the default implementations of @@ -616,7 +617,7 @@ convertBind2 env (NonRec name x) -- -- TODO(MH): The check is an approximation which will fail when users -- start the name of their own methods with, say, `_exercise`. - | any (`isPrefixOf` is name) [ "$"++prefix++"_"++method | prefix <- ["dm", "c"], method <- ["create", "fetch", "exercise"] ] + | any (`isPrefixOf` is name) [ "$"++prefix++"_"++method | prefix <- ["dm", "c"], method <- ["create", "fetch", "exercise", "fetchByKey", "lookupByKey"] ] = pure [] -- NOTE(MH): Our inline return type syntax produces a local letrec for -- recursive functions. We currently don't support local letrecs.