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

Clean up code a bit #53

Merged
merged 1 commit into from
Apr 18, 2022
Merged

Clean up code a bit #53

merged 1 commit into from
Apr 18, 2022

Conversation

triallax
Copy link
Contributor

Yeah, a couple changes here might be a tad opinionated, but you can leave comments on changes you don't agree with and I'll try to argue my case.

if D.isInteger d && d < (D.fromNumber 1.0e18)
then D.toString d
else D.toString (D.toSignificantDigits 6 d)
D.toString
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Did this to hoist out the common D.toString call.

import Prelude ((/))
import Data.Units(DerivedUnit, makeNonStandard, (./))
import Data.Units.SI
import Prelude
Copy link
Contributor Author

Choose a reason for hiding this comment

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

All the import changes are for more consistency.

Copy link
Owner

@sharkdp sharkdp left a comment

Choose a reason for hiding this comment

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

Thank you so much. I agree with all of the changes.

@sharkdp sharkdp merged commit e6cd6f3 into sharkdp:master Apr 18, 2022
@triallax triallax deleted the cleanup branch April 18, 2022 21:01
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