Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.2.8

* Support ghc-9.14, adapt to HPT rule creation API change
* ghc-9.10 and ghc-9.12 were supported via hackage revisions

## 0.2.7

* Support ghc-9.6 and ghc-9.8
Expand Down
8 changes: 4 additions & 4 deletions fusion-plugin.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cabal-version: 2.2

name: fusion-plugin
version: 0.2.7
version: 0.2.8
synopsis: GHC plugin to make stream fusion more predictable.
description:
This plugin provides the programmer with a way to annotate certain
Expand Down Expand Up @@ -50,12 +50,12 @@ source-repository head
library
exposed-modules: Fusion.Plugin
build-depends: base >= 4.0 && < 5.0
, containers >= 0.5.6.2 && < 0.8
, containers >= 0.5.6.2 && < 0.9
, directory >= 1.2.2.0 && < 1.4
, filepath >= 1.4 && < 1.6
, ghc >= 7.10.3 && < 9.13
, ghc >= 7.10.3 && < 9.15
, syb >= 0.7 && < 0.8
, time >= 1.5 && < 1.15
, time >= 1.5 && < 1.16
, transformers >= 0.4 && < 0.7

, fusion-plugin-types >= 0.1 && < 0.2
Expand Down
14 changes: 13 additions & 1 deletion src/Fusion/Plugin.hs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ import GHC.Core.Opt.Simplify (SimplifyOpts(..))
import GHC.Driver.Config.Core.Opt.Simplify (initSimplMode, initSimplifyOpts)
#endif

#if MIN_VERSION_ghc(9,14,0)
import GHC.Unit.Env (ue_hpt)
import GHC.Unit.Home.ModInfo (HomeModInfo(..))
import GHC.Unit.Home.PackageTable (concatHpt)
import GHC.Unit.Module.ModDetails (ModDetails(..))
#endif

#if MIN_VERSION_ghc(9,6,0)
#elif MIN_VERSION_ghc(9,2,0)
import Data.Char (isSpace)
Expand Down Expand Up @@ -1082,7 +1089,12 @@ install args todos = do
options <- liftIO $ parseOptions args
dflags <- getDynFlags
hscEnv <- getHscEnv
#if MIN_VERSION_ghc(9,6,0)
#if MIN_VERSION_ghc(9,14,0)
let hpt = ue_hpt (hsc_unit_env hscEnv)
home_pkg_rules <- liftIO $ concatHpt (md_rules . hm_details) hpt
let hpt_rule_base = mkRuleBase home_pkg_rules
simplify = fusionSimplify hpt_rule_base hscEnv dflags
#elif MIN_VERSION_ghc(9,6,0)
m <- getModule
let
home_pkg_rules =
Expand Down
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
resolver: lts-17.14
resolver: lts-24.36
packages:
- '.'
Loading