From 9e15db49b57df992184d342830ea830aabc626c9 Mon Sep 17 00:00:00 2001
From: Sergei Trofimovich <slyfox@gentoo.org>
Date: Thu, 9 Mar 2017 08:35:58 +0000
Subject: [PATCH] KQueue.hsc: fix build failure on FreeBSD
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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
---
 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 b3ac33147eda..7476c9333e07 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)
 
-- 
GitLab