From 1c064ef1f3e1aa2afc996e962ad53effa99ec5f4 Mon Sep 17 00:00:00 2001 From: Cheng Shao <terrorjack@type.dance> Date: Tue, 27 Feb 2024 12:56:45 +0000 Subject: [PATCH] compiler: start deprecating cmmToRawCmmHook cmmToRawCmmHook was added 4 years ago in d561c8f6244f8280a2483e8753c38e39d34c1f01. Its only user is the Asterius project, which has been archived and deprecated in favor of the ghc wasm backend. This patch starts deprecating cmmToRawCmmHook by placing a DEPRECATED pragma, and actual removal shall happen in a future GHC major release if no issue to oppose the deprecation has been raised in the meantime. --- compiler/GHC/Driver/Hooks.hs | 2 ++ compiler/GHC/Driver/Main.hs | 3 +++ 2 files changed, 5 insertions(+) diff --git a/compiler/GHC/Driver/Hooks.hs b/compiler/GHC/Driver/Hooks.hs index 08aa2a1299ef..19e38a21e506 100644 --- a/compiler/GHC/Driver/Hooks.hs +++ b/compiler/GHC/Driver/Hooks.hs @@ -154,6 +154,8 @@ data Hooks = Hooks -> IO (Stream IO RawCmmGroup a))) } +{-# DEPRECATED cmmToRawCmmHook "cmmToRawCmmHook is being deprecated. If you do use it in your project, please raise a GHC issue!" #-} + class HasHooks m where getHooks :: m Hooks diff --git a/compiler/GHC/Driver/Main.hs b/compiler/GHC/Driver/Main.hs index fb18eb0970ed..cc5d192cf127 100644 --- a/compiler/GHC/Driver/Main.hs +++ b/compiler/GHC/Driver/Main.hs @@ -6,6 +6,9 @@ {-# OPTIONS_GHC -fprof-auto-top #-} +-- Remove this after cmmToRawCmmHook removal +{-# OPTIONS_GHC -Wno-deprecations #-} + ------------------------------------------------------------------------------- -- -- | Main API for compiling plain Haskell source code. -- GitLab