on master help sign in
Add flag -fdump-core to dump core output as html.
876ad15Matthew Pickering
generic-lens.cabal+11
@@ -18,6 +18,10 @@ extra-source-files: ChangeLog.md
18 , examples/Examples.hs
18 , examples/Examples.hs
19 , README.md
19 , README.md
20
20
21+flag dump-core
22+ description: Dump HTML for the core generated by GHC during compilation
23+ default: False
24+
21library
25library
22 exposed-modules: Data.Generics.Product
26 exposed-modules: Data.Generics.Product
23 , Data.Generics.Product.Any
27 , Data.Generics.Product.Any
@@ -57,6 +61,10 @@ library
57 hs-source-dirs: src
61 hs-source-dirs: src
58 default-language: Haskell2010
62 default-language: Haskell2010
59 ghc-options: -Wall
63 ghc-options: -Wall
64+ if flag(dump-core)
65+ build-depends: dump-core
66+ ghc-options: -fplugin=DumpCore -fplugin-opt DumpCore:core-html
67+
60
68
61source-repository head
69source-repository head
62 type: git
70 type: git
@@ -73,6 +81,9 @@ test-suite generic-lens-test
73
81
74 default-language: Haskell2010
82 default-language: Haskell2010
75 ghc-options: -Wall
83 ghc-options: -Wall
84+ if flag(dump-core)
85+ build-depends: dump-core
86+ ghc-options: -fplugin=DumpCore -fplugin-opt DumpCore:core-html
76
87
77test-suite generic-lens-test-25
88test-suite generic-lens-test-25
78 type: exitcode-stdio-1.0
89 type: exitcode-stdio-1.0