-
Notifications
You must be signed in to change notification settings - Fork 71
Description
Description
The functions Copilot.Core.Type.Array.flatten and Copilot.Core.Type.Array.size, the classes Copilot.Core.Type.Array.Flatten and Copilot.Core.Type.Array.InnerType, and the Foldable instance for Array, are not being used by any other part of Copilot.
They were deprecated in Copilot 3.11 and no messages have been received requesting that they be kept in the implementation.
As per our internal policy of waiting 3 versions from deprecation until a public interface declaration can be removed, these definitions can now be removed.
Type
- Bug: unused code included in the implementation.
Additional context
- Issue
copilot-core:InnerType,Flatten,Foldableinstance,sizeare unnecessary inArraymodule #369 , addressed in Copilot 3.11, deprecated the aforementioned definitions.
Requester
- Ivan Perez
Method to check presence of bug
The classes are mentioned in several functions, but removing them does not change the behavior. Due to the generic names of some functions (e.g., size), we cannot use grep to detect that they are not used.
The result obtained is just the module declaration.
Removing the following elements altogether, the code compiles without errors and behaves in the same way:
Copilot.Core.Type.ArrayInnerTypeFlattenFoldablesize
Expected result
The following elements are removed:
-
Copilot.Core.Type.ArrayInnerTypeFlattenFoldableinstancesize
Attempts at using those functions should fail.
Desired result
The following elements are removed:
Copilot.Core.Type.ArrayInnerTypeFlattenFoldableinstancesize
Attempts at using those functions should fail.
Proposed solution
Remove the following definitions from Copilot.Core.Type.Array
InnerTypeFlattenFoldableinstancesize
Review the dependencies in case some are no longer needed.
Further notes
None.