Skip to content

copilot-core: Remove InnerType, Flatten, Foldable instance, size from Copilot.Core.Type.Array #411

@ivanperez-keera

Description

@ivanperez-keera

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

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.Array
    • InnerType
    • Flatten
    • Foldable
    • size

Expected result

The following elements are removed:

  • Copilot.Core.Type.Array

    • InnerType
    • Flatten
    • Foldable instance
    • size

    Attempts at using those functions should fail.

Desired result

The following elements are removed:

  • Copilot.Core.Type.Array
    • InnerType
    • Flatten
    • Foldable instance
    • size
      Attempts at using those functions should fail.

Proposed solution

Remove the following definitions from Copilot.Core.Type.Array

  • InnerType
  • Flatten
  • Foldable instance
  • size

Review the dependencies in case some are no longer needed.

Further notes

None.

Metadata

Metadata

Labels

CR:Status:ClosedAdmin only: Change request that has been completedCR:Type:BugAdmin only: Change request pertaining to error detected

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions