summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2017-03-09 08:35:58 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2017-03-09 08:36:18 +0000
commit9e15db49b57df992184d342830ea830aabc626c9 (patch)
treeff6b1ed22cd39db330da9e3b819ef5adce8f463c
parent87a2d37ca464ce87d39359807cd43706d89f3a0b (diff)
downloadhaskell-9e15db49b57df992184d342830ea830aabc626c9.tar.gz
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@gentoo.org> Test Plan: build on freebsd Reviewers: bgamari, austin, hvr Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3300
-rw-r--r--libraries/base/GHC/Event/KQueue.hsc5
1 files changed, 3 insertions, 2 deletions
diff --git a/libraries/base/GHC/Event/KQueue.hsc b/libraries/base/GHC/Event/KQueue.hsc
index b3ac33147e..7476c9333e 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)