Remaining bugs in Cabal under Windows

Krasimir Angelov ka2_mail at yahoo.com
Tue Aug 17 06:16:22 EDT 2004


--- Simon Marlow <simonmar at microsoft.com> wrote:
> >    - When Cabal is used to build library package
> then
> > it fails to find ar.exe in the path. This isn't a
> > problem when in the build is run from cygwin or
> mingw
> > environment but is painful on plain Command
> prompt.
> 
> Agreed - one of the goals of Cabal is that it should
> work with a plan
> GHC installation, no cygwin required.  I think
> ar.exe should be packaged
> with GHC in the same directory as ghc.exe, so that
> it'll be available in
> the PATH.  This is easier than providing ar
> functionality from GHC
> itself, which would perhaps be nice but is more work
> and is
> GHC-specific, you still have to invoke ar for other
> compilers.

You don't have to invoke ar for Hugs. NHC is working
only with Cygwin so this is a trouble only with GHC.
Is it so hard to invoke ar from GHC. This is alredy
done for ld. Of course packaging ar in the GHC
directory is a quick workaround.

> >      To fix third bug I tried to use
> > SHGetFolderPathAndSubDir function to retrieve the
> > "Application Data" folder for current user.
> > This is:
> > 
> > "C:\Documents and Settings\kr_angelov\Application
> > Data"
> > 
> > on my PC. The trouble here is that to do that I
> need
> > to add shell32 to extra-libs field in package
> > description. I don't have a way to preprocess
> > Setup.description so I can't add shell32
> > conditionally.
> > I would like to have a collection of functions
> like:
> > 
> > getCurrentDirectory
> 
> we already have that
> 
> > getAppUserDataDirectory
> > getHomeDirectory
> 
> Maybe - although the conventions still differ
> between Unix and Windows.
> On Unix, to store per-user data you would use
> <homedir>/.<app> whereas
> on Windows you use <homedir>/<app>.  So I think the
> win32 library should
> provide access to getAppUserDataDirectory, and the
> app code still needs
> to be conditionally compiled.

Instead we can provide function like:

getAppUserDataDirectory :: String -> IO FilePath

where getAppUserDataDirectory "<app>" will return
<homedir>/.<app> or <homedir>\<app>

Cheers,
  Krasimir


		
__________________________________
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo 


More information about the Libraries mailing list