mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-09-11 10:46:25 +03:00
ghc 9.2.5
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6777 Co-authored-by: Samir Talwar <47582+SamirTalwar@users.noreply.github.com> GitOrigin-RevId: 916abab76446cf7c4e1e63dc112ba4994ab4d23d
This commit is contained in:
parent
502115f969
commit
15b3ac0aee
@ -1 +1 @@
|
|||||||
9.2.4
|
9.2.5
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
--
|
--
|
||||||
-- See: https://www.haskell.org/cabal/users-guide/nix-local-build.html#configuring-builds-with-cabal-project
|
-- See: https://www.haskell.org/cabal/users-guide/nix-local-build.html#configuring-builds-with-cabal-project
|
||||||
|
|
||||||
with-compiler: ghc-9.2.4
|
with-compiler: ghc-9.2.5
|
||||||
|
|
||||||
-- package-level parallelism:
|
-- package-level parallelism:
|
||||||
jobs: $ncpus
|
jobs: $ncpus
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
active-repositories: hackage.haskell.org:merge
|
active-repositories: hackage.haskell.org:merge
|
||||||
constraints: any.Cabal ==3.6.3.0,
|
constraints: any.Cabal ==3.6.3.0,
|
||||||
any.Diff ==0.4.1,
|
any.Diff ==0.4.1,
|
||||||
any.HTTP ==4000.3.16,
|
any.HTTP ==4000.4.1,
|
||||||
any.HUnit ==1.6.2.0,
|
any.HUnit ==1.6.2.0,
|
||||||
any.OneTuple ==0.3.1,
|
any.OneTuple ==0.3.1,
|
||||||
any.Only ==0.1,
|
any.Only ==0.1,
|
||||||
@ -11,13 +11,13 @@ constraints: any.Cabal ==3.6.3.0,
|
|||||||
any.Spock ==0.14.0.0,
|
any.Spock ==0.14.0.0,
|
||||||
any.Spock-core ==0.14.0.1,
|
any.Spock-core ==0.14.0.1,
|
||||||
any.StateVar ==1.2.2,
|
any.StateVar ==1.2.2,
|
||||||
any.adjunctions ==4.4,
|
any.adjunctions ==4.4.2,
|
||||||
any.aeson ==2.1.0.0,
|
any.aeson ==2.1.0.0,
|
||||||
any.aeson-casing ==0.2.0.0,
|
any.aeson-casing ==0.2.0.0,
|
||||||
any.aeson-pretty ==0.8.9,
|
any.aeson-pretty ==0.8.9,
|
||||||
any.aeson-qq ==0.8.4,
|
any.aeson-qq ==0.8.4,
|
||||||
any.alex ==3.2.7.1,
|
any.alex ==3.2.7.1,
|
||||||
any.ansi-terminal ==0.11.1,
|
any.ansi-terminal ==0.11.3,
|
||||||
any.ansi-wl-pprint ==0.6.9,
|
any.ansi-wl-pprint ==0.6.9,
|
||||||
any.appar ==0.1.8,
|
any.appar ==0.1.8,
|
||||||
any.array ==0.5.4.0,
|
any.array ==0.5.4.0,
|
||||||
@ -28,23 +28,24 @@ constraints: any.Cabal ==3.6.3.0,
|
|||||||
any.async ==2.2.4,
|
any.async ==2.2.4,
|
||||||
any.atomic-primops ==0.8.4,
|
any.atomic-primops ==0.8.4,
|
||||||
any.attoparsec ==0.14.4,
|
any.attoparsec ==0.14.4,
|
||||||
any.attoparsec-iso8601 ==1.0.2.1,
|
any.attoparsec-iso8601 ==1.1.0.0,
|
||||||
any.authenticate-oauth ==1.7,
|
any.authenticate-oauth ==1.7,
|
||||||
any.auto-update ==0.1.6,
|
any.auto-update ==0.1.6,
|
||||||
any.autodocodec ==0.2.0.0,
|
any.autodocodec ==0.2.0.1,
|
||||||
any.autodocodec-openapi3 ==0.2.1.1,
|
any.autodocodec-openapi3 ==0.2.1.1,
|
||||||
any.barbies ==2.0.3.1,
|
any.barbies ==2.0.3.1,
|
||||||
any.base ==4.16.3.0,
|
any.base ==4.16.4.0,
|
||||||
any.base-compat ==0.12.1,
|
any.base-compat ==0.12.2,
|
||||||
any.base-compat-batteries ==0.12.1,
|
any.base-compat-batteries ==0.12.2,
|
||||||
any.base-orphans ==0.8.6,
|
any.base-orphans ==0.8.7,
|
||||||
any.base-prelude ==1.6.1,
|
any.base-prelude ==1.6.1,
|
||||||
any.base16-bytestring ==1.0.2.0,
|
any.base16-bytestring ==1.0.2.0,
|
||||||
any.base64-bytestring ==1.2.1.0,
|
any.base64-bytestring ==1.2.1.0,
|
||||||
any.basement ==0.0.14,
|
any.basement ==0.0.15,
|
||||||
any.bifunctors ==5.5.11,
|
any.bifunctors ==5.5.13,
|
||||||
any.binary ==0.8.9.0,
|
any.binary ==0.8.9.0,
|
||||||
any.binary-parser ==0.5.7.1,
|
any.binary-parser ==0.5.7.2,
|
||||||
|
any.bitvec ==1.1.3.0,
|
||||||
any.blaze-builder ==0.4.2.2,
|
any.blaze-builder ==0.4.2.2,
|
||||||
any.blaze-html ==0.9.1.2,
|
any.blaze-html ==0.9.1.2,
|
||||||
any.blaze-markup ==0.8.2.8,
|
any.blaze-markup ==0.8.2.8,
|
||||||
@ -53,13 +54,13 @@ constraints: any.Cabal ==3.6.3.0,
|
|||||||
any.byteorder ==1.0.4,
|
any.byteorder ==1.0.4,
|
||||||
any.bytestring ==0.11.3.1,
|
any.bytestring ==0.11.3.1,
|
||||||
any.bytestring-builder ==0.10.8.2.0,
|
any.bytestring-builder ==0.10.8.2.0,
|
||||||
any.bytestring-lexing ==0.5.0.8,
|
any.bytestring-lexing ==0.5.0.9,
|
||||||
any.bytestring-strict-builder ==0.4.5.5,
|
any.bytestring-strict-builder ==0.4.5.6,
|
||||||
any.bytestring-tree-builder ==0.2.7.10,
|
any.bytestring-tree-builder ==0.2.7.10,
|
||||||
any.cabal-doctest ==1.0.9,
|
any.cabal-doctest ==1.0.9,
|
||||||
any.call-stack ==0.4.0,
|
any.call-stack ==0.4.0,
|
||||||
any.case-insensitive ==1.2.1.0,
|
any.case-insensitive ==1.2.1.0,
|
||||||
any.cereal ==0.5.8.2,
|
any.cereal ==0.5.8.3,
|
||||||
any.charset ==0.3.9,
|
any.charset ==0.3.9,
|
||||||
any.ci-info ==0.1.0.0,
|
any.ci-info ==0.1.0.0,
|
||||||
any.clock ==0.8.3,
|
any.clock ==0.8.3,
|
||||||
@ -67,11 +68,11 @@ constraints: any.Cabal ==3.6.3.0,
|
|||||||
any.colour ==2.3.6,
|
any.colour ==2.3.6,
|
||||||
any.comonad ==5.0.8,
|
any.comonad ==5.0.8,
|
||||||
any.concise ==0.1.0.1,
|
any.concise ==0.1.0.1,
|
||||||
any.concurrent-output ==1.10.15,
|
any.concurrent-output ==1.10.16,
|
||||||
any.conduit ==1.3.4.2,
|
any.conduit ==1.3.4.3,
|
||||||
any.conduit-extra ==1.3.5,
|
any.conduit-extra ==1.3.6,
|
||||||
any.connection ==0.3.1,
|
any.connection ==0.3.1,
|
||||||
any.constraints ==0.13.3,
|
any.constraints ==0.13.4,
|
||||||
any.constraints-extras ==0.3.2.1,
|
any.constraints-extras ==0.3.2.1,
|
||||||
any.containers ==0.6.5.1,
|
any.containers ==0.6.5.1,
|
||||||
any.contravariant ==1.5.5,
|
any.contravariant ==1.5.5,
|
||||||
@ -83,7 +84,7 @@ constraints: any.Cabal ==3.6.3.0,
|
|||||||
any.cryptohash-md5 ==0.11.101.0,
|
any.cryptohash-md5 ==0.11.101.0,
|
||||||
any.cryptohash-sha1 ==0.11.101.0,
|
any.cryptohash-sha1 ==0.11.101.0,
|
||||||
any.cryptonite ==0.30,
|
any.cryptonite ==0.30,
|
||||||
any.data-bword ==0.1.0.1,
|
any.data-bword ==0.1.0.2,
|
||||||
any.data-checked ==0.3,
|
any.data-checked ==0.3,
|
||||||
any.data-default ==0.7.1.1,
|
any.data-default ==0.7.1.1,
|
||||||
any.data-default-class ==0.1.2.0,
|
any.data-default-class ==0.1.2.0,
|
||||||
@ -96,9 +97,9 @@ constraints: any.Cabal ==3.6.3.0,
|
|||||||
any.data-has ==0.4.0.0,
|
any.data-has ==0.4.0.0,
|
||||||
any.data-serializer ==0.3.5,
|
any.data-serializer ==0.3.5,
|
||||||
any.data-textual ==0.3.0.3,
|
any.data-textual ==0.3.0.3,
|
||||||
any.dec ==0.0.4,
|
any.dec ==0.0.5,
|
||||||
any.deepseq ==1.4.6.1,
|
any.deepseq ==1.4.6.1,
|
||||||
any.deferred-folds ==0.9.18.1,
|
any.deferred-folds ==0.9.18.2,
|
||||||
any.dependent-map ==0.4.0.0,
|
any.dependent-map ==0.4.0.0,
|
||||||
any.dependent-sum ==0.7.1.0,
|
any.dependent-sum ==0.7.1.0,
|
||||||
any.dependent-sum-template ==0.1.1.1,
|
any.dependent-sum-template ==0.1.1.1,
|
||||||
@ -107,15 +108,15 @@ constraints: any.Cabal ==3.6.3.0,
|
|||||||
any.dlist ==1.0,
|
any.dlist ==1.0,
|
||||||
any.double-conversion ==2.0.4.1,
|
any.double-conversion ==2.0.4.1,
|
||||||
any.easy-file ==0.2.2,
|
any.easy-file ==0.2.2,
|
||||||
any.either ==5.0.1.1,
|
any.either ==5.0.2,
|
||||||
any.ekg-core ==0.1.1.7,
|
any.ekg-core ==0.1.1.7,
|
||||||
any.ekg-json ==0.1.0.7,
|
any.ekg-json ==0.1.0.7,
|
||||||
any.ekg-prometheus ==0.2.0.0,
|
any.ekg-prometheus ==0.2.0.0,
|
||||||
any.entropy ==0.4.1.7,
|
any.entropy ==0.4.1.10,
|
||||||
any.erf ==2.0.0.0,
|
any.erf ==2.0.0.0,
|
||||||
any.errors ==2.3.0,
|
any.errors ==2.3.0,
|
||||||
any.exceptions ==0.10.4,
|
any.exceptions ==0.10.4,
|
||||||
any.extra ==1.7.10,
|
any.extra ==1.7.12,
|
||||||
any.fail ==4.9.0.0,
|
any.fail ==4.9.0.0,
|
||||||
any.fast-logger ==3.1.1,
|
any.fast-logger ==3.1.1,
|
||||||
any.file-embed ==0.0.15.0,
|
any.file-embed ==0.0.15.0,
|
||||||
@ -124,28 +125,28 @@ constraints: any.Cabal ==3.6.3.0,
|
|||||||
any.focus ==1.0.3,
|
any.focus ==1.0.3,
|
||||||
any.foldl ==1.4.12,
|
any.foldl ==1.4.12,
|
||||||
any.formatting ==7.1.3,
|
any.formatting ==7.1.3,
|
||||||
any.free ==5.1.7,
|
any.free ==5.1.9,
|
||||||
any.generic-monoid ==0.1.0.1,
|
any.generic-monoid ==0.1.0.1,
|
||||||
any.generically ==0.1,
|
any.generically ==0.1,
|
||||||
any.generics-sop ==0.5.1.2,
|
any.generics-sop ==0.5.1.2,
|
||||||
any.ghc ==9.2.*,
|
any.ghc ==9.2.5,
|
||||||
any.ghc-bignum ==1.2,
|
any.ghc-bignum ==1.2,
|
||||||
any.ghc-boot ==9.2.*,
|
any.ghc-boot ==9.2.5,
|
||||||
any.ghc-boot-th ==9.2.*,
|
any.ghc-boot-th ==9.2.5,
|
||||||
any.ghc-heap ==9.2.*,
|
any.ghc-heap ==9.2.5,
|
||||||
any.ghc-heap-view ==0.6.3,
|
any.ghc-heap-view ==0.6.3,
|
||||||
any.ghc-prim ==0.8.0,
|
any.ghc-prim ==0.8.0,
|
||||||
any.ghci ==9.2.*,
|
any.ghci ==9.2.5,
|
||||||
any.happy ==1.20.0,
|
any.happy ==1.20.0,
|
||||||
any.hashable ==1.3.5.0,
|
any.hashable ==1.4.1.0,
|
||||||
any.hashtables ==1.2.4.2,
|
any.hashtables ==1.3.1,
|
||||||
any.haskell-lexer ==1.1,
|
any.haskell-lexer ==1.1,
|
||||||
any.haskell-src-exts ==1.23.1,
|
any.haskell-src-exts ==1.23.1,
|
||||||
any.haskell-src-meta ==0.8.9,
|
any.haskell-src-meta ==0.8.11,
|
||||||
any.hasql ==1.5.0.5,
|
any.hasql ==1.5.0.5,
|
||||||
any.hasql-pool ==0.5.2.2,
|
any.hasql-pool ==0.5.2.2,
|
||||||
any.hasql-transaction ==1.0.1.1,
|
any.hasql-transaction ==1.0.1.1,
|
||||||
any.hedgehog ==1.1.1,
|
any.hedgehog ==1.2,
|
||||||
any.hedis ==0.15.1,
|
any.hedis ==0.15.1,
|
||||||
any.hourglass ==0.2.12,
|
any.hourglass ==0.2.12,
|
||||||
any.hpc ==0.6.1.0,
|
any.hpc ==0.6.1.0,
|
||||||
@ -158,7 +159,7 @@ constraints: any.Cabal ==3.6.3.0,
|
|||||||
any.hspec-expectations-json ==1.0.0.7,
|
any.hspec-expectations-json ==1.0.0.7,
|
||||||
any.hspec-expectations-lifted ==0.10.0,
|
any.hspec-expectations-lifted ==0.10.0,
|
||||||
any.hspec-hedgehog ==0.0.1.2,
|
any.hspec-hedgehog ==0.0.1.2,
|
||||||
any.http-api-data ==0.4.3,
|
any.http-api-data ==0.5,
|
||||||
any.http-client ==0.7.13.1,
|
any.http-client ==0.7.13.1,
|
||||||
any.http-client-tls ==0.3.6.1,
|
any.http-client-tls ==0.3.6.1,
|
||||||
any.http-conduit ==2.3.8,
|
any.http-conduit ==2.3.8,
|
||||||
@ -170,35 +171,36 @@ constraints: any.Cabal ==3.6.3.0,
|
|||||||
any.immortal ==0.2.2.1,
|
any.immortal ==0.2.2.1,
|
||||||
any.indexed-profunctors ==0.1.1,
|
any.indexed-profunctors ==0.1.1,
|
||||||
any.indexed-traversable ==0.1.2,
|
any.indexed-traversable ==0.1.2,
|
||||||
any.indexed-traversable-instances ==0.1.1,
|
any.indexed-traversable-instances ==0.1.1.1,
|
||||||
any.insert-ordered-containers ==0.2.5.1,
|
any.insert-ordered-containers ==0.2.5.1,
|
||||||
any.inspection-testing ==0.4.6.1,
|
any.inspection-testing ==0.4.6.1,
|
||||||
any.integer-gmp ==1.1,
|
any.integer-gmp ==1.1,
|
||||||
any.integer-logarithms ==1.0.3.1,
|
any.integer-logarithms ==1.0.3.1,
|
||||||
any.invariant ==0.5.5,
|
any.invariant ==0.6,
|
||||||
any.iproute ==1.7.12,
|
any.iproute ==1.7.12,
|
||||||
|
any.isomorphism-class ==0.1.0.7,
|
||||||
any.jose ==0.9,
|
any.jose ==0.9,
|
||||||
any.kan-extensions ==5.2.3,
|
any.kan-extensions ==5.2.5,
|
||||||
any.keys ==3.12.3,
|
any.keys ==3.12.3,
|
||||||
any.kriti-lang ==0.3.3,
|
any.kriti-lang ==0.3.3,
|
||||||
any.lens ==5.1,
|
any.lens ==5.2,
|
||||||
any.lens-aeson ==1.2.2,
|
any.lens-aeson ==1.2.2,
|
||||||
any.lens-family ==2.1.2,
|
any.lens-family ==2.1.2,
|
||||||
any.lens-family-core ==2.1.2,
|
any.lens-family-core ==2.1.2,
|
||||||
any.libyaml ==0.1.2,
|
any.libyaml ==0.1.2,
|
||||||
any.lifted-async ==0.10.2.2,
|
any.lifted-async ==0.10.2.3,
|
||||||
any.lifted-base ==0.2.3.12,
|
any.lifted-base ==0.2.3.12,
|
||||||
any.list-t ==1.0.5.1,
|
any.list-t ==1.0.5.3,
|
||||||
any.logict ==0.7.0.3,
|
any.logict ==0.8.0.0,
|
||||||
any.lucid2 ==0.0.20221012,
|
any.lucid2 ==0.0.20221012,
|
||||||
any.managed ==1.0.9,
|
any.managed ==1.0.9,
|
||||||
any.megaparsec ==9.2.0,
|
any.megaparsec ==9.2.2,
|
||||||
any.memory ==0.17.0,
|
any.memory ==0.18.0,
|
||||||
any.mime-types ==0.1.0.9,
|
any.mime-types ==0.1.1.0,
|
||||||
any.mmorph ==1.2.0,
|
any.mmorph ==1.2.0,
|
||||||
any.monad-control ==1.0.3.1,
|
any.monad-control ==1.0.3.1,
|
||||||
any.monad-loops ==0.4.3,
|
any.monad-loops ==0.4.3,
|
||||||
any.monad-time ==0.3.1.0,
|
any.monad-time ==0.4.0.0,
|
||||||
any.monad-validate ==1.2.0.1,
|
any.monad-validate ==1.2.0.1,
|
||||||
any.mono-traversable ==1.0.15.3,
|
any.mono-traversable ==1.0.15.3,
|
||||||
any.morpheus-graphql ==0.20.0,
|
any.morpheus-graphql ==0.20.0,
|
||||||
@ -209,7 +211,7 @@ constraints: any.Cabal ==3.6.3.0,
|
|||||||
any.mtl-compat ==0.2.2,
|
any.mtl-compat ==0.2.2,
|
||||||
any.mustache ==2.4.1,
|
any.mustache ==2.4.1,
|
||||||
any.mysql ==0.2.1,
|
any.mysql ==0.2.1,
|
||||||
any.mysql-simple ==0.4.7.1,
|
any.mysql-simple ==0.4.9,
|
||||||
any.natural-transformation ==0.4,
|
any.natural-transformation ==0.4,
|
||||||
any.network ==3.1.2.7,
|
any.network ==3.1.2.7,
|
||||||
any.network-bsd ==2.8.1.0,
|
any.network-bsd ==2.8.1.0,
|
||||||
@ -223,101 +225,103 @@ constraints: any.Cabal ==3.6.3.0,
|
|||||||
any.old-locale ==1.0.0.7,
|
any.old-locale ==1.0.0.7,
|
||||||
any.old-time ==1.1.0.3,
|
any.old-time ==1.1.0.3,
|
||||||
any.openapi3 ==3.2.2,
|
any.openapi3 ==3.2.2,
|
||||||
any.optics-core ==0.4,
|
any.optics-core ==0.4.1,
|
||||||
any.optics-extra ==0.4,
|
any.optics-extra ==0.4.2.1,
|
||||||
any.optics-th ==0.4,
|
any.optics-th ==0.4.1,
|
||||||
any.optparse-applicative ==0.16.1.0,
|
any.optparse-applicative ==0.16.1.0,
|
||||||
any.optparse-generic ==1.4.7,
|
any.optparse-generic ==1.4.8,
|
||||||
any.parallel ==3.2.2.0,
|
any.parallel ==3.2.2.0,
|
||||||
any.parsec ==3.1.15.1,
|
any.parsec ==3.1.15.1,
|
||||||
any.parser-combinators ==1.3.0,
|
any.parser-combinators ==1.3.0,
|
||||||
any.parsers ==0.12.10,
|
any.parsers ==0.12.11,
|
||||||
any.pcre-light ==0.4.1.0,
|
any.pcre-light ==0.4.1.0,
|
||||||
any.pem ==0.2.4,
|
any.pem ==0.2.4,
|
||||||
any.pointed ==5.0.3,
|
any.pointed ==5.0.4,
|
||||||
any.postgres-options ==0.2.0.0,
|
any.postgres-options ==0.2.0.0,
|
||||||
any.postgresql-binary ==0.12.4.2,
|
any.postgresql-binary ==0.12.5,
|
||||||
any.postgresql-libpq ==0.9.4.3,
|
any.postgresql-libpq ==0.9.4.3,
|
||||||
any.postgresql-simple ==0.6.4,
|
any.postgresql-simple ==0.6.5,
|
||||||
any.pretty ==1.1.3.6,
|
any.pretty ==1.1.3.6,
|
||||||
any.pretty-show ==1.10,
|
any.pretty-show ==1.10,
|
||||||
any.pretty-simple ==4.0.0.0,
|
any.pretty-simple ==4.1.2.0,
|
||||||
any.prettyprinter ==1.7.1,
|
any.prettyprinter ==1.7.1,
|
||||||
any.prettyprinter-ansi-terminal ==1.1.3,
|
any.prettyprinter-ansi-terminal ==1.1.3,
|
||||||
any.primitive ==0.7.3.0,
|
any.primitive ==0.7.4.0,
|
||||||
any.primitive-extras ==0.10.1.4,
|
any.primitive-extras ==0.10.1.5,
|
||||||
any.primitive-unlifted ==0.1.3.1,
|
any.primitive-unlifted ==0.1.3.1,
|
||||||
any.process ==1.6.13.2,
|
any.process ==1.6.16.0,
|
||||||
any.profunctors ==5.6.2,
|
any.profunctors ==5.6.2,
|
||||||
any.proto-lens ==0.7.1.1,
|
any.proto-lens ==0.7.1.2,
|
||||||
any.proto-lens-runtime ==0.7.0.2,
|
any.proto-lens-runtime ==0.7.0.3,
|
||||||
any.psqueues ==0.2.7.3,
|
any.psqueues ==0.2.7.3,
|
||||||
any.quickcheck-instances ==0.3.27,
|
any.quickcheck-instances ==0.3.28,
|
||||||
any.quickcheck-io ==0.2.0,
|
any.quickcheck-io ==0.2.0,
|
||||||
any.random ==1.2.1,
|
any.random ==1.2.1.1,
|
||||||
|
any.recv ==0.0.0,
|
||||||
any.refined ==0.8,
|
any.refined ==0.8,
|
||||||
any.reflection ==2.1.6,
|
any.reflection ==2.1.6,
|
||||||
any.regex-base ==0.94.0.2,
|
any.regex-base ==0.94.0.2,
|
||||||
any.regex-tdfa ==1.3.1.1,
|
any.regex-tdfa ==1.3.2,
|
||||||
any.relude ==1.1.0.0,
|
any.relude ==1.1.0.0,
|
||||||
any.reroute ==0.7.0.0,
|
any.reroute ==0.7.0.0,
|
||||||
any.resource-pool ==0.2.3.2,
|
any.resource-pool ==0.2.3.2,
|
||||||
any.resourcet ==1.2.4.3,
|
any.resourcet ==1.2.6,
|
||||||
any.retry ==0.9.1.0,
|
any.retry ==0.9.3.0,
|
||||||
any.rts ==1.0.2,
|
any.rts ==1.0.2,
|
||||||
any.safe ==0.3.19,
|
any.safe ==0.3.19,
|
||||||
any.safe-exceptions ==0.1.7.2,
|
any.safe-exceptions ==0.1.7.3,
|
||||||
any.scanner ==0.3.1,
|
any.scanner ==0.3.1,
|
||||||
any.scientific ==0.3.7.0,
|
any.scientific ==0.3.7.0,
|
||||||
any.semialign ==1.2.0.1,
|
any.semialign ==1.2.0.1,
|
||||||
any.semigroupoids ==5.3.7,
|
any.semigroupoids ==5.3.7,
|
||||||
any.semigroups ==0.20,
|
any.semigroups ==0.20,
|
||||||
any.semver ==0.4.0.1,
|
any.semver ==0.4.0.1,
|
||||||
any.servant ==0.19,
|
any.servant ==0.19.1,
|
||||||
any.servant-client ==0.19,
|
any.servant-client ==0.19,
|
||||||
any.servant-client-core ==0.19,
|
any.servant-client-core ==0.19,
|
||||||
any.servant-openapi3 ==2.0.1.5,
|
any.servant-openapi3 ==2.0.1.5,
|
||||||
any.servant-server ==0.19.1,
|
any.servant-server ==0.19.2,
|
||||||
any.setenv ==0.1.1.3,
|
any.setenv ==0.1.1.3,
|
||||||
any.shakespeare ==2.0.29,
|
any.shakespeare ==2.0.30,
|
||||||
any.simple-sendfile ==0.2.30,
|
any.simple-sendfile ==0.2.30,
|
||||||
any.singleton-bool ==0.1.6,
|
any.singleton-bool ==0.1.6,
|
||||||
any.socks ==0.6.1,
|
any.socks ==0.6.1,
|
||||||
any.some ==1.0.3,
|
any.some ==1.0.3,
|
||||||
any.sop-core ==0.5.0.2,
|
any.sop-core ==0.5.0.2,
|
||||||
any.split ==0.2.3.4,
|
any.split ==0.2.3.5,
|
||||||
any.splitmix ==0.1.0.4,
|
any.splitmix ==0.1.0.4,
|
||||||
any.stm ==2.5.0.2,
|
any.stm ==2.5.0.2,
|
||||||
any.stm-containers ==1.2,
|
any.stm-containers ==1.2,
|
||||||
any.stm-hamt ==1.2.0.7,
|
any.stm-hamt ==1.2.0.8,
|
||||||
any.streaming-commons ==0.2.2.4,
|
any.streaming-commons ==0.2.2.5,
|
||||||
any.strict ==0.4.0.1,
|
any.strict ==0.4.0.1,
|
||||||
any.string-conversions ==0.4.0.1,
|
any.string-conversions ==0.4.0.1,
|
||||||
any.string-interpolate ==0.3.1.2,
|
any.string-interpolate ==0.3.1.2,
|
||||||
any.superbuffer ==0.3.1.2,
|
any.superbuffer ==0.3.1.2,
|
||||||
any.syb ==0.7.2.1,
|
any.syb ==0.7.2.2,
|
||||||
any.system-filepath ==0.4.14,
|
any.system-filepath ==0.4.14,
|
||||||
any.tagged ==0.8.6.1,
|
any.tagged ==0.8.6.1,
|
||||||
any.tasty ==1.4.2.3,
|
any.tasty ==1.4.2.3,
|
||||||
any.tasty-bench ==0.3.2,
|
any.tasty-bench ==0.3.2,
|
||||||
any.template-haskell ==2.18.0.0,
|
any.template-haskell ==2.18.0.0,
|
||||||
any.template-haskell-compat-v0208 ==0.1.9.1,
|
any.template-haskell-compat-v0208 ==0.1.9.1,
|
||||||
any.terminal-size ==0.3.2.1,
|
any.terminal-size ==0.3.3,
|
||||||
any.terminfo ==0.4.1.5,
|
any.terminfo ==0.4.1.5,
|
||||||
any.text ==1.2.5.0,
|
any.text ==1.2.5.0,
|
||||||
any.text-builder ==0.6.6.3,
|
any.text-builder ==0.6.7,
|
||||||
any.text-conversions ==0.3.1,
|
any.text-builder-dev ==0.3.3,
|
||||||
|
any.text-conversions ==0.3.1.1,
|
||||||
any.text-latin1 ==0.3.1,
|
any.text-latin1 ==0.3.1,
|
||||||
any.text-printer ==0.5.0.2,
|
any.text-printer ==0.5.0.2,
|
||||||
any.text-short ==0.1.5,
|
any.text-short ==0.1.5,
|
||||||
any.tf-random ==0.5,
|
any.tf-random ==0.5,
|
||||||
any.th-abstraction ==0.4.3.0,
|
any.th-abstraction ==0.4.5.0,
|
||||||
any.th-compat ==0.1.3,
|
any.th-compat ==0.1.4,
|
||||||
any.th-expand-syns ==0.4.9.0,
|
any.th-expand-syns ==0.4.10.0,
|
||||||
any.th-extras ==0.0.0.6,
|
any.th-extras ==0.0.0.6,
|
||||||
any.th-lift ==0.8.2,
|
any.th-lift ==0.8.2,
|
||||||
any.th-lift-instances ==0.1.19,
|
any.th-lift-instances ==0.1.20,
|
||||||
any.th-orphans ==0.13.12,
|
any.th-orphans ==0.13.14,
|
||||||
any.th-reify-many ==0.1.10,
|
any.th-reify-many ==0.1.10,
|
||||||
any.these ==1.1.1.1,
|
any.these ==1.1.1.1,
|
||||||
any.these-skinny ==0.7.5,
|
any.these-skinny ==0.7.5,
|
||||||
@ -325,19 +329,19 @@ constraints: any.Cabal ==3.6.3.0,
|
|||||||
any.time-compat ==1.9.6.1,
|
any.time-compat ==1.9.6.1,
|
||||||
any.time-locale-compat ==0.1.1.5,
|
any.time-locale-compat ==0.1.1.5,
|
||||||
any.time-manager ==0.0.0,
|
any.time-manager ==0.0.0,
|
||||||
any.tls ==1.5.7,
|
any.tls ==1.6.0,
|
||||||
any.transformers ==0.5.6.2,
|
any.transformers ==0.5.6.2,
|
||||||
any.transformers-base ==0.4.6,
|
any.transformers-base ==0.4.6,
|
||||||
any.transformers-compat ==0.6.6,
|
any.transformers-compat ==0.7.2,
|
||||||
any.type-equality ==1,
|
any.type-equality ==1,
|
||||||
any.type-hint ==0.1,
|
any.type-hint ==0.1,
|
||||||
any.typed-process ==0.2.8.0,
|
any.typed-process ==0.2.10.1,
|
||||||
any.unagi-chan ==0.4.1.4,
|
any.unagi-chan ==0.4.1.4,
|
||||||
any.unbounded-delays ==0.1.1.1,
|
any.unbounded-delays ==0.1.1.1,
|
||||||
any.unix ==2.7.2.2,
|
any.unix ==2.7.2.2,
|
||||||
any.unix-compat ==0.5.4,
|
any.unix-compat ==0.6,
|
||||||
any.unix-time ==0.4.7,
|
any.unix-time ==0.4.8,
|
||||||
any.unliftio ==0.2.21.0,
|
any.unliftio ==0.2.23.0,
|
||||||
any.unliftio-core ==0.2.0.1,
|
any.unliftio-core ==0.2.0.1,
|
||||||
any.unordered-containers ==0.2.19.1,
|
any.unordered-containers ==0.2.19.1,
|
||||||
any.uri-bytestring ==0.3.3.1,
|
any.uri-bytestring ==0.3.3.1,
|
||||||
@ -351,29 +355,29 @@ constraints: any.Cabal ==3.6.3.0,
|
|||||||
any.validity-scientific ==0.2.0.3,
|
any.validity-scientific ==0.2.0.3,
|
||||||
any.vault ==0.3.1.5,
|
any.vault ==0.3.1.5,
|
||||||
any.vector ==0.12.3.1,
|
any.vector ==0.12.3.1,
|
||||||
any.vector-algorithms ==0.8.0.4,
|
any.vector-algorithms ==0.9.0.1,
|
||||||
any.vector-instances ==3.4,
|
any.vector-instances ==3.4,
|
||||||
any.void ==0.7.3,
|
any.void ==0.7.3,
|
||||||
any.wai ==3.2.3,
|
any.wai ==3.2.3,
|
||||||
any.wai-app-static ==3.1.7.4,
|
any.wai-app-static ==3.1.7.4,
|
||||||
any.wai-extra ==3.1.8,
|
any.wai-extra ==3.1.13.0,
|
||||||
any.wai-logger ==2.4.0,
|
any.wai-logger ==2.4.0,
|
||||||
any.warp ==3.3.19,
|
any.warp ==3.3.23,
|
||||||
any.wcwidth ==0.0.2,
|
any.wcwidth ==0.0.2,
|
||||||
any.websockets ==0.12.7.3,
|
any.websockets ==0.12.7.3,
|
||||||
any.wide-word ==0.1.1.2,
|
any.wide-word ==0.1.1.2,
|
||||||
any.witch ==1.0.0.1,
|
any.witch ==1.1.2.0,
|
||||||
any.witherable ==0.4.2,
|
any.witherable ==0.4.2,
|
||||||
any.wl-pprint-annotated ==0.1.0.1,
|
any.wl-pprint-annotated ==0.1.0.1,
|
||||||
any.word8 ==0.1.3,
|
any.word8 ==0.1.3,
|
||||||
any.wreq ==0.5.3.3,
|
any.wreq ==0.5.3.3,
|
||||||
any.x509 ==1.7.6,
|
any.x509 ==1.7.7,
|
||||||
any.x509-store ==1.6.9,
|
any.x509-store ==1.6.9,
|
||||||
any.x509-system ==1.6.7,
|
any.x509-system ==1.6.7,
|
||||||
any.x509-validation ==1.6.12,
|
any.x509-validation ==1.6.12,
|
||||||
any.xml-conduit ==1.9.1.1,
|
any.xml-conduit ==1.9.1.1,
|
||||||
any.xml-lens ==0.3.1,
|
any.xml-lens ==0.3.1,
|
||||||
any.xml-types ==0.3.8,
|
any.xml-types ==0.3.8,
|
||||||
any.yaml ==0.11.7.0,
|
any.yaml ==0.11.8.0,
|
||||||
any.zlib ==0.6.2.3,
|
any.zlib ==0.6.3.0,
|
||||||
index-state: hackage.haskell.org 2022-11-09T19:03:28Z
|
index-state: hackage.haskell.org 2022-11-14T15:18:07Z
|
||||||
|
12
flake.lock
12
flake.lock
@ -2,11 +2,11 @@
|
|||||||
"nodes": {
|
"nodes": {
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1659877975,
|
"lastModified": 1667395993,
|
||||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
|
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -17,11 +17,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1664957017,
|
"lastModified": 1668504765,
|
||||||
"narHash": "sha256-beO1xAHLXXfVTAq4E/pbdt+vUMgYtOGjAUyPq81LV7c=",
|
"narHash": "sha256-53JeBXa/p1L3FCN8SftDViceKuhw9UaOWXJgG0QQ6PY=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "1237bfb999d269c46868b34bb4b33b5ff084ac5f",
|
"rev": "3586bd523f3fee68752e47f198271265bb95376b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
11
flake.nix
11
flake.nix
@ -30,16 +30,7 @@
|
|||||||
}:
|
}:
|
||||||
flake-utils.lib.eachDefaultSystem (system:
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs {
|
pkgs = import ./nix/nixpkgs.nix { inherit nixpkgs system; };
|
||||||
inherit system;
|
|
||||||
config = {
|
|
||||||
allowUnfree = true;
|
|
||||||
};
|
|
||||||
overlays = [
|
|
||||||
(import ./nix/overlays/ghc.nix)
|
|
||||||
(import ./nix/overlays/msodbcsql18.nix)
|
|
||||||
];
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
packages.graphql-parser = (pkgs.haskell.packages.${pkgs.ghcName}.callCabal2nix "graphql-parser" ./server/lib/graphql-parser-hs { }).overrideScope (
|
packages.graphql-parser = (pkgs.haskell.packages.${pkgs.ghcName}.callCabal2nix "graphql-parser" ./server/lib/graphql-parser-hs { }).overrideScope (
|
||||||
|
13
nix/nixpkgs.nix
Normal file
13
nix/nixpkgs.nix
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{ system ? builtins.currentSystem
|
||||||
|
, nixpkgs ? (builtins.getFlake (builtins.toString ../.)).inputs.nixpkgs
|
||||||
|
}:
|
||||||
|
import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
config = {
|
||||||
|
allowUnfree = true;
|
||||||
|
};
|
||||||
|
overlays = [
|
||||||
|
(import ./overlays/ghc.nix)
|
||||||
|
(import ./overlays/msodbcsql18.nix)
|
||||||
|
];
|
||||||
|
}
|
@ -2,7 +2,7 @@ self: super:
|
|||||||
let
|
let
|
||||||
versions = import ../versions.nix { pkgs = super; };
|
versions = import ../versions.nix { pkgs = super; };
|
||||||
|
|
||||||
ghcVersion = "9.2.4";
|
ghcVersion = "9.2.5";
|
||||||
ghcName = "ghc${builtins.replaceStrings ["."] [""] ghcVersion}";
|
ghcName = "ghc${builtins.replaceStrings ["."] [""] ghcVersion}";
|
||||||
ghcPatches =
|
ghcPatches =
|
||||||
if super.stdenv.targetPlatform.isDarwin
|
if super.stdenv.targetPlatform.isDarwin
|
||||||
@ -30,30 +30,21 @@ in
|
|||||||
packages = super.haskell.packages // {
|
packages = super.haskell.packages // {
|
||||||
${ghcName} = super.haskell.packages.${ghcName}.override {
|
${ghcName} = super.haskell.packages.${ghcName}.override {
|
||||||
overrides = hself: hsuper:
|
overrides = hself: hsuper:
|
||||||
if super.stdenv.targetPlatform.isDarwin
|
{
|
||||||
|
# This is due to a GHC 9.2.5 regression.
|
||||||
|
# see https://gitlab.haskell.org/ghc/ghc/-/issues/22425
|
||||||
|
ListLike = super.haskell.lib.dontCheck hsuper.ListLike;
|
||||||
|
} //
|
||||||
|
(if super.stdenv.targetPlatform.isDarwin
|
||||||
then
|
then
|
||||||
# macOS-specific overrides:
|
# macOS-specific overrides:
|
||||||
let
|
|
||||||
# Ormolu v0.5.0.1 doesn't build correctly on aarch64-darwin.
|
|
||||||
# Disabling the "fixity-th" flag seems to fix it.
|
|
||||||
# https://github.com/tweag/ormolu/issues/927
|
|
||||||
fixOrmolu = p: super.lib.pipe p [
|
|
||||||
(super.haskell.lib.compose.addExtraLibrary hself.file-embed)
|
|
||||||
(super.haskell.lib.compose.disableCabalFlag "fixity-th")
|
|
||||||
];
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
# On aarch64-darwin, this creates a cycle for some reason; didn't look too much into it.
|
# On aarch64-darwin, this creates a cycle for some reason; didn't look too much into it.
|
||||||
ghcid = super.haskell.lib.overrideCabal hsuper.ghcid (drv: { enableSeparateBinOutput = false; });
|
ghcid = super.haskell.lib.overrideCabal hsuper.ghcid (drv: { enableSeparateBinOutput = false; });
|
||||||
# See above.
|
|
||||||
ormolu = hself.ormolu_0_5_0_1;
|
|
||||||
ormolu_0_5_0_1 = fixOrmolu hsuper.ormolu_0_5_0_1;
|
|
||||||
fourmolu = hself.fourmolu_0_8_2_0;
|
|
||||||
fourmolu_0_8_2_0 = fixOrmolu hsuper.fourmolu_0_8_2_0;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
# We don't need to override anything on Linux:
|
# We don't need to override anything on Linux:
|
||||||
{ };
|
{ });
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -44,6 +44,7 @@ fi
|
|||||||
declare -A PACKAGE_TARGETS
|
declare -A PACKAGE_TARGETS
|
||||||
SKIP_UPDATE=false
|
SKIP_UPDATE=false
|
||||||
UPGRADE_ALL=false
|
UPGRADE_ALL=false
|
||||||
|
KEEP_TRYING=true
|
||||||
|
|
||||||
if [[ $# -eq 0 ]]; then
|
if [[ $# -eq 0 ]]; then
|
||||||
echo_error "expecting at least one argument"
|
echo_error "expecting at least one argument"
|
||||||
@ -55,6 +56,7 @@ while [[ $# -gt 0 ]]; do
|
|||||||
case $1 in
|
case $1 in
|
||||||
--normalize)
|
--normalize)
|
||||||
SKIP_UPDATE=true
|
SKIP_UPDATE=true
|
||||||
|
KEEP_TRYING=false
|
||||||
shift # past argument
|
shift # past argument
|
||||||
;;
|
;;
|
||||||
--all)
|
--all)
|
||||||
@ -107,54 +109,52 @@ else
|
|||||||
sed -i "\$s/\$/ $package_name ==$package_version,/" "$FREEZE_FILE"
|
sed -i "\$s/\$/ $package_name ==$package_version,/" "$FREEZE_FILE"
|
||||||
done
|
done
|
||||||
|
|
||||||
freeze_line_count_orig=$(wc -l "$FREEZE_FILE" | awk '{print $1}')
|
if "$KEEP_TRYING"; then
|
||||||
freeze_line_count_prev=$freeze_line_count_orig # mutable
|
freeze_line_count_orig=$(wc -l "$FREEZE_FILE" | awk '{print $1}')
|
||||||
while : ; do
|
freeze_line_count_prev=$freeze_line_count_orig # mutable
|
||||||
if out=$(cabal freeze --enable-tests --enable-benchmarks --minimize-conflict-set 2>&1); then
|
while : ; do
|
||||||
break
|
if out=$(cabal freeze --enable-tests --enable-benchmarks --minimize-conflict-set 2>&1); then
|
||||||
else
|
break
|
||||||
# newline-separated:
|
|
||||||
conflict_set=$(echo "$out" | tr '\n' ' ' | sed -r 's/^.*conflict set: ([^\)]+)\).*$/\1/' | tr ',' '\n' | tr -d ' ')
|
|
||||||
if [ -z "$conflict_set" ]; then
|
|
||||||
echo_error "Something went wrong :/"
|
|
||||||
exit 77
|
|
||||||
fi
|
|
||||||
# omit target packages:
|
|
||||||
for package_name in "${!PACKAGE_TARGETS[@]}"; do
|
|
||||||
conflict_set=$(echo "$conflict_set" | sed "/^$package_name$/d")
|
|
||||||
done
|
|
||||||
# filter conflicts from the freeze file
|
|
||||||
while IFS= read -r package_name; do
|
|
||||||
sed -ri "/\s+any.$package_name ==/d" "$FREEZE_FILE"
|
|
||||||
sed -ri "/\s+$package_name /d" "$FREEZE_FILE" # baked in flags
|
|
||||||
done <<< "$conflict_set"
|
|
||||||
|
|
||||||
freeze_line_count=$(wc -l "$FREEZE_FILE" | awk '{print $1}')
|
|
||||||
if [ "$freeze_line_count" -eq "$freeze_line_count_prev" ]; then
|
|
||||||
# No longer making progress, so...
|
|
||||||
echo_error "It looks like we can't find a build plan :("
|
|
||||||
echo_error "With the freeze file in its current state, try doing:"
|
|
||||||
echo_error " $ cabal freeze --enable-tests --enable-benchmarks --minimize-conflict-set"
|
|
||||||
echo_error "Exiting"
|
|
||||||
exit 31
|
|
||||||
else
|
else
|
||||||
echo -ne "Relaxed $((freeze_line_count_orig-freeze_line_count)) constraints so far...\r"
|
# newline-separated:
|
||||||
freeze_line_count_prev=$freeze_line_count
|
conflict_set=$(echo "$out" | tr '\n' ' ' | sed -r 's/^.*conflict set: ([^\)]+)\).*$/\1/' | tr ',' '\n' | tr -d ' ')
|
||||||
# ...and try again
|
if [ -z "$conflict_set" ]; then
|
||||||
|
echo_error "Something went wrong :/"
|
||||||
|
exit 77
|
||||||
|
fi
|
||||||
|
# omit target packages:
|
||||||
|
for package_name in "${!PACKAGE_TARGETS[@]}"; do
|
||||||
|
conflict_set=$(echo "$conflict_set" | sed "/^$package_name$/d")
|
||||||
|
done
|
||||||
|
# filter conflicts from the freeze file
|
||||||
|
while IFS= read -r package_name; do
|
||||||
|
sed -ri "/\s+any.$package_name ==/d" "$FREEZE_FILE"
|
||||||
|
sed -ri "/\s+$package_name /d" "$FREEZE_FILE" # baked in flags
|
||||||
|
done <<< "$conflict_set"
|
||||||
|
|
||||||
|
freeze_line_count=$(wc -l "$FREEZE_FILE" | awk '{print $1}')
|
||||||
|
if [ "$freeze_line_count" -eq "$freeze_line_count_prev" ]; then
|
||||||
|
# No longer making progress, so...
|
||||||
|
echo_error "It looks like we can't find a build plan :("
|
||||||
|
echo_error "With the freeze file in its current state, try doing:"
|
||||||
|
echo_error " $ cabal freeze --enable-tests --enable-benchmarks --minimize-conflict-set"
|
||||||
|
echo_error "Exiting"
|
||||||
|
exit 31
|
||||||
|
else
|
||||||
|
echo -ne "Relaxed $((freeze_line_count_orig-freeze_line_count)) constraints so far...\r"
|
||||||
|
freeze_line_count_prev=$freeze_line_count
|
||||||
|
# ...and try again
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
done
|
||||||
done
|
else
|
||||||
|
cabal freeze --enable-tests --enable-benchmarks --minimize-conflict-set
|
||||||
|
fi
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
### Finally do a little cleanup/normalizing:
|
### Finally do a little cleanup/normalizing:
|
||||||
|
|
||||||
# Be a little more liberal with GHC, as we use a patched version on CI with
|
|
||||||
# performance improvements.
|
|
||||||
GHC_VERSION="$(jq -r '.ghc' ./server/VERSIONS.json)"
|
|
||||||
LIBERAL_GHC_VERSION="$(sed -r 's/[0-9]+$/\*/' <<< "$GHC_VERSION")"
|
|
||||||
sed -ri "s/(\sany\.ghc[^ ]* ==)${GHC_VERSION},$/\1${LIBERAL_GHC_VERSION},/" "$FREEZE_FILE"
|
|
||||||
|
|
||||||
# Remove graphql engine internal mono-repo packages. This doesn't matter unless
|
# Remove graphql engine internal mono-repo packages. This doesn't matter unless
|
||||||
# we happen to bump the version number in one of our cabal files.
|
# we happen to bump the version number in one of our cabal files.
|
||||||
sed -ri "/\s+graphql-engine/d" "$FREEZE_FILE"
|
sed -ri "/\s+graphql-engine/d" "$FREEZE_FILE"
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
# Compile a graphql-engine executable using brew and ghc-9.2.4
|
# Compile a graphql-engine executable using brew and ghc-9.2.5
|
||||||
|
|
||||||
*Note: These instructions use the path `/opt/homebrew` in various places, but this path may be different on your machine depending on where you have installed homebrew (for example, many older homebrew installation were installed to `/usr/local`). You can find out the path of your homebrew installation by running the command `brew --prefix`, and if the output is not `/opt/homebrew`, then you should replace any instances of `/opt/homebrew` in these instructions with the path output by `brew --prefix`.*
|
*Note: These instructions use the path `/opt/homebrew` in various places, but this path may be different on your machine depending on where you have installed homebrew (for example, many older homebrew installation were installed to `/usr/local`). You can find out the path of your homebrew installation by running the command `brew --prefix`, and if the output is not `/opt/homebrew`, then you should replace any instances of `/opt/homebrew` in these instructions with the path output by `brew --prefix`.*
|
||||||
|
|
||||||
1. Install ghc-9.2.4 and cabal-install via [ghcup](https://www.haskell.org/ghcup/).
|
1. Install ghc-9.2.5 and cabal-install via [ghcup](https://www.haskell.org/ghcup/).
|
||||||
|
|
||||||
2. Install dependencies:
|
2. Install dependencies:
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ This guide explains how to set up the graphql-engine server for development on y
|
|||||||
|
|
||||||
## Pre-requisites
|
## Pre-requisites
|
||||||
|
|
||||||
- [GHC](https://www.haskell.org/ghc/) 9.2.4 and [cabal-install](https://cabal.readthedocs.io/en/latest/)
|
- [GHC](https://www.haskell.org/ghc/) 9.2.5 and [cabal-install](https://cabal.readthedocs.io/en/latest/)
|
||||||
- There are various ways these can be installed, but [ghcup](https://www.haskell.org/ghcup/) is a good choice if you’re not sure.
|
- There are various ways these can be installed, but [ghcup](https://www.haskell.org/ghcup/) is a good choice if you’re not sure.
|
||||||
- There are few system packages required like `libpq-dev`, `libssl-dev`, etc. The best place to get the entire list is from the [Dockerfile](../packaging/graphql-engine-base/ubuntu.dockerfile)
|
- There are few system packages required like `libpq-dev`, `libssl-dev`, etc. The best place to get the entire list is from the [Dockerfile](../packaging/graphql-engine-base/ubuntu.dockerfile)
|
||||||
- Additional Haskell tools (expected versions can be found in _VERSIONS.json_):
|
- Additional Haskell tools (expected versions can be found in _VERSIONS.json_):
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"ghc": "9.2.4",
|
"ghc": "9.2.5",
|
||||||
"hlint": "3.4.1",
|
"hlint": "3.4.1",
|
||||||
"hpack": "0.34.7",
|
"hpack": "0.34.7",
|
||||||
"ormolu": "0.5.0.1"
|
"ormolu": "0.5.0.1"
|
||||||
|
@ -180,7 +180,7 @@ selectionSet name desc fields = selectionSetObject name desc fields []
|
|||||||
|
|
||||||
safeSelectionSet ::
|
safeSelectionSet ::
|
||||||
forall n m origin a.
|
forall n m origin a.
|
||||||
(MonadError ErrorMessage n, MonadParse m, Eq origin, Hashable origin, ToErrorValue origin) =>
|
(MonadError ErrorMessage n, MonadParse m, Hashable origin, ToErrorValue origin) =>
|
||||||
Name ->
|
Name ->
|
||||||
Maybe Description ->
|
Maybe Description ->
|
||||||
[FieldParser origin m a] ->
|
[FieldParser origin m a] ->
|
||||||
|
@ -72,13 +72,13 @@ graphQLValueCodec varCodec =
|
|||||||
|
|
||||||
-- | Serializes a hash set by converting it to a list. This matches the FromJSON
|
-- | Serializes a hash set by converting it to a list. This matches the FromJSON
|
||||||
-- and ToJSON instances in aeson.
|
-- and ToJSON instances in aeson.
|
||||||
hashSetCodec :: (Eq a, Hashable a, HasCodec a) => JSONCodec (HashSet a)
|
hashSetCodec :: (Hashable a, HasCodec a) => JSONCodec (HashSet a)
|
||||||
hashSetCodec = hashSetCodecWith codec
|
hashSetCodec = hashSetCodecWith codec
|
||||||
|
|
||||||
-- | Serializes a hash set by converting it to a list. This matches the FromJSON
|
-- | Serializes a hash set by converting it to a list. This matches the FromJSON
|
||||||
-- and ToJSON instances in aeson. This version accepts a codec for individual
|
-- and ToJSON instances in aeson. This version accepts a codec for individual
|
||||||
-- set values as an argument.
|
-- set values as an argument.
|
||||||
hashSetCodecWith :: (Eq a, Hashable a) => JSONCodec a -> JSONCodec (HashSet a)
|
hashSetCodecWith :: Hashable a => JSONCodec a -> JSONCodec (HashSet a)
|
||||||
hashSetCodecWith elemCodec =
|
hashSetCodecWith elemCodec =
|
||||||
dimapCodec HashSet.fromList HashSet.toList $
|
dimapCodec HashSet.fromList HashSet.toList $
|
||||||
listCodec elemCodec
|
listCodec elemCodec
|
||||||
|
@ -120,7 +120,7 @@ instance MonadState s m => MonadState s (CircularT k v m) where
|
|||||||
put x = lift $ put x
|
put x = lift $ put x
|
||||||
|
|
||||||
-- | Runs a computation in 'CircularT'.
|
-- | Runs a computation in 'CircularT'.
|
||||||
runCircularT :: (Eq k, Hashable k, MonadFix m) => CircularT k v m a -> m a
|
runCircularT :: (Hashable k, MonadFix m) => CircularT k v m a -> m a
|
||||||
runCircularT (CircularT m) = evalStateT m mempty
|
runCircularT (CircularT m) = evalStateT m mempty
|
||||||
|
|
||||||
-- | Cache a computation under a given key.
|
-- | Cache a computation under a given key.
|
||||||
@ -129,7 +129,7 @@ runCircularT (CircularT m) = evalStateT m mempty
|
|||||||
-- type @v@, return an action that builds said value @v@ but that prevents
|
-- type @v@, return an action that builds said value @v@ but that prevents
|
||||||
-- cycles by looking into and populating a stateful cache.
|
-- cycles by looking into and populating a stateful cache.
|
||||||
withCircular ::
|
withCircular ::
|
||||||
(Eq k, Hashable k, MonadFix m) =>
|
(Hashable k, MonadFix m) =>
|
||||||
k ->
|
k ->
|
||||||
CircularT k v m v ->
|
CircularT k v m v ->
|
||||||
CircularT k v m v
|
CircularT k v m v
|
||||||
|
@ -25,7 +25,7 @@ import Data.List qualified as L
|
|||||||
import Data.List.NonEmpty (NonEmpty (..))
|
import Data.List.NonEmpty (NonEmpty (..))
|
||||||
import Prelude
|
import Prelude
|
||||||
|
|
||||||
fromListOn :: (Eq k, Hashable k) => (v -> k) -> [v] -> HashMap k v
|
fromListOn :: Hashable k => (v -> k) -> [v] -> HashMap k v
|
||||||
fromListOn f = M.fromList . Prelude.map (\v -> (f v, v))
|
fromListOn f = M.fromList . Prelude.map (\v -> (f v, v))
|
||||||
|
|
||||||
-- | Given a 'Foldable' sequence of values and a function that extracts a key from each value,
|
-- | Given a 'Foldable' sequence of values and a function that extracts a key from each value,
|
||||||
@ -34,22 +34,22 @@ fromListOn f = M.fromList . Prelude.map (\v -> (f v, v))
|
|||||||
--
|
--
|
||||||
-- >>> groupOn (take 1) ["foo", "bar", "baz"]
|
-- >>> groupOn (take 1) ["foo", "bar", "baz"]
|
||||||
-- fromList [("f", ["foo"]), ("b", ["bar", "baz"])]
|
-- fromList [("f", ["foo"]), ("b", ["bar", "baz"])]
|
||||||
groupOn :: (Eq k, Hashable k, Foldable t) => (v -> k) -> t v -> HashMap k [v]
|
groupOn :: (Hashable k, Foldable t) => (v -> k) -> t v -> HashMap k [v]
|
||||||
groupOn f = fmap F.toList . groupOnNE f
|
groupOn f = fmap F.toList . groupOnNE f
|
||||||
|
|
||||||
groupOnNE ::
|
groupOnNE ::
|
||||||
(Eq k, Hashable k, Foldable t) => (v -> k) -> t v -> HashMap k (NonEmpty v)
|
(Hashable k, Foldable t) => (v -> k) -> t v -> HashMap k (NonEmpty v)
|
||||||
groupOnNE f =
|
groupOnNE f =
|
||||||
Prelude.foldr
|
Prelude.foldr
|
||||||
(\v -> M.alter (Just . (v :|) . maybe [] F.toList) (f v))
|
(\v -> M.alter (Just . (v :|) . maybe [] F.toList) (f v))
|
||||||
M.empty
|
M.empty
|
||||||
|
|
||||||
differenceOn ::
|
differenceOn ::
|
||||||
(Eq k, Hashable k, Foldable t) => (v -> k) -> t v -> t v -> HashMap k v
|
(Hashable k, Foldable t) => (v -> k) -> t v -> t v -> HashMap k v
|
||||||
differenceOn f = M.difference `on` (fromListOn f . F.toList)
|
differenceOn f = M.difference `on` (fromListOn f . F.toList)
|
||||||
|
|
||||||
-- | Monadic version of https://hackage.haskell.org/package/unordered-containers-0.2.18.0/docs/Data-HashMap-Internal.html#v:insertWith
|
-- | Monadic version of https://hackage.haskell.org/package/unordered-containers-0.2.18.0/docs/Data-HashMap-Internal.html#v:insertWith
|
||||||
insertWithM :: (Monad m, Hashable k, Eq k) => (v -> v -> m v) -> k -> v -> HashMap k v -> m (HashMap k v)
|
insertWithM :: (Monad m, Hashable k) => (v -> v -> m v) -> k -> v -> HashMap k v -> m (HashMap k v)
|
||||||
insertWithM f k v m =
|
insertWithM f k v m =
|
||||||
sequence $
|
sequence $
|
||||||
M.insertWith
|
M.insertWith
|
||||||
@ -69,12 +69,12 @@ insertWithM f k v m =
|
|||||||
-- 1. @∀ key ∈ A. A[key] ∈ B ∧ B[A[key]] == key@
|
-- 1. @∀ key ∈ A. A[key] ∈ B ∧ B[A[key]] == key@
|
||||||
-- 2. @∀ key ∈ B. B[key] ∈ A ∧ A[B[key]] == key@
|
-- 2. @∀ key ∈ B. B[key] ∈ A ∧ A[B[key]] == key@
|
||||||
isInverseOf ::
|
isInverseOf ::
|
||||||
(Eq k, Hashable k, Eq v, Hashable v) => HashMap k v -> HashMap v k -> Bool
|
(Hashable k, Hashable v) => HashMap k v -> HashMap v k -> Bool
|
||||||
lhs `isInverseOf` rhs = lhs `invertedBy` rhs && rhs `invertedBy` lhs
|
lhs `isInverseOf` rhs = lhs `invertedBy` rhs && rhs `invertedBy` lhs
|
||||||
where
|
where
|
||||||
invertedBy ::
|
invertedBy ::
|
||||||
forall s t.
|
forall s t.
|
||||||
(Eq s, Eq t, Hashable t) =>
|
(Eq s, Hashable t) =>
|
||||||
HashMap s t ->
|
HashMap s t ->
|
||||||
HashMap t s ->
|
HashMap t s ->
|
||||||
Bool
|
Bool
|
||||||
@ -88,7 +88,7 @@ lhs `isInverseOf` rhs = lhs `invertedBy` rhs && rhs `invertedBy` lhs
|
|||||||
-- used to compute the result. Unlike 'unionWith', 'unionWithM' performs the
|
-- used to compute the result. Unlike 'unionWith', 'unionWithM' performs the
|
||||||
-- computation in an arbitratry monad.
|
-- computation in an arbitratry monad.
|
||||||
unionWithM ::
|
unionWithM ::
|
||||||
(Monad m, Eq k, Hashable k) =>
|
(Monad m, Hashable k) =>
|
||||||
(k -> v -> v -> m v) ->
|
(k -> v -> v -> m v) ->
|
||||||
HashMap k v ->
|
HashMap k v ->
|
||||||
HashMap k v ->
|
HashMap k v ->
|
||||||
@ -103,17 +103,17 @@ unionWithM f m1 m2 = foldM step m1 (M.toList m2)
|
|||||||
|
|
||||||
-- | Like 'M.unions', but keeping all elements in the result.
|
-- | Like 'M.unions', but keeping all elements in the result.
|
||||||
unionsAll ::
|
unionsAll ::
|
||||||
(Eq k, Hashable k, Foldable t) => t (HashMap k v) -> HashMap k (NonEmpty v)
|
(Hashable k, Foldable t) => t (HashMap k v) -> HashMap k (NonEmpty v)
|
||||||
unionsAll = F.foldl' (\a b -> M.unionWith (<>) a (fmap (:| []) b)) M.empty
|
unionsAll = F.foldl' (\a b -> M.unionWith (<>) a (fmap (:| []) b)) M.empty
|
||||||
|
|
||||||
-- | Like 'M.unions', but combining elements
|
-- | Like 'M.unions', but combining elements
|
||||||
unionsWith ::
|
unionsWith ::
|
||||||
(Eq k, Hashable k, Foldable t) => (v -> v -> v) -> t (HashMap k v) -> HashMap k v
|
(Hashable k, Foldable t) => (v -> v -> v) -> t (HashMap k v) -> HashMap k v
|
||||||
unionsWith f = F.foldl' (M.unionWith f) M.empty
|
unionsWith f = F.foldl' (M.unionWith f) M.empty
|
||||||
|
|
||||||
-- | Homogenise maps, such that all maps range over the full set of
|
-- | Homogenise maps, such that all maps range over the full set of
|
||||||
-- keys, inserting a default value as needed.
|
-- keys, inserting a default value as needed.
|
||||||
homogenise :: (Hashable a, Eq a) => b -> [HashMap a b] -> (HashSet a, [HashMap a b])
|
homogenise :: Hashable a => b -> [HashMap a b] -> (HashSet a, [HashMap a b])
|
||||||
homogenise defaultValue maps =
|
homogenise defaultValue maps =
|
||||||
let ks = S.unions $ L.map M.keysSet maps
|
let ks = S.unions $ L.map M.keysSet maps
|
||||||
defaults = M.fromList [(k, defaultValue) | k <- S.toList ks]
|
defaults = M.fromList [(k, defaultValue) | k <- S.toList ks]
|
||||||
|
@ -17,7 +17,7 @@ instance Filterable (OMap.InsOrdHashMap k) where
|
|||||||
mapMaybe = OMap.mapMaybe
|
mapMaybe = OMap.mapMaybe
|
||||||
filter = OMap.filter
|
filter = OMap.filter
|
||||||
|
|
||||||
partition :: (Eq k, Hashable k) => (v -> Bool) -> OMap.InsOrdHashMap k v -> (OMap.InsOrdHashMap k v, OMap.InsOrdHashMap k v)
|
partition :: Hashable k => (v -> Bool) -> OMap.InsOrdHashMap k v -> (OMap.InsOrdHashMap k v, OMap.InsOrdHashMap k v)
|
||||||
partition predicate =
|
partition predicate =
|
||||||
OMap.foldlWithKey'
|
OMap.foldlWithKey'
|
||||||
( \(left, right) key val ->
|
( \(left, right) key val ->
|
||||||
@ -30,7 +30,7 @@ partition predicate =
|
|||||||
-- | Alter a hashmap using a function that can fail, in which case the entire operation fails.
|
-- | Alter a hashmap using a function that can fail, in which case the entire operation fails.
|
||||||
-- (Maybe a version with the key also being passed to the function could be useful.)
|
-- (Maybe a version with the key also being passed to the function could be useful.)
|
||||||
alterF ::
|
alterF ::
|
||||||
(Functor f, Eq k, Hashable k) =>
|
(Functor f, Hashable k) =>
|
||||||
(Maybe v -> f (Maybe v)) ->
|
(Maybe v -> f (Maybe v)) ->
|
||||||
k ->
|
k ->
|
||||||
InsOrdHashMap k v ->
|
InsOrdHashMap k v ->
|
||||||
|
@ -33,10 +33,10 @@ newtype MultiMap k v = MultiMap
|
|||||||
}
|
}
|
||||||
deriving newtype (Eq, Show, ToJSON)
|
deriving newtype (Eq, Show, ToJSON)
|
||||||
|
|
||||||
instance (Eq k, Hashable k, Ord v) => Semigroup (MultiMap k v) where
|
instance (Hashable k, Ord v) => Semigroup (MultiMap k v) where
|
||||||
MultiMap m0 <> MultiMap m1 = MultiMap $ M.unionWith S.union m0 m1
|
MultiMap m0 <> MultiMap m1 = MultiMap $ M.unionWith S.union m0 m1
|
||||||
|
|
||||||
instance (Eq k, Hashable k, Ord v) => Monoid (MultiMap k v) where
|
instance (Hashable k, Ord v) => Monoid (MultiMap k v) where
|
||||||
mempty = MultiMap mempty
|
mempty = MultiMap mempty
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
@ -59,7 +59,7 @@ toMap = unMultiMap
|
|||||||
-- If the provided list constains duplicate mappings, the resulting
|
-- If the provided list constains duplicate mappings, the resulting
|
||||||
-- 'MultiMap' will store the set of all mapped values for each
|
-- 'MultiMap' will store the set of all mapped values for each
|
||||||
-- duplicate key.
|
-- duplicate key.
|
||||||
fromList :: (Eq k, Hashable k, Ord v) => [(k, v)] -> MultiMap k v
|
fromList :: (Hashable k, Ord v) => [(k, v)] -> MultiMap k v
|
||||||
fromList l = MultiMap $ M.fromListWith (S.union) $ map (fmap S.singleton) l
|
fromList l = MultiMap $ M.fromListWith (S.union) $ map (fmap S.singleton) l
|
||||||
|
|
||||||
-- | Creates an association list from a 'MultiMap'.
|
-- | Creates an association list from a 'MultiMap'.
|
||||||
@ -73,14 +73,14 @@ toList (MultiMap m) = M.toList $ fmap (S.toList) m
|
|||||||
|
|
||||||
-- | Return the value to which the specified key is mapped, or 'Nothing' if
|
-- | Return the value to which the specified key is mapped, or 'Nothing' if
|
||||||
-- this map contains no mapping for the key.
|
-- this map contains no mapping for the key.
|
||||||
lookup :: (Eq k, Hashable k) => k -> MultiMap k v -> S.Set v
|
lookup :: Hashable k => k -> MultiMap k v -> S.Set v
|
||||||
lookup k (MultiMap m) = fromMaybe S.empty $ M.lookup k m
|
lookup k (MultiMap m) = fromMaybe S.empty $ M.lookup k m
|
||||||
|
|
||||||
-- | Associate the specified value with the specified key in this map.
|
-- | Associate the specified value with the specified key in this map.
|
||||||
--
|
--
|
||||||
-- If this map previously contained a mapping for the key, the new value is
|
-- If this map previously contained a mapping for the key, the new value is
|
||||||
-- inserted in the set, and does not replace the previous mapping.
|
-- inserted in the set, and does not replace the previous mapping.
|
||||||
insert :: (Eq k, Hashable k, Ord v) => k -> v -> MultiMap k v -> MultiMap k v
|
insert :: (Hashable k, Ord v) => k -> v -> MultiMap k v -> MultiMap k v
|
||||||
insert k v (MultiMap m) = MultiMap $ M.insertWith (S.union) k (S.singleton v) m
|
insert k v (MultiMap m) = MultiMap $ M.insertWith (S.union) k (S.singleton v) m
|
||||||
|
|
||||||
-- | Returns a list of this map's keys.
|
-- | Returns a list of this map's keys.
|
||||||
|
@ -66,12 +66,12 @@ fromHashMap m
|
|||||||
-- * if the provided list contains duplicate mappings, the later mappings take
|
-- * if the provided list contains duplicate mappings, the later mappings take
|
||||||
-- precedence;
|
-- precedence;
|
||||||
-- * if the provided list is empty, returns 'Nothing'.
|
-- * if the provided list is empty, returns 'Nothing'.
|
||||||
fromList :: (Eq k, Hashable k) => [(k, v)] -> Maybe (NEHashMap k v)
|
fromList :: Hashable k => [(k, v)] -> Maybe (NEHashMap k v)
|
||||||
fromList [] = Nothing
|
fromList [] = Nothing
|
||||||
fromList v = Just $ NEHashMap $ M.fromList v
|
fromList v = Just $ NEHashMap $ M.fromList v
|
||||||
|
|
||||||
-- | A variant of 'fromList' that uses 'NonEmpty' inputs.
|
-- | A variant of 'fromList' that uses 'NonEmpty' inputs.
|
||||||
fromNonEmpty :: (Eq k, Hashable k) => NonEmpty (k, v) -> NEHashMap k v
|
fromNonEmpty :: Hashable k => NonEmpty (k, v) -> NEHashMap k v
|
||||||
fromNonEmpty (x NE.:| xs) = NEHashMap (M.fromList (x : xs))
|
fromNonEmpty (x NE.:| xs) = NEHashMap (M.fromList (x : xs))
|
||||||
|
|
||||||
-- | Convert a non-empty map to a 'HashMap'.
|
-- | Convert a non-empty map to a 'HashMap'.
|
||||||
@ -91,14 +91,14 @@ toList = M.toList . unNEHashMap
|
|||||||
|
|
||||||
-- | Return the value to which the specified key is mapped, or 'Nothing' if
|
-- | Return the value to which the specified key is mapped, or 'Nothing' if
|
||||||
-- this map contains no mapping for the key.
|
-- this map contains no mapping for the key.
|
||||||
lookup :: (Eq k, Hashable k) => k -> NEHashMap k v -> Maybe v
|
lookup :: Hashable k => k -> NEHashMap k v -> Maybe v
|
||||||
lookup k (NEHashMap m) = M.lookup k m
|
lookup k (NEHashMap m) = M.lookup k m
|
||||||
|
|
||||||
-- | Return the value to which the specified key is mapped, or 'Nothing' if
|
-- | Return the value to which the specified key is mapped, or 'Nothing' if
|
||||||
-- this map contains no mapping for the key.
|
-- this map contains no mapping for the key.
|
||||||
--
|
--
|
||||||
-- This is a flipped version of 'lookup'.
|
-- This is a flipped version of 'lookup'.
|
||||||
(!?) :: (Eq k, Hashable k) => NEHashMap k v -> k -> Maybe v
|
(!?) :: Hashable k => NEHashMap k v -> k -> Maybe v
|
||||||
(!?) = flip lookup
|
(!?) = flip lookup
|
||||||
|
|
||||||
-- | Return a list of this map's keys.
|
-- | Return a list of this map's keys.
|
||||||
@ -111,14 +111,14 @@ keys = M.keys . unNEHashMap
|
|||||||
--
|
--
|
||||||
-- If a key occurs in both maps, the left map @m1@ (first argument) will be
|
-- If a key occurs in both maps, the left map @m1@ (first argument) will be
|
||||||
-- preferred.
|
-- preferred.
|
||||||
union :: (Eq k, Hashable k) => NEHashMap k v -> NEHashMap k v -> NEHashMap k v
|
union :: Hashable k => NEHashMap k v -> NEHashMap k v -> NEHashMap k v
|
||||||
union (NEHashMap m1) (NEHashMap m2) = NEHashMap $ M.union m1 m2
|
union (NEHashMap m1) (NEHashMap m2) = NEHashMap $ M.union m1 m2
|
||||||
|
|
||||||
-- | The union of two maps using a given value-wise union function.
|
-- | The union of two maps using a given value-wise union function.
|
||||||
--
|
--
|
||||||
-- If a key occurs in both maps, the provided function (first argument) will be
|
-- If a key occurs in both maps, the provided function (first argument) will be
|
||||||
-- used to compute the result.
|
-- used to compute the result.
|
||||||
unionWith :: (Eq k, Hashable k) => (v -> v -> v) -> NEHashMap k v -> NEHashMap k v -> NEHashMap k v
|
unionWith :: Hashable k => (v -> v -> v) -> NEHashMap k v -> NEHashMap k v -> NEHashMap k v
|
||||||
unionWith fun (NEHashMap m1) (NEHashMap m2) = NEHashMap $ M.unionWith fun m1 m2
|
unionWith fun (NEHashMap m1) (NEHashMap m2) = NEHashMap $ M.unionWith fun m1 m2
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
@ -128,7 +128,7 @@ unionWith fun (NEHashMap m1) (NEHashMap m2) = NEHashMap $ M.unionWith fun m1 m2
|
|||||||
-- The size of the result may be smaller if f maps two or more distinct keys to
|
-- The size of the result may be smaller if f maps two or more distinct keys to
|
||||||
-- the same new key. In this case there is no guarantee which of the associated
|
-- the same new key. In this case there is no guarantee which of the associated
|
||||||
-- values is chosen for the conflicting key.
|
-- values is chosen for the conflicting key.
|
||||||
mapKeys :: (Eq k2, Hashable k2) => (k1 -> k2) -> NEHashMap k1 v -> NEHashMap k2 v
|
mapKeys :: Hashable k2 => (k1 -> k2) -> NEHashMap k1 v -> NEHashMap k2 v
|
||||||
mapKeys fun (NEHashMap m) = NEHashMap $ M.mapKeys fun m
|
mapKeys fun (NEHashMap m) = NEHashMap $ M.mapKeys fun m
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
@ -140,5 +140,5 @@ mapKeys fun (NEHashMap m) = NEHashMap $ M.mapKeys fun m
|
|||||||
-- 1. @∀ key ∈ A. A[key] ∈ B ∧ B[A[key]] == key@
|
-- 1. @∀ key ∈ A. A[key] ∈ B ∧ B[A[key]] == key@
|
||||||
-- 2. @∀ key ∈ B. B[key] ∈ A ∧ A[B[key]] == key@
|
-- 2. @∀ key ∈ B. B[key] ∈ A ∧ A[B[key]] == key@
|
||||||
isInverseOf ::
|
isInverseOf ::
|
||||||
(Eq k, Hashable k, Eq v, Hashable v) => NEHashMap k v -> NEHashMap v k -> Bool
|
(Hashable k, Hashable v) => NEHashMap k v -> NEHashMap v k -> Bool
|
||||||
lhs `isInverseOf` rhs = toHashMap lhs `Extended.isInverseOf` toHashMap rhs
|
lhs `isInverseOf` rhs = toHashMap lhs `Extended.isInverseOf` toHashMap rhs
|
||||||
|
@ -19,7 +19,7 @@ import Data.List qualified as L
|
|||||||
import Data.List.NonEmpty qualified as NE
|
import Data.List.NonEmpty qualified as NE
|
||||||
import Prelude
|
import Prelude
|
||||||
|
|
||||||
duplicates :: (Eq a, Hashable a) => [a] -> Set.HashSet a
|
duplicates :: Hashable a => [a] -> Set.HashSet a
|
||||||
duplicates =
|
duplicates =
|
||||||
Set.fromList . Map.keys . Map.filter (> 1) . Map.fromListWith (+) . map (,1 :: Int)
|
Set.fromList . Map.keys . Map.filter (> 1) . Map.fromListWith (+) . map (,1 :: Int)
|
||||||
|
|
||||||
@ -30,13 +30,13 @@ duplicates =
|
|||||||
uniques :: (Ord a) => [a] -> [a]
|
uniques :: (Ord a) => [a] -> [a]
|
||||||
uniques = nubOrd
|
uniques = nubOrd
|
||||||
|
|
||||||
getDifference :: (Eq a, Hashable a) => [a] -> [a] -> Set.HashSet a
|
getDifference :: Hashable a => [a] -> [a] -> Set.HashSet a
|
||||||
getDifference = Set.difference `on` Set.fromList
|
getDifference = Set.difference `on` Set.fromList
|
||||||
|
|
||||||
getDifferenceOn :: (Eq k, Hashable k) => (v -> k) -> [v] -> [v] -> [v]
|
getDifferenceOn :: Hashable k => (v -> k) -> [v] -> [v] -> [v]
|
||||||
getDifferenceOn f l = Map.elems . Map.differenceOn f l
|
getDifferenceOn f l = Map.elems . Map.differenceOn f l
|
||||||
|
|
||||||
getOverlapWith :: (Eq k, Hashable k) => (v -> k) -> [v] -> [v] -> [(v, v)]
|
getOverlapWith :: Hashable k => (v -> k) -> [v] -> [v] -> [(v, v)]
|
||||||
getOverlapWith getKey left right =
|
getOverlapWith getKey left right =
|
||||||
Map.elems $ Map.intersectionWith (,) (mkMap left) (mkMap right)
|
Map.elems $ Map.intersectionWith (,) (mkMap left) (mkMap right)
|
||||||
where
|
where
|
||||||
|
@ -34,10 +34,10 @@ data Trie k v = Trie
|
|||||||
-- The resulting 'Trie' will contain all paths present in either tries. If both
|
-- The resulting 'Trie' will contain all paths present in either tries. If both
|
||||||
-- tries contain a value at a given path, we use the value's semigroup instance
|
-- tries contain a value at a given path, we use the value's semigroup instance
|
||||||
-- to compute the resulting value.
|
-- to compute the resulting value.
|
||||||
instance (Eq k, Hashable k, Semigroup v) => Semigroup (Trie k v) where
|
instance (Hashable k, Semigroup v) => Semigroup (Trie k v) where
|
||||||
Trie m0 v0 <> Trie m1 v1 = Trie (M.unionWith (<>) m0 m1) (v0 <> v1)
|
Trie m0 v0 <> Trie m1 v1 = Trie (M.unionWith (<>) m0 m1) (v0 <> v1)
|
||||||
|
|
||||||
instance (Eq k, Hashable k, Semigroup v) => Monoid (Trie k v) where
|
instance (Hashable k, Semigroup v) => Monoid (Trie k v) where
|
||||||
mempty = empty
|
mempty = empty
|
||||||
|
|
||||||
instance (ToJSONKey a, ToJSON v) => ToJSON (Trie a v)
|
instance (ToJSONKey a, ToJSON v) => ToJSON (Trie a v)
|
||||||
@ -61,21 +61,21 @@ singleton ps v = foldr (\p t -> Trie (M.singleton p t) Nothing) (Trie M.empty (J
|
|||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
|
|
||||||
-- | Find a value at the given path, if any.
|
-- | Find a value at the given path, if any.
|
||||||
lookup :: (Eq k, Hashable k) => [k] -> Trie k v -> Maybe v
|
lookup :: Hashable k => [k] -> Trie k v -> Maybe v
|
||||||
lookup [] (Trie _ value) = value
|
lookup [] (Trie _ value) = value
|
||||||
lookup (p : ps) (Trie tmap _) = lookup ps =<< M.lookup p tmap
|
lookup (p : ps) (Trie tmap _) = lookup ps =<< M.lookup p tmap
|
||||||
|
|
||||||
-- | Insert the given value at the given path.
|
-- | Insert the given value at the given path.
|
||||||
--
|
--
|
||||||
-- If there's already a value at the given path, it is replaced.
|
-- If there's already a value at the given path, it is replaced.
|
||||||
insert :: (Eq k, Hashable k) => [k] -> v -> Trie k v -> Trie k v
|
insert :: Hashable k => [k] -> v -> Trie k v -> Trie k v
|
||||||
insert = insertWith const
|
insert = insertWith const
|
||||||
|
|
||||||
-- | Insert the value at the given path.
|
-- | Insert the value at the given path.
|
||||||
--
|
--
|
||||||
-- If there's already a value at the given path, the old value is replaced by
|
-- If there's already a value at the given path, the old value is replaced by
|
||||||
-- the result of applying the given function to the new and old value.
|
-- the result of applying the given function to the new and old value.
|
||||||
insertWith :: (Eq k, Hashable k) => (v -> v -> v) -> [k] -> v -> Trie k v -> Trie k v
|
insertWith :: Hashable k => (v -> v -> v) -> [k] -> v -> Trie k v -> Trie k v
|
||||||
insertWith fun path newValue t = go t path
|
insertWith fun path newValue t = go t path
|
||||||
where
|
where
|
||||||
go (Trie tmap value) = \case
|
go (Trie tmap value) = \case
|
||||||
|
@ -235,7 +235,7 @@ buildSubscriptionPlan userInfo rootFields parameterizedQueryHash = do
|
|||||||
pure $ IR.SourceConfigWith srcConfig queryTagsConfig (IR.QDBR newQDB)
|
pure $ IR.SourceConfigWith srcConfig queryTagsConfig (IR.QDBR newQDB)
|
||||||
case subscriptionType of
|
case subscriptionType of
|
||||||
Streaming -> pure (accLiveQueryFields, OMap.insert gName (src, newQDB) accStreamingFields)
|
Streaming -> pure (accLiveQueryFields, OMap.insert gName (src, newQDB) accStreamingFields)
|
||||||
LiveQuery -> pure $ (first (OMap.insert gName (Right (src, newQDB))) accLiveQueryFields, accStreamingFields)
|
LiveQuery -> pure (first (OMap.insert gName (Right (src, newQDB))) accLiveQueryFields, accStreamingFields)
|
||||||
IR.RFAction action -> do
|
IR.RFAction action -> do
|
||||||
let (noRelsDBAST, remoteJoins) = RJ.getRemoteJoinsActionQuery action
|
let (noRelsDBAST, remoteJoins) = RJ.getRemoteJoinsActionQuery action
|
||||||
unless (isNothing remoteJoins) $
|
unless (isNothing remoteJoins) $
|
||||||
|
@ -56,7 +56,7 @@ unresolveVariables =
|
|||||||
|
|
||||||
collectVariables ::
|
collectVariables ::
|
||||||
forall fragments var.
|
forall fragments var.
|
||||||
(Foldable fragments, Hashable var, Eq var) =>
|
(Foldable fragments, Hashable var) =>
|
||||||
G.SelectionSet fragments var ->
|
G.SelectionSet fragments var ->
|
||||||
Set.HashSet var
|
Set.HashSet var
|
||||||
collectVariables =
|
collectVariables =
|
||||||
|
@ -654,7 +654,7 @@ createRemoteJoin joinColumnAliases = \case
|
|||||||
-- NOTE: if the @fieldName@ argument is a valid GraphQL name, then the
|
-- NOTE: if the @fieldName@ argument is a valid GraphQL name, then the
|
||||||
-- constructed alias MUST also be a valid GraphQL name.
|
-- constructed alias MUST also be a valid GraphQL name.
|
||||||
getJoinColumnAlias ::
|
getJoinColumnAlias ::
|
||||||
(Eq field, Hashable field) =>
|
Hashable field =>
|
||||||
FieldName ->
|
FieldName ->
|
||||||
field ->
|
field ->
|
||||||
HashMap field FieldName ->
|
HashMap field FieldName ->
|
||||||
|
@ -32,13 +32,13 @@ reset = flip writeTVar Map.empty . unTMap
|
|||||||
null :: TMap k v -> STM Bool
|
null :: TMap k v -> STM Bool
|
||||||
null = fmap Map.null . readTVar . unTMap
|
null = fmap Map.null . readTVar . unTMap
|
||||||
|
|
||||||
lookup :: (Eq k, Hashable k) => k -> TMap k v -> STM (Maybe v)
|
lookup :: Hashable k => k -> TMap k v -> STM (Maybe v)
|
||||||
lookup k = fmap (Map.lookup k) . readTVar . unTMap
|
lookup k = fmap (Map.lookup k) . readTVar . unTMap
|
||||||
|
|
||||||
insert :: (Eq k, Hashable k) => v -> k -> TMap k v -> STM ()
|
insert :: Hashable k => v -> k -> TMap k v -> STM ()
|
||||||
insert !v k mapTv = modifyTVar' (unTMap mapTv) $ Map.insert k v
|
insert !v k mapTv = modifyTVar' (unTMap mapTv) $ Map.insert k v
|
||||||
|
|
||||||
delete :: (Eq k, Hashable k) => k -> TMap k v -> STM ()
|
delete :: Hashable k => k -> TMap k v -> STM ()
|
||||||
delete k mapTv = modifyTVar' (unTMap mapTv) $ Map.delete k
|
delete k mapTv = modifyTVar' (unTMap mapTv) $ Map.delete k
|
||||||
|
|
||||||
toList :: TMap k v -> STM [(k, v)]
|
toList :: TMap k v -> STM [(k, v)]
|
||||||
@ -50,7 +50,7 @@ filterWithKey f mapTV = modifyTVar' (unTMap mapTV) $ Map.filterWithKey f
|
|||||||
replace :: TMap k v -> Map.HashMap k v -> STM ()
|
replace :: TMap k v -> Map.HashMap k v -> STM ()
|
||||||
replace mapTV v = void $ swapTVar (unTMap mapTV) v
|
replace mapTV v = void $ swapTVar (unTMap mapTV) v
|
||||||
|
|
||||||
union :: (Eq k, Hashable k) => TMap k v -> TMap k v -> STM (TMap k v)
|
union :: Hashable k => TMap k v -> TMap k v -> STM (TMap k v)
|
||||||
union mapA mapB = do
|
union mapA mapB = do
|
||||||
l <- readTVar $ unTMap mapA
|
l <- readTVar $ unTMap mapA
|
||||||
r <- readTVar $ unTMap mapB
|
r <- readTVar $ unTMap mapB
|
||||||
|
@ -310,7 +310,7 @@ instance (Monoid w, ArrowDistribute arr) => ArrowDistribute (WriterA w arr) wher
|
|||||||
instance ArrowDistribute (Rule m) where
|
instance ArrowDistribute (Rule m) where
|
||||||
keyed ::
|
keyed ::
|
||||||
forall a b k e s.
|
forall a b k e s.
|
||||||
(Eq k, Hashable k) =>
|
Hashable k =>
|
||||||
Rule m (e, (k, (a, s))) b ->
|
Rule m (e, (k, (a, s))) b ->
|
||||||
Rule m (e, (HashMap k a, s)) (HashMap k b)
|
Rule m (e, (HashMap k a, s)) (HashMap k b)
|
||||||
keyed r0 = keyedWith HM.empty
|
keyed r0 = keyedWith HM.empty
|
||||||
|
@ -93,7 +93,7 @@ instance (ToJSON a) => ToJSON (ReloadSpec a) where
|
|||||||
RSReloadAll -> Aeson.Bool True
|
RSReloadAll -> Aeson.Bool True
|
||||||
RSReloadList l -> Aeson.toJSON l
|
RSReloadList l -> Aeson.toJSON l
|
||||||
|
|
||||||
instance (FromJSON a, Eq a, Hashable a) => FromJSON (ReloadSpec a) where
|
instance (FromJSON a, Hashable a) => FromJSON (ReloadSpec a) where
|
||||||
parseJSON (Aeson.Bool b) = pure $ if b then RSReloadAll else RSReloadList mempty
|
parseJSON (Aeson.Bool b) = pure $ if b then RSReloadAll else RSReloadList mempty
|
||||||
parseJSON v = RSReloadList <$> Aeson.parseJSON v
|
parseJSON v = RSReloadList <$> Aeson.parseJSON v
|
||||||
|
|
||||||
|
@ -221,7 +221,7 @@ mkFkeyRel relType io source rn sourceTable remoteTable remoteColumns foreignKeys
|
|||||||
<> fmap (drUsingColumnDep @b source remoteTable) (toList remoteColumns)
|
<> fmap (drUsingColumnDep @b source remoteTable) (toList remoteColumns)
|
||||||
pure (RelInfo rn relType (reverseMap (NEHashMap.toHashMap colMap)) remoteTable False io, dependencies)
|
pure (RelInfo rn relType (reverseMap (NEHashMap.toHashMap colMap)) remoteTable False io, dependencies)
|
||||||
where
|
where
|
||||||
reverseMap :: Eq y => Hashable y => HashMap x y -> HashMap y x
|
reverseMap :: Hashable y => HashMap x y -> HashMap y x
|
||||||
reverseMap = Map.fromList . fmap swap . Map.toList
|
reverseMap = Map.fromList . fmap swap . Map.toList
|
||||||
|
|
||||||
-- | Try to find a foreign key constraint, identifying a constraint by its set of columns
|
-- | Try to find a foreign key constraint, identifying a constraint by its set of columns
|
||||||
|
@ -135,7 +135,7 @@ invalidateKeys CacheInvalidations {..} InvalidationKeys {..} =
|
|||||||
}
|
}
|
||||||
where
|
where
|
||||||
invalidate ::
|
invalidate ::
|
||||||
(Eq a, Hashable a) =>
|
Hashable a =>
|
||||||
a ->
|
a ->
|
||||||
HashMap a Inc.InvalidationKey ->
|
HashMap a Inc.InvalidationKey ->
|
||||||
HashMap a Inc.InvalidationKey
|
HashMap a Inc.InvalidationKey
|
||||||
@ -329,7 +329,6 @@ buildInfoMap ::
|
|||||||
( ArrowChoice arr,
|
( ArrowChoice arr,
|
||||||
Inc.ArrowDistribute arr,
|
Inc.ArrowDistribute arr,
|
||||||
ArrowWriter (Seq CollectedInfo) arr,
|
ArrowWriter (Seq CollectedInfo) arr,
|
||||||
Eq k,
|
|
||||||
Hashable k
|
Hashable k
|
||||||
) =>
|
) =>
|
||||||
(a -> k) ->
|
(a -> k) ->
|
||||||
@ -356,7 +355,6 @@ buildInfoMapPreservingMetadata ::
|
|||||||
( ArrowChoice arr,
|
( ArrowChoice arr,
|
||||||
Inc.ArrowDistribute arr,
|
Inc.ArrowDistribute arr,
|
||||||
ArrowWriter (Seq CollectedInfo) arr,
|
ArrowWriter (Seq CollectedInfo) arr,
|
||||||
Eq k,
|
|
||||||
Hashable k
|
Hashable k
|
||||||
) =>
|
) =>
|
||||||
(a -> k) ->
|
(a -> k) ->
|
||||||
|
@ -452,10 +452,10 @@ buildTableCache = Inc.cache proc (source, sourceConfig, dbTablesMeta, tableBuild
|
|||||||
|) (withSourceInKey source rawTableCache)
|
|) (withSourceInKey source rawTableCache)
|
||||||
returnA -< removeSourceInKey (catMaybes tableInfos)
|
returnA -< removeSourceInKey (catMaybes tableInfos)
|
||||||
where
|
where
|
||||||
withSourceInKey :: (Eq k, Hashable k) => SourceName -> HashMap k v -> HashMap (SourceName, k) v
|
withSourceInKey :: Hashable k => SourceName -> HashMap k v -> HashMap (SourceName, k) v
|
||||||
withSourceInKey source = mapKeys (source,)
|
withSourceInKey source = mapKeys (source,)
|
||||||
|
|
||||||
removeSourceInKey :: (Eq k, Hashable k) => HashMap (SourceName, k) v -> HashMap k v
|
removeSourceInKey :: Hashable k => HashMap (SourceName, k) v -> HashMap k v
|
||||||
removeSourceInKey = mapKeys snd
|
removeSourceInKey = mapKeys snd
|
||||||
|
|
||||||
withTable :: ErrorA QErr arr (e, s) a -> arr (e, ((SourceName, TableName b), s)) (Maybe a)
|
withTable :: ErrorA QErr arr (e, s) a -> arr (e, ((SourceName, TableName b), s)) (Maybe a)
|
||||||
|
@ -188,7 +188,7 @@ inlineAllowlist collections allowlist = InlinedAllowlist global perRole
|
|||||||
| AllowlistEntry coll (AllowlistScopeRoles roles) <- OM.elems allowlist
|
| AllowlistEntry coll (AllowlistScopeRoles roles) <- OM.elems allowlist
|
||||||
]
|
]
|
||||||
|
|
||||||
inverseMap :: (Eq b, Hashable b) => [(a, [b])] -> HashMap b [a]
|
inverseMap :: Hashable b => [(a, [b])] -> HashMap b [a]
|
||||||
inverseMap = M.fromListWith (<>) . concatMap (\(c, rs) -> [(r, [c]) | r <- rs])
|
inverseMap = M.fromListWith (<>) . concatMap (\(c, rs) -> [(r, [c]) | r <- rs])
|
||||||
|
|
||||||
global = inlineQueries globalCollections
|
global = inlineQueries globalCollections
|
||||||
|
@ -88,7 +88,7 @@ instance Monoid (MatchResult a k v) where
|
|||||||
-- | Look up the value at a path.
|
-- | Look up the value at a path.
|
||||||
-- @PathParam@ matches any path component.
|
-- @PathParam@ matches any path component.
|
||||||
-- Returns a list of pairs containing the value found and bindings for any @PathParam@s.
|
-- Returns a list of pairs containing the value found and bindings for any @PathParam@s.
|
||||||
lookupPath :: (Eq a, Hashable a) => [a] -> T.Trie (PathComponent a) v -> [(v, [a])]
|
lookupPath :: Hashable a => [a] -> T.Trie (PathComponent a) v -> [(v, [a])]
|
||||||
lookupPath [] t = [(v, []) | v <- maybeToList (T.trieData t)]
|
lookupPath [] t = [(v, []) | v <- maybeToList (T.trieData t)]
|
||||||
lookupPath (x : xs) t = do
|
lookupPath (x : xs) t = do
|
||||||
(pc, t') <- matchPathComponent x $ T.trieMap t
|
(pc, t') <- matchPathComponent x $ T.trieMap t
|
||||||
@ -98,7 +98,7 @@ lookupPath (x : xs) t = do
|
|||||||
PathParam -> (x :) <$> m
|
PathParam -> (x :) <$> m
|
||||||
where
|
where
|
||||||
matchPathComponent ::
|
matchPathComponent ::
|
||||||
(Eq a, Hashable a) =>
|
Hashable a =>
|
||||||
a ->
|
a ->
|
||||||
M.HashMap (PathComponent a) v ->
|
M.HashMap (PathComponent a) v ->
|
||||||
[(PathComponent (), v)]
|
[(PathComponent (), v)]
|
||||||
@ -106,7 +106,7 @@ lookupPath (x : xs) t = do
|
|||||||
catMaybes [(PathLiteral (),) <$> M.lookup (PathLiteral a) m, (PathParam,) <$> M.lookup PathParam m]
|
catMaybes [(PathLiteral (),) <$> M.lookup (PathLiteral a) m, (PathParam,) <$> M.lookup PathParam m]
|
||||||
|
|
||||||
-- | Match a key @k@ and path @[a]@ against a @MultiMapPathTrie a k v@
|
-- | Match a key @k@ and path @[a]@ against a @MultiMapPathTrie a k v@
|
||||||
matchPath :: (Eq a, Eq k, Hashable k, Hashable a) => k -> [a] -> MultiMapPathTrie a k v -> MatchResult a k v
|
matchPath :: (Hashable k, Hashable a) => k -> [a] -> MultiMapPathTrie a k v -> MatchResult a k v
|
||||||
matchPath k path = foldMap toResult . lookupPath path
|
matchPath k path = foldMap toResult . lookupPath path
|
||||||
where
|
where
|
||||||
toResult (methodMap, paramMatches) =
|
toResult (methodMap, paramMatches) =
|
||||||
@ -116,7 +116,7 @@ matchPath k path = foldMap toResult . lookupPath path
|
|||||||
_ -> MatchAmbiguous
|
_ -> MatchAmbiguous
|
||||||
|
|
||||||
-- | A version of ambiguousPaths that attempts to group all ambiguous paths that have overlapping endpoints
|
-- | A version of ambiguousPaths that attempts to group all ambiguous paths that have overlapping endpoints
|
||||||
ambiguousPathsGrouped :: (Hashable a, Eq k, Hashable k, Ord v, Ord a) => MultiMapPathTrie a k v -> [(S.Set [PathComponent a], S.Set v)]
|
ambiguousPathsGrouped :: (Hashable a, Hashable k, Ord v, Ord a) => MultiMapPathTrie a k v -> [(S.Set [PathComponent a], S.Set v)]
|
||||||
ambiguousPathsGrouped = groupAmbiguousPaths . map (first S.singleton) . ambiguousPaths
|
ambiguousPathsGrouped = groupAmbiguousPaths . map (first S.singleton) . ambiguousPaths
|
||||||
|
|
||||||
groupAmbiguousPaths :: (Ord a, Ord v) => [(S.Set [PathComponent a], S.Set v)] -> [(S.Set [PathComponent a], S.Set v)]
|
groupAmbiguousPaths :: (Ord a, Ord v) => [(S.Set [PathComponent a], S.Set v)] -> [(S.Set [PathComponent a], S.Set v)]
|
||||||
@ -133,7 +133,7 @@ groupAmbiguousPaths (x : xs) =
|
|||||||
|
|
||||||
-- | Detect and return all ambiguous paths in the @MultiMapPathTrie@
|
-- | Detect and return all ambiguous paths in the @MultiMapPathTrie@
|
||||||
-- A path @p@ is ambiguous if @matchPath k p@ can return @MatchAmbiguous@ for some @k@.
|
-- A path @p@ is ambiguous if @matchPath k p@ can return @MatchAmbiguous@ for some @k@.
|
||||||
ambiguousPaths :: (Eq a, Hashable a, Eq k, Hashable k, Ord v) => MultiMapPathTrie a k v -> [([PathComponent a], S.Set v)]
|
ambiguousPaths :: (Hashable a, Hashable k, Ord v) => MultiMapPathTrie a k v -> [([PathComponent a], S.Set v)]
|
||||||
ambiguousPaths (T.Trie pathMap methodMap) =
|
ambiguousPaths (T.Trie pathMap methodMap) =
|
||||||
thisNodeAmbiguousPaths ++ childNodesAmbiguousPaths
|
thisNodeAmbiguousPaths ++ childNodesAmbiguousPaths
|
||||||
where
|
where
|
||||||
|
@ -113,7 +113,7 @@ import Hasura.Session
|
|||||||
-- | Parse a list of objects into a map from a derived key,
|
-- | Parse a list of objects into a map from a derived key,
|
||||||
-- failing if the list has duplicates.
|
-- failing if the list has duplicates.
|
||||||
parseListAsMap ::
|
parseListAsMap ::
|
||||||
(Hashable k, Eq k, T.ToTxt k) =>
|
(Hashable k, T.ToTxt k) =>
|
||||||
Text ->
|
Text ->
|
||||||
(a -> k) ->
|
(a -> k) ->
|
||||||
Parser [a] ->
|
Parser [a] ->
|
||||||
|
@ -316,7 +316,7 @@ instance (ToJSON rootFieldType) => ToJSON (AllowedRootFields rootFieldType) wher
|
|||||||
-- | Serializes set of allowed fields as a nullable array, where @null@ maps to
|
-- | Serializes set of allowed fields as a nullable array, where @null@ maps to
|
||||||
-- 'ARFAllowAllRootFields', and any array value maps to
|
-- 'ARFAllowAllRootFields', and any array value maps to
|
||||||
-- 'ARFAllowConfiguredRootFields'.
|
-- 'ARFAllowConfiguredRootFields'.
|
||||||
instance (Eq rootFieldType, Hashable rootFieldType, HasCodec rootFieldType) => HasCodec (AllowedRootFields rootFieldType) where
|
instance (Hashable rootFieldType, HasCodec rootFieldType) => HasCodec (AllowedRootFields rootFieldType) where
|
||||||
codec = dimapCodec dec enc $ maybeCodec $ listCodec codec
|
codec = dimapCodec dec enc $ maybeCodec $ listCodec codec
|
||||||
where
|
where
|
||||||
dec (Just fields) = ARFAllowConfiguredRootFields $ Set.fromList fields
|
dec (Just fields) = ARFAllowConfiguredRootFields $ Set.fromList fields
|
||||||
|
@ -131,7 +131,7 @@ class OnlyRelevantEq a where
|
|||||||
infix 4 ==~ -- same as (==)
|
infix 4 ==~ -- same as (==)
|
||||||
(==~) :: a -> a -> Bool
|
(==~) :: a -> a -> Bool
|
||||||
|
|
||||||
instance (Backend b, Eq a, Hashable a) => OnlyRelevantEq (GBoolExp b a) where
|
instance (Backend b, Hashable a) => OnlyRelevantEq (GBoolExp b a) where
|
||||||
BoolAnd boolExpL ==~ BoolAnd boolExpR = Set.fromList boolExpL == Set.fromList boolExpR
|
BoolAnd boolExpL ==~ BoolAnd boolExpR = Set.fromList boolExpL == Set.fromList boolExpR
|
||||||
BoolOr boolExpL ==~ BoolOr boolExpR = Set.fromList boolExpL == Set.fromList boolExpR
|
BoolOr boolExpL ==~ BoolOr boolExpR = Set.fromList boolExpL == Set.fromList boolExpR
|
||||||
BoolNot boolExpL ==~ BoolNot boolExpR = boolExpL == boolExpR
|
BoolNot boolExpL ==~ BoolNot boolExpR = boolExpL == boolExpR
|
||||||
@ -148,7 +148,6 @@ instance
|
|||||||
|
|
||||||
instance
|
instance
|
||||||
( Backend b,
|
( Backend b,
|
||||||
Eq (OpExpG b a),
|
|
||||||
Hashable (OpExpG b a),
|
Hashable (OpExpG b a),
|
||||||
OnlyRelevantEq (AnnBoolExp b a),
|
OnlyRelevantEq (AnnBoolExp b a),
|
||||||
OnlyRelevantEq (AnnComputedFieldBoolExp b a)
|
OnlyRelevantEq (AnnComputedFieldBoolExp b a)
|
||||||
|
@ -896,7 +896,7 @@ deriving instance (Backend b, Show a) => Show (PrimaryKey b a)
|
|||||||
|
|
||||||
instance (Backend b, NFData a) => NFData (PrimaryKey b a)
|
instance (Backend b, NFData a) => NFData (PrimaryKey b a)
|
||||||
|
|
||||||
instance (Backend b, Hashable (NESeq a)) => Hashable (PrimaryKey b a)
|
instance (Eq a, Backend b, Hashable (NESeq a)) => Hashable (PrimaryKey b a)
|
||||||
|
|
||||||
instance (Backend b, Cacheable a) => Cacheable (PrimaryKey b a)
|
instance (Backend b, Cacheable a) => Cacheable (PrimaryKey b a)
|
||||||
|
|
||||||
@ -993,7 +993,7 @@ type TableCoreInfo b = TableCoreInfoG b (FieldInfo b) (ColumnInfo b)
|
|||||||
|
|
||||||
tciUniqueOrPrimaryKeyConstraints ::
|
tciUniqueOrPrimaryKeyConstraints ::
|
||||||
forall b f.
|
forall b f.
|
||||||
(Eq (Column b), Hashable (Column b)) =>
|
Hashable (Column b) =>
|
||||||
TableCoreInfoG b f (ColumnInfo b) ->
|
TableCoreInfoG b f (ColumnInfo b) ->
|
||||||
Maybe (NonEmpty (UniqueConstraint b))
|
Maybe (NonEmpty (UniqueConstraint b))
|
||||||
tciUniqueOrPrimaryKeyConstraints info =
|
tciUniqueOrPrimaryKeyConstraints info =
|
||||||
|
@ -499,7 +499,7 @@ processJwt_ processJwtBytes decodeIssuer fGetHeaderType jwtCtxs headers mUnAuthR
|
|||||||
(_, [(ctx, val)]) -> withAuthZ val ctx
|
(_, [(ctx, val)]) -> withAuthZ val ctx
|
||||||
_ -> throw400 InvalidHeaders "Could not verify JWT: Multiple JWTs found"
|
_ -> throw400 InvalidHeaders "Could not verify JWT: Multiple JWTs found"
|
||||||
where
|
where
|
||||||
intersectKeys :: (Hashable a, Eq a) => HM.HashMap a [b] -> HM.HashMap a [c] -> [(b, c)]
|
intersectKeys :: Hashable a => HM.HashMap a [b] -> HM.HashMap a [c] -> [(b, c)]
|
||||||
intersectKeys m n = concatMap (uncurry cartesianProduct) $ HM.elems $ HM.intersectionWith (,) m n
|
intersectKeys m n = concatMap (uncurry cartesianProduct) $ HM.elems $ HM.intersectionWith (,) m n
|
||||||
|
|
||||||
issuerMatch (j, b) = do
|
issuerMatch (j, b) = do
|
||||||
|
@ -21,7 +21,6 @@ import Language.GraphQL.Draft.Syntax qualified as G
|
|||||||
|
|
||||||
genHashMap ::
|
genHashMap ::
|
||||||
MonadGen m =>
|
MonadGen m =>
|
||||||
Eq a =>
|
|
||||||
Hashable a =>
|
Hashable a =>
|
||||||
m a ->
|
m a ->
|
||||||
m b ->
|
m b ->
|
||||||
|
@ -44,14 +44,14 @@ instance Arbitrary Text where
|
|||||||
arbitrary = T.pack <$> listOf arbitraryUnicodeChar
|
arbitrary = T.pack <$> listOf arbitraryUnicodeChar
|
||||||
|
|
||||||
instance
|
instance
|
||||||
(Arbitrary k, Eq k, Hashable k, Arbitrary v) =>
|
(Arbitrary k, Hashable k, Arbitrary v) =>
|
||||||
Arbitrary (HashMap k v)
|
Arbitrary (HashMap k v)
|
||||||
where
|
where
|
||||||
arbitrary = HashMap.fromList <$> arbitrary
|
arbitrary = HashMap.fromList <$> arbitrary
|
||||||
shrink = fmap HashMap.fromList . shrink . HashMap.toList
|
shrink = fmap HashMap.fromList . shrink . HashMap.toList
|
||||||
|
|
||||||
instance
|
instance
|
||||||
(Arbitrary k, Eq k, Hashable k, Arbitrary v) =>
|
(Arbitrary k, Hashable k, Arbitrary v) =>
|
||||||
Arbitrary (InsOrdHashMap k v)
|
Arbitrary (InsOrdHashMap k v)
|
||||||
where
|
where
|
||||||
arbitrary = InsOrd.HashMap.fromList <$> arbitrary
|
arbitrary = InsOrd.HashMap.fromList <$> arbitrary
|
||||||
@ -67,13 +67,13 @@ instance Arbitrary HTTP.Types.Status where
|
|||||||
-- Orphan instances for types defined by us, but which are not coupled to
|
-- Orphan instances for types defined by us, but which are not coupled to
|
||||||
-- GraphQL Engine.
|
-- GraphQL Engine.
|
||||||
|
|
||||||
instance (Eq k, Hashable k, Arbitrary k, Eq v, Arbitrary v) => Arbitrary (Trie.Trie k v) where
|
instance (Hashable k, Arbitrary k, Eq v, Arbitrary v) => Arbitrary (Trie.Trie k v) where
|
||||||
arbitrary = Trie.Trie <$> scale (`div` 2) arbitrary <*> arbitrary
|
arbitrary = Trie.Trie <$> scale (`div` 2) arbitrary <*> arbitrary
|
||||||
shrink (Trie.Trie m v) =
|
shrink (Trie.Trie m v) =
|
||||||
[Trie.Trie m v' | v' <- shrink v]
|
[Trie.Trie m v' | v' <- shrink v]
|
||||||
++ [Trie.Trie m' v | m' <- shrink m]
|
++ [Trie.Trie m' v | m' <- shrink m]
|
||||||
|
|
||||||
instance (Eq k, Hashable k, Arbitrary k, Ord v, Arbitrary v) => Arbitrary (MMap.MultiMap k v) where
|
instance (Hashable k, Arbitrary k, Ord v, Arbitrary v) => Arbitrary (MMap.MultiMap k v) where
|
||||||
arbitrary = MMap.fromMap . fmap (Set.fromList . take 5) <$> arbitrary
|
arbitrary = MMap.fromMap . fmap (Set.fromList . take 5) <$> arbitrary
|
||||||
shrink m = map MMap.fromMap $ shrink $ MMap.toMap m
|
shrink m = map MMap.fromMap $ shrink $ MMap.toMap m
|
||||||
|
|
||||||
|
@ -79,8 +79,6 @@ genAnnBoolExp
|
|||||||
|
|
||||||
genAnnBoolExpFld ::
|
genAnnBoolExpFld ::
|
||||||
MonadGen m =>
|
MonadGen m =>
|
||||||
Eq (ScalarType b) =>
|
|
||||||
Eq (Column b) =>
|
|
||||||
Hashable (ScalarType b) =>
|
Hashable (ScalarType b) =>
|
||||||
Hashable (Column b) =>
|
Hashable (Column b) =>
|
||||||
m (Column b) ->
|
m (Column b) ->
|
||||||
@ -147,7 +145,6 @@ genAnnBoolExpFld
|
|||||||
|
|
||||||
genRelInfo ::
|
genRelInfo ::
|
||||||
MonadGen m =>
|
MonadGen m =>
|
||||||
Eq (Column b) =>
|
|
||||||
Hashable (Column b) =>
|
Hashable (Column b) =>
|
||||||
m (TableName b) ->
|
m (TableName b) ->
|
||||||
m (Column b) ->
|
m (Column b) ->
|
||||||
@ -172,8 +169,6 @@ genInsertOrder = element [BeforeParent, AfterParent]
|
|||||||
|
|
||||||
genAnnComputedFieldBolExp ::
|
genAnnComputedFieldBolExp ::
|
||||||
MonadGen m =>
|
MonadGen m =>
|
||||||
Eq (ScalarType b) =>
|
|
||||||
Eq (Column b) =>
|
|
||||||
Hashable (ScalarType b) =>
|
Hashable (ScalarType b) =>
|
||||||
Hashable (Column b) =>
|
Hashable (Column b) =>
|
||||||
m (TableName b) ->
|
m (TableName b) ->
|
||||||
@ -211,8 +206,6 @@ genAnnComputedFieldBolExp
|
|||||||
|
|
||||||
genComputedFieldBoolExp ::
|
genComputedFieldBoolExp ::
|
||||||
MonadGen m =>
|
MonadGen m =>
|
||||||
Eq (ScalarType b) =>
|
|
||||||
Eq (Column b) =>
|
|
||||||
Hashable (ScalarType b) =>
|
Hashable (ScalarType b) =>
|
||||||
Hashable (Column b) =>
|
Hashable (Column b) =>
|
||||||
m (TableName b) ->
|
m (TableName b) ->
|
||||||
@ -265,7 +258,6 @@ genComputedFieldName = ComputedFieldName <$> genNonEmptyText defaultRange
|
|||||||
|
|
||||||
genOpExpG ::
|
genOpExpG ::
|
||||||
MonadGen m =>
|
MonadGen m =>
|
||||||
Eq (ScalarType b) =>
|
|
||||||
Hashable (ScalarType b) =>
|
Hashable (ScalarType b) =>
|
||||||
m (TableName b) ->
|
m (TableName b) ->
|
||||||
m (Column b) ->
|
m (Column b) ->
|
||||||
@ -403,8 +395,6 @@ genAnnotatedOrderByItemG genBasicOrderType genNullsOrderType genA =
|
|||||||
|
|
||||||
genAnnotatedOrderByElement ::
|
genAnnotatedOrderByElement ::
|
||||||
MonadGen m =>
|
MonadGen m =>
|
||||||
Eq (ScalarType b) =>
|
|
||||||
Eq (Column b) =>
|
|
||||||
Hashable (ScalarType b) =>
|
Hashable (ScalarType b) =>
|
||||||
Hashable (Column b) =>
|
Hashable (Column b) =>
|
||||||
m (Column b) ->
|
m (Column b) ->
|
||||||
@ -515,9 +505,7 @@ genAnnotatedAggregateOrderBy
|
|||||||
|
|
||||||
genComputedFieldOrderBy ::
|
genComputedFieldOrderBy ::
|
||||||
MonadGen m =>
|
MonadGen m =>
|
||||||
Eq (ScalarType b) =>
|
|
||||||
Hashable (ScalarType b) =>
|
Hashable (ScalarType b) =>
|
||||||
Eq (Column b) =>
|
|
||||||
Hashable (Column b) =>
|
Hashable (Column b) =>
|
||||||
m (Column b) ->
|
m (Column b) ->
|
||||||
m (ScalarType b) ->
|
m (ScalarType b) ->
|
||||||
@ -554,9 +542,7 @@ genComputedFieldOrderBy
|
|||||||
|
|
||||||
genComputedFieldOrderByElement ::
|
genComputedFieldOrderByElement ::
|
||||||
MonadGen m =>
|
MonadGen m =>
|
||||||
Eq (ScalarType b) =>
|
|
||||||
Hashable (ScalarType b) =>
|
Hashable (ScalarType b) =>
|
||||||
Eq (Column b) =>
|
|
||||||
Hashable (Column b) =>
|
Hashable (Column b) =>
|
||||||
m (Column b) ->
|
m (Column b) ->
|
||||||
m (ScalarType b) ->
|
m (ScalarType b) ->
|
||||||
|
@ -23,10 +23,10 @@ emptyTrie = Trie.empty
|
|||||||
singleton :: String -> Int -> TestTrie
|
singleton :: String -> Int -> TestTrie
|
||||||
singleton k s = Trie.singleton [] $ MMap.singleton k s
|
singleton k s = Trie.singleton [] $ MMap.singleton k s
|
||||||
|
|
||||||
insert :: (Eq a, Hashable a, Eq k, Hashable k, Ord v) => [PathComponent a] -> k -> v -> MultiMapPathTrie a k v -> MultiMapPathTrie a k v
|
insert :: (Hashable a, Hashable k, Ord v) => [PathComponent a] -> k -> v -> MultiMapPathTrie a k v -> MultiMapPathTrie a k v
|
||||||
insert p k = Trie.insertWith (<>) p . MMap.singleton k
|
insert p k = Trie.insertWith (<>) p . MMap.singleton k
|
||||||
|
|
||||||
inserts :: (Eq a, Hashable a, Eq k, Hashable k, Ord v) => [PathComponent a] -> [k] -> v -> MultiMapPathTrie a k v -> MultiMapPathTrie a k v
|
inserts :: (Hashable a, Hashable k, Ord v) => [PathComponent a] -> [k] -> v -> MultiMapPathTrie a k v -> MultiMapPathTrie a k v
|
||||||
inserts p ks v t = foldl' (\t' k -> insert p k v t') t ks
|
inserts p ks v t = foldl' (\t' k -> insert p k v t') t ks
|
||||||
|
|
||||||
spec :: Spec
|
spec :: Spec
|
||||||
|
Loading…
Reference in New Issue
Block a user