Cabal preprocessing

Henrik Nilsson nhn at Cs.Nott.AC.UK
Thu Nov 30 05:13:30 EST 2006

 > Ulf Norell wrote:
 > Stefan Holdermans wrote:
 > > One reason could be that, when distributing *sources*, you'd want
 > > the generated file to be included as well (that is, you want to
 > > regard it as a source file),
 > The problem with that is that someone getting the sources might get
 > the idea that the preprocessed file is  an actual source file and try
 > to modify it (or just make sense of it, imagine someone trying to read
 > a happy parser...).

True (although I'm not sure how much of a problem that really is).
However, if one is relying on some "exotic" preprocessing, it can be
really helpful for people who are just interested in getting the code up
and running if they don't have to install a bunch of preprocessors

As a case in point, (a long time ago) we distributed Frob (Robot
programming layer on top of FRP) both with Greencard sources and the
output from Greencard for that very reason.

But maybe this is less of an issue with Cabal taking a lot of pain out
of building and installing?

 > Including parts of dist in the tarball makes it
 > clear that what you get is not a vanilla source distribution.

Yes, that's possibly a better way of doing it.

As long as there is a way of generating preprocessed pure Haskell for



Henrik Nilsson
School of Computer Science and Information Technology
The University of Nottingham
nhn at

This message has been checked for viruses but the contents of an attachment
may still contain software viruses, which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.

More information about the Libraries mailing list