[commit: packages/haskeline] master: Use 0xffffffff in place of -1 to MessageBeep (fd5116c)
git at git.haskell.org
git at git.haskell.org
Wed Mar 8 04:53:57 UTC 2017
Repository : ssh://git@git.haskell.org/haskeline
On branch : master
Link : http://git.haskell.org/packages/haskeline.git/commitdiff/fd5116c81031da68ec23dfb09a06a46bc006e1d7
>---------------------------------------------------------------
commit fd5116c81031da68ec23dfb09a06a46bc006e1d7
Author: Ben Gamari <ben at well-typed.com>
Date: Tue Mar 7 12:04:34 2017 -0500
Use 0xffffffff in place of -1 to MessageBeep
MessageBeep expects an unsigned argument, leading to a
literal-out-of-range error previously.
>---------------------------------------------------------------
fd5116c81031da68ec23dfb09a06a46bc006e1d7
System/Console/Haskeline/Backend/Win32.hsc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/System/Console/Haskeline/Backend/Win32.hsc b/System/Console/Haskeline/Backend/Win32.hsc
index 9471354..01552be 100644
--- a/System/Console/Haskeline/Backend/Win32.hsc
+++ b/System/Console/Haskeline/Backend/Win32.hsc
@@ -226,7 +226,8 @@ writeConsole h str = writeConsole' >> writeConsole h ys
foreign import WINDOWS_CCONV "windows.h MessageBeep" c_messageBeep :: UINT -> IO Bool
messageBeep :: IO ()
-messageBeep = c_messageBeep (-1) >> return ()-- intentionally ignore failures.
+messageBeep = c_messageBeep simpleBeep >> return ()-- intentionally ignore failures.
+ where simpleBeep = 0xffffffff
----------
More information about the ghc-commits
mailing list