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

Brian Hulley brianh at metamilk.com
Tue Mar 7 15:16:52 EST 2006


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. 



More information about the Glasgow-haskell-users mailing list