[commit: ghc] master: KQueue.hsc: fix build failure on FreeBSD (9e15db4)
git at git.haskell.org
git at git.haskell.org
Thu Mar 9 08:37:24 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/9e15db49b57df992184d342830ea830aabc626c9/ghc
>---------------------------------------------------------------
commit 9e15db49b57df992184d342830ea830aabc626c9
Author: Sergei Trofimovich <slyfox at gentoo.org>
Date: Thu Mar 9 08:35:58 2017 +0000
KQueue.hsc: fix build failure on FreeBSD
Build failed as:
libraries/base/GHC/Event/KQueue.hsc:192:25: error:
Not in scope: type constructor or class ‘Int16’
|
192 | newtype Filter = Filter Int16
| ^^^^^
If was caused by an import tweak from Word16 to Int16.
Adjust imports to make KQueue compile cleanly.
Signed-off-by: Sergei Trofimovich <slyfox at gentoo.org>
Test Plan: build on freebsd
Reviewers: bgamari, austin, hvr
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3300
>---------------------------------------------------------------
9e15db49b57df992184d342830ea830aabc626c9
libraries/base/GHC/Event/KQueue.hsc | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libraries/base/GHC/Event/KQueue.hsc b/libraries/base/GHC/Event/KQueue.hsc
index b3ac331..7476c93 100644
--- a/libraries/base/GHC/Event/KQueue.hsc
+++ b/libraries/base/GHC/Event/KQueue.hsc
@@ -27,6 +27,7 @@ available = False
#else
import Data.Bits (Bits(..), FiniteBits(..))
+import qualified Data.Int as I
import Data.Word (Word16, Word32)
import Data.Int (Int16)
import Foreign.C.Error (throwErrnoIfMinus1, eINTR, eINVAL,
@@ -188,9 +189,9 @@ newtype Flag = Flag Word16
}
#if SIZEOF_KEV_FILTER == 4 /*kevent.filter: int32_t or int16_t. */
-newtype Filter = Filter Int32
+newtype Filter = Filter I.Int32
#else
-newtype Filter = Filter Int16
+newtype Filter = Filter I.Int16
#endif
deriving (Bits, FiniteBits, Eq, Num, Show, Storable)
More information about the ghc-commits
mailing list