on master help sign in
Add flag -fdump-core to dump core output as html.

In order to view the core you can just open the relevant module in ./core-html.

commit876ad15282e2ea5e5d77e3eae4c4a2bba77bd81a authorMatthew Pickering <matthewtpickering@gmail.com> dateFri 29 Dec 2017, 18:26 (9 years ago) parent416fa83
1 file changed+11
generic-lens.cabal+11
generic-lens.cabal+11
@@ -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