rethinkdb-client-driver 0.0.22 → 0.0.23
raw patch · 2 files changed
+24/−7 lines, 2 filesdep ~basedep ~template-haskellPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: base, template-haskell
API changes (from Hackage documentation)
- Database.RethinkDB: Add :: [Exp a] -> Exp a
- Database.RethinkDB: All :: [Exp Bool] -> Exp Bool
- Database.RethinkDB: Any :: [Exp Bool] -> Exp Bool
- Database.RethinkDB: Append :: Exp (Array a) -> Exp a -> Exp (Array a)
- Database.RethinkDB: Between :: (Bound, Bound) -> Exp s -> Exp s
- Database.RethinkDB: BetweenIndexed :: Text -> (Bound, Bound) -> Exp s -> Exp s
- Database.RethinkDB: Call :: Exp f -> [SomeExp] -> Exp r
- Database.RethinkDB: Coerce :: Exp a -> Exp Text -> Exp b
- Database.RethinkDB: Constant :: a -> Exp a
- Database.RethinkDB: CreateDatabase :: Exp Text -> Exp Object
- Database.RethinkDB: CreateIndex :: Exp Table -> Exp Text -> (Exp Object -> Exp a) -> Exp Object
- Database.RethinkDB: CreateTable :: Exp Database -> Exp Text -> Exp Object
- Database.RethinkDB: Database :: Exp Text -> Exp Database
- Database.RethinkDB: Default :: Exp a -> Exp a -> Exp a
- Database.RethinkDB: Delete :: Exp a -> Exp Object
- Database.RethinkDB: DropDatabase :: Exp Text -> Exp Object
- Database.RethinkDB: DropIndex :: Exp Table -> Exp Text -> Exp Object
- Database.RethinkDB: DropTable :: Exp Database -> Exp Text -> Exp Object
- Database.RethinkDB: Eq :: Exp a -> Exp b -> Exp Bool
- Database.RethinkDB: Error :: Exp Text -> Exp a
- Database.RethinkDB: Filter :: (Exp a -> Exp Bool) -> Exp s -> Exp s
- Database.RethinkDB: Function :: State Context ([Int], Exp a) -> Exp f
- Database.RethinkDB: Get :: Exp Table -> Exp Text -> Exp SingleSelection
- Database.RethinkDB: GetAll :: Exp Table -> [Exp a] -> Exp (Array Datum)
- Database.RethinkDB: GetAllIndexed :: Exp Table -> [Exp a] -> Text -> Exp (Sequence Datum)
- Database.RethinkDB: GetField :: Exp Text -> Exp a -> Exp r
- Database.RethinkDB: HasFields :: [Text] -> Exp a -> Exp Bool
- Database.RethinkDB: IndexStatus :: Exp Table -> [Exp Text] -> Exp (Array Object)
- Database.RethinkDB: Info :: Exp a -> Exp Object
- Database.RethinkDB: InsertObject :: ConflictResolutionStrategy -> Exp Table -> Object -> Exp Object
- Database.RethinkDB: InsertSequence :: Exp Table -> Exp s -> Exp Object
- Database.RethinkDB: IsEmpty :: Exp a -> Exp Bool
- Database.RethinkDB: Keys :: Exp a -> Exp (Array Text)
- Database.RethinkDB: Limit :: Double -> Exp s -> Exp s
- Database.RethinkDB: ListDatabases :: Exp (Array Text)
- Database.RethinkDB: ListIndices :: Exp Table -> Exp (Array Text)
- Database.RethinkDB: ListTables :: Exp Database -> Exp (Array Text)
- Database.RethinkDB: Map :: (Exp a -> Exp b) -> Exp s -> Exp (Sequence b)
- Database.RethinkDB: Match :: Exp Text -> Exp Text -> Exp Datum
- Database.RethinkDB: MkArray :: [Exp a] -> Exp (Array a)
- Database.RethinkDB: Multiply :: [Exp a] -> Exp a
- Database.RethinkDB: Ne :: Exp a -> Exp b -> Exp Bool
- Database.RethinkDB: Not :: Exp Bool -> Exp Bool
- Database.RethinkDB: Now :: Exp ZonedTime
- Database.RethinkDB: Nth :: Double -> Exp s -> Exp r
- Database.RethinkDB: OrderBy :: [Order] -> Exp s -> Exp s
- Database.RethinkDB: OrderByIndexed :: Order -> Exp s -> Exp s
- Database.RethinkDB: Prepend :: Exp (Array a) -> Exp a -> Exp (Array a)
- Database.RethinkDB: RandomFloat :: Exp Double -> Exp Double -> Exp Double
- Database.RethinkDB: RandomInteger :: Exp Int -> Exp Int -> Exp Int
- Database.RethinkDB: SequenceChanges :: Exp s -> Exp (Sequence ChangeNotification)
- Database.RethinkDB: SingleSelectionChanges :: Exp a -> Exp (Sequence ChangeNotification)
- Database.RethinkDB: SomeExp :: Exp a -> SomeExp
- Database.RethinkDB: Sub :: [Exp a] -> Exp a
- Database.RethinkDB: Table :: Maybe (Exp Database) -> Exp Text -> Exp Table
- Database.RethinkDB: Take :: Exp Double -> Exp s -> Exp s
- Database.RethinkDB: Timezone :: Exp ZonedTime -> Exp Text
- Database.RethinkDB: UUID :: Exp Text
- Database.RethinkDB: Var :: Int -> Exp a
- Database.RethinkDB: WaitDatabase :: Exp Database -> Exp Object
- Database.RethinkDB: WaitIndex :: Exp Table -> [Exp Text] -> Exp (Array Object)
- Database.RethinkDB: WaitTable :: Exp Table -> Exp Object
+ Database.RethinkDB: [Add] :: (Num a) => [Exp a] -> Exp a
+ Database.RethinkDB: [All] :: [Exp Bool] -> Exp Bool
+ Database.RethinkDB: [Any] :: [Exp Bool] -> Exp Bool
+ Database.RethinkDB: [Append] :: (IsDatum a) => Exp (Array a) -> Exp a -> Exp (Array a)
+ Database.RethinkDB: [BetweenIndexed] :: (IsSequence s) => Text -> (Bound, Bound) -> Exp s -> Exp s
+ Database.RethinkDB: [Between] :: (IsSequence s) => (Bound, Bound) -> Exp s -> Exp s
+ Database.RethinkDB: [Call] :: Exp f -> [SomeExp] -> Exp r
+ Database.RethinkDB: [Coerce] :: Exp a -> Exp Text -> Exp b
+ Database.RethinkDB: [Constant] :: (ToDatum a) => a -> Exp a
+ Database.RethinkDB: [CreateDatabase] :: Exp Text -> Exp Object
+ Database.RethinkDB: [CreateIndex] :: (IsDatum a) => Exp Table -> Exp Text -> (Exp Object -> Exp a) -> Exp Object
+ Database.RethinkDB: [CreateTable] :: Exp Database -> Exp Text -> Exp Object
+ Database.RethinkDB: [Database] :: Exp Text -> Exp Database
+ Database.RethinkDB: [Default] :: Exp a -> Exp a -> Exp a
+ Database.RethinkDB: [Delete] :: Exp a -> Exp Object
+ Database.RethinkDB: [DropDatabase] :: Exp Text -> Exp Object
+ Database.RethinkDB: [DropIndex] :: Exp Table -> Exp Text -> Exp Object
+ Database.RethinkDB: [DropTable] :: Exp Database -> Exp Text -> Exp Object
+ Database.RethinkDB: [Eq] :: (IsDatum a, IsDatum b) => Exp a -> Exp b -> Exp Bool
+ Database.RethinkDB: [Error] :: Exp Text -> Exp a
+ Database.RethinkDB: [Filter] :: (IsSequence s) => (Exp a -> Exp Bool) -> Exp s -> Exp s
+ Database.RethinkDB: [Function] :: State Context ([Int], Exp a) -> Exp f
+ Database.RethinkDB: [GetAllIndexed] :: (IsDatum a) => Exp Table -> [Exp a] -> Text -> Exp (Sequence Datum)
+ Database.RethinkDB: [GetAll] :: (IsDatum a) => Exp Table -> [Exp a] -> Exp (Array Datum)
+ Database.RethinkDB: [GetField] :: (IsObject a, IsDatum r) => Exp Text -> Exp a -> Exp r
+ Database.RethinkDB: [Get] :: Exp Table -> Exp Text -> Exp SingleSelection
+ Database.RethinkDB: [HasFields] :: (IsObject a) => [Text] -> Exp a -> Exp Bool
+ Database.RethinkDB: [IndexStatus] :: Exp Table -> [Exp Text] -> Exp (Array Object)
+ Database.RethinkDB: [Info] :: Exp a -> Exp Object
+ Database.RethinkDB: [InsertObject] :: ConflictResolutionStrategy -> Exp Table -> Object -> Exp Object
+ Database.RethinkDB: [InsertSequence] :: (IsSequence s) => Exp Table -> Exp s -> Exp Object
+ Database.RethinkDB: [IsEmpty] :: (IsSequence a) => Exp a -> Exp Bool
+ Database.RethinkDB: [Keys] :: (IsObject a) => Exp a -> Exp (Array Text)
+ Database.RethinkDB: [Limit] :: (IsSequence s) => Double -> Exp s -> Exp s
+ Database.RethinkDB: [ListDatabases] :: Exp (Array Text)
+ Database.RethinkDB: [ListIndices] :: Exp Table -> Exp (Array Text)
+ Database.RethinkDB: [ListTables] :: Exp Database -> Exp (Array Text)
+ Database.RethinkDB: [Map] :: (IsSequence s) => (Exp a -> Exp b) -> Exp s -> Exp (Sequence b)
+ Database.RethinkDB: [Match] :: Exp Text -> Exp Text -> Exp Datum
+ Database.RethinkDB: [MkArray] :: [Exp a] -> Exp (Array a)
+ Database.RethinkDB: [Multiply] :: (Num a) => [Exp a] -> Exp a
+ Database.RethinkDB: [Ne] :: (IsDatum a, IsDatum b) => Exp a -> Exp b -> Exp Bool
+ Database.RethinkDB: [Not] :: Exp Bool -> Exp Bool
+ Database.RethinkDB: [Now] :: Exp ZonedTime
+ Database.RethinkDB: [Nth] :: (IsSequence s, IsDatum r) => Double -> Exp s -> Exp r
+ Database.RethinkDB: [OrderByIndexed] :: (IsSequence s) => Order -> Exp s -> Exp s
+ Database.RethinkDB: [OrderBy] :: (IsSequence s) => [Order] -> Exp s -> Exp s
+ Database.RethinkDB: [Prepend] :: (IsDatum a) => Exp (Array a) -> Exp a -> Exp (Array a)
+ Database.RethinkDB: [RandomFloat] :: Exp Double -> Exp Double -> Exp Double
+ Database.RethinkDB: [RandomInteger] :: Exp Int -> Exp Int -> Exp Int
+ Database.RethinkDB: [SequenceChanges] :: (IsSequence s) => Exp s -> Exp (Sequence ChangeNotification)
+ Database.RethinkDB: [SingleSelectionChanges] :: (IsDatum a) => Exp a -> Exp (Sequence ChangeNotification)
+ Database.RethinkDB: [SomeExp] :: Exp a -> SomeExp
+ Database.RethinkDB: [Sub] :: (Num a) => [Exp a] -> Exp a
+ Database.RethinkDB: [Table] :: Maybe (Exp Database) -> Exp Text -> Exp Table
+ Database.RethinkDB: [Take] :: (IsSequence s) => Exp Double -> Exp s -> Exp s
+ Database.RethinkDB: [Timezone] :: Exp ZonedTime -> Exp Text
+ Database.RethinkDB: [UUID] :: Exp Text
+ Database.RethinkDB: [Var] :: Int -> Exp a
+ Database.RethinkDB: [WaitDatabase] :: Exp Database -> Exp Object
+ Database.RethinkDB: [WaitIndex] :: Exp Table -> [Exp Text] -> Exp (Array Object)
+ Database.RethinkDB: [WaitTable] :: Exp Table -> Exp Object
+ Database.RethinkDB.TH: UntaggedValue :: SumEncoding
Files
rethinkdb-client-driver.cabal view
@@ -1,5 +1,5 @@ name: rethinkdb-client-driver-version: 0.0.22+version: 0.0.23 license: MIT license-file: LICENSE author: Tomas Carnecky@@ -33,7 +33,7 @@ default-language : Haskell2010 hs-source-dirs : src - build-depends : base < 4.9+ build-depends : base < 4.10 , aeson , binary >= 0.6.0.0 , bytestring@@ -67,7 +67,7 @@ main-is : Test.hs type : exitcode-stdio-1.0 - build-depends : base < 4.9+ build-depends : base < 4.10 , hspec , smallcheck , hspec-smallcheck@@ -86,7 +86,7 @@ main-is : Benchmark.hs type : exitcode-stdio-1.0 - build-depends : base+ build-depends : base < 4.10 , criterion , rethinkdb-client-driver
src/Database/RethinkDB/TH.hs view
@@ -101,7 +101,7 @@ , length, map, zip, genericLength, all, partition ) import Data.Maybe ( Maybe(Nothing, Just), catMaybes )-import Prelude ( String, (-), Integer, fromIntegral, error )+import Prelude ( String, (-), Integer, fromIntegral, error, head ) import Text.Printf ( printf ) import Text.Show ( show ) @@ -356,7 +356,14 @@ encodeArgs opts multiCons (ForallC _ _ con) = encodeArgs opts multiCons con +-- GADTs.+encodeArgs opts multiCons (GadtC conNames ts _) =+ encodeArgs opts multiCons $ NormalC (head conNames) ts +encodeArgs opts multiCons (RecGadtC conNames ts _) =+ encodeArgs opts multiCons $ RecC (head conNames) ts++ -------------------------------------------------------------------------------- -- FromDatum --------------------------------------------------------------------------------@@ -688,6 +695,14 @@ parseArgs tName opts (ForallC _ _ con) contents = parseArgs tName opts con contents +-- GADTs. We ignore the refined return type and proceed as if it were a+-- NormalC or RecC.+parseArgs tName opts (GadtC conNames ts _) contents =+ parseArgs tName opts (NormalC (head conNames) ts) contents++parseArgs tName opts (RecGadtC conNames ts _) contents =+ parseArgs tName opts (RecC (head conNames) ts) contents+ -- | Generates code to parse the Datum encoding of an n-ary -- constructor. parseProduct :: Name -- ^ Name of the type to which the constructor belongs.@@ -833,8 +848,8 @@ case info of TyConI dec -> case dec of- DataD _ _ tvbs cons _ -> f tvbs cons- NewtypeD _ _ tvbs con _ -> f tvbs [con]+ DataD _ _ tvbs _ cons _ -> f tvbs cons+ NewtypeD _ _ tvbs _ con _ -> f tvbs [con] other -> error $ "Data.Aeson.TH.withType: Unsupported type: " ++ show other _ -> error "Data.Aeson.TH.withType: I need the name of a type."@@ -845,6 +860,8 @@ getConName (RecC name _) = name getConName (InfixC _ name _) = name getConName (ForallC _ _ con) = getConName con+getConName (GadtC names _ _) = head names+getConName (RecGadtC names _ _) = head names -- | Extracts the name from a type variable binder. tvbName :: TyVarBndr -> Name