Skip to content

Commit a90b466

Browse files
committed
guarding the COMPLETE pragma
1 parent db2e47b commit a90b466

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Network/Socket/Options.hsc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,9 @@ pattern CustomSockOpt xy <- ((\(SockOpt x y) -> (x, y)) -> xy)
296296
where
297297
CustomSockOpt (x, y) = SockOpt x y
298298

299+
#if __GLASGOW_HASKELL__ >= 806
299300
{-# COMPLETE CustomSockOpt #-}
301+
#endif
300302
#ifdef SO_LINGER
301303
data StructLinger = StructLinger CInt CInt
302304

Network/Socket/Types.hsc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,9 @@ isSupportedSocketType = (/= UnsupportedSocketType)
325325
-- | Pattern for a general socket type.
326326
pattern GeneralSocketType :: CInt -> SocketType
327327
pattern GeneralSocketType n = SocketType n
328+
#if __GLASGOW_HASKELL__ >= 806
328329
{-# COMPLETE GeneralSocketType #-}
330+
#endif
329331
-- The actual constructor is not exported, which keeps the internal
330332
-- representation private, but for all purposes other than 'coerce' the
331333
-- above pattern is just as good.
@@ -411,7 +413,9 @@ unpackFamily = Family
411413
-- @since 3.2.0.0
412414
pattern GeneralFamily :: CInt -> Family
413415
pattern GeneralFamily n = Family n
416+
#if __GLASGOW_HASKELL__ >= 806
414417
{-# COMPLETE GeneralFamily #-}
418+
#endif
415419
-- The actual constructor is not exported, which keeps the internal
416420
-- representation private, but for all purposes other than 'coerce' the
417421
-- above pattern is just as good.

0 commit comments

Comments
 (0)