@@ -41,17 +41,29 @@ import Foreign.C.String ( peekCWString )
4141import Foreign.C.Types ( CChar , CInt (.. ), CShort (.. ), CWchar )
4242import Foreign.Ptr ( Ptr , nullPtr )
4343import Foreign.StablePtr ( StablePtr , freeStablePtr , newStablePtr )
44+ #if MIN_VERSION_base(4,20,0)
45+ import GHC.Internal.IO.Handle.Types ( Handle (.. ), Handle__ (.. ) )
46+ import GHC.Internal.IO.FD ( FD (.. ) ) -- A wrapper around an Int32
47+ #elif
4448import GHC.IO.Handle.Types ( Handle (.. ), Handle__ (.. ) )
4549import GHC.IO.FD ( FD (.. ) ) -- A wrapper around an Int32
50+ #endif
4651import Numeric ( showHex )
4752import System.IO.Error ( ioeSetErrorString )
4853
4954#if defined(__IO_MANAGER_WINIO__)
55+ #if MIN_VERSION_base(4,20,0)
56+ import GHC.Internal.IO.Exception
57+ ( IOErrorType (InappropriateType ), IOException (IOError ), ioException )
58+ import GHC.Internal.IO.SubSystem ( (<!>) )
59+ import GHC.Internal.IO.Windows.Handle ( ConsoleHandle , Io , NativeHandle , toHANDLE )
60+ #elif
5061import GHC.IO.Exception
5162 ( IOErrorType (InappropriateType ), IOException (IOError ), ioException )
5263import GHC.IO.SubSystem ( (<!>) )
5364import GHC.IO.Windows.Handle ( ConsoleHandle , Io , NativeHandle , toHANDLE )
5465#endif
66+ #endif
5567
5668type Addr = Ptr ()
5769type BOOL = Bool
0 commit comments