haskell / win32

Haskell support for the Win32 API
http://hackage.haskell.org/package/Win32
Other
98 stars 62 forks source link

Add support for duplex and console handles to withHandleToHANDLE with winio #192

Closed Mistuke closed 2 years ago

Mistuke commented 2 years ago

Handled Duplex and Console handles in withHandleToHANDLE with WINIO the same way they are handled with the POSIX interface.

Fixes #191 and addresses https://github.com/UnkindPartition/ansi-terminal/issues/114

Description

Win32 acts as an intermediate translation layer between projects so they don't have to be really aware of which I/O manager is running at any given time.

The withHandleToHANDLE is an I/O manager agnostic way to retrieve native handles but the behavior of withHandleToHANDLEPosix was different from withHandleToHANDLENative.

This normalizes them.

Motivation and Context

Types of changes

Checklist: