How to use "-ddump-minimum-import" with glass

I am such a big fan of the stack that I completely deleted any cabal and ghc executable files from my machine (letting the stack install everything it needs into its own mysterious ~ / .stack / directory) ....

However, it seems that some flags are not working properly on the stack. For example, I want to use -ddump-minimal-imports . In bondage it will be

 cabal build --ghc-option=-ddump-minimal-imports 

The obvious translation will be

 stack build --ghc-options -ddump-minimal-imports 

This executes, but produces nothing but an executable file (as far as I can tell, at least .... Perhaps the output is somewhere in the mysterious ~ / .stack directory).

Is there any way to do this?

+6
source share
1 answer

I just tried this using stack build --ghc-options=-ddump-minimal-imports , and it created the output files in ./.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/ , for example :

 $ stack clean $ stack build --ghc-options=-ddump-minimal-imports stack-0.1.5.0: configure Configuring stack-0.1.5.0... stack-0.1.5.0: build Preprocessing library stack-0.1.5.0... [ 1 of 69] Compiling Data.Set.Monad ( src/Data/Set/Monad.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Data/Set/Monad.o ) [ 2 of 69] Compiling Data.Attoparsec.Combinators ( src/Data/Attoparsec/Combinators.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Data/Attoparsec/Combinators.o ) [ 3 of 69] Compiling Network.HTTP.Download.Verified ( src/Network/HTTP/Download/Verified.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Network/HTTP/Download/Verified.o ) ^Cuser interrupt $ find . -name '*imports*' ./.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Data.Attoparsec.Combinators.imports ./.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Data.Set.Monad.imports ./.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Network.HTTP.Download.Verified.imports 
+7
source

All Articles