Safe Haskell | None |
---|---|
Language | Haskell2010 |
CallCount.TcPlugin
Synopsis
- callCount :: TcPlugin
- optCallCount :: [CommandLineOption] -> Maybe TcPlugin
Documentation
callCount :: TcPlugin Source #
A plugin that counts the number of times its tcPluginSolve
function is
called when GHC is type checking.
optCallCount :: [CommandLineOption] -> Maybe TcPlugin Source #
This plugin does no type checking.
Any options passed are echoed as a prefix before the call count when
tcPluginSolve
is called. If no options are passed then GHC-TcPlugin is
used instead as the prefix before the count like this test suite shows.
Building test suite 'test-counter-foobar-main' [1 of 2] Compiling FooBar >>> GHC-TcPlugin #1 >>> GHC-TcPlugin #2 [2 of 2] Compiling Main
The options passed to optCallCount
are echoed as a prefix in the test
suites called by ./build-opts.sh
.
> cat ./build-opts.sh # The steps in .github/workflows/cabal.yml related to passing options to plugins. # You might like to run cabal update and cabal clean before running this script. cabal build test-in-turn cabal build test-in-line cabal build test-in-turn-each cabal build test-in-line-each
> ./build-opts.sh ... Building test suite 'test-in-turn' [1 of 1] Compiling Main >>> AB #1 >>> AB #1 >>> AB #2 >>> AB #2 ... Building test suite 'test-in-line' [1 of 1] Compiling Main >>> AB #1 >>> AB #1 >>> AB #2 >>> AB #2 ... Building test suite 'test-in-turn-each' [1 of 1] Compiling Main >>> B #1 >>> A #1 >>> B #2 >>> A #2 ... Building test suite 'test-in-line-each' [1 of 1] Compiling Main >>> B #1 >>> A #1 >>> B #2 >>> A #2