As Dave Lee pointed out, it's possible to pass use the --c2hs-options
flag like so:
cabal ... --c2hs-options="-d trace"
I couldn't figure out how to make this work by adding to the .cabal
or stack.yaml
files, or by passing it on the command like in conjunction with stack build
so just copied the command from the output of stack build
and manually ran it with the additional flag:
/Users/py/projects/jspahrsummers/Arbiter/bindings/haskell/.stack-work/dist/x86_64-osx/Cabal-1.24.0.0/setup/setup --builddir=.stack-work/dist/x86_64-osx/Cabal-1.24.0.0 build lib:arbiter --ghc-options " -ddump-hi -ddump-to-file" --c2hs-options="-d trace"