Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
f891ddaf
Commit
f891ddaf
authored
Nov 17, 2010
by
dimitris@microsoft.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing uses of fromIntegral for Windows
parent
eea95042
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
libraries/base/GHC/IO/FD.hs
libraries/base/GHC/IO/FD.hs
+5
-3
No files found.
libraries/base/GHC/IO/FD.hs
View file @
f891ddaf
{-# OPTIONS_GHC -XNoImplicitPrelude -XBangPatterns #-}
{-# OPTIONS_GHC -XNoImplicitPrelude -XBangPatterns -fno-warn-identities #-}
-- Whether there are identities depends on the platform
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
-- |
...
...
@@ -395,13 +396,14 @@ setRaw fd raw = System.Posix.Internals.setCooked (fdFD fd) (not raw)
fdRead
::
FD
->
Ptr
Word8
->
Int
->
IO
Int
fdRead
fd
ptr
bytes
=
readRawBufferPtr
"GHC.IO.FD.fdRead"
fd
ptr
0
(
fromIntegral
bytes
)
=
do
{
r
<-
readRawBufferPtr
"GHC.IO.FD.fdRead"
fd
ptr
0
(
fromIntegral
bytes
)
;
return
(
fromIntegral
r
)
}
fdReadNonBlocking
::
FD
->
Ptr
Word8
->
Int
->
IO
(
Maybe
Int
)
fdReadNonBlocking
fd
ptr
bytes
=
do
r
<-
readRawBufferPtrNoBlock
"GHC.IO.FD.fdReadNonBlocking"
fd
ptr
0
(
fromIntegral
bytes
)
case
r
of
case
fromIntegral
r
of
(
-
1
)
->
return
(
Nothing
)
n
->
return
(
Just
n
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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