Both Win32 and base-4.15 define identical (but distinct) type synonyms named CodePage. I propose that Win32 re-export the CodePage from base when possible.
(Note that DWORD = UINT = Word32.) This creates problems for code that tries to use both System.Win32.NLS and GHC.IO.Encoding.CodePage together, as their two CodePage definitions will clash.
Steps to Reproduce (for bugs)
An example of a library that this actually affected in practice in code-page, which stopped building after base-4.15's release. See RyanGlScott/code-page#5. It's possible to work around the issue, but if Win32 simply re-exported CodePage from base, this bug would have never happened in the first place.
Your Environment
Version used: GHC 9.0.1 (base-4.15.0.0 and Win32-2.10.0.0)
Both
Win32
andbase-4.15
define identical (but distinct) type synonyms namedCodePage
. I propose thatWin32
re-export theCodePage
frombase
when possible.Current Behavior
As of
base-4.15
, theGHC.IO.Encoding.CodePage
module defines a type synonym namedCodePage
:As it turns out, the
Win32
library also defines an identical (but distinct) type synonym namedCodePage
inSystem.Win32.NLS
:https://github.com/haskell/win32/blob/b297380a778b24a2afd98e091303294f7a35aa1c/System/Win32/NLS.hsc#L72
(Note that
DWORD
=UINT
=Word32
.) This creates problems for code that tries to use bothSystem.Win32.NLS
andGHC.IO.Encoding.CodePage
together, as their twoCodePage
definitions will clash.Steps to Reproduce (for bugs)
An example of a library that this actually affected in practice in
code-page
, which stopped building afterbase-4.15
's release. See RyanGlScott/code-page#5. It's possible to work around the issue, but ifWin32
simply re-exportedCodePage
frombase
, this bug would have never happened in the first place.Your Environment
base-4.15.0.0
andWin32-2.10.0.0
)