From 4d612548dea849a044546214faa6dc604bb33494 Mon Sep 17 00:00:00 2001 From: Alexander 'ccntrq' Pankoff Date: Tue, 2 Jun 2026 14:08:45 +0200 Subject: Fix PacmanUpdates parse error on GHC < 9.8 - fix #766 Export-list DEPRECATED pragmas were only added in GHC 9.8 (proposal `#134`[1]). On older compilers the pragma inside the export list is a parse error ("parse error on input '{-# DEPRECATED'"), breaking the build. Guard the pragma with CPP so it is only emitted on GHC >= 9.8. The export-list form is kept deliberately: it deprecates only the `pattern PacmanUpdates` export, leaving the equally-named `PacmanUpdates` type untouched, so downstream users referencing the type get no spurious deprecation warnings. On older GHC the compile-time warning is simply absent; the runtime "deprecated plugin" note still informs users. [1]: https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0134-deprecating-exports-proposal.rst --- src/Xmobar/Plugins/PacmanUpdates.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Xmobar/Plugins/PacmanUpdates.hs b/src/Xmobar/Plugins/PacmanUpdates.hs index 527580b..ea14454 100644 --- a/src/Xmobar/Plugins/PacmanUpdates.hs +++ b/src/Xmobar/Plugins/PacmanUpdates.hs @@ -25,7 +25,9 @@ available (provided the name of the kernel package), and whether the running ker than the installed one. -} module Xmobar.Plugins.PacmanUpdates ( +#if __GLASGOW_HASKELL__ >= 908 {-# DEPRECATED "This ctor is DEPRECATED; please use `PacmanUpdates` type and `PacmanUpdatesK`, `PacmanUpdatesPredicateK` and `PacmanUpdatesNoK` constructors instead." #-} +#endif pattern PacmanUpdates , PacmanUpdates () , PacmanUpdatesKernelCheck (..) -- cgit v1.2.3