From 1c35fe3d31710e609477423f69bfb1403558667d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C5=82eczek?= Date: Mon, 15 Jun 2026 17:26:07 +0200 Subject: [PATCH] perf: add ghc 9.12 options -fexpose-overloaded-unfoldings -fspecialise-aggressively Before 9.12.1 it was necessary to mark functions as INLINABLE or INLINE to make GHC consider cross-module specialization of polymorphic functions. 9.12 added a new -fexpose-overloaded-unfoldings flag that exposes optimized polymorphic functions in interface files. -fspecialise-aggressively then makes GHC apply aggresive specialization. --- postgrest.cabal | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/postgrest.cabal b/postgrest.cabal index 04a4e324be..f77507272c 100644 --- a/postgrest.cabal +++ b/postgrest.cabal @@ -177,7 +177,9 @@ library if flag(hpc) ghc-options: -fhpc -hpcdir .hpc else - ghc-options: -O2 + ghc-options: -O2 + if impl(ghc >= 9.12) + ghc-options: -fexpose-overloaded-unfoldings -fspecialise-aggressively if !os(windows) build-depends: