build regex-tfda with the build flag "base4". I don't uses cabal-install so can't say how to send it build flags (hopefully should be very simple), but downloading and untarring the archive and using the "runhaskell Setup ..." steps lets you use build flags in the configure step.