My program consists of 4 executables, and basically zero library code. My tests work by running the executables with various input files.
"stack test --coverage" apparently doesn't handle executables. OK, fine, but I can't figure out how to do it "by hand", as it were.
I've tried adding -fhpc to my cabal files, and it appears to work:
/home/rlpowell/.stack/programs/x86_64-linux/ghc-8.0.1/lib/ghc-8.0.1/bin/ghc -B/home/rlpowell/.stack/programs/x86_64-linux/ghc-8.0.1/lib/ghc-8.0.1 --make -no-link -fbuilding-cabal-package -O -static -outputdir .stack-work/dist/x86_64-linux/Cabal-1.24.0.0/build/unphone/unphone-tmp -odir .stack-work/dist/x86_64-linux/Cabal-1.24.0.0/build/unphone/unphone-tmp -hidir .stack-work/dist/x86_64-linux/Cabal-1.24.0.0/build/unphone/unphone-tmp -stubdir .stack-work/dist/x86_64-linux/Cabal-1.24.0.0/build/unphone/unphone-tmp -i -i.stack-work/dist/x86_64-linux/Cabal-1.24.0.0/build/unphone/unphone-tmp -iapp -i.stack-work/dist/x86_64-linux/Cabal-1.24.0.0/build/autogen -I.stack-work/dist/x86_64-linux/Cabal-1.24.0.0/build/autogen -I.stack-work/dist/x86_64-linux/Cabal-1.24.0.0/build/unphone/unphone-tmp -optP-include -optP.stack-work/dist/x86_64-linux/Cabal-1.24.0.0/build/autogen/cabal_macros.h -hide-all-packages -no-user-package-db -package-db /home/rlpowell/.stack/snapshots/x86_64-linux/lts-7.4/8.0.1/pkgdb -package-db /dropbox/src/hblog/.stack-work/install/x86_64-linux/lts-7.4/8.0.1/pkgdb -package-db .stack-work/dist/x86_64-linux/Cabal-1.24.0.0/package.conf.inplace -package-id base-4.9.0.0 -package-id directory-1.2.6.2 -package-id filemanip-0.3.6.3-DFENeGbODv96RwGywUxkEu -package-id filepath-1.4.1.0 -package-id hblog-0.1.0.0-5BseEsncIi47yHhFL2tGbM -package-id pcre-heavy-1.0.0.2-ncNpc9J5vG8YMUKvU47xG -package-id pcre-light-0.4.0.4-IQAaYrFkWFB49U9V8o5b8j -package-id unix-2.7.2.0 -XHaskell2010 app/unphone.hs -threaded -Wall -fhpc -Wall -fhpc -ddump-hi -ddump-to-file
but after running the programs thus generated, I can't find a .hpc directory or any .tix files.
--coverage(may only apply to current dev version of stack)? - sjakobi