@@ -18,6 +18,10 @@ extra-source-files: ChangeLog.md
1818 , examples/Examples.hs
1919 , README.md
2020
21+flag dump-core
22+ description: Dump HTML for the core generated by GHC during compilation
23+ default: False
24+
2125library
2226 exposed-modules: Data.Generics.Product
2327 , Data.Generics.Product.Any
@@ -57,6 +61,10 @@ library
5761 hs-source-dirs: src
5862 default-language: Haskell2010
5963 ghc-options: -Wall
64+ if flag(dump-core)
65+ build-depends: dump-core
66+ ghc-options: -fplugin=DumpCore -fplugin-opt DumpCore:core-html
67+
6068
6169source-repository head
6270 type: git
@@ -73,6 +81,9 @@ test-suite generic-lens-test
7381
7482 default-language: Haskell2010
7583 ghc-options: -Wall
84+ if flag(dump-core)
85+ build-depends: dump-core
86+ ghc-options: -fplugin=DumpCore -fplugin-opt DumpCore:core-html
7687
7788test-suite generic-lens-test-25
7889 type: exitcode-stdio-1.0