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

Turn FlintIntegerRing/FlintRationalField into fake singleton type #1246

Closed
wants to merge 1 commit into from

Conversation

fingolfin
Copy link
Member

PR #1221 is stalled or may even be a no-go; but I still think that it's potentially confusing that one can have multiple instances of type FlintIntegerRing/FlintRationalField; I certainly see code not expecting this.

So, let's fake it, by restricting the constructors. Also add tests to verify this works.

@codecov
Copy link

codecov bot commented Jan 7, 2022

Codecov Report

Merging #1246 (17eefc7) into master (7df5066) will increase coverage by 0.00%.
The diff coverage is 66.66%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1246   +/-   ##
=======================================
  Coverage   88.07%   88.08%           
=======================================
  Files          76       76           
  Lines       28401    28411   +10     
=======================================
+ Hits        25015    25026   +11     
+ Misses       3386     3385    -1     
Impacted Files Coverage Δ
src/flint/FlintTypes.jl 94.35% <66.66%> (-0.06%) ⬇️
src/flint/mpoly.jl 100.00% <0.00%> (ø)
src/flint/fmpq_mpoly.jl 85.93% <0.00%> (+0.10%) ⬆️
src/flint/gfp_elem.jl 89.95% <0.00%> (+1.43%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7df5066...17eefc7. Read the comment docs.

@tthsqe12
Copy link
Contributor

tthsqe12 commented Jan 7, 2022

Do we really need to fake it? The other one only stalled because of singular. I can try adding mutability checks on the parents as well..., and I think it would be good if singular.jl supported immutable parents anyways ...

@fingolfin
Copy link
Member Author

Oh if we can do "the real thing" then of course that'd be greatly preferable. I just wasn't sure this would be happening!

@fingolfin
Copy link
Member Author

Closing in favor of #1221

@fingolfin fingolfin closed this Jan 17, 2022
@fingolfin fingolfin deleted the mh/QQ-ZZ-Singleton branch February 2, 2022 21:51
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.

2 participants