@@ -129,6 +129,11 @@ source-repository head
129 type: git
129 type: git
130 location: https://github.com/composewell/streamly
130 location: https://github.com/composewell/streamly
133+ description: Enable fusion plugin for better optimizations
132flag inspection
137flag inspection
133 description: Enable inspection testing
138 description: Enable inspection testing
134 manual: True
139 manual: True
@@ -237,18 +242,31 @@ common lib-options
237-- in general.
242-- in general.
238common test-options
243common test-options
239 import: compile-options, threading-options
244 import: compile-options, threading-options
240 ghc-options: -O0
246 ghc-options: -O0
241 -fno-ignore-asserts
247 -fno-ignore-asserts
248+ if flag(fusion-plugin)
249+ ghc-options: -fplugin Fusion.Plugin
251+ fusion-plugin >= 0.1 && < 0.2
243-- Used by maxrate test, benchmarks and executables
253-- Used by maxrate test, benchmarks and executables
244common exe-options
254common exe-options
245 import: compile-options, optimization-options, threading-options
255 import: compile-options, optimization-options, threading-options
256+ if flag(fusion-plugin)
257+ ghc-options: -fplugin Fusion.Plugin
259+ fusion-plugin >= 0.1 && < 0.2
247-- Some benchmarks are threaded some are not
261-- Some benchmarks are threaded some are not
248-- XXX dependencies should be separated under bench-depends
262-- XXX dependencies should be separated under bench-depends
249common bench-options
263common bench-options
250 import: compile-options, optimization-options
264 import: compile-options, optimization-options
251 ghc-options: -with-rtsopts "-T -M256M"
265 ghc-options: -with-rtsopts "-T -M256M"
266+ if flag(fusion-plugin)
267+ ghc-options: -fplugin Fusion.Plugin
269+ fusion-plugin >= 0.1 && < 0.2
252 build-depends: mtl >= 2.2 && < 3
270 build-depends: mtl >= 2.2 && < 3
254common bench-options-threaded
272common bench-options-threaded
@@ -256,6 +274,10 @@ common bench-options-threaded
256 -- -threaded and -N2 is important because some GC and space leak issues
274 -- -threaded and -N2 is important because some GC and space leak issues
257 -- trigger only with these options.
275 -- trigger only with these options.
258 ghc-options: -threaded -with-rtsopts "-T -N2 -M256M"
276 ghc-options: -threaded -with-rtsopts "-T -N2 -M256M"
277+ if flag(fusion-plugin)
278+ ghc-options: -fplugin Fusion.Plugin
280+ fusion-plugin >= 0.1 && < 0.2
259 build-depends: mtl >= 2.2 && < 3
281 build-depends: mtl >= 2.2 && < 3
261-------------------------------------------------------------------------------
283-------------------------------------------------------------------------------