Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the current status of GHC on 64 bit Windows?

Tags:

haskell

64-bit

My current understanding is

  • No 64-bit GHC, ticket #1884
  • The 32-bit GHC and the binaries it builds work just fine because the Windows OS loader converts OS calls and pointers to 64 bits. The same applies to DLLs
  • No mixing 32 bit and 64 bit code (ie. your 32 bit Haskell DLL isn't going to be friends with the 64 bit program that wants to use it)
  • Latest discussion is a thread started on May 2011

Is this correct? Are there any pitfalls to watch out for, particularly as an FFI user? For example, if I were to export some Haskell code as a 32 bit DLL to some Windows program, should I expect it to work?

Edit: looks like you'd need a 64 bit DLL to go with a 64 bit process

like image 624
kowey Avatar asked Sep 21 '11 21:09

kowey


1 Answers

I don't know if anyone's actively working on a 64-bit codegen right now, but 32-bit haskell will work just fine as long as you're only talking to 32-bit FFI libraries (and/or being embedded in 32-bit host programs). If you want to interact with 64-bit programs, you will need to use some form of IPC, as 32-bit and 64-bit code cannot coexist in one process.

like image 127
bdonlan Avatar answered Nov 13 '22 19:11

bdonlan