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

Malcolm Wallace Malcolm.Wallace at
Wed Oct 12 05:58:12 EDT 2005

Isaac Jones <ijones at> writes:

> > 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 /is/ rather simple-minded.  But it doesn't really need to be
complex, there are only a few odd corner cases where you need to be
slightly careful.

> > I think the
> > only thing not handled entirely correctly is several import statements
> > on the same line separated by semicolons.

Actually I was wrong - this is already handled correctly.  See

But in testing it, I did discover a different corner case that was wrong:
    module A where
      { import B    -- this import was being missed due to leading {
      ; import C
      ; ...

Now fixed in CVS.

> Cool.  Maybe we can steal your code :)

Yeah, of course, provided you abide by the license (nhc98-style) -
this use would fall under the definition of stealing < 10% of any
one program.  (But you should also be aware that the cpphs modules
are LGPL.)


More information about the Libraries mailing list