GHC compilation error (re-post).

Hi all. I wrote the following test program: bar x = x * x on a Win32 (SP3) machine using the Haskell Platform and GHC-7.6.1 (standalone) and I have noticed the same frustrating errors. Any suggestions would be most appreciated. Thanks, ~Caitlin C:\>ghci GHCi, version 7.4.2: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Prelude> Prelude> :l bar [1 of 1] Compiling Main ( bar.hs, interpreted ) *** Exception: CreateDirectory ".": permission denied (Access is denied.)
:l bar.hs
[1 of 1] Compiling Main ( bar.hs, interpreted ) *** Exception: CreateDirectory ".": permission denied (Access is denied.)
:l "C:\\bar.hs"
[1 of 1] Compiling Main ( C:\bar.hs, interpreted ) *** Exception: CreateDirectory "C:\\": permission denied (Access is denied.)

Caitlin
Hi all.
I wrote the following test program:
bar x = x * x
on a Win32 (SP3) machine using the Haskell Platform and GHC-7.6.1 (standalone) and I have noticed the same frustrating errors. Any suggestions would be most appreciated.
Are you certain you have write permission for C:\? I'm not terribly with how Windows handles file permissions, but the error seems pretty unambiguous as to its cause. It's a little strange to be placing files like this in the root directory of a volume, anyways. Perhaps try this in a directory which you certainly have adequate permissions in (the Windows equivalent of $HOME perhaps. Wikipedia seems to think this is %UserProfile%). Cheers, - Ben

Hi Ben and Garrett.
I am logged in as the administrator (full access rights). This problem is
quite confusing since I recall using a older version of the GHC
(standalone) without any incidents. I have no idea how to solve this
particular problem.
Thanks,
~Caitlin
On Fri, Jan 18, 2013 at 11:05 AM, Ben Gamari
Caitlin
writes: Hi all.
I wrote the following test program:
bar x = x * x
on a Win32 (SP3) machine using the Haskell Platform and GHC-7.6.1 (standalone) and I have noticed the same frustrating errors. Any suggestions would be most appreciated.
Are you certain you have write permission for C:\? I'm not terribly with how Windows handles file permissions, but the error seems pretty unambiguous as to its cause. It's a little strange to be placing files like this in the root directory of a volume, anyways. Perhaps try this in a directory which you certainly have adequate permissions in (the Windows equivalent of $HOME perhaps. Wikipedia seems to think this is %UserProfile%).
Cheers,
- Ben

On Fri, Jan 18, 2013 at 1:05 PM, Ben Gamari
on a Win32 (SP3) machine using the Haskell Platform and GHC-7.6.1 (standalone) and I have noticed the same frustrating errors. Any suggestions would be most appreciated.
Are you certain you have write permission for C:\? I'm not terribly with how Windows handles file permissions, but the error seems pretty
I suspect it's more fundamental than that. *** Exception: CreateDirectory ".": permission denied (Access is denied.) Why is it trying to create "."? -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

On Fri, Jan 18, 2013 at 11:32 AM, Brandon Allbery
On Fri, Jan 18, 2013 at 1:05 PM, Ben Gamari
wrote: on a Win32 (SP3) machine using the Haskell Platform and GHC-7.6.1 (standalone) and I have noticed the same frustrating errors. Any suggestions would be most appreciated.
Are you certain you have write permission for C:\? I'm not terribly with how Windows handles file permissions, but the error seems pretty
I suspect it's more fundamental than that.
*** Exception: CreateDirectory ".": permission denied (Access is denied.)
Why is it trying to create "."?
You can specify -o<dir> with a directory that doesn't exist; perhaps GHC always tries to create the output directory? In any case, I can confirm the observed behavior with GHC 7.6.1 on Windows 8, running with elevated privilege. It seems to only be a problem in the root directory tho---while I can observe the problem in both C:\ and D:\, I can't in any subdirectories thereof. /g -- Sent from my mail client.

On Fri, Jan 18, 2013 at 2:53 PM, J. Garrett Morris
Why is it trying to create "."?
You can specify -o<dir> with a directory that doesn't exist; perhaps GHC always tries to create the output directory?
In any case, I can confirm the observed behavior with GHC 7.6.1 on Windows 8, running with elevated privilege. It seems to only be a problem in the root directory tho---while I can observe the problem in both C:\ and D:\, I can't in any subdirectories thereof.
That makes a certain amount of sense; the root directory of a drive is treated somewhat specially for backward compatibility reasons. (In particular, "." is emulated --- on FAT, at least, neither "." nor ".." exists in a drive root, and this behavior may well be emulated to keep from confusing older programs.) -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

Ahh...I see. Thanks Brandon. I was unaware of that.
~Caitlin
On Fri, Jan 18, 2013 at 1:00 PM, Brandon Allbery
On Fri, Jan 18, 2013 at 2:53 PM, J. Garrett Morris
wrote: Why is it trying to create "."?
You can specify -o<dir> with a directory that doesn't exist; perhaps GHC always tries to create the output directory?
In any case, I can confirm the observed behavior with GHC 7.6.1 on Windows 8, running with elevated privilege. It seems to only be a problem in the root directory tho---while I can observe the problem in both C:\ and D:\, I can't in any subdirectories thereof.
That makes a certain amount of sense; the root directory of a drive is treated somewhat specially for backward compatibility reasons. (In particular, "." is emulated --- on FAT, at least, neither "." nor ".." exists in a drive root, and this behavior may well be emulated to keep from confusing older programs.)
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Thanks Garrett.
I deleted the Haskell Platform installation, manually removed all traces of
GHC and the Hakell Platform from my registry and various folders, then
re-installed the Haskell Platform. I created a folder under the 'C:\'
drive, copied my .hs files there, changed to that subfolder started ghci.
The file loaded without error. This seems like a problem the developers
might address in the next release?
Thanks again for the help.
~Caitlin
On Fri, Jan 18, 2013 at 12:53 PM, J. Garrett Morris
On Fri, Jan 18, 2013 at 11:32 AM, Brandon Allbery
wrote: On Fri, Jan 18, 2013 at 1:05 PM, Ben Gamari
wrote: on a Win32 (SP3) machine using the Haskell Platform and GHC-7.6.1 (standalone) and I have noticed the same frustrating errors. Any suggestions would be most appreciated.
Are you certain you have write permission for C:\? I'm not terribly with how Windows handles file permissions, but the error seems pretty
I suspect it's more fundamental than that.
*** Exception: CreateDirectory ".": permission denied (Access is denied.)
Why is it trying to create "."?
You can specify -o<dir> with a directory that doesn't exist; perhaps GHC always tries to create the output directory?
In any case, I can confirm the observed behavior with GHC 7.6.1 on Windows 8, running with elevated privilege. It seems to only be a problem in the root directory tho---while I can observe the problem in both C:\ and D:\, I can't in any subdirectories thereof.
/g
-- Sent from my mail client.
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

On Fri, Jan 18, 2013 at 01:05:05PM -0700, Caitlin wrote:
I deleted the Haskell Platform installation, manually removed all traces of GHC and the Hakell Platform from my registry and various folders, then re-installed the Haskell Platform. I created a folder under the 'C:\' drive, copied my .hs files there, changed to that subfolder started ghci. The file loaded without error. This seems like a problem the developers might address in the next release?
Thanks for the report. I've fixed it in HEAD. Thanks Ian
participants (5)
-
Ben Gamari
-
Brandon Allbery
-
Caitlin
-
Ian Lynagh
-
J. Garrett Morris