... | ... | @@ -480,6 +480,34 @@ deriving via (forall x. V x) instance C (S x) |
|
|
The coverage checker will now detect more redundant cases, in particular wrt. long distance information.
|
|
|
If for some reason (like bitrot prevention of a debug-only case branch) a redundant or inaccessible right-hand side is not to be flagged, a guard like `| GHC.Magic.lazy False` should prevent the checker from flagging it as such.
|
|
|
|
|
|
### I/O manager (WinIO) related changes
|
|
|
|
|
|
If internal GHC I/O primitives were used you may need to manually add support for WINIO. GHC now emits new pre-processor macros
|
|
|
`__IO_MANAGER_WINIO__` which can be used to determine whether you are compiling with a compiler that is `winio` aware.
|
|
|
|
|
|
The compiler also exposes a helper function `(<!>)` which can be used to select between the WINIO and Posix implementation of a function. An example usage:
|
|
|
|
|
|
```hs
|
|
|
#if defined(__IO_MANAGER_WINIO__)
|
|
|
import GHC.IO.Handle.Windows (handleToHANDLE)
|
|
|
import GHC.IO.SubSystem ((<!>))
|
|
|
#endif
|
|
|
```
|
|
|
|
|
|
to import the required changes. These can be used as
|
|
|
|
|
|
```hs
|
|
|
withHandleToHANDLE :: Handle -> (HANDLE -> IO a) -> IO a
|
|
|
withHandleToHANDLE haskell_handle action =
|
|
|
#if defined(__IO_MANAGER_WINIO__)
|
|
|
withHandleToHANDLE = withHandleToHANDLEPosix <!> withHandleToHANDLENative
|
|
|
#else
|
|
|
withHandleToHANDLE = withHandleToHANDLEPosix
|
|
|
#endif
|
|
|
```
|
|
|
|
|
|
The `Win32` package exposes helpers that can be used to aid in supporting WINIO porting.
|
|
|
|
|
|
---
|
|
|
|
|
|
## Library changes
|
... | ... | |