@@ -245,7 +245,7 @@ common test-options
245245
246246 ghc-options: -O0
247247 -fno-ignore-asserts
248− if flag(fusion-plugin)
248+ if flag(fusion-plugin) && !impl(ghcjs) && !impl(ghc < 8.6)
249249 ghc-options: -fplugin Fusion.Plugin
250250 build-depends:
251251 fusion-plugin >= 0.1 && < 0.2
@@ -253,7 +253,7 @@ common test-options
253253-- Used by maxrate test, benchmarks and executables
254254common exe-options
255255 import: compile-options, optimization-options, threading-options
256− if flag(fusion-plugin)
256+ if flag(fusion-plugin) && !impl(ghcjs) && !impl(ghc < 8.6)
257257 ghc-options: -fplugin Fusion.Plugin
258258 build-depends:
259259 fusion-plugin >= 0.1 && < 0.2
@@ -263,7 +263,7 @@ common exe-options
263263common bench-options
264264 import: compile-options, optimization-options
265265 ghc-options: -with-rtsopts "-T -M256M"
266− if flag(fusion-plugin)
266+ if flag(fusion-plugin) && !impl(ghcjs) && !impl(ghc < 8.6)
267267 ghc-options: -fplugin Fusion.Plugin
268268 build-depends:
269269 fusion-plugin >= 0.1 && < 0.2
@@ -274,7 +274,7 @@ common bench-options-threaded
274274 -- -threaded and -N2 is important because some GC and space leak issues
275275 -- trigger only with these options.
276276 ghc-options: -threaded -with-rtsopts "-T -N2 -M256M"
277− if flag(fusion-plugin)
277+ if flag(fusion-plugin) && !impl(ghcjs) && !impl(ghc < 8.6)
278278 ghc-options: -fplugin Fusion.Plugin
279279 build-depends:
280280 fusion-plugin >= 0.1 && < 0.2
@@ -371,6 +371,7 @@ library
371371 , Streamly.Internal.Data.Unicode.Char
372372 , Streamly.Internal.Memory.Unicode.Array
373373 , Streamly.Internal.Prelude
374+ , Streamly.Internal.Fusion
374375
375376 -- Mutable data
376377 , Streamly.Internal.Mutable.Prim.Var
@@ -407,7 +408,9 @@ library
407408 , monad-control >= 1.0 && < 2
408409 , transformers-base >= 0.4 && < 0.5
409410
410− , fusion-plugin >= 0.1 && < 0.2
411+ if !impl(ghcjs) && !impl(ghc < 8.6)
412+ build-depends:
413+ fusion-plugin >= 0.1 && < 0.2
411414
412415 if !impl(ghcjs)
413416 build-depends: