Hi,

I am running a compiler plugin over hundreds of libraries to extract statistical data. I use the plugin like it is done here:

https://github.com/coot/ghc-tags-plugin

So I just have to add a cabal.project.local to a library with:


ignore-project: False

package test
    ghc-options: -package-db=/home/till/.cabal/store/ghc-8.10.7/package.db
                 -plugin-package=ghc-core-graph
                 -fplugin=GhcPlugins.Optimind

But unfortunately the plugin only runs over code that is used in the main function or that is used in other functions.

Example:

main = putStrLn (show (f 0))

f x = sin x

g = h + i

Then the compiler plugin only runs over f, h, i   but not not g (unused top level functions).

Can the plugin be forced to run over all code?

-Tillmann

_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Reply via email to