Skip to content

copilot-core: Haddock comment of test property is incorrect #787

Open

Description

@ivanperez-keera

Description

The Haddock comment associated to copilot-core:Test.Copilot.Core.Type.testSimpleTypesInequality indicates that the test is limited because it "[does] not test structs or arrays". However, the implementation of the test does include a struct and an array.

Haddock comments should accurately describe the definitions they accompany.

Type

  • Bug: Incorrect documentation.

Additional context

None.

Requester

  • Ivan Perez.

Method to check presence of bug

Can only be checked by visual inspection, since it is a discrepancy between comments and code. The comment that accompanies copilot-core:Test.Copilot.Core.Type.testSimpleTypesInequality reads:

-- | Test that the function simpleTypes preserves inequality, that is, it
-- returns different values for different types. This test is limited; we do
-- not test structs or arrays.

However, the implementation grabs types from diffTypes, whose last elements are:

    diffTypes = [ simpleType Bool
                  -- ... removed for brevity
                , simpleType (Array Int8 :: Type (Array 3 Int8))
                , simpleType (Struct (S (Field 0) (Field 0)))
                ] 

Expected result

The comment that accompanies copilot-core:Test.Copilot.Core.Type.testSimpleTypesInequality is consistent with what it tests.

Desired result

The comment that accompanies copilot-core:Test.Copilot.Core.Type.testSimpleTypesInequality is consistent with what it tests.

Proposed solution

Remove the claim that the test is limited because we do not test structs or arrays from the Haddock comment for copilot-core:Test.Copilot.Core.Type.testSimpleTypesInequality.

Further notes

None.

Activity

  1. added
    CR:Type:BugAdmin only: Change request pertaining to error detected
    CR:Status:InitiatedAdmin only: Change request that has been initiated
    on Oct 20, 2026
  2. ivanperez-keera commented on Nov 10, 2026

    @ivanperez-keera
    MemberAuthor

    Change Manager: Confirmed that the issue exists.

  3. added
    CR:Status:ConfirmedAdmin only: Change request that has been acknowledged by the change manager
    and removed
    CR:Status:InitiatedAdmin only: Change request that has been initiated
    on Nov 10, 2026
  4. ivanperez-keera commented on Nov 10, 2026

    @ivanperez-keera
    MemberAuthor

    Technical Lead: Confirmed that the issue should be addressed.

  5. added
    CR:Status:AcceptedAdmin only: Change request accepted by technical lead
    and removed
    CR:Status:ConfirmedAdmin only: Change request that has been acknowledged by the change manager
    on Nov 10, 2026
  6. ivanperez-keera commented on Nov 10, 2026

    @ivanperez-keera
    MemberAuthor

    Technical Lead: Issue scheduled for fixing in Copilot 4.8.3.

    Fix assigned to: @ivanperez-keera .

  7. added
    CR:Status:ScheduledAdmin only: Change requested scheduled
    and removed
    CR:Status:AcceptedAdmin only: Change request accepted by technical lead
    on Nov 10, 2026
  8. added this to the 4.8.3 milestone on Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

CR:Status:ScheduledAdmin only: Change requested scheduledCR: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