servant-effectful 1.0.0 → 1.0.1
raw patch · 3 files changed
+19/−20 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +6/−0
- servant-effectful.cabal +4/−4
- src/Effectful/Servant/Server.hs +9/−16
CHANGELOG.md view
@@ -5,6 +5,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to the [Haskell Package Versioning Policy](https://pvp.haskell.org/). +## [1.0.1] - 2026-10-01++### Changed++- Eliminated process-wide lock contention during handler unlifting.+ ## [1.0.0] - 2026-07-28 ### Added
servant-effectful.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: servant-effectful-version: 1.0.0+version: 1.0.1 synopsis: Effectful bindings for the Servant library description: Adaptation of the @<https://hackage.haskell.org/package/servant Servant>@ library for the @<https://hackage.haskell.org/package/effectful effectful>@ ecosystem.@@ -54,7 +54,7 @@ build-depends: base >=4.10 && <5, bytestring >=0.12 && <0.13,- effectful >=2.6 && <2.7,+ effectful >=2.6 && <2.8, wai-effectful >=1.0 && <1.1, library@@ -68,7 +68,7 @@ Effectful.Servant.Server.StaticFiles build-depends:- effectful-core >=2 && <3,+ effectful-core >=2.6 && <2.8, servant >=0.20 && <0.21, servant-server >=0.20 && <0.21, transformers >=0.4 && <0.7,@@ -83,4 +83,4 @@ http-client-effectful >=1.0 && <1.1, http-types >=0.12 && <0.13, servant-effectful,- warp-effectful >=1.0 && <1.1,+ warp-effectful >=1.0 && <1.2,
src/Effectful/Servant/Server.hs view
@@ -74,6 +74,7 @@ import Data.Kind (Type) import Data.Proxy (Proxy) import Effectful+import Effectful.Dispatch.Static (unEff, unsafeEff) import Effectful.Error.Static (Error, runErrorNoCallStack) import Effectful.Wai (Application, liftApplication) import Servant.Server hiding@@ -128,19 +129,11 @@ -> ServerT api m -> Application es serveWithContextT p context toHandler server req respond =- withEffToIO SeqUnlift \unlift ->- unlift $- liftApplication- ( Servant.serveWithContextT- p- context- ( Servant.Handler- . ExceptT- . unlift- . runErrorNoCallStack- . toHandler- )- server- )- req- respond+ unsafeEff \es -> unEff (liftApplication (waiApp es) req respond) es+ where+ waiApp es =+ Servant.serveWithContextT+ p+ context+ (Servant.Handler . ExceptT . (`unEff` es) . runErrorNoCallStack . toHandler)+ server