packages feed

cql 4.0.2 → 4.0.3

raw patch · 4 files changed

+17/−4 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG view
@@ -1,3 +1,8 @@+4.0.3+-----+- Compatibility with template-haskell-2.16.+  https://gitlab.com/twittner/cql/-/merge_requests/9.+ 4.0.2 ----- - Add missing constructors for `WriteType`.
cql.cabal view
@@ -1,5 +1,5 @@ name:                 cql-version:              4.0.2+version:              4.0.3 synopsis:             Cassandra CQL binary protocol. stability:            experimental license:              OtherLicense
src/Database/CQL/Protocol/Record.hs view
@@ -9,6 +9,7 @@  import Control.Monad import Language.Haskell.TH+import Database.CQL.Protocol.Tuple.TH (mkTup)  typeSynDecl :: Name -> Type -> Type -> Dec #if __GLASGOW_HASKELL__ < 808@@ -91,7 +92,7 @@     go n t = do         vars <- replicateM (length t) (newName "a")         return $ Clause [ConP n (map VarP vars)] (body vars) []-    body = NormalB . TupE . map VarE+    body = NormalB . mkTup . map VarE  asRecrdDecl ::Con -> Q Clause asRecrdDecl c =
src/Database/CQL/Protocol/Tuple/TH.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP                 #-} {-# LANGUAGE ScopedTypeVariables #-}  module Database.CQL.Protocol.Tuple.TH where@@ -61,7 +62,7 @@     star   = flip UInfixE (var "<*>")     comb   = do         names <- replicateM n (newName "x")-        let f = NormalB $ TupE (map VarE names)+        let f = NormalB $ mkTup (map VarE names)         return [ FunD (mkName "combine") [Clause (map VarP names) f []] ]  -- store v (a, b) = put (2 :: Word16) >> putValue v (toCql a) >> putValue v (toCql b)@@ -130,7 +131,7 @@         fn names   = map (AppE (var "fromCql") . VarE) names         combine    = do             names <- replicateM n (newName "x")-            let f = NormalB $ TupE (map VarE names)+            let f = NormalB $ mkTup (map VarE names)             return [ FunD (mkName "combine") [Clause (map VarP names) f []] ]         failure = LitE (StringL $ "Expected CqlTuple with " ++ show n ++ " elements") @@ -153,3 +154,9 @@ ($:) :: Type -> Type -> Type ($:) = AppT +mkTup :: [Exp] -> Exp+#if MIN_VERSION_template_haskell(2,16,0)+mkTup = TupE . map Just+#else+mkTup = TupE+#endif