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? Thanks, Calle
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 ----- From: Calle Lejdfors To: glasgow-haskell-users@haskell.org 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? Thanks, Calle
Hi Thanks for the answer. It appears as if XP calls ghci via "p::\ath\to\ghci" "c:\Documents and Settings\foo\...." i.e. with quotes. Trying to start ghci via cygwin using any of $ ghci Test\ with\ spaces/Test.lhs $ ghci Test\ with\ spaces\\Test.lhs $ ghci "Test with space/Test.lhs" $ ghci "Test with space\\Test.lhs" will give the error: can't find module `Test' (while processing "Test") Testing $ ghci Test\ with\ spaces/Test.lhs $ ghci "Test with space/Test.lhs" under Linux gives the same error. Hence there seem to be something strange about pathnames containing spaces under GHCi. However trying the same thing under GHC works like a charm under both cygwin and Linux. Any ideas? /Calle ----- Original Message ----- From: Sigbjorn Finne To: Calle Lejdfors Cc: glasgow-haskell-users@haskell.org Sent: Tuesday, February 11, 2003 3:19 PM Subject: Re: GHCi-5.04.2: Windows Open with ... problem. 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 ----- From: Calle Lejdfors To: glasgow-haskell-users@haskell.org 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? Thanks, Calle
Allright, thanks - this a bug in the GHCi UI frontend. When given a filename via a :load command or the cmd-line it processes the filename(s) using Prelude.words, which isn't the right thing to do. --sigbjorn ----- Original Message ----- From: Calle Lejdfors To: glasgow-haskell-users@haskell.org Sent: Wednesday, February 12, 2003 05:33 Subject: Re: GHCi-5.04.2: Windows Open with ... problem. Hi Thanks for the answer. It appears as if XP calls ghci via "p::\ath\to\ghci" "c:\Documents and Settings\foo\...." i.e. with quotes. Trying to start ghci via cygwin using any of $ ghci Test\ with\ spaces/Test.lhs $ ghci Test\ with\ spaces\\Test.lhs $ ghci "Test with space/Test.lhs" $ ghci "Test with space\\Test.lhs" will give the error: can't find module `Test' (while processing "Test") Testing $ ghci Test\ with\ spaces/Test.lhs $ ghci "Test with space/Test.lhs" under Linux gives the same error. Hence there seem to be something strange about pathnames containing spaces under GHCi. However trying the same thing under GHC works like a charm under both cygwin and Linux. Any ideas? /Calle ----- Original Message ----- From: Sigbjorn Finne To: Calle Lejdfors Cc: glasgow-haskell-users@haskell.org Sent: Tuesday, February 11, 2003 3:19 PM Subject: Re: GHCi-5.04.2: Windows Open with ... problem. 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 ----- From: Calle Lejdfors To: glasgow-haskell-users@haskell.org 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? Thanks, Calle
Hi. Ok. When can we expect a patch? Will it be incorporated into the next stable release? The reason for asking is that we're migrating from Hugs to using GHC(i) in our basic Functional Programming course. And since all our lab machines are Windows based it is imperative that this works correctly. Thanks, Calle ----- Original Message ----- From: Sigbjorn Finne To: Calle Lejdfors Cc: glasgow-haskell-users@haskell.org Sent: Wednesday, February 12, 2003 3:54 PM Subject: Re: GHCi-5.04.2: Windows Open with ... problem. Allright, thanks - this a bug in the GHCi UI frontend. When given a filename via a :load command or the cmd-line it processes the filename(s) using Prelude.words, which isn't the right thing to do. --sigbjorn ----- Original Message ----- From: Calle Lejdfors To: glasgow-haskell-users@haskell.org Sent: Wednesday, February 12, 2003 05:33 Subject: Re: GHCi-5.04.2: Windows Open with ... problem. Hi Thanks for the answer. It appears as if XP calls ghci via "p::\ath\to\ghci" "c:\Documents and Settings\foo\...." i.e. with quotes. Trying to start ghci via cygwin using any of $ ghci Test\ with\ spaces/Test.lhs $ ghci Test\ with\ spaces\\Test.lhs $ ghci "Test with space/Test.lhs" $ ghci "Test with space\\Test.lhs" will give the error: can't find module `Test' (while processing "Test") Testing $ ghci Test\ with\ spaces/Test.lhs $ ghci "Test with space/Test.lhs" under Linux gives the same error. Hence there seem to be something strange about pathnames containing spaces under GHCi. However trying the same thing under GHC works like a charm under both cygwin and Linux. Any ideas? /Calle ----- Original Message ----- From: Sigbjorn Finne To: Calle Lejdfors Cc: glasgow-haskell-users@haskell.org Sent: Tuesday, February 11, 2003 3:19 PM Subject: Re: GHCi-5.04.2: Windows Open with ... problem. 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 ----- From: Calle Lejdfors To: glasgow-haskell-users@haskell.org 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? Thanks, Calle
participants (2)
-
Calle Lejdfors -
Sigbjorn Finne