Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tobias Decking
GHC
Commits
1e38f49e
Commit
1e38f49e
authored
Nov 08, 2013
by
Gabor Greif
💬
Browse files
Spelling in comments
parent
33ed16bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
libraries/base/GHC/Event/Poll.hsc
View file @
1e38f49e
...
...
@@ -105,7 +105,7 @@ poll p mtout f = do
return (fromIntegral n)
where
-- The poll timeout is specified as an Int, but c_poll takes a CInt. These
-- can't be safely coerced as on many systems (e.g. x86_64) CInt has a
a
-- can't be safely coerced as on many systems (e.g. x86_64) CInt has a
-- maxBound of (2^32 - 1), even though Int may have a significantly higher
-- bound.
--
...
...
@@ -132,7 +132,7 @@ poll p mtout f = do
-- which is the largest value accepted by c_poll. This will result in
-- c_pollLoop recursing if the provided timeout is larger.
--
-- In case 3, "fromIntegral (maxBound :: CInt) :: Int" wil result in a
-- In case 3, "fromIntegral (maxBound :: CInt) :: Int" wil
l
result in a
-- negative Int, max will thus return maxBound :: Int. Since poll doesn't
-- accept values bigger than maxBound :: Int and CInt is larger than Int,
-- there is no problem converting Int to CInt for the c_poll call.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment