Skip to content

copilot-theorem: Copilot.Theorem.What4.Translate enables PatternSynonyms unnecessarily #733

Closed

Description

@ivanperez-keera

Description

The module copilot-theorem:Copilot.Theorem.What4.Translate enables the language extension PatternSynonyms unnecessarily. Nothing in the module requires that extension and it should continue to compile without it.

Per our style guide to remove unused code and minimize extensions, this extension should be removed from that module.

Type

  • Maintenance: Remove unused extension in compliance with style guide.

Additional context

None.

Requester

  • Ivan Perez.

Method to check presence of bug

We can check that the module declares the extension PatternSynonyms with grep:

$ grep -nHre 'PatternSynonyms' copilot-theorem/src/Copilot/Theorem/What4/Translate.hs
copilot-theorem/src/Copilot/Theorem/What4/Translate.hs:5:{-# LANGUAGE PatternSynonyms            #-}

However, we can only check that it is not needed by removing it and checking that copilot-theorem compiles correctly without it.

Expected result

The module copilot-theorem:Copilot.Theorem.What4.Translate does not enable the language extension PatternSynonyms.

Desired result

The module copilot-theorem:Copilot.Theorem.What4.Translate does not enable the language extension PatternSynonyms.

Proposed solution

Remove the line that enables the language extension PatternSynonyms from copilot-theorem/src/Copilot/Theorem/What4/Translate.hs.

Further notes

None.

Activity

  1. added
    CR:Type:ManagementAdmin only: Change request for conformance with policies or procedures
    CR:Status:InitiatedAdmin only: Change request that has been initiated
    on May 25, 2026
  2. ivanperez-keera commented on May 25, 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 May 25, 2026
  4. ivanperez-keera commented on May 25, 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 May 25, 2026
  6. ivanperez-keera commented on Sep 8, 2026

    @ivanperez-keera
    MemberAuthor

    Technical Lead: Issue scheduled for fixing in Copilot 4.8.1.

    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 Sep 8, 2026
  8. added this to the 4.8.1 milestone on Sep 8, 2026
  9. added
    CR:Status:ImplementationAdmin only: Change request that is currently being implemented
    and removed
    CR:Status:ScheduledAdmin only: Change requested scheduled
    on Sep 8, 2026
  10. ivanperez-keera commented on Sep 8, 2026

    @ivanperez-keera
    MemberAuthor

    Implementor: Solution implemented, review requested.

  11. added
    CR:Status:VerificationAdmin only: Change request that is currently being verified
    and removed
    CR:Status:ImplementationAdmin only: Change request that is currently being implemented
    on Sep 8, 2026
  12. ivanperez-keera commented on Sep 8, 2026

    @ivanperez-keera
    MemberAuthor

    Change Manager: Verified that:

    • Solution is implemented:
      • The code proposed compiles and passes all tests. Details:
        Build log: https://app.travis-ci.com/github/Copilot-Language/copilot/builds/278784325
      • The solution proposed produces the expected result. Details:
        The following Dockerfile checks that the extension PatternSynonyms is not used in the file copilot-theorem/src/Copilot/Theorem/What4/Translate.hs, after which it prints the message "Success":
        --- Dockerfile-verify-733
        FROM ubuntu:jammy
        
        WORKDIR /root
        SHELL ["/bin/bash", "-c"]
        
        ENV DEBIAN_FRONTEND=noninteractive
        RUN apt-get update
        
        RUN apt-get install --yes \
              git
        
        ARG GIT_COMMIT=HEAD
        ARG NAME=copilot
        ARG REPO=https://github.com/copilot-language/copilot
        
        RUN git clone ${REPO} ${NAME}
        RUN cd ${NAME} && git checkout ${GIT_COMMIT}
        
        WORKDIR ${NAME}
        
        RUN ! grep -e 'PatternSynonyms' copilot-theorem/src/Copilot/Theorem/What4/Translate.hs
        RUN echo "Success"
        Command (substitute variables based on new path after merge):
        $ docker build --build-arg "REPO=https://github.com/ivanperez-keera/copilot" --build-arg "NAME=copilot" --build-arg "GIT_COMMIT=a26633e64929c8f19d0cb922e9acb39a07460c61" -t copilot-verify-733 -f Dockerfile-verify-733 .
    • Implementation is documented. Details:
      No updates needed; the change removes an unused extension.
    • Change history is clear.
    • Commit messages are clear.
    • Changelogs are updated.
    • Examples are updated. Details:
      No updates needed; the change removes an unused extension and does not affect existing examples.
    • Author is internal or has provided signed CLA.
    • Required version bumps are evaluated. Details:
      Bump not needed; the change removes an unused extension and does not affect the public API.
  13. ivanperez-keera commented on Sep 8, 2026

    @ivanperez-keera
    MemberAuthor

    Change Manager: Implementation ready to be merged.

  14. added
    CR:Status:ClosedAdmin only: Change request that has been completed
    and removed
    CR:Status:VerificationAdmin only: Change request that is currently being verified
    on Sep 8, 2026
  15. added a commit that references this issue on Oct 27, 2026
    1f26d9c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

CR:Status:ClosedAdmin only: Change request that has been completedCR:Type:ManagementAdmin only: Change request for conformance with policies or procedures

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions