Remove the no-fusion build flag and DISABLE_FUSION cpp macro (#2568)
commitfe5a036489379f76def95161382b4e782b4963e4
authorRanjeet Ranjan <ranjeetr@composewell.com>
dateThu 24 Aug 2023, 11:42 (3 years ago)
parent8e6d418
core/src/Streamly/Internal/Data/ParserK/Type.hs−2
@@ -782,10 +782,8 @@ toParser parser = ParserD.Parser step initial extract
782782 Partial _ cont1 -> extract cont1
783783 Continue n cont1 -> return $ ParserD.Continue n cont1
784784
785−#ifndef DISABLE_FUSION
786785{-# RULES "fromParser/toParser fusion" [2]
787786 forall s. toParser (fromParser s) = s #-}
788787{-# RULES "toParser/fromParser fusion" [2]
789788 forall s. fromParser (toParser s) = s #-}
790−#endif
791789-}
core/src/Streamly/Internal/Data/Stream/Type.hs−2
@@ -377,12 +377,10 @@ toStreamK (Stream step state) = go state
377377 Stop -> stp
378378 in go' st
379379
380−#ifndef DISABLE_FUSION
381380{-# RULES "fromStreamK/toStreamK fusion"
382381 forall s. toStreamK (fromStreamK s) = s #-}
383382{-# RULES "toStreamK/fromStreamK fusion"
384383 forall s. fromStreamK (toStreamK s) = s #-}
385−#endif
386384
387385------------------------------------------------------------------------------
388386-- Running a 'Fold'
core/streamly-core.cabal−8
@@ -94,11 +94,6 @@ flag has-llvm
9494 manual: True
9595 default: False
9696
97−flag no-fusion
98− description: Disable rewrite rules for stream fusion
99− manual: True
100− default: False
101−
10297flag opt
10398 description: off=GHC default, on=-O2
10499 manual: True
@@ -131,9 +126,6 @@ flag use-folds
131126common compile-options
132127 default-language: Haskell2010
133128
134− if flag(no-fusion)
135− cpp-options: -DDISABLE_FUSION
136−
137129 if flag(dev)
138130 cpp-options: -DDEVBUILD
139131