From 1a6e727e67ee69219cf60b8ab957804d5275bed2 Mon Sep 17 00:00:00 2001 From: Joonkyu Park Date: Fri, 24 Oct 2025 00:40:52 +0900 Subject: [PATCH 1/2] Derive `Read` for `Scheme` using `deriving` in `BaseUrl` (#1847) --- servant-client-core/src/Servant/Client/Core/BaseUrl.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servant-client-core/src/Servant/Client/Core/BaseUrl.hs b/servant-client-core/src/Servant/Client/Core/BaseUrl.hs index 935952948..4a5aec71f 100644 --- a/servant-client-core/src/Servant/Client/Core/BaseUrl.hs +++ b/servant-client-core/src/Servant/Client/Core/BaseUrl.hs @@ -32,7 +32,7 @@ data Scheme Http | -- | https:// Https - deriving (Data, Eq, Generic, Lift, Ord, Show) + deriving (Data, Eq, Generic, Lift, Ord, Read, Show) -- | Simple data type to represent the target of HTTP requests -- for servant's automatically-generated clients. From be8fe557d6c8749646093a8f5573d0bfed79ad38 Mon Sep 17 00:00:00 2001 From: Joonkyu Park Date: Mon, 27 Oct 2025 18:50:14 +0900 Subject: [PATCH 2/2] Add changelog entry file for PR #1848 --- changelog.d/pr-1848 | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 changelog.d/pr-1848 diff --git a/changelog.d/pr-1848 b/changelog.d/pr-1848 new file mode 100644 index 000000000..a3ec48464 --- /dev/null +++ b/changelog.d/pr-1848 @@ -0,0 +1,12 @@ +synopsis: Derive `Read` instance for `Scheme` in `BaseUrl` +packages: servant-client-core +prs: #1848 +issues: #1847 +description: { + Added a `Read` instance to the `Scheme` data type in `BaseUrl` via the + `deriving` clause. This allows parsing `Scheme` values from strings using + the standard `Read` mechanism. + + This change improves compatibility with libraries like `config-ini` + that rely on the `Read` typeclass for parsing configuration values. +}