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

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Tue Oct 11 17:39:28 EDT 2005


Isaac Jones <ijones at syntaxpolice.org> 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.

> 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).  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.

Regards,
    Malcolm


More information about the Libraries mailing list