-
Notifications
You must be signed in to change notification settings - Fork 110
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
Do not depend on unbounded-delays on 64-bit architecture #344
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,8 +70,13 @@ library | |
transformers >= 0.5, | ||
tagged >= 0.5, | ||
optparse-applicative >= 0.14, | ||
unbounded-delays >= 0.1, | ||
ansi-terminal >= 0.9 | ||
|
||
-- No reason to depend on unbounded-delays on 64-bit architecture | ||
if(!arch(x86_64) && !arch(aarch64)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks brittle. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Full list is here: https://hackage.haskell.org/package/Cabal-3.8.1.0/docs/src/Distribution.Simple.PreProcess.html#local-6989586621679281986 Potentially There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suggest to open an issue to potentially extend the list of recognized architectures, and whoever has access to one of them and can do testing can attack it. |
||
build-depends: | ||
unbounded-delays >= 0.1 | ||
|
||
if(!impl(ghc >= 8.0)) | ||
build-depends: semigroups | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the
max 0 t
necessary? BothSystem.Timeout.timeout
and itsunbounded-delays
counterpart arefmap Just
when the specified delay is less than zero.That being said, it doesn't hurt to keep it there. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
max 0 t
is to prevent underflow. Imaginet = -(2^63+1) :: Integer
: previously it meant no delay, but withoutmax 0 t
it would be cast to2^63-1 :: Int
, a huge timeout.