Getting GHC to print "Done" when it's finished linking?

Hi - I've set up my Visual Studio environment so that ghc is an external tool, where the output from ghc appears on the VS output pane. However when I use this to compile and link a Haskell program (I'm just using the plain text editor that comes with VC++ not the Haskell plugin because of its unfortunate MS-restricted-use licence...) the last thing ghc prints is: Linking ... but when it's finished nothing else is printed out, with the net result that I sit and wait forever! :-) Is there any flag to get ghc or the ghc linker to print "Done" or something when it's finished? Thanks, Brian.

On Tue, Mar 07, 2006 at 06:45:52PM -0000, Brian Hulley wrote:
Is there any flag to get ghc or the ghc linker to print "Done" or something when it's finished?
In unix you could wrap ghc in a script that would print "Done" if ghc finished successfully. I am sure you can do it somehow in windows. Best regards Tomasz -- I am searching for programmers who are good at least in (Haskell || ML) && (Linux || FreeBSD || math) for work in Warsaw, Poland

On Tue, Mar 07, 2006 at 06:54:50PM +0000, Neil Mitchell wrote:
In unix you could wrap ghc in a script that would print "Done" if ghc finished successfully. I am sure you can do it somehow in windows.
ghc --make Whatever if errorfail 1 goto failed echo Success :-) goto end :failed echo Failure :-( :end
In unix/sh: #!/bin/sh ghc "$@" && echo Done Best regards Tomasz -- I am searching for programmers who are good at least in (Haskell || ML) && (Linux || FreeBSD || math) for work in Warsaw, Poland

Neil Mitchell wrote:
In unix you could wrap ghc in a script that would print "Done" if ghc finished successfully. I am sure you can do it somehow in windows.
ghc --make Whatever if errorfail 1 goto failed echo Success :-) goto end
failed echo Failure :-( end
Thanks Neil - the script below, based on your script above, works on WinXP: echo off C:\ghc\ghc-6.4\bin\ghc.exe -fglasgow-exts -fffi --make main.hs -optl-lduma -optl-L"c:\dll" if errorlevel 1 goto failed echo Success :-) goto end :failed echo Failure :-( :end (compiling haskell that links to libduma.a stored in c:\dll) Regards, Brian.

Brian Hulley wrote:
Thanks Neil - the script below, based on your script above, works on WinXP: echo off C:\ghc\ghc-6.4\bin\ghc.exe -fglasgow-exts -fffi --make main.hs -optl-lduma -optl-L"c:\dll" if errorlevel 1 goto failed echo Success :-) goto end
failed echo Failure :-( end
In my script in my last email Outlook Express has changed the colons before each label to a greater-than sign which is really irritating (time for a proper email client to be written in Haskell! ;-) ) So each label should look like ":failed" ie "COLONfailed" Also Outlook Express has messed up the lines by wrapping the ghc --make line. Regards, Brian.
participants (3)
-
Brian Hulley
-
Neil Mitchell
-
Tomasz Zielonka