packages feed

fusion-plugin 0.2.4 → 0.2.5

raw patch · 3 files changed

+29/−15 lines, 3 filesdep ~ghcPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: ghc

API changes (from Hackage documentation)

- Fusion.Plugin: instance Outputable.Outputable Fusion.Plugin.Types.Fuse
+ Fusion.Plugin: instance GHC.Utils.Outputable.Outputable Fusion.Plugin.Types.Fuse

Files

CHANGELOG.md view
@@ -1,3 +1,7 @@+## 0.2.5++* Support ghc-9.4.2+ ## 0.2.4  * Suport ghc-9.2.2
fusion-plugin.cabal view
@@ -1,7 +1,7 @@ cabal-version:       2.2  name:                fusion-plugin-version:             0.2.4+version:             0.2.5 synopsis:            GHC plugin to make stream fusion more predictable. description:   This plugin provides the programmer with a way to annotate certain@@ -24,7 +24,8 @@                    , GHC==8.8.4                    , GHC==8.10.7                    , GHC==9.0.2-                   , GHC==9.2.2+                   , GHC==9.2.4+                   , GHC==9.4.2 author:              Pranay Sashank maintainer:          streamly@composewell.com copyright:           (c) 2019 Composewell Technologies@@ -46,7 +47,7 @@                      , containers   >= 0.5.6.2 && <  0.7                      , directory    >= 1.2.2.0 && <  1.4                      , filepath     >= 1.4     && <  1.5-                     , ghc          >= 7.10.3  && <  9.3+                     , ghc          >= 7.10.3  && <  9.5                      , syb          >= 0.7     && <  0.8                      , time         >= 1.5     && <  1.14                      , transformers >= 0.4     && < 0.7
src/Fusion/Plugin.hs view
@@ -56,6 +56,7 @@ import Data.Maybe (mapMaybe) import Data.Generics.Schemes (everywhere) import Data.Generics.Aliases (mkT)+import Debug.Trace (trace) import qualified Data.List as DL  -- Imports for specific compiler versions@@ -684,9 +685,8 @@  fusionSimplify :: HscEnv -> DynFlags -> CoreToDo fusionSimplify _hsc_env dflags =-    CoreDoSimplify-        (maxSimplIterations dflags)-        SimplMode+    let mode =+            SimplMode             { sm_phase = InitialPhase             , sm_names = ["Fusion Plugin Inlining"]             , sm_dflags = dflags@@ -697,15 +697,20 @@ #if MIN_VERSION_ghc(9,2,0)             , sm_uf_opts = unfoldingOpts dflags             , sm_pre_inline = gopt Opt_SimplPreInlining dflags-            , sm_logger = logger+            , sm_logger = hsc_logger _hsc_env #endif #if MIN_VERSION_ghc(9,2,2)             , sm_cast_swizzle = True #endif+#if MIN_VERSION_ghc(9,5,0)+            , sm_float_enable = floatEnable dflags+#endif             }--#if MIN_VERSION_ghc(9,2,0)-    where logger = hsc_logger _hsc_env+    in CoreDoSimplify+#if MIN_VERSION_ghc(9,5,0)+        (CoreDoSimplifyOpts (maxSimplIterations dflags) mode)+#else+        (maxSimplIterations dflags) mode #endif  -------------------------------------------------------------------------------@@ -942,11 +947,8 @@                $ showSDoc dflags todo)         ++ "." -#if MIN_VERSION_ghc(9,3,0)-    prefix =-        case log_dump_prefix (logFlags logger) of-            Nothing -> Just _suffix-            Just x -> Just (x ++ _suffix)+#if MIN_VERSION_ghc(9,4,0)+    prefix = log_dump_prefix (logFlags logger) ++ _suffix     logger1 = logger {logFlags = (logFlags logger) {log_dump_prefix = prefix}} #elif MIN_VERSION_ghc(9,2,0)     logger1 = logger@@ -1000,10 +1002,17 @@   where     go False [] = error "Simplifier phase 0/\"main\" not found"     go True [] = []+#if MIN_VERSION_ghc(9,5,0)+    go _ (todo@(CoreDoSimplify (CoreDoSimplifyOpts _ SimplMode+            { sm_phase = Phase 0+            , sm_names = ["main"]+            })):todos)+#else     go _ (todo@(CoreDoSimplify _ SimplMode             { sm_phase = Phase 0             , sm_names = ["main"]             }):todos)+#endif         = todo : ourTodos ++ go True todos     go found (todo:todos) = todo : go found todos