Building GHC on Windows

Simon Marlow marlowsd at gmail.com
Thu Feb 19 10:11:19 EST 2009


Felix Martini wrote:
> Simon Marlow has recently posted a patch that adds Unicode support to
> Handle I/O. He mentioned that it didn't work yet on Windows so i was
> thinking of looking at the source code to see how the new Unicode
> support works and perhaps try to make it work on Windows.

Thanks - I've looked into it a little and it's not too hard.  There's some 
code in the Win32 package (System.Win32.NLS) that should prove helpful, 
though we'll have to copy anything we need from there since base can't 
depend on Win32.

If you manage to get your build working, keep me updated on your plans.

BTW, I think the patches now have conflicts with the HEAD, but hopefully 
they shouldn't be too hard to fix (I'll try to get around to this soon, but 
I'm quite busy with other stuff at the moment).

> I have built GHC from source in the past on Windows and the process
> was cumbersome compared to building it on Linux. But i was curious to
> see if it has gotten easier.
> 
> After reading the Wiki i decided to get the source with Git as Darcs
> was slow with remote downloads. Ok, that was a lot quicker than
> before! Let's see, i need to run sync-all to get the core libraries. I
> remember that i used to use darcs-all so it must be a new script.
> Sync-all doesn't have an extension so i probably need to run it with
> msys. That doesn't work, somehow my msys environment does not find
> git. So let's try the Git Bash environment which also uses msys (and
> does not have bash). Now i get a cryptic error: "at ./sync-all line
> 99, <IN> line 19." It seems the script cannot determine the default
> remote repo. The top line shows that it is a Perl script and i don't
> know Perl enough to see what is wrong. I have Perl installed on this
> Windows pc so let's try to run the script directly. That doesn't work
> either: the Perl script wants to use grep and sed.
> 
> All this is likely trivial to fix but at the same time these little
> roadblocks may also explain why few developers on Windows contribute
> code to GHC and Haskell.

I haven't tried sync-all on Windows - can anyone help out here?

Cheers,
	Simon


More information about the Glasgow-haskell-users mailing list