ghc 5.04 -- make -prof -auto-all under WinNT

andreas.marth@daimlerchrysler.com andreas.marth@daimlerchrysler.com
Thu, 15 Aug 2002 17:57:44 +0200


--Boundary=_0.0_=0057440028027395
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hallo!

I tried to compile the following little program (hallo.hs) with ghc-5.0=
4 --make=20
-prof -auto:

import System (getArgs)


main :: IO ()
main=3D do	args <- getArgs
	if args =3D=3D []	then error "Aufruf: Filename Dimension1 Dimension2=20
..."
		else prog (head args) (tail args)

prog :: FilePath -> [String] -> IO ()
prog file dimZ =3D do	cont <- readFile file
		putStr (file ++ "\n")
		putStr (show dimZ ++ "\n")
		let result =3D "Hello world!"
		writeFile (file++".out") ( result)

The system is WinNT and compiling succeeded. But I got an a.out file wh=
ile I=20
should get a file hallo.exe (according to ghc --help).
I renamed the program to hallo.exe and tried it. When I don't give any =

arguments it behaves like expected. If I give it one or more arguments =
it=20
crashes.

When I compile it only with ghc --make hallo.hs I also get an a.out fil=
e but=20
this behaves well when renamed to hallo.exe.

What is the problem? And what can I do to use the profiling?

Thank,
Andreas

=

--Boundary=_0.0_=0057440028027395
Content-Type: application/octet-stream; name=hallo.hs
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=hallo.hs

aW1wb3J0IFN5c3RlbSAoZ2V0QXJncykNCg0KDQptYWluIDo6IElPICgpDQptYWluPSBkbwlhcmdz
IDwtIGdldEFyZ3MNCgkJaWYgYXJncyA9PSBbXQl0aGVuIGVycm9yICJBdWZydWY6IEZpbGVuYW1l
IERpbWVuc2lvbjEgRGltZW5zaW9uMiAuLi4iDQoJCQkJZWxzZSBwcm9nIChoZWFkIGFyZ3MpICh0
YWlsIGFyZ3MpDQoNCnByb2cgOjogRmlsZVBhdGggLT4gW1N0cmluZ10gLT4gSU8gKCkNCnByb2cg
ZmlsZSBkaW1aID0gZG8JY29udCA8LSByZWFkRmlsZSBmaWxlDQoJCQlwdXRTdHIgKGZpbGUgKysg
IlxuIikNCgkJCXB1dFN0ciAoc2hvdyBkaW1aICsrICJcbiIpDQoJCQlsZXQgcmVzdWx0ID0gIkhl
bGxvIHdvcmxkISINCgkJCXdyaXRlRmlsZSAoZmlsZSsrIi5vdXQiKSAoIHJlc3VsdCkNCg0K

--Boundary=_0.0_=0057440028027395--