[arch-commits] Commit in haskell-ghc-api-compat/trunk (2 files)

Felix Yan felixonmars at archlinux.org
Thu Jul 1 07:18:04 UTC 2021


    Date: Thursday, July 1, 2021 @ 07:18:04
  Author: felixonmars
Revision: 969143

upgpkg: haskell-ghc-api-compat 8.6.1-3: update ways patch

Added:
  haskell-ghc-api-compat/trunk/ghc-api-compat-ways.patch
Modified:
  haskell-ghc-api-compat/trunk/PKGBUILD

---------------------------+
 PKGBUILD                  |    7 +-
 ghc-api-compat-ways.patch |  103 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 107 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-07-01 07:03:31 UTC (rev 969142)
+++ PKGBUILD	2021-07-01 07:18:04 UTC (rev 969143)
@@ -4,7 +4,7 @@
 pkgname=haskell-ghc-api-compat
 pkgver=8.6.1
 _commit=9e8c1ec540bc0a68700e8541d44dca14913c5c9e
-pkgrel=2
+pkgrel=3
 pkgdesc="GHC-API compatibility helpers"
 url="https://hackage.haskell.org/package/ghc-api-compat"
 license=("BSD")
@@ -14,9 +14,10 @@
 # https://gitlab.haskell.org/haskell/ghc-api-compat/-/issues/1
 #source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz")
 source=("https://gitlab.haskell.org/haskell/ghc-api-compat/-/archive/$_commit/ghc-api-compat-$_commit.tar.bz2"
-        $_hkgname-ways.patch::https://gitlab.haskell.org/haskell/ghc-api-compat/-/merge_requests/2.patch)
+        # https://gitlab.haskell.org/haskell/ghc-api-compat/-/merge_requests/2.patch
+        $_hkgname-ways.patch)
 sha256sums=('c9ff586aca0ccd6ccffe333403d21c9b86ed6dbd6335830419c0875c7df891bc'
-            '4558eced20f4d436b03200a09543f00e1de7f78d1df7998bcbb4ebab8dfdba3b')
+            'c6462c449593529dad769964c789f626352e706f71b9945aa26c862d88429431')
 
 prepare() {
   cd $_hkgname-$_commit

Added: ghc-api-compat-ways.patch
===================================================================
--- ghc-api-compat-ways.patch	                        (rev 0)
+++ ghc-api-compat-ways.patch	2021-07-01 07:18:04 UTC (rev 969143)
@@ -0,0 +1,103 @@
+From c40f91549af351a126cedda71d48a6b7e6ebe725 Mon Sep 17 00:00:00 2001
+From: Potato Hatsue <1793913507 at qq.com>
+Date: Wed, 23 Jun 2021 18:42:40 +0800
+Subject: [PATCH 1/2] Re-export some 'Way' related functions in DynFlags
+
+---
+ ghc-api-compat.cabal |  4 ++--
+ src/DynFlags.hs      | 24 ++++++++++++++++++++++++
+ 2 files changed, 26 insertions(+), 2 deletions(-)
+ create mode 100644 src/DynFlags.hs
+
+diff --git a/ghc-api-compat.cabal b/ghc-api-compat.cabal
+index f24cd2a..d694c2b 100644
+--- a/ghc-api-compat.cabal
++++ b/ghc-api-compat.cabal
+@@ -120,7 +120,7 @@ library
+ 
+    if impl(ghc >= 9.0)
+       hs-source-dirs:   src
+-      exposed-modules:  Outputable
++      exposed-modules:  Outputable DynFlags
+       reexported-modules:
+            GHC.Rename.Bind                as RnBinds
+          , GHC.Rename.Env                 as RnEnv
+@@ -347,7 +347,7 @@ library
+          , GHC.Driver.Main                as HscMain
+          , GHC.Driver.Make                as GhcMake
+          , GHC.Driver.Hooks               as Hooks
+-         , GHC.Driver.Session             as DynFlags
++        --  , GHC.Driver.Session             as DynFlags
+          , GHC.Driver.Phases              as DriverPhases
+          , GHC.Driver.Pipeline            as DriverPipeline
+          , GHC.Driver.Pipeline.Monad      as PipelineMonad
+diff --git a/src/DynFlags.hs b/src/DynFlags.hs
+new file mode 100644
+index 0000000..16f1adf
+--- /dev/null
++++ b/src/DynFlags.hs
+@@ -0,0 +1,24 @@
++{-# LANGUAGE CPP #-}
++module DynFlags
++  ( module GHC.Driver.Session,
++    Way(..),
++    wayRTSOnly,
++    wayGeneralFlags,
++    wayUnsetGeneralFlags,
++    buildTag,
++    dynamicGhc,
++  )
++where
++
++import GHC.Driver.Session
++#if MIN_VERSION_GLASGOW_HASKELL(9,2,0,0)
++import GHC.Platform.Ways
++#else
++import GHC.Driver.Ways
++#endif
++
++buildTag :: DynFlags -> String
++buildTag = waysBuildTag . ways
++
++dynamicGhc :: Bool
++dynamicGhc = hostIsDynamic
+-- 
+GitLab
+
+
+From 13cf6c8cde83a2ba536d965701fdcffa0fe8a9a2 Mon Sep 17 00:00:00 2001
+From: Potato Hatsue <1793913507 at qq.com>
+Date: Wed, 30 Jun 2021 20:25:05 +0800
+Subject: [PATCH 2/2] interpWays
+
+---
+ src/DynFlags.hs | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/src/DynFlags.hs b/src/DynFlags.hs
+index 16f1adf..ef65823 100644
+--- a/src/DynFlags.hs
++++ b/src/DynFlags.hs
+@@ -7,9 +7,11 @@ module DynFlags
+     wayUnsetGeneralFlags,
+     buildTag,
+     dynamicGhc,
++    hostFullWays,
+   )
+ where
+ 
++import Data.Foldable (toList)
+ import GHC.Driver.Session
+ #if MIN_VERSION_GLASGOW_HASKELL(9,2,0,0)
+ import GHC.Platform.Ways
+@@ -22,3 +24,7 @@ buildTag = waysBuildTag . ways
+ 
+ dynamicGhc :: Bool
+ dynamicGhc = hostIsDynamic
++
++interpWays :: [Way]
++interpWays = toList hostFullWays
++
+-- 
+GitLab
+




More information about the arch-commits mailing list