
At 11:23 22/10/04 -0400, Isaac Jones wrote:
Hi Graham. Thanks for your comments!
Graham Klyne
writes: I'm having a shot at packaging my revision of the HaXml library using Cabal, using [1] as reference:
[1] http://www.haskell.org/libraryInfrastructure/proposal/index.html
I'm basically stuck at the point of bootstrapping Cabal into my system (see point 9 towards the end, below). I'm proceeding on the basis of using Windows and Hugs. I *could* use GHC, but for non-Haskellers I think Hugs represents the easiest path of entry into using Haskell software, so I'd like to persist with that.
I haven't worked much with the Hugs code; I'm mostly focusing on an end-to-end solution with GHC first, then branching out to other implementations, if no one beats me to them. If you want to use Hugs, you'll have to help contribute some code :)
I'll do what I can, and my supplementary questions will focus on that... [...]
9. At this point, I get stuck. How am I supposed to bootstrap Cabal?
Did you read the README? Cabal comes with a bootstrap makefile. In the future, it'll hopefully be distributed with the compilers to make this easier.
Er, yes, but I gave up as soon as I saw "makefile". Any approach that depends on make is not portable top a bare Window system. Hmmm... unless the makefile is compatible with hsmake?
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.
OK, for the time being, I suggest isolating the non-portable code and creating a windows-specific version. If you can point me to the relevant modules, I'll look into creating windows-specific versions and a batch file to replace them in the main source directory and compile/run them them. There's a technique something like this used for the Hugs distribution, IIRC. ...
10. I'll repeat here a comment made on the list. I think there should be an option in the Setup.description file to specify what file extensions are to be passed through the hscpp (or whatever) program.
I'm not sure I understand this, I'll have to read back over the list.
Maybe better I explain in a little more detail... This was in relation to the discussion of file name conventions for preprocessing and literate Haskell, etc. A number of different naming conventions were suggested. My view is that rather than forcing everyone to use the same naming conventions for various files, the Setup.description file could specify what filenames would be subject to special processing; e.g.: Preprocess: (.cpphs,.hs),(.cpplhs,.lhs) A default value being selected to match common usage. A similar directive might be used for literate source processing.
11. If Cabal does not ship with hscpp for performing all preprocessing, I'd suggest having a point of indirection (like "runhaskell") so that systems without cpp but with hscpp can be set up to invoke this.
In the short-term (at least), I think I'll probably include hscpp with cabal
I have successfully run hscpp under Windows/Hugs, but I think may have needed to make a couple of small changes. I think that making it easy to switch cpp implementation will make it easier to get Cabal up and running on various platforms. Then (I believe) it will be easier to make such operation appear more seamless.
I think that's as much as I can usefully do at this stage. If anyone has any further suggestions I'm willing to try them out.
So is ghc a problem for you? If so, you'll have to hack the makefiles to get it working with hugs (and send me the patch!!) If not, then just switch to ghc, read the README, and you should be set. Please let me know how things are working for Windows, send me any patches you make (preferably with darcs, which is really easy!)
It's not GHC that's the main problem, its the dependency on makefiles. But if I can use hscpp, that's less of a problem. ... Summary: I think the next step is this: if you can point me at the non-portable modules in Cabal, I can try and figure out what it takes to run them under Windows, and feed the details back to you. Also, maybe, if you can point me to the code that invokes make, I'll see if I can figure a way to add a revectoring point there. #g ------------ Graham Klyne For email: http://www.ninebynine.org/#Contact