Cabal feedback notes
ka2_mail at yahoo.com
Sat Oct 23 05:00:32 EDT 2004
--- Isaac Jones <ijones at syntaxpolice.org> wrote:
> > runhugs: Error occurred
> > Reading file "Setup.lhs":
> > Reading file ".\Distribution\Simple.hs":
> > Parsing
> > ERROR ".\Distribution\Simple.hs":52 - Syntax error
> in module
> > definition (unexpec
> > ted selector "#ifdef")
> > ]]
> You're going to have some trouble using Hugs here,
> since the makefile
> doesn't have any hugs target and so there's no
> preprocessing step.
> Theoretically, most if not all of the code is
> portable, we just need
> the makefile rules to do the bootstrapping and such.
> It'll be easier
> once we figure out how to do preprocessing in cabal
> itself, so I've
> been a little lazy here.
One way to make Cabal really portable is to move the
entire platform specific code out of it. One example
function, which uses HOME environment variable to
determine the user's home directory, but this doesn't
work under Windows. The CVS System.Directory module
already provides the getAppUserDataDirectory function
which is more suitable (and portable) in this case.
Another example is
Distribution.Simple.Utils.findBinary. Recently I had
updated it and now it is portable but now I see that a
similar function is used in runghc tool but in its non
portable version. If we move this to the standard
libraries then we will be able to use it in both
cases. Most of the other #ifdef-s are related to the
filepath handling. It will be great benefit if we
isolate it in a separate library. I already use the
filepath routines in VSHaskell. You can see that a
similar functions are used in haddock, happy and alex
tools. Maybe if we agree on this it is not too late to
add it before the next GHC release.
Do you Yahoo!?
Y! Messenger - Communicate in real time. Download now.
More information about the Libraries