cql 3.1.0 → 3.1.1
raw patch · 4 files changed
+21/−1 lines, 4 files
Files
- CHANGELOG +4/−0
- cql.cabal +1/−1
- src/Database/CQL/Protocol/Record.hs +8/−0
- src/Database/CQL/Protocol/Tuple/TH.hs +8/−0
CHANGELOG view
@@ -1,3 +1,7 @@+3.1.1+-----+- Fix compatibility with template-haskell 2.11.0.0+ 3.1.0 ----- - Bugfix: Previous versions used an encoding for `CqlVarInt`
cql.cabal view
@@ -1,5 +1,5 @@ name: cql-version: 3.1.0+version: 3.1.1 synopsis: Cassandra CQL binary protocol. stability: experimental license: OtherLicense
src/Database/CQL/Protocol/Record.hs view
@@ -57,7 +57,11 @@ _ -> fail "expecting record type" start :: Dec -> Q [Dec]+#if MIN_VERSION_template_haskell(2,11,0)+start (DataD _ tname _ _ cons _) = do+#else start (DataD _ tname _ cons _) = do+#endif unless (length cons == 1) $ fail "expecting single data constructor" tt <- tupleType (head cons)@@ -65,7 +69,11 @@ ar <- asRecrdDecl (head cons) return [ typeSynDecl (mkName "TupleType") [ConT tname] tt+#if MIN_VERSION_template_haskell(2,11,0)+ , InstanceD Nothing [] (ConT (mkName "Record") $: ConT tname)+#else , InstanceD [] (ConT (mkName "Record") $: ConT tname)+#endif [ FunD (mkName "asTuple") [at] , FunD (mkName "asRecord") [ar] ]
src/Database/CQL/Protocol/Tuple/TH.hs view
@@ -106,13 +106,21 @@ td <- tupleDecl n sd <- storeDecl n return+#if MIN_VERSION_template_haskell(2,11,0)+ [ InstanceD Nothing ctx (tcon "PrivateTuple" $: tupleType)+#else [ InstanceD ctx (tcon "PrivateTuple" $: tupleType)+#endif [ FunD (mkName "count") [countDecl n] , FunD (mkName "check") [checkDecl vnames] , FunD (mkName "tuple") [td] , FunD (mkName "store") [sd] ]+#if MIN_VERSION_template_haskell(2,11,0)+ , InstanceD Nothing ctx (tcon "Tuple" $: tupleType) []+#else , InstanceD ctx (tcon "Tuple" $: tupleType) []+#endif ] countDecl :: Int -> Clause