on master help sign in
Remove the no-fusion build flag and DISABLE_FUSION cpp macro (#2568)
fe5a036Ranjeet Ranjan
core/src/Streamly/Internal/Data/ParserK/Type.hs−2
@@ -782,10 +782,8 @@ toParser parser = ParserD.Parser step initial extract
782 Partial _ cont1 -> extract cont1
782 Partial _ cont1 -> extract cont1
783 Continue n cont1 -> return $ ParserD.Continue n cont1
783 Continue n cont1 -> return $ ParserD.Continue n cont1
784
784
785−#ifndef DISABLE_FUSION
786{-# RULES "fromParser/toParser fusion" [2]
785{-# RULES "fromParser/toParser fusion" [2]
787 forall s. toParser (fromParser s) = s #-}
786 forall s. toParser (fromParser s) = s #-}
788{-# RULES "toParser/fromParser fusion" [2]
787{-# RULES "toParser/fromParser fusion" [2]
789 forall s. fromParser (toParser s) = s #-}
788 forall s. fromParser (toParser s) = s #-}
790−#endif
791-}
789-}
core/src/Streamly/Internal/Data/Stream/Type.hs−2
@@ -377,12 +377,10 @@ toStreamK (Stream step state) = go state
377 Stop -> stp
377 Stop -> stp
378 in go' st
378 in go' st
379
379
380−#ifndef DISABLE_FUSION
381{-# RULES "fromStreamK/toStreamK fusion"
380{-# RULES "fromStreamK/toStreamK fusion"
382 forall s. toStreamK (fromStreamK s) = s #-}
381 forall s. toStreamK (fromStreamK s) = s #-}
383{-# RULES "toStreamK/fromStreamK fusion"
382{-# RULES "toStreamK/fromStreamK fusion"
384 forall s. fromStreamK (toStreamK s) = s #-}
383 forall s. fromStreamK (toStreamK s) = s #-}
385−#endif
386
384
387------------------------------------------------------------------------------
385------------------------------------------------------------------------------
388-- Running a 'Fold'
386-- Running a 'Fold'
core/streamly-core.cabal−8
@@ -94,11 +94,6 @@ flag has-llvm
94 manual: True
94 manual: True
95 default: False
95 default: False
96
96
97−flag no-fusion
98− description: Disable rewrite rules for stream fusion
99− manual: True
100− default: False
101−
102flag opt
97flag opt
103 description: off=GHC default, on=-O2
98 description: off=GHC default, on=-O2
104 manual: True
99 manual: True
@@ -131,9 +126,6 @@ flag use-folds
131common compile-options
126common compile-options
132 default-language: Haskell2010
127 default-language: Haskell2010
133
128
134− if flag(no-fusion)
135− cpp-options: -DDISABLE_FUSION
136−
137 if flag(dev)
129 if flag(dev)
138 cpp-options: -DDEVBUILD
130 cpp-options: -DDEVBUILD
139
131