From 22fcc5f86d2b01808b7d3a75657b1e8f7c3adb1d Mon Sep 17 00:00:00 2001
From: Samir Talwar <samir.talwar@hasura.io>
Date: Thu, 30 May 2024 12:37:16 +0300
Subject: [PATCH] Upgrade GHC to v9.6.5.

This contains a few bug fixes and bumps the base libraries.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10835
GitOrigin-RevId: bf96ab647ed95f30f473ca9a2b918a936cd35e32
---
 .envrc               |  2 ++
 .ghcversion          |  2 +-
 cabal.project        |  2 +-
 cabal.project.freeze | 22 ++++++++++++----------
 flake.lock           |  6 +++---
 server/VERSIONS.json |  4 ++--
 6 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/.envrc b/.envrc
index 7d1d144ed6608..dac0fcaf141e3 100644
--- a/.envrc
+++ b/.envrc
@@ -49,5 +49,7 @@ use_ghcup() {
   ghcup set ghc "$GHC_VERSION"
 }
 
+watch_file server/VERSIONS.json
+
 # this line sources your `.envrc.local` file
 source_env_if_exists .envrc.local
diff --git a/.ghcversion b/.ghcversion
index c261e8cf8e8a0..8c9af59f1adfc 100644
--- a/.ghcversion
+++ b/.ghcversion
@@ -1 +1 @@
-9.6.4
+9.6.5
diff --git a/cabal.project b/cabal.project
index bac81a3852b95..3b15ff1c401bc 100644
--- a/cabal.project
+++ b/cabal.project
@@ -16,7 +16,7 @@
 --
 -- See: https://www.haskell.org/cabal/users-guide/nix-local-build.html#configuring-builds-with-cabal-project
 
-with-compiler: ghc-9.6.4
+with-compiler: ghc-9.6.5
 
 -- package-level parallelism:
 jobs: $ncpus
diff --git a/cabal.project.freeze b/cabal.project.freeze
index e6278672d8c15..598028136781c 100644
--- a/cabal.project.freeze
+++ b/cabal.project.freeze
@@ -38,7 +38,7 @@ constraints: any.Cabal ==3.10.1.0,
              any.autodocodec ==0.2.0.3,
              any.autodocodec-openapi3 ==0.2.1.1,
              any.barbies ==2.0.4.0,
-             any.base ==4.18.2.0,
+             any.base ==4.18.2.1,
              any.base-compat ==0.12.2,
              any.base-compat-batteries ==0.12.2,
              any.base-orphans ==0.9.0,
@@ -96,6 +96,8 @@ constraints: any.Cabal ==3.10.1.0,
              any.cryptohash ==0.11.9,
              any.cryptohash-md5 ==0.11.101.0,
              any.cryptohash-sha1 ==0.11.101.0,
+             any.crypton ==0.33,
+             any.crypton-x509 ==1.7.6,
              any.cryptonite ==0.30,
              any.cryptostore ==0.3.0.0,
              any.data-bword ==0.1.0.2,
@@ -119,7 +121,7 @@ constraints: any.Cabal ==3.10.1.0,
              any.dependent-map ==0.4.0.0,
              any.dependent-sum ==0.7.2.0,
              any.dependent-sum-template ==0.2.0.0,
-             any.directory ==1.3.8.1,
+             any.directory ==1.3.8.4,
              any.distributive ==0.6.2.1,
              any.dlist ==1.0,
              any.doctest ==0.21.1,
@@ -136,7 +138,7 @@ constraints: any.Cabal ==3.10.1.0,
              any.fail ==4.9.0.0,
              any.fast-logger ==3.2.1,
              any.file-embed ==0.0.15.0,
-             any.filepath ==1.4.200.1,
+             any.filepath ==1.4.300.1,
              any.flush-queue ==1.0.0,
              any.focus ==1.0.3.1,
              any.fold-debounce ==0.2.0.11,
@@ -148,17 +150,17 @@ constraints: any.Cabal ==3.10.1.0,
              any.generic-monoid ==0.1.0.1,
              any.generically ==0.1.1,
              any.generics-sop ==0.5.1.3,
-             any.ghc ==9.6.4,
+             any.ghc ==9.6.5,
              any.ghc-bignum ==1.3,
-             any.ghc-boot ==9.6.4,
-             any.ghc-boot-th ==9.6.4,
+             any.ghc-boot ==9.6.5,
+             any.ghc-boot-th ==9.6.5,
              any.ghc-debug-convention ==0.4.0.0,
              any.ghc-debug-stub ==0.4.0.0,
-             any.ghc-heap ==9.6.4,
+             any.ghc-heap ==9.6.5,
              any.ghc-heap-view ==0.6.4,
              any.ghc-paths ==0.1.0.12,
              any.ghc-prim ==0.10.0,
-             any.ghci ==9.6.4,
+             any.ghci ==9.6.5,
              any.happy ==1.20.1.1,
              any.hashable ==1.4.2.0,
              any.hashtables ==1.3.1,
@@ -292,7 +294,7 @@ constraints: any.Cabal ==3.10.1.0,
              any.primitive ==0.7.4.0,
              any.primitive-extras ==0.10.1.6,
              any.primitive-unlifted ==0.1.3.1,
-             any.process ==1.6.17.0,
+             any.process ==1.6.19.0,
              any.profunctors ==5.6.2,
              any.proto-lens ==0.7.1.3,
              any.proto-lens-runtime ==0.7.0.4,
@@ -417,7 +419,7 @@ constraints: any.Cabal ==3.10.1.0,
              any.wai-app-static ==3.1.7.4,
              any.wai-extra ==3.1.13.0,
              any.wai-logger ==2.4.0,
-             any.warp ==3.3.25,
+             any.warp ==3.3.29,
              any.websockets ==0.12.7.3,
              any.wide-word ==0.1.5.0,
              any.witch ==1.2.0.2,
diff --git a/flake.lock b/flake.lock
index f7b17440852bd..d3387268b7fb1 100644
--- a/flake.lock
+++ b/flake.lock
@@ -20,11 +20,11 @@
     },
     "nixpkgs": {
       "locked": {
-        "lastModified": 1710754590,
-        "narHash": "sha256-9LA94zYvr5a6NawEftuSdTP8HYMV0ZYdB5WG6S9Z7tI=",
+        "lastModified": 1716811426,
+        "narHash": "sha256-A7hAiX85+GnXrwYNkOlzErJ97lpFqklfCrKjKbYq2A4=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "a089e2dc4cf2421ca29f2d5ced81badd5911fcdf",
+        "rev": "77e9384f0f7cb5747e4d949ec5f74ab77650e457",
         "type": "github"
       },
       "original": {
diff --git a/server/VERSIONS.json b/server/VERSIONS.json
index 0b846511d905d..ac97eb6e4700a 100644
--- a/server/VERSIONS.json
+++ b/server/VERSIONS.json
@@ -1,6 +1,6 @@
 {
-  "cabal-install": "3.10.2.1",
-  "ghc": "9.6.4",
+  "cabal-install": "3.10.3.0",
+  "ghc": "9.6.5",
   "hlint": "3.6.1",
   "ormolu": "0.7.2.0"
 }