# GHCi-5.04.2: Windows Open with ... problem.

Sigbjorn Finne sof@galois.com
Tue, 11 Feb 2003 06:19:49 -0800

This is a multi-part message in MIME format.

------=_NextPart_000_09EE_01C2D195.94B83E30
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi thee,

this is most likely due to the XP shell invoking 'ghci' as follows:

p:\ath\to\ghci c:\Documents and Settings\foo\....

which makes it look as if multiple arguments are given on the
command-line (indeed, that's what the argv vector will contain.)

The registered file assocations for .hs and .lhs takes care of quoting
the filename argument, so I'm not sure this is worth fixing.

--sigbjorn

Enterprising souls may want to have a look at the Registry key

HKEY_CLASSES_ROOT\Unknown\shell\openas\command

and look at how the %1 arg is quoted (or not)....
----- Original Message -----=20
From: Calle Lejdfors=20
Sent: Tuesday, February 11, 2003 02:02
Subject: GHCi-5.04.2: Windows Open with ... problem.

Hello.

I am having a problem using the Open with ... on haskell-files under =
WinXP. The problem is this: create a file on my desktop and then =
right-click and try to open it using Open with -> ghci. I get the =
following error message:

can't find module C:\Documents' (while processing "C:\\Documents")

Obviously GHCi incorrectly handles white space in the path. If I run =
under Cygwin I can use a script like:

c:\\ghc\\ghc-5.04.2\\bin\\ghci cygpath -d $1; But how do I solve this if I'm not using cygwin?=20 Thanks, Calle ------=_NextPart_000_09EE_01C2D195.94B83E30 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 6.00.2800.1126" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>Hi thee,</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>this is most likely due to the XP shell = invoking=20 'ghci' as follows:</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>&nbsp; p:\ath\to\ghci c:\Documents and=20 Settings\foo\....</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>which makes it look as if multiple = arguments are=20 given on the</FONT></DIV> <DIV><FONT face=3DArial size=3D2>command-line (indeed, that's what the = argv vector=20 will contain.)</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>The registered file assocations for .hs = and .lhs=20 takes care of quoting</FONT></DIV> <DIV><FONT face=3DArial size=3D2>the filename argument, so I'm not sure = this is=20 worth fixing.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>--sigbjorn</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>Enterprising souls may want to have a = look at the=20 Registry key</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>&nbsp;=20 HKEY_CLASSES_ROOT\Unknown\shell\openas\command</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>and look at how the %1 arg is quoted = (or=20 not)....</FONT></DIV> <BLOCKQUOTE dir=3Dltr=20 style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; = BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV> <DIV=20 style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: = black"><B>From:</B>=20 <A title=3Dcalle.lejdfors@cs.lth.se = href=3D"mailto:calle.lejdfors@cs.lth.se">Calle=20 Lejdfors</A> </DIV> <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A=20 title=3Dglasgow-haskell-users@haskell.org=20 = href=3D"mailto:glasgow-haskell-users@haskell.org">glasgow-haskell-users@h= askell.org</A>=20 </DIV> <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Tuesday, February 11, = 2003=20 02:02</DIV> <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> GHCi-5.04.2: Windows = Open with=20 ... problem.</DIV> <DIV><BR></DIV> <DIV><FONT face=3D"Courier New" size=3D2>Hello.</FONT></DIV> <DIV><FONT face=3D"Courier New" size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3D"Courier New"><FONT size=3D2>I am having a problem = using the=20 Open with ... on haskell-files under WinXP. The problem is this: = </FONT><FONT=20 size=3D2>create a file on my desktop and then right-click and try to = open it=20 using Open with -&gt; ghci. I get the following error=20 message:</FONT></FONT></DIV> <DIV><FONT face=3D"Courier New" size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3D"Courier New" size=3D2>can't find module = C:\Documents' (while=20 processing "C:\\Documents")</FONT></DIV> <DIV><FONT face=3D"Courier New" size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3D"Courier New" size=3D2>Obviously GHCi incorrectly = handles white=20 space in the path. If I run under Cygwin&nbsp;I can use a script=20 like:</FONT></DIV> <DIV><FONT face=3D"Courier New" size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>c:\\ghc\\ghc-5.04.2\\bin\\ghci = cygpath -d=20$1;<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>But how do I solve this if I'm not =
using cygwin?=20
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks,=20
Calle</DIV></BLOCKQUOTE></FONT></BODY></HTML>

------=_NextPart_000_09EE_01C2D195.94B83E30--