packages feed

hasql 1.4.0.1 → 1.4.1

raw patch · 4 files changed

+11/−3 lines, 4 filesdep ~postgresql-binaryPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: postgresql-binary

API changes (from Hackage documentation)

+ Hasql.Decoders: refine :: (a -> Either Text b) -> Value a -> Value b

Files

hasql.cabal view
@@ -1,5 +1,5 @@ name: hasql-version: 1.4.0.1+version: 1.4.1 category: Hasql, Database, PostgreSQL synopsis: An efficient PostgreSQL driver with a flexible mapping API description:@@ -67,7 +67,7 @@     loch-th ==0.2.*,     mtl >=2 && <3,     placeholders ==0.1.*,-    postgresql-binary >=0.12.1 && <0.13,+    postgresql-binary >=0.12.2 && <0.13,     postgresql-libpq ==0.9.*,     profunctors >=5.1 && <6,     text >=1 && <2,
library/Hasql/Decoders.hs view
@@ -53,6 +53,7 @@   hstore,   enum,   custom,+  refine,   -- * Array   Array,   dimension,
library/Hasql/Private/Decoders.hs view
@@ -332,6 +332,13 @@ custom fn = Value (Value.decoderFn fn)  {-|+Refine a value decoder, lifting the possible error to the session level.+-}+{-# INLINABLE refine #-}+refine :: (a -> Either Text b) -> Value a -> Value b+refine fn (Value v) = Value (Value.Value (ask >>= \b -> lift (A.refine fn (Value.run v b))))++{-| A generic decoder of @HSTORE@ values.  Here's how you can use it to construct a specific value:
library/Hasql/Private/Prelude.hs view
@@ -26,7 +26,7 @@ import Control.Monad.Trans.Cont as Exports hiding (shift, callCC) import Control.Monad.Trans.Except as Exports (ExceptT(ExceptT), Except, except, runExcept, runExceptT, mapExcept, mapExceptT, withExcept, withExceptT, throwE, catchE) import Control.Monad.Trans.Maybe as Exports-import Control.Monad.Trans.Reader as Exports (Reader, runReader, mapReader, withReader, ReaderT(ReaderT), runReaderT, mapReaderT, withReaderT)+import Control.Monad.Trans.Reader as Exports (Reader, ask, runReader, mapReader, withReader, ReaderT(ReaderT), runReaderT, mapReaderT, withReaderT) import Control.Monad.Trans.State.Strict as Exports (State, runState, evalState, execState, mapState, withState, StateT(StateT), runStateT, evalStateT, execStateT, mapStateT, withStateT) import Control.Monad.Trans.Writer.Strict as Exports (Writer, runWriter, execWriter, mapWriter, WriterT(..), execWriterT, mapWriterT) import Data.Functor.Compose as Exports