Cabal custom scripts and me

Used Cabal’s custom setup script mechanism to generate release/build info for my redis server. Wrote about it here. Would appreciate any feedback!

3 Likes

Hooks do seem a bit too bleeding edge to be usable, but I’m curious as to why you chose a custom setup over Template Haskell? I think I’d always opt for the latter when possible. It plays a lot better with various tools, e.g. HLS. And you get to construct actual ASTs rather than working with strings.

I’m not to familiar with Template Haskell and the custom script seemed simpler, particularly since it was a mirror solution to what the redis codebase does. Metaprogramming also didn’t seem like it fit. Though, that could just be my ignorance talking

TH is actually very easy, try it.