Template Haskell in cabal-install

Brent Yorgey byorgey at seas.upenn.edu
Mon Dec 21 14:57:27 EST 2009


On Mon, Dec 21, 2009 at 02:49:10PM +0000, Duncan Coutts wrote:
> On Mon, 2009-12-21 at 07:30 +0100, Mikhail Glushenkov wrote:
> > Hi,
> > 
> > Would it be worthwile to reimplement
> > Distribution/Client/Init/Licenses.hs using a TH macro that parses and
> > loads license files at compile time? IIUC, currently one has to use a
> > Perl script to add new licenses.
> 
> We cannot have cabal-install use TH, because that language extension is
> GHC-only.
> 
> I suggest we change it so that the license files are external data
> files. Then we just use string substitution.

I agree using external data files would be better.  I just stole the
code for the licenses from the old mkcabal project, and decided
improving it to use external data files was a "nice to have" feature I
didn't end up getting around to.  Mikhail, can you add a feature
request ticket for this on the bug tracker?  I might get around to it
at some point but in the meantime anyone else is obviously welcome to
have a go (should be a nice easy project for someone wanting to get
their feet wet).

-Brent



More information about the cabal-devel mailing list