packages feed

pinch 0.5.0.0 → 0.5.1.0

raw patch · 4 files changed

+21/−9 lines, 4 filesdep ~bytestringdep ~deepseq

Dependency ranges changed: bytestring, deepseq

Files

CHANGES.md view
@@ -1,3 +1,10 @@+0.5.1.0 (2024-01-08)+====================++- Allow bytestring 0.12.+- Allow deepseq 1.6.+- Build on GHC 9.8 without warning.+ 0.5.0.0 (2023-08-07) ===================== 
README.md view
@@ -46,7 +46,7 @@                <*> value .:? 2 ``` -Better yet, you can drive an instance automatically.+Better yet, you can derive an instance automatically.  ```haskell {-# LANGUAGE DeriveGeneric, DataKinds #-}
pinch.cabal view
@@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.35.2.+-- This file has been generated from package.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack  name:           pinch-version:        0.5.0.0+version:        0.5.1.0 synopsis:       An alternative implementation of Thrift for Haskell. description:    This library provides machinery for types to specify how they can be                 serialized and deserialized into/from Thrift payloads. It makes no@@ -26,9 +26,9 @@ maintainer:     mail@abhinavg.net license:        BSD3 license-file:   LICENSE+build-type:     Simple tested-with:     GHC == 8.10.2, GHC == 8.8.3, GHC == 8.6.5, GHC == 8.4.4-build-type:     Simple extra-source-files:     README.md     CHANGES.md@@ -76,10 +76,10 @@   build-depends:       array >=0.5     , base >=4.7 && <5-    , bytestring >=0.10 && <0.12+    , bytestring >=0.10 && <0.13     , cereal >=0.5.8.1 && <0.6     , containers >=0.5 && <0.7-    , deepseq >=1.3 && <1.5+    , deepseq >=1.3 && <1.6     , ghc-prim     , hashable >=1.2 && <1.5     , network >=3.1.2.0 && <3.2@@ -117,7 +117,7 @@       QuickCheck >=2.5     , async >=2.2.2 && <2.3     , base >=4.7 && <5-    , bytestring >=0.10 && <0.12+    , bytestring >=0.10 && <0.13     , cereal >=0.5.8.1 && <0.6     , containers >=0.5 && <0.7     , hspec >=2.0
tests/Pinch/ClientServerSpec.hs view
@@ -1,6 +1,7 @@ {-# LANGUAGE DataKinds           #-} {-# LANGUAGE DeriveGeneric       #-} {-# LANGUAGE GADTs               #-}+{-# LANGUAGE LambdaCase          #-} {-# LANGUAGE OverloadedStrings   #-} {-# LANGUAGE RankNTypes          #-} {-# LANGUAGE ScopedTypeVariables #-}@@ -160,8 +161,12 @@         >>= runConnection mempty srv      resolve :: SocketType -> Maybe HostName -> S.ServiceName -> Bool -> IO AddrInfo-    resolve socketType mhost port passive =-        head <$> getAddrInfo (Just hints) mhost (Just port)+    resolve socketType mhost port passive = +        getAddrInfo (Just hints) mhost (Just port) >>= \case+          -- Data.List.head emits a warning in GHC 9.8+. Therefore, we're being more explicit+          -- about possible error cases.+          [addr] -> pure addr+          _      -> error "No addresses"       where         hints = defaultHints           { addrSocketType = socketType