-
Notifications
You must be signed in to change notification settings - Fork 48
ogma-core: Simplify struct generation #199
Description
Description
Copilot 4.2 introduced a simpler way of defining the class instances needed to work with structs in Copilot. Thanks to generics, it is now possible to use default versions of most functions (but they have to be explicitly stated).
We should update Ogma to generate simpler code, which will also simplify Ogma's code.
Type
- Management: Update to leverage capabilities of new versions of Copilot.
Additional context
- Issue #564 introduced a simpler method to work with structs in Copilot.
Requester
- Ivan Perez.
Method to check presence of bug
Not applicable (not a bug).
Expected result
Ogma generates simpler code that defaults to typeNameDefault and other similar functions when generating type class instances for Copilot structs.
Desired result
Ogma generates simpler code that defaults to typeNameDefault and other similar functions when generating type class instances for Copilot structs.
Proposed solution
Modify Ogma's Copilot struct backend to make structs an instance of Generic, and to leverage the new default functions where possible.
Further notes
None.