[Haskell-cafe] Cabal fail

Andrew Coppin andrewcoppin at btinternet.com
Sat Jun 11 11:04:41 CEST 2011


How do you make Cabal fail?

Let me clarify. I built a package that uses a post-configure hook to do 
some settings detection. Under certain circumstances, it can fail. When 
this happens, the hook prints "fatal error" and quits. Unfortunately, I 
didn't actually /test/ whether it works. On further investigation, I 
discovered that the hook considers itself to have failed, but it doesn't 
bother actually telling Cabal about this. (!) So Cabal still thinks 
everything went fine.

OK, so, let's the correct way to notify Cabal that we need to retry the 
configure step? I can't figure it out from the minimal documentation in 
Distribution.Simple. (I'm guessing I need to use a pre-configure hook, 
since by the time post-configure runs, the configure stage is presumably 
over...?)



More information about the Haskell-Cafe mailing list