[Haskell-cafe] Re: How to make cabal pass flags to happy?

Thomas Schilling nominolo at googlemail.com
Sat Oct 16 11:44:28 EDT 2010

You probably want to customise Setup.lhs to use defaultMainWithHooks
and add your own custom suffix handler to the UserHooks, see:


Take a look at PPSuffixHandler
and see the source code for ppHappy to get started

I'm CC'ing Duncan, in case he has a better idea.

On 13 October 2010 19:44, Niklas Broberg <niklas.broberg at gmail.com> wrote:
> On Fri, Oct 8, 2010 at 4:55 PM, Niklas Broberg <niklas.broberg at gmail.com> wrote:
>> Hi all,
>> I want to do something I thought would be quite simple, but try as I
>> might I can't find neither information nor examples on how to achieve
>> it.
>> What I want specifically is to have happy produce a GLR parser from my
>> .ly file, and I want this to happen during 'cabal install'. Which in
>> turn means I want cabal to pass the "--glr" flag to happy during
>> setup. My best guess is that I might want to use 'ppHappy' [1], or
>> something in the vicinity, but there's no documentation for the
>> combinator and it's far from obvious how to pass arguments to it.
>> ... help? :-)
> ... anyone? ... please? :-)
> Cheers,
> /Niklas
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

Push the envelope. Watch it bend.

More information about the Haskell-Cafe mailing list