Skip to content

Integrate exhaustiveness metadata into solution payload for printSolutionAndAssert APIs#44

Merged
jvoigtlaender merged 4 commits into
mainfrom
copilot/integrate-exhaustiveness-parameter
May 30, 2026
Merged

Integrate exhaustiveness metadata into solution payload for printSolutionAndAssert APIs#44
jvoigtlaender merged 4 commits into
mainfrom
copilot/integrate-exhaustiveness-parameter

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 30, 2026

printSolutionAndAssert and printSolutionAndAssertWithMinimum previously split “exhaustiveness wording” (Bool) from the optional solution payload. This change folds that flag into the solution payload itself so “what to show” and “how to phrase it” are carried together.

  • API shape change

    • Updated both functions to accept:
      • Maybe (Bool, ArticleToUse, String)
    • Removed the separate Bool parameter from both signatures.
  • Call-site adaptation

    • extendedMultipleChoice now injects mentionExhaustiveness into the optional solution tuple before calling printSolutionAndAssertWithMinimum.
    • singleChoice now passes (False, articleToUse, solutionString) to preserve current wording behavior.
  • Behavior preservation

    • Output strings and grading/refusal flow remain unchanged; this is a parameter-model refactor to align semantics at the API boundary.
-- before
printSolutionAndAssertWithMinimum
  :: MinimumThreshold
  -> Bool
  -> Maybe (ArticleToUse, String)
  -> Rational
  -> Rated m

-- after
printSolutionAndAssertWithMinimum
  :: MinimumThreshold
  -> Maybe (Bool, ArticleToUse, String)
  -> Rational
  -> Rated m

Copilot AI changed the title [WIP] Integrate whether to mention exhaustiveness parameter into correct solution Integrate exhaustiveness metadata into solution payload for printSolutionAndAssert APIs May 30, 2026
Copilot AI requested a review from jvoigtlaender May 30, 2026 16:25
Updated comments to clarify the purpose of parameters in printSolutionAndAssert and another function.
@jvoigtlaender jvoigtlaender marked this pull request as ready for review May 30, 2026 16:51
Copilot AI review requested due to automatic review settings May 30, 2026 16:51
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the solution-printing API so the exhaustiveness flag travels with the optional solution payload, keeping display content and phrasing metadata together.

Changes:

  • Updates printSolutionAndAssert and printSolutionAndAssertWithMinimum to accept Maybe (Bool, ArticleToUse, String).
  • Adapts extendedMultipleChoice and singleChoice call sites to construct the new tuple shape while preserving existing behavior.
  • Updates Haddock comments for the revised parameter model.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +344 to +345
=> Maybe (Bool, ArticleToUse, String)
-- ^ potentially the correct solution to show,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 32d4f0e.

@jvoigtlaender jvoigtlaender merged commit 817cde2 into main May 30, 2026
@jvoigtlaender jvoigtlaender deleted the copilot/integrate-exhaustiveness-parameter branch May 30, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants