From 6a27eb97c7005ff0cb96d7b12eb495804556c862 Mon Sep 17 00:00:00 2001
From: Stefan Holdermans <stefan@holdermans.nl>
Date: Mon, 25 Sep 2023 21:34:37 +0200
Subject: [PATCH] Mark `GHC.Utils.Misc.partitionWithM` as inlineable

This patch adds an `INLINEABLE` pragma for `partitionWithM` to ensure
that the right-hand side of the definition of this function remains
available for specialisation at call sites.
---
 compiler/GHC/Utils/Misc.hs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/compiler/GHC/Utils/Misc.hs b/compiler/GHC/Utils/Misc.hs
index 357bf82bfcd9..7b78e4aa24d4 100644
--- a/compiler/GHC/Utils/Misc.hs
+++ b/compiler/GHC/Utils/Misc.hs
@@ -228,6 +228,7 @@ partitionWithM f (x:xs) = do
   case y of
     Left  b -> return (b:bs, cs)
     Right c -> return (bs, c:cs)
+{-# INLINEABLE partitionWithM #-}
 
 chkAppend :: [a] -> [a] -> [a]
 -- Checks for the second argument being empty
-- 
GitLab