Opened 3 years ago

Closed 3 years ago

#10165 closed bug (fixed)

Win32 broken with GHC 7.10 RC3

Reported by: NeilMitchell Owned by:
Priority: highest Milestone: 7.10.1
Component: libraries (other) Version: 7.10.1-rc3
Keywords: Win32 Cc:
Operating System: Windows Architecture: x86
Type of failure: Runtime crash Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


Using the 32bit Windows build of GHC 7.10 RC3 (ghc- I can't load the Win32 library. I get the problem:

GHCi, version  :? for help
Prelude> import System.Win32
Prelude System.Win32> wRITE_DAC
<interactive>: C:\ghc\ghc-\lib\Win32_6dnIMpnCmqmCdDB983aKnr\HSWin
32- unknown symbol `_SetWindowLongPtrW'
ghc.exe: unable to load package `Win32-'

This seems very serious, and breaks all packages that indirectly depend on the Win32 module (which on Windows is most of them).

Change History (8)

comment:1 Changed 3 years ago by NeilMitchell

I just tried with the 64bit Windows build and that worked fine.

comment:2 Changed 3 years ago by m37

Documentation on MSDN for SetWindowLongPtr indicates that SetWindowLongPtrW only exists on 64-bit.

It appears that the win32 library should be fixed to conditionally call SetWindowLongW on 32-bit, and call SetWindowLongPtrW on 64-bit.

Last edited 3 years ago by m37 (previous) (diff)

comment:3 Changed 3 years ago by Kludgy

Untested fix here for review:

I will submit this as a PR as soon as I am able to verify that it works.

comment:4 Changed 3 years ago by hvr

Milestone: 7.10.1
Priority: normalhighest

let's consider this a blocker until proven otherwise :)

comment:5 Changed 3 years ago by hvr

Component: Compilerlibraries (other)
Keywords: Win32 added

comment:6 Changed 3 years ago by Kludgy

comment:7 Changed 3 years ago by Austin Seipp <austin@…>

In 2ff68c3589af86811f65991c71f33282e0e50778/ghc:

libraries: update win32 submodule

This update fixes #10165.

Signed-off-by: Austin Seipp <>

comment:8 Changed 3 years ago by thoughtpolice

Resolution: fixed
Status: newclosed

Thanks! Merged to both master and ghc-7.10 (via 2ff68c3589af86811f65991c71f33282e0e50778 & 47cd08ab94e0a9bae3d9e966777616230d4fb4ff).

Note: See TracTickets for help on using tickets.