commit ghc-rethinkdb for openSUSE:Factory
Hello community, here is the log from the commit of package ghc-rethinkdb for openSUSE:Factory checked in at 2017-09-15 22:10:16 Comparing /work/SRC/openSUSE:Factory/ghc-rethinkdb (Old) and /work/SRC/openSUSE:Factory/.ghc-rethinkdb.new (New) Package is "ghc-rethinkdb" Fri Sep 15 22:10:16 2017 rev:7 rq:525313 version:2.2.0.10 Changes: --- /work/SRC/openSUSE:Factory/ghc-rethinkdb/ghc-rethinkdb.changes 2017-06-04 01:58:44.285447724 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-rethinkdb.new/ghc-rethinkdb.changes 2017-09-15 22:10:17.325154032 +0200 @@ -1,0 +2,5 @@ +Thu Aug 3 15:38:38 UTC 2017 - psim...@suse.com + +- Updated with latest spec-cleaner version 0.9.8-8-geadfbbf. + +--- Other differences: -- ++ ghc-rethinkdb.spec ++ --- /var/tmp/diff_new_pack.3Fu70P/_old 2017-09-15 22:10:17.977062189 +0200 +++ /var/tmp/diff_new_pack.3Fu70P/_new 2017-09-15 22:10:17.981061625 +0200 @@ -23,8 +23,8 @@ Release:0 Summary:A driver for RethinkDB 2.2 License:Apache-2.0 -Group: Development/Languages/Other -Url:https://hackage.haskell.org/package/%{pkg_name} +Group: Development/Libraries/Haskell +URL:https://hackage.haskell.org/package/%{pkg_name} Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz BuildRequires: ghc-Cabal-devel BuildRequires: ghc-aeson-devel @@ -42,7 +42,6 @@ BuildRequires: ghc-unordered-containers-devel BuildRequires: ghc-utf8-string-devel BuildRequires: ghc-vector-devel -BuildRoot: %{_tmppath}/%{name}-%{version}-build %if %{with tests} BuildRequires: ghc-doctest-devel %endif @@ -52,7 +51,7 @@ %package devel Summary:Haskell %{pkg_name} library development files -Group: Development/Libraries/Other +Group: Development/Libraries/Haskell Requires: %{name} = %{version}-%{release} Requires: ghc-compiler = %{ghc_version} Requires(post): ghc-compiler = %{ghc_version} @@ -80,11 +79,9 @@ %ghc_pkg_recache %files -f %{name}.files -%defattr(-,root,root,-) %doc LICENSE %files devel -f %{name}-devel.files -%defattr(-,root,root,-) %doc doctests.hs %changelog
commit ghc-rethinkdb for openSUSE:Factory
Hello community, here is the log from the commit of package ghc-rethinkdb for openSUSE:Factory checked in at 2017-06-04 01:58:43 Comparing /work/SRC/openSUSE:Factory/ghc-rethinkdb (Old) and /work/SRC/openSUSE:Factory/.ghc-rethinkdb.new (New) Package is "ghc-rethinkdb" Sun Jun 4 01:58:43 2017 rev:6 rq:499726 version:2.2.0.10 Changes: --- /work/SRC/openSUSE:Factory/ghc-rethinkdb/ghc-rethinkdb.changes 2017-04-11 09:43:35.994331066 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-rethinkdb.new/ghc-rethinkdb.changes 2017-06-04 01:58:44.285447724 +0200 @@ -1,0 +2,5 @@ +Thu May 18 09:52:26 UTC 2017 - psim...@suse.com + +- Update to version 2.2.0.10 with cabal2obs. + +--- Old: rethinkdb-2.2.0.9.tar.gz New: rethinkdb-2.2.0.10.tar.gz Other differences: -- ++ ghc-rethinkdb.spec ++ --- /var/tmp/diff_new_pack.GFYpa0/_old 2017-06-04 01:58:44.813373142 +0200 +++ /var/tmp/diff_new_pack.GFYpa0/_new 2017-06-04 01:58:44.817372577 +0200 @@ -19,7 +19,7 @@ %global pkg_name rethinkdb %bcond_with tests Name: ghc-%{pkg_name} -Version:2.2.0.9 +Version:2.2.0.10 Release:0 Summary:A driver for RethinkDB 2.2 License:Apache-2.0 ++ rethinkdb-2.2.0.9.tar.gz -> rethinkdb-2.2.0.10.tar.gz ++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rethinkdb-2.2.0.9/rethinkdb.cabal new/rethinkdb-2.2.0.10/rethinkdb.cabal --- old/rethinkdb-2.2.0.9/rethinkdb.cabal 2017-03-02 14:23:59.0 +0100 +++ new/rethinkdb-2.2.0.10/rethinkdb.cabal 2017-05-10 20:56:09.0 +0200 @@ -1,5 +1,5 @@ name: rethinkdb -version: 2.2.0.9 +version: 2.2.0.10 cabal-version: >=1.8 build-type: Simple license: Apache @@ -31,7 +31,7 @@ base >=4 && <4.10, unordered-containers ==0.2.*, text >=0.11 && <1.3, -aeson >=0.7 && <1.2, +aeson >=0.7 && <1.3, bytestring ==0.10.*, containers ==0.5.*, data-default >=0.5 && <0.8,
commit ghc-rethinkdb for openSUSE:Factory
Hello community, here is the log from the commit of package ghc-rethinkdb for openSUSE:Factory checked in at 2017-04-11 09:43:30 Comparing /work/SRC/openSUSE:Factory/ghc-rethinkdb (Old) and /work/SRC/openSUSE:Factory/.ghc-rethinkdb.new (New) Package is "ghc-rethinkdb" Tue Apr 11 09:43:30 2017 rev:5 rq:485158 version:2.2.0.9 Changes: --- /work/SRC/openSUSE:Factory/ghc-rethinkdb/ghc-rethinkdb.changes 2017-02-08 12:07:19.703102773 +0100 +++ /work/SRC/openSUSE:Factory/.ghc-rethinkdb.new/ghc-rethinkdb.changes 2017-04-11 09:43:35.994331066 +0200 @@ -1,0 +2,5 @@ +Tue Mar 7 11:19:26 UTC 2017 - psim...@suse.com + +- Update to version 2.2.0.9 with cabal2obs. + +--- Old: rethinkdb-2.2.0.8.tar.gz New: rethinkdb-2.2.0.9.tar.gz Other differences: -- ++ ghc-rethinkdb.spec ++ --- /var/tmp/diff_new_pack.ECcVH7/_old 2017-04-11 09:43:37.754082478 +0200 +++ /var/tmp/diff_new_pack.ECcVH7/_new 2017-04-11 09:43:37.758081913 +0200 @@ -19,7 +19,7 @@ %global pkg_name rethinkdb %bcond_with tests Name: ghc-%{pkg_name} -Version:2.2.0.8 +Version:2.2.0.9 Release:0 Summary:A driver for RethinkDB 2.2 License:Apache-2.0 ++ rethinkdb-2.2.0.8.tar.gz -> rethinkdb-2.2.0.9.tar.gz ++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rethinkdb-2.2.0.8/Database/RethinkDB/Driver.hs new/rethinkdb-2.2.0.9/Database/RethinkDB/Driver.hs --- old/rethinkdb-2.2.0.8/Database/RethinkDB/Driver.hs 2016-09-29 14:14:26.0 +0200 +++ new/rethinkdb-2.2.0.9/Database/RethinkDB/Driver.hs 2017-03-02 14:31:55.0 +0100 @@ -40,13 +40,18 @@ import Database.RethinkDB.ReQL -- $setup --- --- Get the doctests ready --- +-- >>> :set -XOverloadedStrings -- >>> :load Database.RethinkDB.NoClash -- >>> import qualified Database.RethinkDB as R --- >>> :set -XOverloadedStrings +-- >>> import Control.Exception +-- >>> import Data.Text +-- >>> let try' x = (try x `asTypeOf` return (Left (undefined :: SomeException))) >> return () -- >>> h <- fmap (use "doctests") $ connect "localhost" 28015 def +-- >>> try' $ run' h $ dbCreate "doctests" +-- >>> try' $ run' h $ tableCreate (table "users"){ tablePrimaryKey = Just "name" } +-- >>> try' $ run' h $ delete $ table "users" +-- >>> run h $ table "users" # insert (R.map (\x -> ["name":=x]) ["bill", "bob", "nancy" :: Text]) :: IO WriteResponse +-- {inserted:3} -- | Per-query settings @@ -106,7 +111,7 @@ -- >>> next c -- Just "bill" -- >>> collect c --- ["nancy","sabrina"] +-- ["bob","nancy"] run :: (Expr query, Result r) => RethinkDBHandle -> query -> IO r run h = runOpts h [] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rethinkdb-2.2.0.8/Database/RethinkDB/Functions.hs new/rethinkdb-2.2.0.9/Database/RethinkDB/Functions.hs --- old/rethinkdb-2.2.0.8/Database/RethinkDB/Functions.hs 2016-09-29 14:14:26.0 +0200 +++ new/rethinkdb-2.2.0.9/Database/RethinkDB/Functions.hs 2017-03-01 23:50:17.0 +0100 @@ -522,6 +522,9 @@ -- | Merge two objects together -- +-- NOTE: This driver is based on the official JavaScript driver, you are correct to expect the same semantics. +-- However the order of composition is flipped by putting the first argument last. +-- -- >>> run' h $ merge ["a" := 1, "b" := 1] ["b" := 1, "c" := 2] -- {"a":1,"b":1,"c":2} merge :: (Expr a, Expr b) => a -> b -> ReQL diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rethinkdb-2.2.0.8/rethinkdb.cabal new/rethinkdb-2.2.0.9/rethinkdb.cabal --- old/rethinkdb-2.2.0.8/rethinkdb.cabal 2017-01-16 17:27:44.0 +0100 +++ new/rethinkdb-2.2.0.9/rethinkdb.cabal 2017-03-02 14:23:59.0 +0100 @@ -1,5 +1,5 @@ name: rethinkdb -version: 2.2.0.8 +version: 2.2.0.9 cabal-version: >=1.8 build-type: Simple license: Apache @@ -16,7 +16,7 @@ GHC==7.6.3, GHC==7.8.4, GHC==7.10.3, - GHC==8.0.1 + GHC==8.0.2 source-repository head type: git @@ -37,7 +37,7 @@ data-default >=0.5 && <0.8, network >=2.4 && <2.7, mtl >=2.1 && <2.3, -vector >=0.10 && <0.12, +vector >=0.10 && <0.13, time >=1.4 && <1.7, utf8-string >=0.3 && <1.1, binary >=0.5 && <0.9,
commit ghc-rethinkdb for openSUSE:Factory
Hello community, here is the log from the commit of package ghc-rethinkdb for openSUSE:Factory checked in at 2017-02-08 12:07:19 Comparing /work/SRC/openSUSE:Factory/ghc-rethinkdb (Old) and /work/SRC/openSUSE:Factory/.ghc-rethinkdb.new (New) Package is "ghc-rethinkdb" Changes: --- /work/SRC/openSUSE:Factory/ghc-rethinkdb/ghc-rethinkdb.changes 2017-02-03 17:39:50.826476586 +0100 +++ /work/SRC/openSUSE:Factory/.ghc-rethinkdb.new/ghc-rethinkdb.changes 2017-02-08 12:07:19.703102773 +0100 @@ -1,0 +2,5 @@ +Thu Jan 26 16:22:01 UTC 2017 - psim...@suse.com + +- Update to version 2.2.0.8 with cabal2obs. + +--- Old: rethinkdb-2.2.0.7.tar.gz rethinkdb.cabal New: rethinkdb-2.2.0.8.tar.gz Other differences: -- ++ ghc-rethinkdb.spec ++ --- /var/tmp/diff_new_pack.PTbpgR/_old 2017-02-08 12:07:20.167037346 +0100 +++ /var/tmp/diff_new_pack.PTbpgR/_new 2017-02-08 12:07:20.167037346 +0100 @@ -19,14 +19,13 @@ %global pkg_name rethinkdb %bcond_with tests Name: ghc-%{pkg_name} -Version:2.2.0.7 +Version:2.2.0.8 Release:0 Summary:A driver for RethinkDB 2.2 License:Apache-2.0 Group: Development/Languages/Other Url:https://hackage.haskell.org/package/%{pkg_name} Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz -Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal#/%{pkg_name}.cabal BuildRequires: ghc-Cabal-devel BuildRequires: ghc-aeson-devel BuildRequires: ghc-base64-bytestring-devel @@ -64,7 +63,6 @@ %prep %setup -q -n %{pkg_name}-%{version} -cp -p %{SOURCE1} %{pkg_name}.cabal %build %ghc_lib_build @@ -87,5 +85,6 @@ %files devel -f %{name}-devel.files %defattr(-,root,root,-) +%doc doctests.hs %changelog ++ rethinkdb-2.2.0.7.tar.gz -> rethinkdb-2.2.0.8.tar.gz ++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rethinkdb-2.2.0.7/Database/RethinkDB/ReQL.hs new/rethinkdb-2.2.0.8/Database/RethinkDB/ReQL.hs --- old/rethinkdb-2.2.0.7/Database/RethinkDB/ReQL.hs2016-09-29 21:14:27.0 +0200 +++ new/rethinkdb-2.2.0.8/Database/RethinkDB/ReQL.hs2017-01-16 16:46:16.0 +0100 @@ -1,8 +1,15 @@ {-# LANGUAGE ExistentialQuantification, RecordWildCards, ScopedTypeVariables, FlexibleInstances, - OverloadedStrings, PatternGuards, GADTs, + OverloadedStrings, PatternGuards, GADTs, EmptyDataDecls, DefaultSignatures, CPP #-} +#if __GLASGOW_HASKELL__ < 710 +{-# LANGUAGE OverlappingInstances #-} +#define PRAGMA_OVERLAPPING +#else +#define PRAGMA_OVERLAPPING {-# OVERLAPPING #-} +#endif + -- | Building RQL queries in Haskell module Database.RethinkDB.ReQL ( ReQL(..), @@ -133,7 +140,7 @@ Datum _ -> return e Term t a oa -> Term t a . (oa ++) <$> baseAttributes attrs Note n t -> Note n <$> runReQL (ex (ReQL $ return t) attrs) - + instance OptArgs b => OptArgs (a -> b) where ex f a = flip ex a . f @@ -169,7 +176,7 @@ else intercalate (sep ++ " ") args where tooLong = any ('\n' `elem`) args || 80 < (length $ concat args) -indent = (\x -> case x of [] -> []; _ -> init x) . unlines . map (" "++) . lines +indent = (\x -> case x of [] -> []; _ -> init x) . unlines . map (" "++) . lines varName :: Int -> String varName n = replicate (q+1) (chr $ ord 'a' + r) @@ -214,7 +221,7 @@ infix 0 := -- | A key/value pair used for building objects -data Attribute a where +data Attribute a where (:=) :: Expr e => T.Text -> e -> Attribute a (::=) :: (Expr k, Expr v) => k -> v -> Attribute Dynamic NoAttribute :: Attribute a @@ -293,7 +300,7 @@ varsOf :: [Term] -> Maybe [Int] varsOf = sequence . map varOf - + varOf :: Term -> Maybe Int varOf (Term VAR [Datum d] []) = toInt d varOf _ = Nothing @@ -356,10 +363,10 @@ expr (Left a) = expr ["Left" := a] expr (Right b) = expr ["Right" := b] -instance Expr a => Expr (HM.HashMap [Char] a) where +instance PRAGMA_OVERLAPPING Expr a => Expr (HM.HashMap [Char] a) where expr = expr . map (\(k,v) -> T.pack k := v) . HM.toList -instance Expr a => Expr (HM.HashMap T.Text a) where +instance PRAGMA_OVERLAPPING Expr a => Expr (HM.HashMap T.Text a) where expr = expr . map (uncurry (:=)) . HM.toList instance Expr a => Expr (Map.Map [Char] a) where @@ -453,7 +460,7 @@ instance Expr ArgList where expr a = op MAKE_ARRAY a -instance (Expr k, Expr v) => Expr (M.HashMap k v) where +instance PRAGMA_OVERLAPPING (Expr k, Expr v) => Expr (M.HashMap k v) where expr m = expr $
commit ghc-rethinkdb for openSUSE:Factory
Hello community, here is the log from the commit of package ghc-rethinkdb for openSUSE:Factory checked in at 2017-01-31 12:45:01 Comparing /work/SRC/openSUSE:Factory/ghc-rethinkdb (Old) and /work/SRC/openSUSE:Factory/.ghc-rethinkdb.new (New) Package is "ghc-rethinkdb" Changes: --- /work/SRC/openSUSE:Factory/ghc-rethinkdb/ghc-rethinkdb.changes 2016-11-24 21:24:33.0 +0100 +++ /work/SRC/openSUSE:Factory/.ghc-rethinkdb.new/ghc-rethinkdb.changes 2017-02-03 17:39:50.826476586 +0100 @@ -1,0 +2,5 @@ +Wed Jan 18 09:00:20 UTC 2017 - psim...@suse.com + +- Update to version 2.2.0.7 revision 1 with cabal2obs. + +--- New: rethinkdb.cabal Other differences: -- ++ ghc-rethinkdb.spec ++ --- /var/tmp/diff_new_pack.nwRInj/_old 2017-02-03 17:39:51.214421676 +0100 +++ /var/tmp/diff_new_pack.nwRInj/_new 2017-02-03 17:39:51.214421676 +0100 @@ -1,7 +1,7 @@ # # spec file for package ghc-rethinkdb # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,6 +26,7 @@ Group: Development/Languages/Other Url:https://hackage.haskell.org/package/%{pkg_name} Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz +Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal#/%{pkg_name}.cabal BuildRequires: ghc-Cabal-devel BuildRequires: ghc-aeson-devel BuildRequires: ghc-base64-bytestring-devel @@ -63,6 +64,7 @@ %prep %setup -q -n %{pkg_name}-%{version} +cp -p %{SOURCE1} %{pkg_name}.cabal %build %ghc_lib_build @@ -85,6 +87,5 @@ %files devel -f %{name}-devel.files %defattr(-,root,root,-) -%doc doctests.hs %changelog ++ rethinkdb.cabal ++ name: rethinkdb version: 2.2.0.7 x-revision: 1 cabal-version: >=1.8 build-type: Simple license: Apache license-file: LICENSE maintainer: Etienne Laurinhomepage: http://github.com/atnnn/haskell-rethinkdb synopsis: A driver for RethinkDB 2.2 description: A driver for the RethinkDB database server category: Database author: Etienne Laurin, Brandon Martin tested-with: GHC==7.6.3, GHC==7.8.4, GHC==7.10.3, GHC==8.0.1 source-repository head type: git location: https://github.com/atnnn/haskell-rethinkdb flag dev default: False manual: True library build-depends: base >=4 && <4.9.1, unordered-containers ==0.2.*, text >=0.11 && <1.3, aeson >=0.7 && <1.1, bytestring ==0.10.*, containers ==0.5.*, data-default >=0.5 && <0.8, network >=2.4 && <2.7, mtl >=2.1 && <2.3, vector >=0.10 && <0.12, time >=1.4 && <1.7, utf8-string >=0.3 && <1.1, binary >=0.5 && <0.9, scientific ==0.3.*, base64-bytestring ==1.0.* if flag(dev) other-modules: Debug exposed: True buildable: True -- ghc-prof-options: -fprof-auto exposed-modules: Database.RethinkDB Database.RethinkDB.NoClash Database.RethinkDB.Driver Database.RethinkDB.Functions Database.RethinkDB.Time Database.RethinkDB.Types Database.RethinkDB.Datum Database.RethinkDB.Geospatial Database.RethinkDB.ReQL Database.RethinkDB.Network Database.RethinkDB.MapReduce Database.RethinkDB.Wire Database.RethinkDB.Wire.Datum Database.RethinkDB.Wire.Frame Database.RethinkDB.Wire.Query Database.RethinkDB.Wire.Response Database.RethinkDB.Wire.Term Database.RethinkDB.Wire.VersionDummy Database.RethinkDB.Doctest exposed: True buildable: True if impl(ghc > 8) ghc-options: -Wall -Wno-redundant-constraints else ghc-options: -Wall test-suite doctests build-depends: base, doctest >=0.9 type: exitcode-stdio-1.0 main-is: doctests.hs buildable: True ghc-options: -threaded benchmark bench build-depends: base, criterion, rethinkdb, text, aeson, async hs-source-dirs: bench type: exitcode-stdio-1.0 main-is: Bench.hs ghc-options: -O2 -threaded -rtsopts -with-rtsopts=-N ghc-prof-options: "-with-rtsopts=-p -s -h -i0.1 -N" executable proto2hs if !flag(dev) buildable: False main-is: proto2hs.hs build-depends: base, text, attoparsec
commit ghc-rethinkdb for openSUSE:Factory
Hello community, here is the log from the commit of package ghc-rethinkdb for openSUSE:Factory checked in at 2016-11-24 21:24:32 Comparing /work/SRC/openSUSE:Factory/ghc-rethinkdb (Old) and /work/SRC/openSUSE:Factory/.ghc-rethinkdb.new (New) Package is "ghc-rethinkdb" Changes: --- /work/SRC/openSUSE:Factory/ghc-rethinkdb/ghc-rethinkdb.changes 2016-11-15 17:58:13.0 +0100 +++ /work/SRC/openSUSE:Factory/.ghc-rethinkdb.new/ghc-rethinkdb.changes 2016-11-24 21:24:33.0 +0100 @@ -1,0 +2,5 @@ +Sat Oct 1 17:18:05 UTC 2016 - psim...@suse.com + +- Update to version 2.2.0.7 with cabal2obs. + +--- Old: rethinkdb-2.2.0.6.tar.gz New: rethinkdb-2.2.0.7.tar.gz Other differences: -- ++ ghc-rethinkdb.spec ++ --- /var/tmp/diff_new_pack.RNpoYN/_old 2016-11-24 21:24:34.0 +0100 +++ /var/tmp/diff_new_pack.RNpoYN/_new 2016-11-24 21:24:34.0 +0100 @@ -19,11 +19,11 @@ %global pkg_name rethinkdb %bcond_with tests Name: ghc-%{pkg_name} -Version:2.2.0.6 +Version:2.2.0.7 Release:0 Summary:A driver for RethinkDB 2.2 License:Apache-2.0 -Group: System/Libraries +Group: Development/Languages/Other Url:https://hackage.haskell.org/package/%{pkg_name} Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz BuildRequires: ghc-Cabal-devel @@ -64,19 +64,15 @@ %prep %setup -q -n %{pkg_name}-%{version} - %build %ghc_lib_build - %install %ghc_lib_install - %check %cabal_test - %post devel %ghc_pkg_recache ++ rethinkdb-2.2.0.6.tar.gz -> rethinkdb-2.2.0.7.tar.gz ++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rethinkdb-2.2.0.6/Database/RethinkDB/Driver.hs new/rethinkdb-2.2.0.7/Database/RethinkDB/Driver.hs --- old/rethinkdb-2.2.0.6/Database/RethinkDB/Driver.hs 2016-05-27 22:44:05.0 +0200 +++ new/rethinkdb-2.2.0.7/Database/RethinkDB/Driver.hs 2016-09-29 21:14:27.0 +0200 @@ -6,6 +6,8 @@ Result(..), runOpts, RunFlag(..), + Durability(..), + durability, WriteResponse(..), Change(..) ) where @@ -60,6 +62,14 @@ data Durability = Hard | Soft +instance Expr Durability where + expr Hard = "hard" + expr Soft = "soft" + +-- | Optional argument for soft durability writes +durability :: Durability -> Attribute a +durability d = "durability" := d + renderOption :: RunFlag -> (Text, Datum) renderOption UseOutdated = "read_mode" .= ("outdated" :: String) renderOption (ReadMode Majority) = "read_mode" .= ("majority" :: String) @@ -115,7 +125,7 @@ instance FromDatum a => Result (Cursor a) where convertResult r = do -c <- makeCursor r +c <- makeCursor r return c { cursorMap = unsafeFromDatum } unsafeFromDatum :: FromDatum a => Datum -> IO a @@ -144,7 +154,7 @@ Error a -> return $ Left $ RethinkDBError ErrorUnexpectedResponse (Datum Null) a [] instance FromDatum a => Result (Maybe a) where - convertResult v = do + convertResult v = do ed <- convertResult v case ed of Left _ -> return Nothing diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rethinkdb-2.2.0.6/Database/RethinkDB/Functions.hs new/rethinkdb-2.2.0.7/Database/RethinkDB/Functions.hs --- old/rethinkdb-2.2.0.6/Database/RethinkDB/Functions.hs 2016-05-30 15:45:15.0 +0200 +++ new/rethinkdb-2.2.0.7/Database/RethinkDB/Functions.hs 2016-09-29 21:14:27.0 +0200 @@ -350,6 +350,13 @@ slice :: (Expr a, Expr b, Expr c) => a -> b -> c -> ReQL slice n m s = op SLICE (s, n, m) +-- | Get nth element of a sequence +-- +-- >>> run h $ nth 2 [1, 2, 3, 4, 5] +-- 3 +nth :: (Expr a, Expr seq) => a -> seq -> ReQL +nth a s = op NTH (s, a) + -- | Reduce a sequence to a single value -- -- >>> run h $ reduce0 (+) 0 [1, 2, 3] @@ -1029,16 +1036,6 @@ includeInitial :: Attribute a includeInitial = "include_initial" := P.True -data Durability = Hard | Soft - -instance Expr Durability where - expr Hard = "hard" - expr Soft = "soft" - --- | Optional argument for soft durability writes -durability :: Durability -> Attribute a -durability d = "durability" := d - -- | Optional argument for non-atomic writes -- -- >>> run' h $ table "users" # get "sabrina" # update (merge ["lucky_number" := random]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rethinkdb-2.2.0.6/Database/RethinkDB/Network.hs new/rethinkdb-2.2.0.7/Database/RethinkDB/Network.hs --- old/rethinkdb-2.2.0.6/Database/RethinkDB/Network.hs 2016-05-30