Skip to content

copilot-theorem: Copilot.Theorem.Misc.SExpr.parseSExpr is unused #661

Closed

Description

@ivanperez-keera

Description

The function copilot-theorem:Copilot.Theorem.Misc.SExpr.parseSExpr is not used anywhere in the implementation. The module is internal and not exposed to the user, so that function does not have and cannot have any users.

Type

  • Bug: unused code included in the implementation.

Additional context

None.

Requester

  • Ivan Perez.

Method to check presence of bug

The following search finds mentions of parseSExpr in the implementation, showing only the definition:

$ grep -nHre 'parseSExpr' copilot**/src copilot**/tests
copilot-theorem/src/Copilot/Theorem/Misc/SExpr.hs:103:parseSExpr :: String -> Maybe (SExpr String)
copilot-theorem/src/Copilot/Theorem/Misc/SExpr.hs:104:parseSExpr str = case parse parser "" str of

Expected result

The string should be either empty (the function does not exist) or list further uses.

Desired result

The string should be either empty (the function does not exist) or list further uses.

Proposed solution

Removing the function from the module Copilot.Theorem.Misc.SExpr.parseSExpr, as well as any auxiliary functions or imports exclusively needed by that function, if any.

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 Sep 7, 2025
  2. ivanperez-keera commented on Sep 7, 2025

    @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 Sep 7, 2025
  4. ivanperez-keera commented on Sep 7, 2025

    @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 Sep 7, 2025
  6. ivanperez-keera commented on Sep 7, 2025

    @ivanperez-keera
    MemberAuthor

    Technical Lead: Issue scheduled for fixing in Copilot 4.5.1.

    Fix assigned to: @ivanperez-keera .

    EDIT: Milestone renamed from 4.6 to 4.5.1.

  7. added
    CR:Status:ScheduledAdmin only: Change requested scheduled
    and removed
    CR:Status:AcceptedAdmin only: Change request accepted by technical lead
    on Sep 7, 2025
  8. added this to the 4.6 milestone on Sep 7, 2025
  9. added
    CR:Status:ImplementationAdmin only: Change request that is currently being implemented
    and removed
    CR:Status:ScheduledAdmin only: Change requested scheduled
    on Sep 7, 2025
  10. ivanperez-keera commented on Sep 7, 2025

    @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 7, 2025
  12. ivanperez-keera commented on Sep 7, 2025

    @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/276239475
      • The solution proposed produces the expected result. Details:
        The following dockerfile checks that parseSExpr is not mentioned anywhere in the code, after which it prints the message "Success":
        FROM ubuntu:jammy
        
        RUN apt-get update
        RUN apt-get install --yes git
        
        SHELL ["/bin/bash", "-c"]
        CMD git clone $REPO \
          && cd $NAME \
          && git checkout $COMMIT \
          && ! grep -nHre '\<parseSExpr\>' --include='*.hs' \
          && echo "Success"
        Command (substitute variables based on new path after merge):
        $ docker run -e "REPO=https://github.com/ivanperez-keera/copilot" -e "NAME=copilot" -e "COMMIT=b0d5e2bc652ff4cb3cd15e977ee49e503501dafa" -it copilot-verify-661
        
    • Implementation is documented. Details:
      The documentation is updated to reflect that parsing is no longer supported for SExpr.
    • Change history is clear.
    • Commit messages are clear.
    • Changelogs are updated.
    • Examples are updated. Details:
      Update not needed; change does not affect examples.
    • Author is internal or has provided signed CLA.
    • Required version bumps are evaluated. Details:
      Bump not needed; change does not affect public API.
  13. ivanperez-keera commented on Sep 7, 2025

    @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 7, 2025
  15. added a commit that references this issue on Sep 7, 2025
    452ebe6
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: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