This is perhaps a minor nuisance but I had to spendquite some time to track down my bug. When ghc is givena preprocessor which for some reason cannot executethen ghc just dies silently without giving anyindication as to what the problem was. It would be nicewith a little message hinting at the problem on stderr.Oh, and by the way, the -F flag doesn't have anydocumentation. It is only mentioned together with -optF.
Edited
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items
0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Logged In: YES user_id=307552Indeed, this is on windows. It happens very easily whenworking on cygwin. It is very natural to use a shell scriptas a preprocessor which is what I was trying to do. Butsince ghc is a windows program it doesn't know what a shellscript is. Hence the failure.
More specifically, I think the issue here is with the use of runInteractiveProcess, which ultimately calls CreateProcess on Windows. The problem is that processes created using CreateProcess must be known by the Windows loader. From the MSDN page.
"This module can be a Windows-based application. It can be some other type of module (for example, MS-DOS or OS/2) if the appropriate subsystem is available on the local computer. "
Since .py are not known by the system loader the call fails with Exec format error
I think there are two solutions:
Specify cmd.exe or rather, whatever ComSpec is pointing to as the application and the preprocessor to run as the argument.
Alternatively use ShellExecute instead of CreateProcess to start the preprocessors.
However both of them won't necessarily fix the tests that are failing, since that would require the .py extension to be registered to the python2 in msys.
Using ShellExecute would probably be the wrong thing to do in this instance. ShellExecute is the right thing to "execute" (or Open) a file in the same way as the "Shell" (e.g. Windows Explorer) would do. In other words, its a generic "open this file" mechanism, not something to run command line tools, which is what you really want here.