I’m using the the DAML LF API Type Signature package and now I more or less understand how to extract type signatures.
I’m using the extracted info for Daml codegen, and I need to know somehow if I need to include a type class constraint.
In this case e.g. I have extracted from the DALF that the data type has a certain number of fields, but had to add the Ord constraints manually. I’d like to avoid this manuality and I’m wondering if I can get this info from the DALF as well.
instance (HasMigrate type_param0_old type_param0_new, HasMigrate type_param1_old type_param1_new, Ord type_param0_old, Ord type_param0_new, Ord type_param1_old, Ord type_param1_new) => HasMigrate (OldModels.Product.Product.SetOfPairs type_param0_old type_param1_old) (NewModels.Product.Product.SetOfPairs type_param0_new type_param1_new ) where
migrate (OldModels.Product.Product.SetOfPairs field0 field1 field2 field3) = NewModels.Product.Product.SetOfPairs (migrate field0) (migrate field1) (migrate field2) (migrate field3)
Maybe @stefanobaghino-da or @Stephen can tell me the answer, or any of you who is using this library regularly.