@@ -41,17 +41,29 @@ import Foreign.C.String ( peekCWString )
41
41
import Foreign.C.Types ( CChar , CInt (.. ), CShort (.. ), CWchar )
42
42
import Foreign.Ptr ( Ptr , nullPtr )
43
43
import 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
+ #else
44
48
import GHC.IO.Handle.Types ( Handle (.. ), Handle__ (.. ) )
45
49
import GHC.IO.FD ( FD (.. ) ) -- A wrapper around an Int32
50
+ #endif
46
51
import Numeric ( showHex )
47
52
import System.IO.Error ( ioeSetErrorString )
48
53
49
54
#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
+ #else
50
61
import GHC.IO.Exception
51
62
( IOErrorType (InappropriateType ), IOException (IOError ), ioException )
52
63
import GHC.IO.SubSystem ( (<!>) )
53
64
import GHC.IO.Windows.Handle ( ConsoleHandle , Io , NativeHandle , toHANDLE )
54
65
#endif
66
+ #endif
55
67
56
68
type Addr = Ptr ()
57
69
type BOOL = Bool
0 commit comments