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

Operator for measuring sizes of unions #53

Merged
merged 2 commits into from
Feb 15, 2023
Merged

Operator for measuring sizes of unions #53

merged 2 commits into from
Feb 15, 2023

Conversation

lsrcz
Copy link
Owner

@lsrcz lsrcz commented Feb 15, 2023

This pull request introduces a utility function for measuring union sizes.

>>> unionSize (single True)
1
>>> unionSize (mrgIf "a" (single 1) (single 2) :: UnionM Integer)
2
>>> unionSize (choose [1..7] "a" :: UnionM Integer)
7

@codecov
Copy link

codecov bot commented Feb 15, 2023

Codecov Report

Base: 32.32% // Head: 32.63% // Increases project coverage by +0.30% 🎉

Coverage data is based on head (b526752) compared to base (3638ec5).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #53      +/-   ##
==========================================
+ Coverage   32.32%   32.63%   +0.30%     
==========================================
  Files          48       48              
  Lines        4523     4526       +3     
  Branches      220      216       -4     
==========================================
+ Hits         1462     1477      +15     
+ Misses       2841     2833       -8     
+ Partials      220      216       -4     
Impacted Files Coverage Δ
src/Grisette/Core/Control/Monad/UnionM.hs 11.17% <100.00%> (+1.98%) ⬆️
src/Grisette/Core/Data/Class/Mergeable.hs 16.19% <0.00%> (ø)
.../Grisette/IR/SymPrim/Data/Prim/PartialEval/Bool.hs 86.66% <0.00%> (+0.44%) ⬆️
src/Grisette/Core/Data/Class/SimpleMergeable.hs 6.71% <0.00%> (+0.67%) ⬆️
src/Grisette/Core/Data/Union.hs 46.23% <0.00%> (+1.07%) ⬆️
src/Grisette/Core/Data/Class/GenSym.hs 5.41% <0.00%> (+2.06%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@lsrcz lsrcz merged commit 48089ac into main Feb 15, 2023
@lsrcz lsrcz deleted the feat-union-size branch February 15, 2023 21:26
@lsrcz lsrcz restored the feat-union-size branch February 15, 2023 21:26
@lsrcz lsrcz deleted the feat-union-size branch February 15, 2023 21:26
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

1 participant