mirror of
https://github.com/circuithub/rel8.git
synced 2024-11-12 22:49:56 +03:00
Upgrade Opaleye
This commit is contained in:
parent
47af4fd531
commit
508479de57
@ -1,83 +1,32 @@
|
||||
{ mkDerivation
|
||||
, aeson
|
||||
, base
|
||||
, base16-bytestring
|
||||
, bytestring
|
||||
, case-insensitive
|
||||
, containers
|
||||
, contravariant
|
||||
#, dotenv
|
||||
, fetchgit
|
||||
, hspec
|
||||
, hspec-discover
|
||||
, multiset
|
||||
, postgresql-simple
|
||||
, pretty
|
||||
, product-profunctors
|
||||
, profunctors
|
||||
, QuickCheck
|
||||
, scientific
|
||||
, semigroups
|
||||
, stdenv
|
||||
, text
|
||||
, time
|
||||
, time-locale-compat
|
||||
, transformers
|
||||
, uuid
|
||||
, void
|
||||
{ mkDerivation, aeson, base, base16-bytestring, bytestring
|
||||
, case-insensitive, containers, contravariant, dotenv, fetchgit
|
||||
, hspec, hspec-discover, multiset, postgresql-simple, pretty
|
||||
, product-profunctors, profunctors, QuickCheck, scientific
|
||||
, semigroups, stdenv, text, time, time-locale-compat, transformers
|
||||
, uuid, void
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "opaleye";
|
||||
version = "0.6.7004.2";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/circuithub/haskell-opaleye";
|
||||
sha256 = "1zmdxqikzvad035c75z02whg0jvs0g3i9zc3rj97xzb2q6ay4m3r";
|
||||
rev = "430dd995f365e68d05aa7ed9f8affec2e0f13b50";
|
||||
url = "git://github.com/circuithub/haskell-opaleye";
|
||||
sha256 = "04464lm4yzkc81jvcfxdxkdl9bb5wkkkkq0i5ny7s7l9vfwan4dp";
|
||||
rev = "3683bbabf98e6a65824dce02445e482c91fdbae2";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
libraryHaskellDepends = [
|
||||
aeson
|
||||
base
|
||||
base16-bytestring
|
||||
bytestring
|
||||
case-insensitive
|
||||
contravariant
|
||||
postgresql-simple
|
||||
pretty
|
||||
product-profunctors
|
||||
profunctors
|
||||
scientific
|
||||
semigroups
|
||||
text
|
||||
time
|
||||
time-locale-compat
|
||||
transformers
|
||||
uuid
|
||||
void
|
||||
aeson base base16-bytestring bytestring case-insensitive
|
||||
contravariant postgresql-simple pretty product-profunctors
|
||||
profunctors scientific semigroups text time time-locale-compat
|
||||
transformers uuid void
|
||||
];
|
||||
# dotenv, which is needed for the test suite, is broken in our nixpkgs,
|
||||
# so disable testing for now
|
||||
doCheck = false;
|
||||
testHaskellDepends = [
|
||||
aeson
|
||||
base
|
||||
containers
|
||||
contravariant
|
||||
# dotenv
|
||||
hspec
|
||||
hspec-discover
|
||||
multiset
|
||||
postgresql-simple
|
||||
product-profunctors
|
||||
profunctors
|
||||
QuickCheck
|
||||
semigroups
|
||||
text
|
||||
time
|
||||
transformers
|
||||
uuid
|
||||
aeson base containers contravariant dotenv hspec hspec-discover
|
||||
multiset postgresql-simple product-profunctors profunctors
|
||||
QuickCheck semigroups text time transformers uuid
|
||||
];
|
||||
testToolDepends = [ hspec-discover ];
|
||||
doCheck = false;
|
||||
homepage = "https://github.com/tomjaguarpaw/haskell-opaleye";
|
||||
description = "An SQL-generating DSL targeting PostgreSQL";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
|
@ -20,11 +20,6 @@ primQuery
|
||||
:: Applicative f
|
||||
=> ( PrimQuery' a -> f ( PrimQuery' a ) ) -> PrimQuery' a -> f ( PrimQuery' a )
|
||||
primQuery f = \case
|
||||
Product primQueries bindings -> do
|
||||
primQueries <- traverse f primQueries
|
||||
|
||||
return ( Product primQueries bindings )
|
||||
|
||||
Aggregate bindingsAndPrimExpr primQuery -> do
|
||||
primQuery <- f primQuery
|
||||
|
||||
@ -52,10 +47,10 @@ primQuery f = \case
|
||||
|
||||
return ( Exists bool primQueryA primQueryB )
|
||||
|
||||
Binary binOp bindings primQueries -> do
|
||||
Binary binOp primQueries -> do
|
||||
primQueries <- both f primQueries
|
||||
|
||||
return ( Binary binOp bindings primQueries )
|
||||
return ( Binary binOp primQueries )
|
||||
|
||||
Label label primQuery -> do
|
||||
primQuery <- f primQuery
|
||||
@ -68,9 +63,6 @@ primQuery f = \case
|
||||
|
||||
optimisePredicates :: PrimQuery' a -> PrimQuery' a
|
||||
optimisePredicates = \case
|
||||
Product primQueries predicates ->
|
||||
Product primQueries ( map nullIsFalse predicates )
|
||||
|
||||
Join joinType predicate bindingsA bindingsB primQueryA primQueryB ->
|
||||
Join joinType ( nullIsFalse predicate ) bindingsA bindingsB primQueryA primQueryB
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user