cabal beginner issues (other-modules, build-depends)

Isaac Jones ijones at
Tue Oct 11 20:05:28 EDT 2005

Malcolm Wallace <Malcolm.Wallace at> writes:

> Isaac Jones <ijones at> writes:
>> We really should add depenency analysis to Cabal directly.
> Indeed.  I had the impression that eventually Cabal hopes to be a
> complete replacement for hmake in many ways.

I would like to have enough stuff in the API so that you could
implement HMake on top of the Distribution.* architecture, basically.

>> The only
>> reason to avoid this, afaik, is that parsing the imports might be a
>> little tricky. I don't think that hmake necessarily handles every
>> possible case here, semi-colons separating lines and multi-line
>> comments, for instance (though maybe it does handle these, I might be
>> wrong). It does a good job, and we can use that code in Cabal as well.
> hmake certainly handles multi-line comments, and #ifdef'd conditional
> imports (by using cpphs as a library).  

Great.  I had some vague memories about HMake's parser for input
statements being over simple, so I'm sorry I was incorrect there.

> It used to have a problem with
> para-Haskell sources, e.g. where a Happy grammar defined a symbolname
> 'import', but now it is clever enough to avoid those too.  I think the
> only thing not handled entirely correctly is several import statements
> on the same line separated by semicolons.  Not only is this situation
> extremely rare, but I've just thought of an easy way to make it work
> right anyway.

Cool.  Maybe we can steal your code :)



More information about the Libraries mailing list