Skip to content

Commit

Permalink
Support ghc 9.8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
edsko committed Apr 27, 2024
1 parent c2ea390 commit f22e53c
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 4 deletions.
File renamed without changes.
10 changes: 10 additions & 0 deletions cabal.project.plugin-9.8.2
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import: cabal.project

package *
ghc-options:
-package-db=/tmp/cabal-plugin-store/ghc-9.8.2/package.db
-fplugin-trustworthy
-plugin-package=trace-foreign-calls
-fplugin=Plugin.TraceForeignCalls

store-dir: /tmp/cabal-plugin-store
3 changes: 2 additions & 1 deletion example-pkg-A/example-pkg-A.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ build-type: Simple
extra-source-files: cbits/cbits.h
cbits/cbits.c
tested-with: GHC ==9.6.4
GHC ==9.8.2

common lang
ghc-options:
-Wall
build-depends:
base >= 4.18 && < 4.19
base >= 4.18 && < 4.20
default-language:
GHC2021

Expand Down
3 changes: 2 additions & 1 deletion example-pkg-B/example-pkg-B.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ maintainer: [email protected]
category: Development
build-type: Simple
tested-with: GHC ==9.6.4
GHC ==9.8.2

common lang
ghc-options:
-Wall
build-depends:
base >= 4.18 && < 4.19
base >= 4.18 && < 4.20
default-language:
GHC2021

Expand Down
6 changes: 6 additions & 0 deletions trace-foreign-calls/src/Plugin/TraceForeignCalls.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}

module Plugin.TraceForeignCalls (plugin) where
Expand Down Expand Up @@ -198,7 +199,12 @@ mkWrapper rfi@ReplacedForeignImport {
fun_ext = mkNameSet [unLoc rfiSuffixedName] -- TODO: what is this?
, fun_id = rfiOriginalName
, fun_matches = MG {
#if __GLASGOW_HASKELL__ == 906
mg_ext = Generated
#endif
#if __GLASGOW_HASKELL__ >= 908
mg_ext = Generated SkipPmc
#endif
, mg_alts = noLocA . map noLocA $ [
Match {
m_ext = EpAnnNotUsed
Expand Down
5 changes: 3 additions & 2 deletions trace-foreign-calls/trace-foreign-calls.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ extra-doc-files: CHANGELOG.md
extra-source-files: test-cbits/test_cbits.h
test-cbits/test_cbits.c
tested-with: GHC ==9.6.4
GHC ==9.8.2

source-repository head
type: git
location: https://github.com/well-typed/trace-foreign-calls

common lang
build-depends:
base >= 4.18 && < 4.19
base >= 4.18 && < 4.20
default-language:
GHC2021
ghc-options:
Expand All @@ -49,7 +50,7 @@ library
build-depends:
-- dependencies intentionally kept at a minimum
-- (we want to be able to build the boot libs with this plugin)
, ghc >= 9.6 && < 9.7
, ghc >= 9.6 && < 9.9

test-suite test-trace-foreign-calls
import:
Expand Down

0 comments on commit f22e53c

Please sign in to comment.