Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New ListWhere Pred added to the Constrained Solver. #3904

Merged
merged 1 commit into from
Dec 4, 2023

Conversation

TimSheard
Copy link
Contributor

@TimSheard TimSheard commented Dec 1, 2023

Added the ListWhere Pred, and a test that it works.
Often we have some record structure, and we would like to generate a list of that structure
But we want each element in that list, to constrain each record field with some constraints.

  [ Sized (ExactSize 10) credsUniv
  , Sized (ExactSize 10) voteUniv
  , ListWhere (Range 2 4) ans (pairT CredR VCredR)
        [ Member (Right (pair1 CredR)) credsUniv, Member (Right (pair2 VCredR)) voteUniv]
  ]

Here we want to constrain 'ans', such that for each pair in 'ans', the first component is a subset of the credsUniv and the second component is a subset of the voteUniv.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated
  • When applicable, versions are updated in .cabal and CHANGELOG.md files according to the
    versioning process.
  • The version bounds in .cabal files for all affected packages are updated. If you change the bounds in a cabal file, that package itself must have a version increase. (See RELEASING.md)
  • All visible changes are prepended to the latest section of a CHANGELOG.md for the affected packages. New section is never added with the code changes. (See RELEASING.md)
  • Code is formatted with fourmolu (use scripts/fourmolize.sh)
  • Cabal files are formatted (use scripts/cabal-format.sh)
  • hie.yaml has been updated (use scripts/gen-hie.sh)
  • Self-reviewed the diff

@lehins lehins merged commit 5e91d39 into master Dec 4, 2023
11 of 13 checks passed
@iohk-bors iohk-bors bot deleted the ts-newPred-ListWhere branch December 4, 2023 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants