packages feed

capnp 0.15.0.0 → 0.16.0.0

raw patch · 18 files changed

+42/−8 lines, 18 filesdep ~ghc-primdep ~template-haskell

Dependency ranges changed: ghc-prim, template-haskell

Files

CHANGELOG.md view
@@ -1,3 +1,14 @@+# 0.16.0.0++- Updated to work with GHC 9.2.x. In particular:+  - The generated code now enables the `FlexibleContexts` extension+    since it is no longer implied by `UndecidableInstances`+  - The `IsPtr` type alias now includes an additional constraint,+    which GHC seems to no longer be able to derive from the others.+  - Internals have been updated to deal with a breaking change to+    `template-haskell`.+- Fixed an error building the documentation.+ # 0.15.0.0  - There is now a per-connection limit on the total size of incoming
capnp.cabal view
@@ -1,8 +1,8 @@ cabal-version:            2.2 name:                     capnp-version:                  0.15.0.0+version:                  0.16.0.0 category:                 Data, Serialization, Network, Rpc-copyright:                2016-2021 haskell-capnp contributors (see CONTRIBUTORS file).+copyright:                2016-2022 haskell-capnp contributors (see CONTRIBUTORS file). author:                   Ian Denhardt maintainer:               ian@zenhack.net license:                  MIT@@ -59,7 +59,7 @@       , containers                        >= 0.5.9 && <0.7       , data-default                      ^>= 0.7.1       , exceptions                        ^>= 0.10.0-      , ghc-prim                          >= 0.6.1 && <0.8+      , ghc-prim                          >= 0.6.1 && <0.9       , mtl                               ^>= 2.2.2       , primitive                         >= 0.6.3 && <0.8       , safe-exceptions                   ^>= 0.1.7@@ -167,7 +167,7 @@       , supervisors                       ^>= 0.2.1       , lifetimes                         ^>= 0.1       , pretty-show                       >= 1.9.5 && <1.11-      , template-haskell                  >=2.16.0 && <2.18+      , template-haskell                  ^>=2.18  -------------------------------------------------------------------------------- 
cmd/capnpc-haskell/Trans/NewToHaskell.hs view
@@ -53,6 +53,7 @@             , "DeriveGeneric"             , "DuplicateRecordFields"             , "EmptyDataDeriving"+            , "FlexibleContexts"             , "FlexibleInstances"             , "MultiParamTypeClasses"             , "UndecidableInstances"
examples/gen/lib/Capnp/Gen/Calculator/New.hs view
@@ -3,6 +3,7 @@ {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE EmptyDataDeriving #-}+{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE UndecidableInstances #-}
examples/gen/lib/Capnp/Gen/Echo/New.hs view
@@ -3,6 +3,7 @@ {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE EmptyDataDeriving #-}+{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE UndecidableInstances #-}
gen/lib/Capnp/Gen/Capnp/Compat/Json/New.hs view
@@ -3,6 +3,7 @@ {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE EmptyDataDeriving #-}+{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE UndecidableInstances #-}
gen/lib/Capnp/Gen/Capnp/Cxx/New.hs view
@@ -3,6 +3,7 @@ {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE EmptyDataDeriving #-}+{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE UndecidableInstances #-}
gen/lib/Capnp/Gen/Capnp/Persistent/New.hs view
@@ -3,6 +3,7 @@ {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE EmptyDataDeriving #-}+{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE UndecidableInstances #-}
gen/lib/Capnp/Gen/Capnp/Rpc/New.hs view
@@ -3,6 +3,7 @@ {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE EmptyDataDeriving #-}+{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE UndecidableInstances #-}
gen/lib/Capnp/Gen/Capnp/RpcTwoparty/New.hs view
@@ -3,6 +3,7 @@ {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE EmptyDataDeriving #-}+{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE UndecidableInstances #-}
gen/lib/Capnp/Gen/Capnp/Schema/New.hs view
@@ -3,6 +3,7 @@ {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE EmptyDataDeriving #-}+{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE UndecidableInstances #-}
gen/lib/Capnp/Gen/Capnp/Stream/New.hs view
@@ -3,6 +3,7 @@ {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE EmptyDataDeriving #-}+{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE UndecidableInstances #-}
gen/tests/Capnp/Gen/Aircraft/New.hs view
@@ -3,6 +3,7 @@ {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE EmptyDataDeriving #-}+{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE UndecidableInstances #-}
gen/tests/Capnp/Gen/Generics/New.hs view
@@ -3,6 +3,7 @@ {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE EmptyDataDeriving #-}+{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE UndecidableInstances #-}
lib/Capnp/Repr.hs view
@@ -256,8 +256,14 @@ -- | Constraint that @a@ is a capability type. type IsCap a = ReprFor a ~ 'Ptr ('Just 'Cap) + -- | Constraint that @a@ is a pointer type. type IsPtr a =     ( ReprFor a ~ 'Ptr (PtrReprFor (ReprFor a))+    -- N.B. prior to ghc 9.2.x, this next constraint wasn't necessary,+    -- because it could be inferred from the first. I(zenhack) don't+    -- fully understand what changed, but some call sites need this+    -- extra help now...+    , Untyped (ReprFor a) ~ UntypedPtr (PtrReprFor (ReprFor a))     , IsPtrRepr (PtrReprFor (ReprFor a))     )
lib/Capnp/Rpc/Untyped.hs view
@@ -1982,8 +1982,8 @@         ( Nothing, RemoteDest _ ) ->             -- If it resolves to a null client, then we can't send a disembargo.             -- Note that this may result in futrther calls throwing exceptions-            -- *before* the outstanding calls, which is a bit weird. But all-            -- calls with throw at some point, so it's probably fine.+            -- /before/ the outstanding calls, which is a bit weird. But all+            -- calls will throw at some point, so it's probably fine.             resolveNow          -- Local promises never need embargos; we can just forward:
lib/Capnp/Untyped.hs view
@@ -1142,6 +1142,7 @@  -- | Return a prefix of the list, of the given length. {-# INLINABLE take #-}+take :: (ListItem r, MonadThrow m) => Int -> ListOf r mut -> m (ListOf r mut) take count list     | length list < count =         throwM E.BoundsError { E.index = count, E.maxIndex = length list - 1 }@@ -1532,7 +1533,7 @@     let mkIsListPtrRepr (r, listC, str) =             [d| instance IsListPtrRepr $r where                     rToList = $(pure $ TH.ConE listC)-                    rFromList $(pure $ TH.ConP listC [TH.VarP (TH.mkName "l")]) = pure l+                    rFromList $(pure $ TH.ConP listC [] [TH.VarP (TH.mkName "l")]) = pure l                     rFromList _ = expected $(pure $ TH.LitE $ TH.StringL $ "pointer to " ++ str)                     rFromListMsg = messageDefault @(Untyped ('Ptr ('Just ('List ('Just $r)))))             |]
tests/Module/Capnp/Rpc.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE DataKinds             #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE FlexibleContexts      #-} {-# LANGUAGE MultiParamTypeClasses #-}@@ -52,6 +53,7 @@     , parsedToMsg     , waitPipeline     )+import qualified Capnp.Repr as R import Capnp.Rpc.Errors (eFailed)  import Capnp.Gen.Aircraft.New  hiding (Left, Right)@@ -486,7 +488,9 @@     race_ runServer runClient  expectException-    :: (IsCap c, TypeParam a, Parse a pa, Show pa)+    :: ( IsCap c, TypeParam a, Parse a pa, Show pa+       , R.ReprFor a ~ 'R.Ptr pr+       )     => (Client c -> IO (Pipeline a)) -> Parsed Exception -> Client c -> IO () expectException callFn wantExn cap = do     ret <- try $ callFn cap >>= waitPipeline