Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions changelog.d/pr-1848
Original file line number Diff line number Diff line change
@@ -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.
}
2 changes: 1 addition & 1 deletion servant-client-core/src/Servant/Client/Core/BaseUrl.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading