==> Cloning haskell-persistent-test ... Cloning into 'haskell-persistent-test'... ==> Collecting packager identity from makepkg.conf -> name : Reproducible Arch Linux tests -> email : reproducible@archlinux.org -> gpg-key : undefined -> protocol: https ==> Configuring haskell-persistent-test :: Synchronizing package databases... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 133k 100 133k 0 0 394k 0 --:--:-- --:--:-- --:--:-- 395k % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 8560k 100 8560k 0 0 20.1M 0 --:--:-- --:--:-- --:--:-- 20.1M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 50 142k 50 73374 0 0 211k 0 --:--:-- --:--:-- --:--:-- 210k 100 142k 100 142k 0 0 420k 0 --:--:-- --:--:-- --:--:-- 420k :: Starting full system upgrade... there is nothing to do PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin TMPDIR=/tmp/archlinux-ci/ GIT_SSL_NO_VERIFY=1 SOURCE_DATE_EPOCH=1709931397 SHELL=/bin/bash SCHROOT_CHROOT_NAME=jenkins-reproducible-archlinux no_proxy=localhost,127.0.0.1 SCHROOT_COMMAND=bash -l -c SOURCE_DATE_EPOCH='1709931397' PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' TMPDIR='/tmp/archlinux-ci/' GIT_SSL_NO_VERIFY=1 printenv 2>&1 SCHROOT_SESSION_ID=archlinux-haskell-persistent-test-archlinuxrb-build-TYk876Ll PWD=/tmp/archlinux-ci/haskell-persistent-test-archlinuxrb-build-TYk876Ll/haskell-persistent-test LOGNAME=jenkins SCHROOT_ALIAS_NAME=jenkins-reproducible-archlinux SCHROOT_GROUP=jenkins SCHROOT_USER=jenkins ftp_proxy=http://127.0.0.1:3128 HOME=/var/lib/jenkins LANG=C https_proxy=http://127.0.0.1:3128 USER=jenkins FTP_PROXY=http://127.0.0.1:3128 SHLVL=1 HTTPS_PROXY=http://127.0.0.1:3128 HTTP_PROXY=http://127.0.0.1:3128 SCHROOT_GID=116 http_proxy=http://127.0.0.1:3128 DEBUGINFOD_URLS=https://debuginfod.archlinux.org SCHROOT_UID=108 HG=/usr/bin/hg _=/usr/sbin/printenv ==> Making package: haskell-persistent-test 2.13.1.3-6 (Fri Apr 11 03:19:49 2025) ==> Checking runtime dependencies... ==> Installing missing dependencies... resolving dependencies... looking for conflicting packages... Packages (103) haskell-ansi-terminal-0.11.4-64 haskell-assoc-1.0.2-256 haskell-async-2.2.5-25 haskell-attoparsec-0.14.4-73 haskell-attoparsec-iso8601-1.1.0.0-49 haskell-auto-update-0.1.6-336 haskell-base-compat-0.12.2-2 haskell-base-compat-batteries-0.12.2-81 haskell-base-orphans-0.8.8.2-12 haskell-base64-bytestring-1.2.1.0-103 haskell-bifunctors-5.6-67 haskell-bitvec-1.1.3.0-89 haskell-blaze-builder-0.4.2.3-2 haskell-blaze-markup-0.8.3.0-9 haskell-call-stack-0.4.0-182 haskell-case-insensitive-1.2.1.0-202 haskell-colour-2.3.6-208 haskell-comonad-5.0.8-251 haskell-conduit-extra-1.3.6-127 haskell-contravariant-1.5.5-4 haskell-cookie-0.4.6-2 haskell-data-array-byte-0.1.0.1-53 haskell-data-default-class-0.1.2.0-25 haskell-data-fix-0.3.2-101 haskell-distributive-0.6.2.1-208 haskell-dlist-1.0-240 haskell-easy-file-0.2.5-20 haskell-erf-2.0.0.0-25 haskell-fast-logger-3.1.2-68 haskell-foldable1-classes-compat-0.1-67 haskell-generically-0.1.1-2 haskell-ghc-bignum-orphans-0.1.1-2 haskell-hashable-1.4.3.0-44 haskell-hspec-core-2.10.9-95 haskell-hspec-discover-2.10.9-49 haskell-http-api-data-0.5.1-48 haskell-http-types-0.12.3-341 haskell-indexed-traversable-0.1.3-59 haskell-indexed-traversable-instances-0.1.1.2-39 haskell-integer-logarithms-1.0.3.1-7 haskell-lexer-1.1.1-2 haskell-lift-type-0.1.1.1-2 haskell-lifted-base-0.2.3.12-266 haskell-monad-loops-0.4.3-26 haskell-mono-traversable-1.0.17.0-1 haskell-network-3.1.4.0-19 haskell-old-locale-1.0.0.7-31 haskell-old-time-1.1.0.4-2 haskell-onetuple-0.3.1-74 haskell-primitive-0.7.4.0-109 haskell-quickcheck-io-0.2.0-687 haskell-resource-pool-0.2.3.2-295 haskell-safe-exceptions-0.1.7.4-20 haskell-scientific-0.3.7.0-112 haskell-semialign-1.2.0.1-155 haskell-semigroupoids-5.3.7-137 haskell-setenv-0.1.1.3-26 haskell-silently-1.2.5.3-2 haskell-split-0.2.5-5 haskell-splitmix-0.1.0.5-20 haskell-statevar-1.2.2-3 haskell-stm-chans-3.0.0.9-2 haskell-streaming-commons-0.2.2.6-25 haskell-strict-0.4.0.1-230 haskell-tagged-0.8.8-2 haskell-text-short-0.1.5-78 haskell-tf-random-0.5-696 haskell-th-abstraction-0.4.5.0-2 haskell-th-lift-0.8.4-2 haskell-th-lift-instances-0.1.20-46 haskell-these-1.1.1.1-257 haskell-time-compat-1.9.6.1-96 haskell-transformers-compat-0.7.2-2 haskell-typed-process-0.2.11.1-14 haskell-unix-compat-0.7.1-11 haskell-unix-time-0.4.12-4 haskell-uuid-types-1.0.5.1-15 haskell-vault-0.3.1.5-180 haskell-vector-0.13.1.0-28 haskell-vector-algorithms-0.9.0.1-89 haskell-vector-stream-0.1.0.1-2 haskell-witherable-0.4.2-96 haskell-zlib-0.6.3.0-59 numactl-2.0.18-1 ghc-libs-9.2.8-1 haskell-aeson-2.1.2.1-42 haskell-blaze-html-0.9.1.2-225 haskell-conduit-1.3.5-46 haskell-hspec-2.10.9-105 haskell-hspec-expectations-0.8.3-37 haskell-hunit-1.6.2.0-225 haskell-monad-control-1.0.3.1-101 haskell-monad-logger-0.3.40-53 haskell-path-pieces-0.2.1-31 haskell-persistent-2.14.5.1-6 haskell-quickcheck-2.14.3-62 haskell-quickcheck-instances-0.3.30-50 haskell-random-1.2.1.2-6 haskell-resourcet-1.2.6-50 haskell-transformers-base-0.4.6-101 haskell-unliftio-0.2.25.0-9 haskell-unliftio-core-0.2.1.0-2 haskell-unordered-containers-0.2.20-13 Total Download Size: 28.97 MiB Total Installed Size: 207.23 MiB :: Proceed with installation? [Y/n] :: Retrieving packages... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 83803 100 83803 0 0 41.3M 0 --:--:-- --:--:-- --:--:-- 79.9M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 24 16.1M 24 4019k 0 0 108M 0 --:--:-- --:--:-- --:--:-- 106M 100 16.1M 100 16.1M 0 0 110M 0 --:--:-- --:--:-- --:--:-- 110M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 28164 100 28164 0 0 20.8M 0 --:--:-- --:--:-- --:--:-- 26.8M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 9396 100 9396 0 0 7621k 0 --:--:-- --:--:-- --:--:-- 9175k % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 15637 100 15637 0 0 14.2M 0 --:--:-- --:--:-- --:--:-- 14.9M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 35865 100 35865 0 0 27.3M 0 --:--:-- --:--:-- --:--:-- 34.2M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 201k 100 201k 0 0 81.6M 0 --:--:-- --:--:-- --:--:-- 98.3M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 480k 100 480k 0 0 104M 0 --:--:-- --:--:-- --:--:-- 117M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 30141 100 30141 0 0 22.7M 0 --:--:-- --:--:-- --:--:-- 28.7M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 5853 100 5853 0 0 4230k 0 --:--:-- --:--:-- --:--:-- 5715k % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 93418 100 93418 0 0 48.4M 0 --:--:-- --:--:-- --:--:-- 89.0M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 24084 100 24084 0 0 18.4M 0 --:--:-- --:--:-- --:--:-- 22.9M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 235k 100 235k 0 0 58.6M 0 --:--:-- --:--:-- --:--:-- 76.5M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 98k 100 98k 0 0 56.0M 0 --:--:-- --:--:-- --:--:-- 96.2M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 321k 100 321k 0 0 64.0M 0 --:--:-- --:--:-- --:--:-- 78.4M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 80917 100 80917 0 0 48.1M 0 --:--:-- --:--:-- --:--:-- 77.1M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 79236 100 79236 0 0 40.4M 0 --:--:-- --:--:-- --:--:-- 75.5M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 36725 100 36725 0 0 27.4M 0 --:--:-- --:--:-- --:--:-- 35.0M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 49966 100 49966 0 0 30.3M 0 --:--:-- --:--:-- --:--:-- 47.6M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 19781 100 19781 0 0 13.8M 0 --:--:-- --:--:-- --:--:-- 18.8M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 55312 100 55312 0 0 34.1M 0 --:--:-- --:--:-- --:--:-- 52.7M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 69719 100 69719 0 0 40.1M 0 --:--:-- --:--:-- --:--:-- 66.4M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 102k 100 102k 0 0 45.5M 0 --:--:-- --:--:-- --:--:-- 50.2M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 216k 100 216k 0 0 76.7M 0 --:--:-- --:--:-- --:--:-- 105M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 68462 100 68462 0 0 36.9M 0 --:--:-- --:--:-- --:--:-- 65.2M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 1004k 100 1004k 0 0 100M 0 --:--:-- --:--:-- --:--:-- 108M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 22610 100 22610 0 0 16.4M 0 --:--:-- --:--:-- --:--:-- 21.5M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 37077 100 37077 0 0 25.0M 0 --:--:-- --:--:-- --:--:-- 35.3M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 109k 100 109k 0 0 44.9M 0 --:--:-- --:--:-- --:--:-- 53.5M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 93829 100 93829 0 0 57.8M 0 --:--:-- --:--:-- --:--:-- 89.4M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 135k 100 135k 0 0 51.1M 0 --:--:-- --:--:-- --:--:-- 66.0M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 363k 100 363k 0 0 94.5M 0 --:--:-- --:--:-- --:--:-- 118M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 19841 100 19841 0 0 15.1M 0 --:--:-- --:--:-- --:--:-- 18.9M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 57805 100 57805 0 0 36.9M 0 --:--:-- --:--:-- --:--:-- 55.1M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 326k 100 326k 0 0 64.5M 0 --:--:-- --:--:-- --:--:-- 79.6M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 16971 100 16971 0 0 12.4M 0 --:--:-- --:--:-- --:--:-- 16.1M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 91494 100 91494 0 0 57.8M 0 --:--:-- --:--:-- --:--:-- 87.2M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 119k 100 119k 0 0 67.0M 0 --:--:-- --:--:-- --:--:-- 117M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 154k 100 154k 0 0 76.2M 0 --:--:-- --:--:-- --:--:-- 150M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 69912 100 69912 0 0 40.0M 0 --:--:-- --:--:-- --:--:-- 66.6M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 62691 100 62691 0 0 39.3M 0 --:--:-- --:--:-- --:--:-- 59.7M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 62903 100 62903 0 0 43.2M 0 --:--:-- --:--:-- --:--:-- 59.9M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 111k 100 111k 0 0 64.9M 0 --:--:-- --:--:-- --:--:-- 108M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 1080k 100 1080k 0 0 98.7M 0 --:--:-- --:--:-- --:--:-- 105M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 35058 100 35058 0 0 20.9M 0 --:--:-- --:--:-- --:--:-- 33.4M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 61331 100 61331 0 0 39.4M 0 --:--:-- --:--:-- --:--:-- 58.4M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 81188 100 81188 0 0 37.1M 0 --:--:-- --:--:-- --:--:-- 38.7M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 384k 100 384k 0 0 100M 0 --:--:-- --:--:-- --:--:-- 125M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 35560 100 35560 0 0 27.3M 0 --:--:-- --:--:-- --:--:-- 33.9M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 243k 100 243k 0 0 88.3M 0 --:--:-- --:--:-- --:--:-- 119M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 270k 100 270k 0 0 85.7M 0 --:--:-- --:--:-- --:--:-- 88.1M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 503k 100 503k 0 0 107M 0 --:--:-- --:--:-- --:--:-- 123M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 19362 100 19362 0 0 14.6M 0 --:--:-- --:--:-- --:--:-- 18.4M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 75877 100 75877 0 0 46.6M 0 --:--:-- --:--:-- --:--:-- 72.3M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 294k 100 294k 0 0 95.1M 0 --:--:-- --:--:-- --:--:-- 143M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 31201 100 31201 0 0 17.7M 0 --:--:-- --:--:-- --:--:-- 29.7M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 32737 100 32737 0 0 25.0M 0 --:--:-- --:--:-- --:--:-- 31.2M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 15474 100 15474 0 0 12.9M 0 --:--:-- --:--:-- --:--:-- 14.7M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 26650 100 26650 0 0 17.1M 0 --:--:-- --:--:-- --:--:-- 25.4M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 75532 100 75532 0 0 51.7M 0 --:--:-- --:--:-- --:--:-- 72.0M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 40304 100 40304 0 0 27.7M 0 --:--:-- --:--:-- --:--:-- 38.4M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 76504 100 76504 0 0 46.8M 0 --:--:-- --:--:-- --:--:-- 72.9M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 38493 100 38493 0 0 25.9M 0 --:--:-- --:--:-- --:--:-- 36.7M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 16534 100 16534 0 0 11.3M 0 --:--:-- --:--:-- --:--:-- 15.7M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 34343 100 34343 0 0 28.0M 0 --:--:-- --:--:-- --:--:-- 32.7M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 33942 100 33942 0 0 25.7M 0 --:--:-- --:--:-- --:--:-- 32.3M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 117k 100 117k 0 0 65.3M 0 --:--:-- --:--:-- --:--:-- 114M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 195k 100 195k 0 0 82.5M 0 --:--:-- --:--:-- --:--:-- 95.5M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 11058 100 11058 0 0 9.9M 0 --:--:-- --:--:-- --:--:-- 10.5M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 57780 100 57780 0 0 38.5M 0 --:--:-- --:--:-- --:--:-- 55.1M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 286k 100 286k 0 0 59.8M 0 --:--:-- --:--:-- --:--:-- 69.8M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 120k 100 120k 0 0 59.3M 0 --:--:-- --:--:-- --:--:-- 117M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 158k 100 158k 0 0 75.5M 0 --:--:-- --:--:-- --:--:-- 77.5M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 65895 100 65895 0 0 41.3M 0 --:--:-- --:--:-- --:--:-- 62.8M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 140k 100 140k 0 0 68.9M 0 --:--:-- --:--:-- --:--:-- 137M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 22558 100 22558 0 0 14.8M 0 --:--:-- --:--:-- --:--:-- 21.5M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 30779 100 30779 0 0 21.5M 0 --:--:-- --:--:-- --:--:-- 29.3M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 37069 100 37069 0 0 26.8M 0 --:--:-- --:--:-- --:--:-- 35.3M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 29389 100 29389 0 0 21.8M 0 --:--:-- --:--:-- --:--:-- 28.0M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 36688 100 36688 0 0 28.7M 0 --:--:-- --:--:-- --:--:-- 34.9M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 123k 100 123k 0 0 69.3M 0 --:--:-- --:--:-- --:--:-- 120M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 30381 100 30381 0 0 24.1M 0 --:--:-- --:--:-- --:--:-- 28.9M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 29981 100 29981 0 0 20.3M 0 --:--:-- --:--:-- --:--:-- 28.5M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 13529 100 13529 0 0 12.2M 0 --:--:-- --:--:-- --:--:-- 12.9M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 42330 100 42330 0 0 32.6M 0 --:--:-- --:--:-- --:--:-- 40.3M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 38614 100 38614 0 0 27.8M 0 --:--:-- --:--:-- --:--:-- 36.8M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 32309 100 32309 0 0 27.2M 0 --:--:-- --:--:-- --:--:-- 30.8M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 194k 100 194k 0 0 82.4M 0 --:--:-- --:--:-- --:--:-- 94.9M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 42800 100 42800 0 0 29.2M 0 --:--:-- --:--:-- --:--:-- 40.8M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 1124k 100 1124k 0 0 96.5M 0 --:--:-- --:--:-- --:--:-- 99.8M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 142k 100 142k 0 0 66.4M 0 --:--:-- --:--:-- --:--:-- 69.3M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 113k 100 113k 0 0 49.7M 0 --:--:-- --:--:-- --:--:-- 55.4M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 17193 100 17193 0 0 13.8M 0 --:--:-- --:--:-- --:--:-- 16.3M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 76265 100 76265 0 0 47.9M 0 --:--:-- --:--:-- --:--:-- 72.7M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 33321 100 33321 0 0 25.3M 0 --:--:-- --:--:-- --:--:-- 31.7M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 189k 100 189k 0 0 77.3M 0 --:--:-- --:--:-- --:--:-- 92.4M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 18663 100 18663 0 0 15.4M 0 --:--:-- --:--:-- --:--:-- 17.7M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 6848 100 6848 0 0 6350k 0 --:--:-- --:--:-- --:--:-- 6687k % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 61650 100 61650 0 0 41.8M 0 --:--:-- --:--:-- --:--:-- 58.7M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 491k 100 491k 0 0 106M 0 --:--:-- --:--:-- --:--:-- 119M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 54203 100 54203 0 0 39.3M 0 --:--:-- --:--:-- --:--:-- 51.6M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 29213 100 29213 0 0 20.1M 0 --:--:-- --:--:-- --:--:-- 27.8M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 157k 100 157k 0 0 76.6M 0 --:--:-- --:--:-- --:--:-- 153M checking keyring... checking package integrity... loading package files... checking for file conflicts... checking available disk space... :: Processing package changes... installing numactl... installing ghc-libs... installing haskell-base-orphans... installing haskell-onetuple... installing haskell-erf... installing haskell-splitmix... installing haskell-random... installing haskell-quickcheck... installing haskell-data-array-byte... installing haskell-ghc-bignum-orphans... installing haskell-hashable... installing haskell-integer-logarithms... installing haskell-primitive... installing haskell-scientific... installing haskell-attoparsec... installing haskell-base-compat... installing haskell-base-compat-batteries... installing haskell-data-fix... installing haskell-dlist... installing haskell-generically... installing haskell-tagged... installing haskell-foldable1-classes-compat... installing haskell-indexed-traversable... installing haskell-unordered-containers... installing haskell-vector-stream... installing haskell-vector... installing haskell-indexed-traversable-instances... installing haskell-distributive... installing haskell-transformers-compat... installing haskell-comonad... installing haskell-th-abstraction... installing haskell-bifunctors... installing haskell-statevar... installing haskell-contravariant... installing haskell-semigroupoids... installing haskell-assoc... installing haskell-these... installing haskell-semialign... installing haskell-strict... installing haskell-text-short... installing haskell-time-compat... installing haskell-uuid-types... installing haskell-witherable... installing haskell-aeson... installing haskell-base64-bytestring... installing haskell-blaze-builder... installing haskell-blaze-markup... installing haskell-blaze-html... installing haskell-split... installing haskell-bitvec... installing haskell-vector-algorithms... installing haskell-mono-traversable... installing haskell-unliftio-core... installing haskell-resourcet... installing haskell-conduit... installing haskell-auto-update... installing haskell-easy-file... installing haskell-unix-compat... installing haskell-old-locale... installing haskell-old-time... installing haskell-unix-time... installing haskell-fast-logger... installing haskell-attoparsec-iso8601... installing haskell-data-default-class... installing haskell-cookie... installing haskell-case-insensitive... installing haskell-http-types... installing haskell-http-api-data... installing haskell-lift-type... installing haskell-async... installing haskell-network... installing haskell-zlib... installing haskell-streaming-commons... installing haskell-typed-process... installing haskell-conduit-extra... installing haskell-transformers-base... installing haskell-monad-control... installing haskell-lifted-base... installing haskell-monad-loops... installing haskell-stm-chans... installing haskell-monad-logger... installing haskell-path-pieces... installing haskell-resource-pool... installing haskell-silently... installing haskell-th-lift... installing haskell-th-lift-instances... installing haskell-safe-exceptions... installing haskell-unliftio... installing haskell-vault... installing haskell-persistent... installing haskell-colour... installing haskell-ansi-terminal... installing haskell-call-stack... installing haskell-hunit... installing haskell-hspec-expectations... installing haskell-lexer... installing haskell-quickcheck-io... installing haskell-setenv... installing haskell-tf-random... installing haskell-hspec-core... installing haskell-hspec-discover... installing haskell-hspec... installing haskell-quickcheck-instances... :: Running post-transaction hooks... (1/2) Arming ConditionNeedsUpdate... (2/2) Registering Haskell modules... ==> Checking buildtime dependencies... ==> Installing missing dependencies... resolving dependencies... looking for conflicting packages... Packages (1) ghc-9.2.8-1 Total Download Size: 33.73 MiB Total Installed Size: 232.52 MiB :: Proceed with installation? [Y/n] :: Retrieving packages... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 33.7M 100 33.7M 0 0 104M 0 --:--:-- --:--:-- --:--:-- 105M checking keyring... checking package integrity... loading package files... checking for file conflicts... checking available disk space... :: Processing package changes... installing ghc... :: Running post-transaction hooks... (1/1) Arming ConditionNeedsUpdate... ==> Retrieving sources... -> Downloading persistent-test-2.13.1.3.tar.gz... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 32262 100 32262 0 0 358k 0 --:--:-- --:--:-- --:--:-- 358k ==> WARNING: Skipping verification of source file PGP signatures. ==> Validating source files with sha512sums... persistent-test-2.13.1.3.tar.gz ... Passed ==> Extracting sources... -> Extracting persistent-test-2.13.1.3.tar.gz with bsdtar ==> Starting build()... Configuring persistent-test-2.13.1.3... Preprocessing library for persistent-test-2.13.1.3.. Building library for persistent-test-2.13.1.3.. [ 1 of 41] Compiling Init ( src/Init.hs, dist/build/Init.dyn_o ) src/Init.hs:38:5: warning: [-Wduplicate-exports] `MonadFail' is exported by `MonadFail' and `module Control.Monad.Reader' | 38 | , MonadFail | ^^^^^^^^^ src/Init.hs:159:33: warning: [-Wdeprecations] In the use of `mpsGeneric' (imported from Database.Persist.TH): Deprecated: "The mpsGeneric function adds a considerable amount of overhead and complexity to the library without bringing significant benefit. We would like to remove it. If you require this feature, please comment on the linked GitHub issue, and we'll either keep it around, or we can figure out a nicer way to solve your problem. Github: https://github.com/yesodweb/persistent/issues/1204" | 159 | persistSettings = sqlSettings { mpsGeneric = True } | ^^^^^^^^^^ [ 2 of 41] Compiling HtmlTest ( src/HtmlTest.hs, dist/build/HtmlTest.dyn_o ) src/HtmlTest.hs:14:36: warning: [-Wdeprecations] In the use of `mpsGeneric' (imported from Init, but defined in Database.Persist.TH): Deprecated: "The mpsGeneric function adds a considerable amount of overhead and complexity to the library without bringing significant benefit. We would like to remove it. If you require this feature, please comment on the linked GitHub issue, and we'll either keep it around, or we can figure out a nicer way to solve your problem. Github: https://github.com/yesodweb/persistent/issues/1204" | 14 | share [mkPersist persistSettings { mpsGeneric = True }, mkMigrate "htmlMigrate"] [persistLowerCase| | ^^^^^^^^^^ [ 3 of 41] Compiling GeneratedColumnTestSQL ( src/GeneratedColumnTestSQL.hs, dist/build/GeneratedColumnTestSQL.dyn_o ) [ 4 of 41] Compiling ForeignKey ( src/ForeignKey.hs, dist/build/ForeignKey.dyn_o ) src/ForeignKey.hs:14:36: warning: [-Wdeprecations] In the use of `mpsGeneric' (imported from Init, but defined in Database.Persist.TH): Deprecated: "The mpsGeneric function adds a considerable amount of overhead and complexity to the library without bringing significant benefit. We would like to remove it. If you require this feature, please comment on the linked GitHub issue, and we'll either keep it around, or we can figure out a nicer way to solve your problem. Github: https://github.com/yesodweb/persistent/issues/1204" | 14 | share [mkPersist persistSettings { mpsGeneric = False }, mkMigrate "compositeMigrate"] [persistLowerCase| | ^^^^^^^^^^ [ 5 of 41] Compiling EquivalentTypeTest ( src/EquivalentTypeTest.hs, dist/build/EquivalentTypeTest.dyn_o ) [ 6 of 41] Compiling EntityEmbedTest ( src/EntityEmbedTest.hs, dist/build/EntityEmbedTest.dyn_o ) src/EntityEmbedTest.hs:8:29: warning: [-Wdeprecations] In the use of `mpsGeneric' (imported from Init, but defined in Database.Persist.TH): Deprecated: "The mpsGeneric function adds a considerable amount of overhead and complexity to the library without bringing significant benefit. We would like to remove it. If you require this feature, please comment on the linked GitHub issue, and we'll either keep it around, or we can figure out a nicer way to solve your problem. Github: https://github.com/yesodweb/persistent/issues/1204" | 8 | mkPersist persistSettings { mpsGeneric = True } [persistUpperCase| | ^^^^^^^^^^ [ 7 of 41] Compiling EmptyEntityTest ( src/EmptyEntityTest.hs, dist/build/EmptyEntityTest.dyn_o ) src/EmptyEntityTest.hs:11:32: warning: [-Wdeprecations] In the use of `mpsGeneric' (imported from Init, but defined in Database.Persist.TH): Deprecated: "The mpsGeneric function adds a considerable amount of overhead and complexity to the library without bringing significant benefit. We would like to remove it. If you require this feature, please comment on the linked GitHub issue, and we'll either keep it around, or we can figure out a nicer way to solve your problem. Github: https://github.com/yesodweb/persistent/issues/1204" | 11 | share [mkPersist sqlSettings { mpsGeneric = True }, mkMigrate "migration"] [persistLowerCase| | ^^^^^^^^^^ [ 8 of 41] Compiling EmbedTest ( src/EmbedTest.hs, dist/build/EmbedTest.dyn_o ) src/EmbedTest.hs:31:32: warning: [-Wdeprecations] In the use of `mpsGeneric' (imported from Init, but defined in Database.Persist.TH): Deprecated: "The mpsGeneric function adds a considerable amount of overhead and complexity to the library without bringing significant benefit. We would like to remove it. If you require this feature, please comment on the linked GitHub issue, and we'll either keep it around, or we can figure out a nicer way to solve your problem. Github: https://github.com/yesodweb/persistent/issues/1204" | 31 | share [mkPersist sqlSettings { mpsGeneric = True }, mkMigrate "embedMigrate"] [persistUpperCase| | ^^^^^^^^^^ [ 9 of 41] Compiling EmbedOrderTest ( src/EmbedOrderTest.hs, dist/build/EmbedOrderTest.dyn_o ) src/EmbedOrderTest.hs:13:32: warning: [-Wdeprecations] In the use of `mpsGeneric' (imported from Init, but defined in Database.Persist.TH): Deprecated: "The mpsGeneric function adds a considerable amount of overhead and complexity to the library without bringing significant benefit. We would like to remove it. If you require this feature, please comment on the linked GitHub issue, and we'll either keep it around, or we can figure out a nicer way to solve your problem. Github: https://github.com/yesodweb/persistent/issues/1204" | 13 | share [mkPersist sqlSettings { mpsGeneric = True }, mkMigrate "embedOrderMigrate"] [persistUpperCase| | ^^^^^^^^^^ [10 of 41] Compiling DataTypeTest ( src/DataTypeTest.hs, dist/build/DataTypeTest.dyn_o ) [11 of 41] Compiling CustomPrimaryKeyReferenceTest ( src/CustomPrimaryKeyReferenceTest.hs, dist/build/CustomPrimaryKeyReferenceTest.dyn_o ) src/CustomPrimaryKeyReferenceTest.hs:10:36: warning: [-Wdeprecations] In the use of `mpsGeneric' (imported from Init, but defined in Database.Persist.TH): Deprecated: "The mpsGeneric function adds a considerable amount of overhead and complexity to the library without bringing significant benefit. We would like to remove it. If you require this feature, please comment on the linked GitHub issue, and we'll either keep it around, or we can figure out a nicer way to solve your problem. Github: https://github.com/yesodweb/persistent/issues/1204" | 10 | share [mkPersist persistSettings { mpsGeneric = False }, mkMigrate "migration"] [persistLowerCase| | ^^^^^^^^^^ [12 of 41] Compiling CustomPersistField ( src/CustomPersistField.hs, dist/build/CustomPersistField.dyn_o ) [13 of 41] Compiling CustomPersistFieldTest ( src/CustomPersistFieldTest.hs, dist/build/CustomPersistFieldTest.dyn_o ) src/CustomPersistFieldTest.hs:8:32: warning: [-Wdeprecations] In the use of `mpsGeneric' (imported from Init, but defined in Database.Persist.TH): Deprecated: "The mpsGeneric function adds a considerable amount of overhead and complexity to the library without bringing significant benefit. We would like to remove it. If you require this feature, please comment on the linked GitHub issue, and we'll either keep it around, or we can figure out a nicer way to solve your problem. Github: https://github.com/yesodweb/persistent/issues/1204" | 8 | share [mkPersist sqlSettings { mpsGeneric = True }, mkMigrate "customFieldMigrate"] [persistLowerCase| | ^^^^^^^^^^ [14 of 41] Compiling CompositeTest ( src/CompositeTest.hs, dist/build/CompositeTest.dyn_o ) src/CompositeTest.hs:14:36: warning: [-Wdeprecations] In the use of `mpsGeneric' (imported from Init, but defined in Database.Persist.TH): Deprecated: "The mpsGeneric function adds a considerable amount of overhead and complexity to the library without bringing significant benefit. We would like to remove it. If you require this feature, please comment on the linked GitHub issue, and we'll either keep it around, or we can figure out a nicer way to solve your problem. Github: https://github.com/yesodweb/persistent/issues/1204" | 14 | share [mkPersist persistSettings { mpsGeneric = False }, mkMigrate "compositeMigrate"] [persistLowerCase| | ^^^^^^^^^^ [15 of 41] Compiling LargeNumberTest ( src/LargeNumberTest.hs, dist/build/LargeNumberTest.dyn_o ) src/LargeNumberTest.hs:8:32: warning: [-Wdeprecations] In the use of `mpsGeneric' (imported from Init, but defined in Database.Persist.TH): Deprecated: "The mpsGeneric function adds a considerable amount of overhead and complexity to the library without bringing significant benefit. We would like to remove it. If you require this feature, please comment on the linked GitHub issue, and we'll either keep it around, or we can figure out a nicer way to solve your problem. Github: https://github.com/yesodweb/persistent/issues/1204" | 8 | share [mkPersist sqlSettings { mpsGeneric = True }, mkMigrate "numberMigrate"] [persistLowerCase| | ^^^^^^^^^^ [16 of 41] Compiling LongIdentifierTest ( src/LongIdentifierTest.hs, dist/build/LongIdentifierTest.dyn_o ) [17 of 41] Compiling MaxLenTest ( src/MaxLenTest.hs, dist/build/MaxLenTest.dyn_o ) src/MaxLenTest.hs:10:32: warning: [-Wdeprecations] In the use of `mpsGeneric' (imported from Init, but defined in Database.Persist.TH): Deprecated: "The mpsGeneric function adds a considerable amount of overhead and complexity to the library without bringing significant benefit. We would like to remove it. If you require this feature, please comment on the linked GitHub issue, and we'll either keep it around, or we can figure out a nicer way to solve your problem. Github: https://github.com/yesodweb/persistent/issues/1204" | 10 | share [mkPersist sqlSettings { mpsGeneric = True }, mkMigrate "maxlenMigrate"] [persistLowerCase| | ^^^^^^^^^^ [18 of 41] Compiling MaybeFieldDefsTest ( src/MaybeFieldDefsTest.hs, dist/build/MaybeFieldDefsTest.dyn_o ) src/MaybeFieldDefsTest.hs:11:32: warning: [-Wdeprecations] In the use of `mpsGeneric' (imported from Init, but defined in Database.Persist.TH): Deprecated: "The mpsGeneric function adds a considerable amount of overhead and complexity to the library without bringing significant benefit. We would like to remove it. If you require this feature, please comment on the linked GitHub issue, and we'll either keep it around, or we can figure out a nicer way to solve your problem. Github: https://github.com/yesodweb/persistent/issues/1204" | 11 | share [mkPersist sqlSettings { mpsGeneric = True }, mkMigrate "maybeFieldDefMigrate"] [persistLowerCase| | ^^^^^^^^^^ [19 of 41] Compiling MigrationColumnLengthTest ( src/MigrationColumnLengthTest.hs, dist/build/MigrationColumnLengthTest.dyn_o ) [20 of 41] Compiling MigrationIdempotencyTest ( src/MigrationIdempotencyTest.hs, dist/build/MigrationIdempotencyTest.dyn_o ) [21 of 41] Compiling MigrationOnlyTest ( src/MigrationOnlyTest.hs, dist/build/MigrationOnlyTest.dyn_o ) src/MigrationOnlyTest.hs:13:32: warning: [-Wdeprecations] In the use of `mpsGeneric' (imported from Init, but defined in Database.Persist.TH): Deprecated: "The mpsGeneric function adds a considerable amount of overhead and complexity to the library without bringing significant benefit. We would like to remove it. If you require this feature, please comment on the linked GitHub issue, and we'll either keep it around, or we can figure out a nicer way to solve your problem. Github: https://github.com/yesodweb/persistent/issues/1204" | 13 | share [mkPersist sqlSettings { mpsGeneric = True }, mkMigrate "migrateAll1"] [persistLowerCase| | ^^^^^^^^^^ src/MigrationOnlyTest.hs:21:32: warning: [-Wdeprecations] In the use of `mpsGeneric' (imported from Init, but defined in Database.Persist.TH): Deprecated: "The mpsGeneric function adds a considerable amount of overhead and complexity to the library without bringing significant benefit. We would like to remove it. If you require this feature, please comment on the linked GitHub issue, and we'll either keep it around, or we can figure out a nicer way to solve your problem. Github: https://github.com/yesodweb/persistent/issues/1204" | 21 | share [mkPersist sqlSettings { mpsGeneric = True }, mkMigrate "migrateAll2"] [persistLowerCase| | ^^^^^^^^^^ [22 of 41] Compiling MigrationTest ( src/MigrationTest.hs, dist/build/MigrationTest.dyn_o ) [23 of 41] Compiling PersistTestPetCollarType ( src/PersistTestPetCollarType.hs, dist/build/PersistTestPetCollarType.dyn_o ) [24 of 41] Compiling PersistTestPetType ( src/PersistTestPetType.hs, dist/build/PersistTestPetType.dyn_o ) [25 of 41] Compiling PersistUniqueTest ( src/PersistUniqueTest.hs, dist/build/PersistUniqueTest.dyn_o ) src/PersistUniqueTest.hs:8:36: warning: [-Wdeprecations] In the use of `mpsGeneric' (imported from Init, but defined in Database.Persist.TH): Deprecated: "The mpsGeneric function adds a considerable amount of overhead and complexity to the library without bringing significant benefit. We would like to remove it. If you require this feature, please comment on the linked GitHub issue, and we'll either keep it around, or we can figure out a nicer way to solve your problem. Github: https://github.com/yesodweb/persistent/issues/1204" | 8 | share [mkPersist persistSettings { mpsGeneric = False }, mkMigrate "migration"] [persistLowerCase| | ^^^^^^^^^^ [26 of 41] Compiling PersistentTestModelsImports ( src/PersistentTestModelsImports.hs, dist/build/PersistentTestModelsImports.dyn_o ) [27 of 41] Compiling PersistentTestModels ( src/PersistentTestModels.hs, dist/build/PersistentTestModels.dyn_o ) src/PersistentTestModels.hs:(25,101)-(126,2): Splicing expression template-haskell:Language.Haskell.TH.Quote.quoteExp persistUpperCase "\n\ \\n\ \-- Dedented comment\n\ \ -- Header-level comment\n\ \ -- Indented comment\n\ \ Person json\n\ \ name Text\n\ \ age Int \"some ignored -- \\\" attribute\"\n\ \ color Text Maybe -- this is a comment sql=foobarbaz\n\ \ PersonNameKey name -- this is a comment sql=foobarbaz\n\ \ deriving Show Eq\n\ \ Person1\n\ \-- Dedented comment\n\ \ -- Header-level comment\n\ \ -- Indented comment\n\ \ name Text\n\ \ age Int\n\ \ deriving Show Eq\n\ \ PersonMaybeAge\n\ \ name Text\n\ \ age Int Maybe\n\ \ PersonMay json\n\ \ name Text Maybe\n\ \ color Text Maybe\n\ \ deriving Show Eq\n\ \ Pet\n\ \ ownerId PersonId\n\ \ name Text\n\ \ -- deriving Show Eq\n\ \-- Dedented comment\n\ \ -- Header-level comment\n\ \ -- Indented comment\n\ \ type PetType\n\ \ MaybeOwnedPet\n\ \ ownerId PersonId Maybe\n\ \ name Text\n\ \ type PetType\n\ \-- Dedented comment\n\ \ -- Header-level comment\n\ \ -- Indented comment\n\ \ NeedsPet\n\ \ petKey PetId\n\ \ OutdoorPet\n\ \ ownerId PersonId\n\ \ collar PetCollar\n\ \ type PetType\n\ \\n\ \ -- From the scaffold\n\ \ UserPT\n\ \ ident Text\n\ \ password Text Maybe\n\ \ UniqueUserPT ident\n\ \ EmailPT\n\ \ email Text\n\ \ user UserPTId Maybe\n\ \ verkey Text Maybe\n\ \ UniqueEmailPT email\n\ \\n\ \ Upsert\n\ \ email Text\n\ \ attr Text\n\ \ extra Text\n\ \ age Int\n\ \ UniqueUpsert email\n\ \ deriving Eq Show\n\ \\n\ \ UpsertBy\n\ \ email Text\n\ \ city Text\n\ \ attr Text\n\ \ UniqueUpsertBy email\n\ \ UniqueUpsertByCity city\n\ \ deriving Eq Show\n\ \\n\ \ Strict\n\ \ !yes Int\n\ \ ~no Int\n\ \ def Int\n\ \\n\ \ DudeWeirdColumns\n\ \ name Text\n\ \ foo Int Maybe MigrationOnly\n\ \ bar Double SafeToRemove\n\ \ UniqueName name\n\ \ deriving Eq Show\n\ \\n\ \ -- | This is a doc comment for a relationship.\n\ \ -- | You need to put the pipe character for each line of documentation.\n\ \ -- Lines without a pipe are omitted.\n\ \ -- | But you can resume the doc comments afterwards.\n\ \ Relationship\n\ \ -- | Fields should be documentable.\n\ \ name String\n\ \ parent RelationshipId Maybe\n\ \\n\ \ MutA\n\ \ mutB MutBId\n\ \\n\ \ MutB\n\ \ mutA MutAId\n\ \\n" ======> [(((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "Person"))) (EntityNameDB (Data.Text.pack "Person"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "PersonId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) [Data.Text.pack "json"]) []) [(((UniqueDef (ConstraintNameHS (Data.Text.pack "PersonNameKey"))) (ConstraintNameDB (Data.Text.pack "PersonNameKey"))) ((FieldNameHS (Data.Text.pack "name"), FieldNameDB (Data.Text.pack "name")) NEL.:| [])) []]) []) [Data.Text.pack "Show", Data.Text.pack "Eq"]) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "name"))) (FieldNameDB (Data.Text.pack "name"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "age"))) (FieldNameDB (Data.Text.pack "age"))) [FieldAttrOther (Data.Text.pack "some ignored -- " attribute")]) True) ((FTTypeCon Nothing) (Data.Text.pack "Int"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "color"))) (FieldNameDB (Data.Text.pack "color"))) [FieldAttrMaybe]) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "Person1"))) (EntityNameDB (Data.Text.pack "Person1"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "Person1Id"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) [Data.Text.pack "Show", Data.Text.pack "Eq"]) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "name"))) (FieldNameDB (Data.Text.pack "name"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "age"))) (FieldNameDB (Data.Text.pack "age"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Int"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "PersonMaybeAge"))) (EntityNameDB (Data.Text.pack "PersonMaybeAge"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "PersonMaybeAgeId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "name"))) (FieldNameDB (Data.Text.pack "name"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "age"))) (FieldNameDB (Data.Text.pack "age"))) [FieldAttrMaybe]) True) ((FTTypeCon Nothing) (Data.Text.pack "Int"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "PersonMay"))) (EntityNameDB (Data.Text.pack "PersonMay"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "PersonMayId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) [Data.Text.pack "json"]) []) []) []) [Data.Text.pack "Show", Data.Text.pack "Eq"]) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "name"))) (FieldNameDB (Data.Text.pack "name"))) [FieldAttrMaybe]) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "color"))) (FieldNameDB (Data.Text.pack "color"))) [FieldAttrMaybe]) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "Pet"))) (EntityNameDB (Data.Text.pack "Pet"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "PetId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "ownerId"))) (FieldNameDB (Data.Text.pack "ownerId"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "PersonId"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "name"))) (FieldNameDB (Data.Text.pack "name"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "type"))) (FieldNameDB (Data.Text.pack "type"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "PetType"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "MaybeOwnedPet"))) (EntityNameDB (Data.Text.pack "MaybeOwnedPet"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "MaybeOwnedPetId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "ownerId"))) (FieldNameDB (Data.Text.pack "ownerId"))) [FieldAttrMaybe]) True) ((FTTypeCon Nothing) (Data.Text.pack "PersonId"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "name"))) (FieldNameDB (Data.Text.pack "name"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "type"))) (FieldNameDB (Data.Text.pack "type"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "PetType"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "NeedsPet"))) (EntityNameDB (Data.Text.pack "NeedsPet"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "NeedsPetId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "petKey"))) (FieldNameDB (Data.Text.pack "petKey"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "PetId"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "OutdoorPet"))) (EntityNameDB (Data.Text.pack "OutdoorPet"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "OutdoorPetId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "ownerId"))) (FieldNameDB (Data.Text.pack "ownerId"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "PersonId"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "collar"))) (FieldNameDB (Data.Text.pack "collar"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "PetCollar"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "type"))) (FieldNameDB (Data.Text.pack "type"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "PetType"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "UserPT"))) (EntityNameDB (Data.Text.pack "UserPT"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "UserPTId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) [(((UniqueDef (ConstraintNameHS (Data.Text.pack "UniqueUserPT"))) (ConstraintNameDB (Data.Text.pack "UniqueUserPT"))) ((FieldNameHS (Data.Text.pack "ident"), FieldNameDB (Data.Text.pack "ident")) NEL.:| [])) []]) []) []) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "ident"))) (FieldNameDB (Data.Text.pack "ident"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "password"))) (FieldNameDB (Data.Text.pack "password"))) [FieldAttrMaybe]) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "EmailPT"))) (EntityNameDB (Data.Text.pack "EmailPT"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "EmailPTId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) [(((UniqueDef (ConstraintNameHS (Data.Text.pack "UniqueEmailPT"))) (ConstraintNameDB (Data.Text.pack "UniqueEmailPT"))) ((FieldNameHS (Data.Text.pack "email"), FieldNameDB (Data.Text.pack "email")) NEL.:| [])) []]) []) []) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "email"))) (FieldNameDB (Data.Text.pack "email"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "user"))) (FieldNameDB (Data.Text.pack "user"))) [FieldAttrMaybe]) True) ((FTTypeCon Nothing) (Data.Text.pack "UserPTId"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "verkey"))) (FieldNameDB (Data.Text.pack "verkey"))) [FieldAttrMaybe]) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "Upsert"))) (EntityNameDB (Data.Text.pack "Upsert"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "UpsertId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) [(((UniqueDef (ConstraintNameHS (Data.Text.pack "UniqueUpsert"))) (ConstraintNameDB (Data.Text.pack "UniqueUpsert"))) ((FieldNameHS (Data.Text.pack "email"), FieldNameDB (Data.Text.pack "email")) NEL.:| [])) []]) []) [Data.Text.pack "Eq", Data.Text.pack "Show"]) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "email"))) (FieldNameDB (Data.Text.pack "email"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "attr"))) (FieldNameDB (Data.Text.pack "attr"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "extra"))) (FieldNameDB (Data.Text.pack "extra"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "age"))) (FieldNameDB (Data.Text.pack "age"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Int"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "UpsertBy"))) (EntityNameDB (Data.Text.pack "UpsertBy"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "UpsertById"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) [(((UniqueDef (ConstraintNameHS (Data.Text.pack "UniqueUpsertBy"))) (ConstraintNameDB (Data.Text.pack "UniqueUpsertBy"))) ((FieldNameHS (Data.Text.pack "email"), FieldNameDB (Data.Text.pack "email")) NEL.:| [])) [], (((UniqueDef (ConstraintNameHS (Data.Text.pack "UniqueUpsertByCity"))) (ConstraintNameDB (Data.Text.pack "UniqueUpsertByCity"))) ((FieldNameHS (Data.Text.pack "city"), FieldNameDB (Data.Text.pack "city")) NEL.:| [])) []]) []) [Data.Text.pack "Eq", Data.Text.pack "Show"]) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "email"))) (FieldNameDB (Data.Text.pack "email"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "city"))) (FieldNameDB (Data.Text.pack "city"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "attr"))) (FieldNameDB (Data.Text.pack "attr"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "Strict"))) (EntityNameDB (Data.Text.pack "Strict"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "StrictId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "yes"))) (FieldNameDB (Data.Text.pack "yes"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Int"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "no"))) (FieldNameDB (Data.Text.pack "no"))) []) False) ((FTTypeCon Nothing) (Data.Text.pack "Int"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "def"))) (FieldNameDB (Data.Text.pack "def"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Int"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "DudeWeirdColumns"))) (EntityNameDB (Data.Text.pack "DudeWeirdColumns"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "DudeWeirdColumnsId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) [(((UniqueDef (ConstraintNameHS (Data.Text.pack "UniqueName"))) (ConstraintNameDB (Data.Text.pack "UniqueName"))) ((FieldNameHS (Data.Text.pack "name"), FieldNameDB (Data.Text.pack "name")) NEL.:| [])) []]) []) [Data.Text.pack "Eq", Data.Text.pack "Show"]) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "name"))) (FieldNameDB (Data.Text.pack "name"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "foo"))) (FieldNameDB (Data.Text.pack "foo"))) [FieldAttrMigrationOnly, FieldAttrMaybe]) True) ((FTTypeCon Nothing) (Data.Text.pack "Int"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "bar"))) (FieldNameDB (Data.Text.pack "bar"))) [FieldAttrSafeToRemove]) True) ((FTTypeCon Nothing) (Data.Text.pack "Double"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "Relationship"))) (EntityNameDB (Data.Text.pack "Relationship"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "RelationshipId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) (Just (Data.Text.pack "This is a doc comment for a relationship. You need to put the pipe character for each line of documentation. But you can resume the doc comments afterwards. ")))) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "name"))) (FieldNameDB (Data.Text.pack "name"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "String"))) ((FieldCascade Nothing) Nothing)) Nothing) (Just (Data.Text.pack "Fields should be documentable. ")), (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "parent"))) (FieldNameDB (Data.Text.pack "parent"))) [FieldAttrMaybe]) True) ((FTTypeCon Nothing) (Data.Text.pack "RelationshipId"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "MutA"))) (EntityNameDB (Data.Text.pack "MutA"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "MutAId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "mutB"))) (FieldNameDB (Data.Text.pack "mutB"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "MutBId"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "MutB"))) (EntityNameDB (Data.Text.pack "MutB"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "MutBId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "mutA"))) (FieldNameDB (Data.Text.pack "mutA"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "MutAId"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing]] src/PersistentTestModels.hs:(25,1)-(126,2): Splicing declarations share [mkPersist persistSettings {mpsGeneric = True}, mkMigrate "testMigrate"] ([(((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "Person"))) (EntityNameDB (Data.Text.pack "Person"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "PersonId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) [Data.Text.pack "json"]) []) [(((UniqueDef (ConstraintNameHS (Data.Text.pack "PersonNameKey"))) (ConstraintNameDB (Data.Text.pack "PersonNameKey"))) ((FieldNameHS (Data.Text.pack "name"), FieldNameDB (Data.Text.pack "name")) NEL.:| [])) []]) []) [Data.Text.pack "Show", Data.Text.pack "Eq"]) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "name"))) (FieldNameDB (Data.Text.pack "name"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "age"))) (FieldNameDB (Data.Text.pack "age"))) [FieldAttrOther (Data.Text.pack "some ignored -- " attribute")]) True) ((FTTypeCon Nothing) (Data.Text.pack "Int"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "color"))) (FieldNameDB (Data.Text.pack "color"))) [FieldAttrMaybe]) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "Person1"))) (EntityNameDB (Data.Text.pack "Person1"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "Person1Id"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) [Data.Text.pack "Show", Data.Text.pack "Eq"]) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "name"))) (FieldNameDB (Data.Text.pack "name"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "age"))) (FieldNameDB (Data.Text.pack "age"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Int"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "PersonMaybeAge"))) (EntityNameDB (Data.Text.pack "PersonMaybeAge"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "PersonMaybeAgeId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "name"))) (FieldNameDB (Data.Text.pack "name"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "age"))) (FieldNameDB (Data.Text.pack "age"))) [FieldAttrMaybe]) True) ((FTTypeCon Nothing) (Data.Text.pack "Int"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "PersonMay"))) (EntityNameDB (Data.Text.pack "PersonMay"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "PersonMayId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) [Data.Text.pack "json"]) []) []) []) [Data.Text.pack "Show", Data.Text.pack "Eq"]) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "name"))) (FieldNameDB (Data.Text.pack "name"))) [FieldAttrMaybe]) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "color"))) (FieldNameDB (Data.Text.pack "color"))) [FieldAttrMaybe]) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "Pet"))) (EntityNameDB (Data.Text.pack "Pet"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "PetId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "ownerId"))) (FieldNameDB (Data.Text.pack "ownerId"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "PersonId"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "name"))) (FieldNameDB (Data.Text.pack "name"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "type"))) (FieldNameDB (Data.Text.pack "type"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "PetType"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "MaybeOwnedPet"))) (EntityNameDB (Data.Text.pack "MaybeOwnedPet"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "MaybeOwnedPetId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "ownerId"))) (FieldNameDB (Data.Text.pack "ownerId"))) [FieldAttrMaybe]) True) ((FTTypeCon Nothing) (Data.Text.pack "PersonId"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "name"))) (FieldNameDB (Data.Text.pack "name"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "type"))) (FieldNameDB (Data.Text.pack "type"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "PetType"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "NeedsPet"))) (EntityNameDB (Data.Text.pack "NeedsPet"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "NeedsPetId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "petKey"))) (FieldNameDB (Data.Text.pack "petKey"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "PetId"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "OutdoorPet"))) (EntityNameDB (Data.Text.pack "OutdoorPet"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "OutdoorPetId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "ownerId"))) (FieldNameDB (Data.Text.pack "ownerId"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "PersonId"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "collar"))) (FieldNameDB (Data.Text.pack "collar"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "PetCollar"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "type"))) (FieldNameDB (Data.Text.pack "type"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "PetType"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "UserPT"))) (EntityNameDB (Data.Text.pack "UserPT"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "UserPTId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) [(((UniqueDef (ConstraintNameHS (Data.Text.pack "UniqueUserPT"))) (ConstraintNameDB (Data.Text.pack "UniqueUserPT"))) ((FieldNameHS (Data.Text.pack "ident"), FieldNameDB (Data.Text.pack "ident")) NEL.:| [])) []]) []) []) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "ident"))) (FieldNameDB (Data.Text.pack "ident"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "password"))) (FieldNameDB (Data.Text.pack "password"))) [FieldAttrMaybe]) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "EmailPT"))) (EntityNameDB (Data.Text.pack "EmailPT"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "EmailPTId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) [(((UniqueDef (ConstraintNameHS (Data.Text.pack "UniqueEmailPT"))) (ConstraintNameDB (Data.Text.pack "UniqueEmailPT"))) ((FieldNameHS (Data.Text.pack "email"), FieldNameDB (Data.Text.pack "email")) NEL.:| [])) []]) []) []) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "email"))) (FieldNameDB (Data.Text.pack "email"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "user"))) (FieldNameDB (Data.Text.pack "user"))) [FieldAttrMaybe]) True) ((FTTypeCon Nothing) (Data.Text.pack "UserPTId"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "verkey"))) (FieldNameDB (Data.Text.pack "verkey"))) [FieldAttrMaybe]) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "Upsert"))) (EntityNameDB (Data.Text.pack "Upsert"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "UpsertId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) [(((UniqueDef (ConstraintNameHS (Data.Text.pack "UniqueUpsert"))) (ConstraintNameDB (Data.Text.pack "UniqueUpsert"))) ((FieldNameHS (Data.Text.pack "email"), FieldNameDB (Data.Text.pack "email")) NEL.:| [])) []]) []) [Data.Text.pack "Eq", Data.Text.pack "Show"]) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "email"))) (FieldNameDB (Data.Text.pack "email"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "attr"))) (FieldNameDB (Data.Text.pack "attr"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "extra"))) (FieldNameDB (Data.Text.pack "extra"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "age"))) (FieldNameDB (Data.Text.pack "age"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Int"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "UpsertBy"))) (EntityNameDB (Data.Text.pack "UpsertBy"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "UpsertById"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) [(((UniqueDef (ConstraintNameHS (Data.Text.pack "UniqueUpsertBy"))) (ConstraintNameDB (Data.Text.pack "UniqueUpsertBy"))) ((FieldNameHS (Data.Text.pack "email"), FieldNameDB (Data.Text.pack "email")) NEL.:| [])) [], (((UniqueDef (ConstraintNameHS (Data.Text.pack "UniqueUpsertByCity"))) (ConstraintNameDB (Data.Text.pack "UniqueUpsertByCity"))) ((FieldNameHS (Data.Text.pack "city"), FieldNameDB (Data.Text.pack "city")) NEL.:| [])) []]) []) [Data.Text.pack "Eq", Data.Text.pack "Show"]) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "email"))) (FieldNameDB (Data.Text.pack "email"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "city"))) (FieldNameDB (Data.Text.pack "city"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "attr"))) (FieldNameDB (Data.Text.pack "attr"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "Strict"))) (EntityNameDB (Data.Text.pack "Strict"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "StrictId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "yes"))) (FieldNameDB (Data.Text.pack "yes"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Int"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "no"))) (FieldNameDB (Data.Text.pack "no"))) []) False) ((FTTypeCon Nothing) (Data.Text.pack "Int"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "def"))) (FieldNameDB (Data.Text.pack "def"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Int"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "DudeWeirdColumns"))) (EntityNameDB (Data.Text.pack "DudeWeirdColumns"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "DudeWeirdColumnsId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) [(((UniqueDef (ConstraintNameHS (Data.Text.pack "UniqueName"))) (ConstraintNameDB (Data.Text.pack "UniqueName"))) ((FieldNameHS (Data.Text.pack "name"), FieldNameDB (Data.Text.pack "name")) NEL.:| [])) []]) []) [Data.Text.pack "Eq", Data.Text.pack "Show"]) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "name"))) (FieldNameDB (Data.Text.pack "name"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Text"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "foo"))) (FieldNameDB (Data.Text.pack "foo"))) [FieldAttrMigrationOnly, FieldAttrMaybe]) True) ((FTTypeCon Nothing) (Data.Text.pack "Int"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "bar"))) (FieldNameDB (Data.Text.pack "bar"))) [FieldAttrSafeToRemove]) True) ((FTTypeCon Nothing) (Data.Text.pack "Double"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "Relationship"))) (EntityNameDB (Data.Text.pack "Relationship"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "RelationshipId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) (Just (Data.Text.pack "This is a doc comment for a relationship. You need to put the pipe character for each line of documentation. But you can resume the doc comments afterwards. ")))) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "name"))) (FieldNameDB (Data.Text.pack "name"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "String"))) ((FieldCascade Nothing) Nothing)) Nothing) (Just (Data.Text.pack "Fields should be documentable. ")), (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "parent"))) (FieldNameDB (Data.Text.pack "parent"))) [FieldAttrMaybe]) True) ((FTTypeCon Nothing) (Data.Text.pack "RelationshipId"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "MutA"))) (EntityNameDB (Data.Text.pack "MutA"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "MutAId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "mutB"))) (FieldNameDB (Data.Text.pack "mutB"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "MutBId"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "MutB"))) (EntityNameDB (Data.Text.pack "MutB"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "MutBId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "mutA"))) (FieldNameDB (Data.Text.pack "mutA"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "MutAId"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing]]) ======> instance PersistStore backend => PersistField (PersonGeneric backend) where toPersistValue = Database.Persist.TH.entityToPersistValueHelper fromPersistValue = Database.Persist.TH.entityFromPersistValueHelper ["name", "age", "color"] instance PersistStore backend => PersistFieldSql (PersonGeneric backend) where sqlType _ = SqlString instance PersistStore backend => PersistField (Person1Generic backend) where toPersistValue = Database.Persist.TH.entityToPersistValueHelper fromPersistValue = Database.Persist.TH.entityFromPersistValueHelper ["name", "age"] instance PersistStore backend => PersistFieldSql (Person1Generic backend) where sqlType _ = SqlString instance PersistStore backend => PersistField (PersonMaybeAgeGeneric backend) where toPersistValue = Database.Persist.TH.entityToPersistValueHelper fromPersistValue = Database.Persist.TH.entityFromPersistValueHelper ["name", "age"] instance PersistStore backend => PersistFieldSql (PersonMaybeAgeGeneric backend) where sqlType _ = SqlString instance PersistStore backend => PersistField (PersonMayGeneric backend) where toPersistValue = Database.Persist.TH.entityToPersistValueHelper fromPersistValue = Database.Persist.TH.entityFromPersistValueHelper ["name", "color"] instance PersistStore backend => PersistFieldSql (PersonMayGeneric backend) where sqlType _ = SqlString instance PersistStore backend => PersistField (PetGeneric backend) where toPersistValue = Database.Persist.TH.entityToPersistValueHelper fromPersistValue = Database.Persist.TH.entityFromPersistValueHelper ["ownerId", "name", "type"] instance PersistStore backend => PersistFieldSql (PetGeneric backend) where sqlType _ = SqlString instance PersistStore backend => PersistField (MaybeOwnedPetGeneric backend) where toPersistValue = Database.Persist.TH.entityToPersistValueHelper fromPersistValue = Database.Persist.TH.entityFromPersistValueHelper ["ownerId", "name", "type"] instance PersistStore backend => PersistFieldSql (MaybeOwnedPetGeneric backend) where sqlType _ = SqlString instance PersistStore backend => PersistField (NeedsPetGeneric backend) where toPersistValue = Database.Persist.TH.entityToPersistValueHelper fromPersistValue = Database.Persist.TH.entityFromPersistValueHelper ["petKey"] instance PersistStore backend => PersistFieldSql (NeedsPetGeneric backend) where sqlType _ = SqlString instance PersistStore backend => PersistField (OutdoorPetGeneric backend) where toPersistValue = Database.Persist.TH.entityToPersistValueHelper fromPersistValue = Database.Persist.TH.entityFromPersistValueHelper ["ownerId", "collar", "type"] instance PersistStore backend => PersistFieldSql (OutdoorPetGeneric backend) where sqlType _ = SqlString instance PersistStore backend => PersistField (UserPTGeneric backend) where toPersistValue = Database.Persist.TH.entityToPersistValueHelper fromPersistValue = Database.Persist.TH.entityFromPersistValueHelper ["ident", "password"] instance PersistStore backend => PersistFieldSql (UserPTGeneric backend) where sqlType _ = SqlString instance PersistStore backend => PersistField (EmailPTGeneric backend) where toPersistValue = Database.Persist.TH.entityToPersistValueHelper fromPersistValue = Database.Persist.TH.entityFromPersistValueHelper ["email", "user", "verkey"] instance PersistStore backend => PersistFieldSql (EmailPTGeneric backend) where sqlType _ = SqlString instance PersistStore backend => PersistField (UpsertGeneric backend) where toPersistValue = Database.Persist.TH.entityToPersistValueHelper fromPersistValue = Database.Persist.TH.entityFromPersistValueHelper ["email", "attr", "extra", "age"] instance PersistStore backend => PersistFieldSql (UpsertGeneric backend) where sqlType _ = SqlString instance PersistStore backend => PersistField (UpsertByGeneric backend) where toPersistValue = Database.Persist.TH.entityToPersistValueHelper fromPersistValue = Database.Persist.TH.entityFromPersistValueHelper ["email", "city", "attr"] instance PersistStore backend => PersistFieldSql (UpsertByGeneric backend) where sqlType _ = SqlString instance PersistStore backend => PersistField (StrictGeneric backend) where toPersistValue = Database.Persist.TH.entityToPersistValueHelper fromPersistValue = Database.Persist.TH.entityFromPersistValueHelper ["yes", "no", "def"] instance PersistStore backend => PersistFieldSql (StrictGeneric backend) where sqlType _ = SqlString instance PersistStore backend => PersistField (DudeWeirdColumnsGeneric backend) where toPersistValue = Database.Persist.TH.entityToPersistValueHelper fromPersistValue = Database.Persist.TH.entityFromPersistValueHelper ["name"] instance PersistStore backend => PersistFieldSql (DudeWeirdColumnsGeneric backend) where sqlType _ = SqlString instance PersistStore backend => PersistField (RelationshipGeneric backend) where toPersistValue = Database.Persist.TH.entityToPersistValueHelper fromPersistValue = Database.Persist.TH.entityFromPersistValueHelper ["name", "parent"] instance PersistStore backend => PersistFieldSql (RelationshipGeneric backend) where sqlType _ = SqlString instance PersistStore backend => PersistField (MutAGeneric backend) where toPersistValue = Database.Persist.TH.entityToPersistValueHelper fromPersistValue = Database.Persist.TH.entityFromPersistValueHelper ["mutB"] instance PersistStore backend => PersistFieldSql (MutAGeneric backend) where sqlType _ = SqlString instance PersistStore backend => PersistField (MutBGeneric backend) where toPersistValue = Database.Persist.TH.entityToPersistValueHelper fromPersistValue = Database.Persist.TH.entityFromPersistValueHelper ["mutA"] instance PersistStore backend => PersistFieldSql (MutBGeneric backend) where sqlType _ = SqlString type Person = PersonGeneric SqlBackend data PersonGeneric backend = Person {personName :: !Text, personAge :: !Int, personColor :: !(Maybe Text)} deriving stock (Show, Eq) type PersonId = Key Person instance PersistStore backend => PersistEntity (PersonGeneric backend) where type PersistEntityBackend (PersonGeneric backend) = backend data Unique (PersonGeneric backend) = PersonNameKey Text newtype Key (PersonGeneric backend) = PersonKey {unPersonKey :: (BackendKey backend)} data EntityField (PersonGeneric backend) typ = (typ ~ Key (PersonGeneric backend)) => PersonId | (typ ~ Text) => PersonName | (typ ~ Int) => PersonAge | (typ ~ Maybe Text) => PersonColor keyToValues = ((: []) . (toPersistValue . (\ PersonKey {unPersonKey = x} -> x))) keyFromValues = (fmap PersonKey . (fromPersistValue . Database.Persist.TH.headNote)) keyFromRecordM = Nothing tabulateEntityA fromField_a2v5l = ((Entity <$> fromField_a2v5l PersonId) <*> (((pure Person <*> fromField_a2v5l PersonName) <*> fromField_a2v5l PersonAge) <*> fromField_a2v5l PersonColor)) entityDef _ = ((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "Person"))) (EntityNameDB (Data.Text.pack "Person"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "PersonId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) [Data.Text.pack "json"]) []) [(((UniqueDef (ConstraintNameHS (Data.Text.pack "PersonNameKey"))) (ConstraintNameDB (Data.Text.pack "PersonNameKey"))) ((FieldNameHS (Data.Text.pack "name"), FieldNameDB (Data.Text.pack "name")) NEL.:| [])) []]) []) [Data.Text.pack "Show", Data.Text.pack "Eq"]) Data.Map.Internal.Tip) False) Nothing {persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityFields = [FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "name"), fieldDB = FieldNameDB (Data.Text.pack "name"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "Text"), fieldSqlType = sqlType (Proxy :: Proxy Text), fieldAttrs = [], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}, FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "age"), fieldDB = FieldNameDB (Data.Text.pack "age"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "Int"), fieldSqlType = sqlType (Proxy :: Proxy Int), fieldAttrs = [FieldAttrOther (Data.Text.pack "some ignored -- " attribute")], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}, FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "color"), fieldDB = FieldNameDB (Data.Text.pack "color"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "Text"), fieldSqlType = sqlType (Proxy :: Proxy Text), fieldAttrs = [FieldAttrMaybe], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}], persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityId = EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "PersonId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True), persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityForeigns = []} toPersistFields (Person x_a2v4U x_a2v4V x_a2v4W) = [toPersistValue x_a2v4U, toPersistValue x_a2v4V, toPersistValue x_a2v4W] fromPersistValues [x1_a2v4Y, x2_a2v4Z, x3_a2v50] = Person <$> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "Person")) (Data.Text.pack "name")) . fromPersistValue) x1_a2v4Y <*> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "Person")) (Data.Text.pack "age")) . fromPersistValue) x2_a2v4Z <*> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "Person")) (Data.Text.pack "color")) . fromPersistValue) x3_a2v50 fromPersistValues x_a2v4X = (Left $ (mappend (Data.Text.pack "Person: fromPersistValues failed on: ")) (Data.Text.pack $ show x_a2v4X)) persistUniqueToFieldNames PersonNameKey {} = ((FieldNameHS (Data.Text.pack "name"), FieldNameDB (Data.Text.pack "name")) NEL.:| []) persistUniqueToValues (PersonNameKey x_a2v51) = [toPersistValue x_a2v51] persistUniqueKeys (Person _name_a2v52 _age_a2v53 _color_a2v54) = [PersonNameKey _name_a2v52] persistFieldDef PersonId = Database.Persist.TH.stripIdFieldImpl (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "PersonId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True)) persistFieldDef PersonName = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy Person)) (FieldNameHS (Data.Text.pack "name")) persistFieldDef PersonAge = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy Person)) (FieldNameHS (Data.Text.pack "age")) persistFieldDef PersonColor = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy Person)) (FieldNameHS (Data.Text.pack "color")) persistIdField = PersonId fieldLens PersonId = (lensPTH entityKey) (\ (Entity _ value_a2v57) key_a2v58 -> (Entity key_a2v58) value_a2v57) fieldLens PersonName = (lensPTH ((\ Person {personName = x} -> x) . entityVal)) (\ (Entity key_a2v59 value_a2v5a) x_a2v5b -> (Entity key_a2v59) (case value_a2v5a of Person {personAge = personAge_a2v5d, personColor = personColor_a2v5e} -> Person {personName = x_a2v5b, personAge = personAge, personColor = personColor})) fieldLens PersonAge = (lensPTH ((\ Person {personAge = x} -> x) . entityVal)) (\ (Entity key_a2v59 value_a2v5a) x_a2v5b -> (Entity key_a2v59) (case value_a2v5a of Person {personName = personName_a2v5f, personColor = personColor_a2v5h} -> Person {personName = personName, personAge = x_a2v5b, personColor = personColor})) fieldLens PersonColor = (lensPTH ((\ Person {personColor = x} -> x) . entityVal)) (\ (Entity key_a2v59 value_a2v5a) x_a2v5b -> (Entity key_a2v59) (case value_a2v5a of Person {personName = personName_a2v5i, personAge = personAge_a2v5j} -> Person {personName = personName, personAge = personAge, personColor = x_a2v5b})) deriving stock instance Show (BackendKey backend) => Show (Key (PersonGeneric backend)) deriving stock instance Read (BackendKey backend) => Read (Key (PersonGeneric backend)) deriving newtype instance Eq (BackendKey backend) => Eq (Key (PersonGeneric backend)) deriving newtype instance Ord (BackendKey backend) => Ord (Key (PersonGeneric backend)) deriving newtype instance Web.Internal.HttpApiData.ToHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.ToHttpApiData (Key (PersonGeneric backend)) deriving newtype instance Web.Internal.HttpApiData.FromHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.FromHttpApiData (Key (PersonGeneric backend)) deriving newtype instance Web.PathPieces.PathPiece (BackendKey backend) => Web.PathPieces.PathPiece (Key (PersonGeneric backend)) deriving newtype instance PersistField (BackendKey backend) => PersistField (Key (PersonGeneric backend)) deriving newtype instance PersistFieldSql (BackendKey backend) => PersistFieldSql (Key (PersonGeneric backend)) deriving newtype instance ToJSON (BackendKey backend) => ToJSON (Key (PersonGeneric backend)) deriving newtype instance FromJSON (BackendKey backend) => FromJSON (Key (PersonGeneric backend)) instance PersistStore backend => ToBackendKey backend (PersonGeneric backend) where toBackendKey = \ PersonKey {unPersonKey = x} -> x fromBackendKey = PersonKey type Person1 = Person1Generic SqlBackend data Person1Generic backend = Person1 {person1Name :: !Text, person1Age :: !Int} deriving stock (Show, Eq) type Person1Id = Key Person1 instance PersistStore backend => PersistEntity (Person1Generic backend) where type PersistEntityBackend (Person1Generic backend) = backend data Unique (Person1Generic backend) newtype Key (Person1Generic backend) = Person1Key {unPerson1Key :: (BackendKey backend)} data EntityField (Person1Generic backend) typ = (typ ~ Key (Person1Generic backend)) => Person1Id | (typ ~ Text) => Person1Name | (typ ~ Int) => Person1Age keyToValues = ((: []) . (toPersistValue . (\ Person1Key {unPerson1Key = x} -> x))) keyFromValues = (fmap Person1Key . (fromPersistValue . Database.Persist.TH.headNote)) keyFromRecordM = Nothing tabulateEntityA fromField_a2v5P = ((Entity <$> fromField_a2v5P Person1Id) <*> ((pure Person1 <*> fromField_a2v5P Person1Name) <*> fromField_a2v5P Person1Age)) entityDef _ = ((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "Person1"))) (EntityNameDB (Data.Text.pack "Person1"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "Person1Id"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) [Data.Text.pack "Show", Data.Text.pack "Eq"]) Data.Map.Internal.Tip) False) Nothing {persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityFields = [FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "name"), fieldDB = FieldNameDB (Data.Text.pack "name"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "Text"), fieldSqlType = sqlType (Proxy :: Proxy Text), fieldAttrs = [], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}, FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "age"), fieldDB = FieldNameDB (Data.Text.pack "age"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "Int"), fieldSqlType = sqlType (Proxy :: Proxy Int), fieldAttrs = [], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}], persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityId = EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "Person1Id"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True), persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityForeigns = []} toPersistFields (Person1 x_a2v5x x_a2v5y) = [toPersistValue x_a2v5x, toPersistValue x_a2v5y] fromPersistValues [x1_a2v5A, x2_a2v5B] = Person1 <$> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "Person1")) (Data.Text.pack "name")) . fromPersistValue) x1_a2v5A <*> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "Person1")) (Data.Text.pack "age")) . fromPersistValue) x2_a2v5B fromPersistValues x_a2v5z = (Left $ (mappend (Data.Text.pack "Person1: fromPersistValues failed on: ")) (Data.Text.pack $ show x_a2v5z)) persistUniqueToFieldNames _ = error "Degenerate case, should never happen" persistUniqueToValues _ = error "Degenerate case, should never happen" persistUniqueKeys (Person1 _name_a2v5C _age_a2v5D) = [] persistFieldDef Person1Id = Database.Persist.TH.stripIdFieldImpl (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "Person1Id"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True)) persistFieldDef Person1Name = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy Person1)) (FieldNameHS (Data.Text.pack "name")) persistFieldDef Person1Age = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy Person1)) (FieldNameHS (Data.Text.pack "age")) persistIdField = Person1Id fieldLens Person1Id = (lensPTH entityKey) (\ (Entity _ value_a2v5F) key_a2v5G -> (Entity key_a2v5G) value_a2v5F) fieldLens Person1Name = (lensPTH ((\ Person1 {person1Name = x} -> x) . entityVal)) (\ (Entity key_a2v5H value_a2v5I) x_a2v5J -> (Entity key_a2v5H) (case value_a2v5I of Person1 {person1Age = person1Age_a2v5L} -> Person1 {person1Name = x_a2v5J, person1Age = person1Age})) fieldLens Person1Age = (lensPTH ((\ Person1 {person1Age = x} -> x) . entityVal)) (\ (Entity key_a2v5H value_a2v5I) x_a2v5J -> (Entity key_a2v5H) (case value_a2v5I of Person1 {person1Name = person1Name_a2v5N} -> Person1 {person1Name = person1Name, person1Age = x_a2v5J})) deriving stock instance Show (BackendKey backend) => Show (Key (Person1Generic backend)) deriving stock instance Read (BackendKey backend) => Read (Key (Person1Generic backend)) deriving newtype instance Eq (BackendKey backend) => Eq (Key (Person1Generic backend)) deriving newtype instance Ord (BackendKey backend) => Ord (Key (Person1Generic backend)) deriving newtype instance Web.Internal.HttpApiData.ToHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.ToHttpApiData (Key (Person1Generic backend)) deriving newtype instance Web.Internal.HttpApiData.FromHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.FromHttpApiData (Key (Person1Generic backend)) deriving newtype instance Web.PathPieces.PathPiece (BackendKey backend) => Web.PathPieces.PathPiece (Key (Person1Generic backend)) deriving newtype instance PersistField (BackendKey backend) => PersistField (Key (Person1Generic backend)) deriving newtype instance PersistFieldSql (BackendKey backend) => PersistFieldSql (Key (Person1Generic backend)) deriving newtype instance ToJSON (BackendKey backend) => ToJSON (Key (Person1Generic backend)) deriving newtype instance FromJSON (BackendKey backend) => FromJSON (Key (Person1Generic backend)) instance PersistStore backend => ToBackendKey backend (Person1Generic backend) where toBackendKey = \ Person1Key {unPerson1Key = x} -> x fromBackendKey = Person1Key type PersonMaybeAge = PersonMaybeAgeGeneric SqlBackend data PersonMaybeAgeGeneric backend = PersonMaybeAge {personMaybeAgeName :: !Text, personMaybeAgeAge :: !(Maybe Int)} type PersonMaybeAgeId = Key PersonMaybeAge instance PersistStore backend => PersistEntity (PersonMaybeAgeGeneric backend) where type PersistEntityBackend (PersonMaybeAgeGeneric backend) = backend data Unique (PersonMaybeAgeGeneric backend) newtype Key (PersonMaybeAgeGeneric backend) = PersonMaybeAgeKey {unPersonMaybeAgeKey :: (BackendKey backend)} data EntityField (PersonMaybeAgeGeneric backend) typ = (typ ~ Key (PersonMaybeAgeGeneric backend)) => PersonMaybeAgeId | (typ ~ Text) => PersonMaybeAgeName | (typ ~ Maybe Int) => PersonMaybeAgeAge keyToValues = ((: []) . (toPersistValue . (\ PersonMaybeAgeKey {unPersonMaybeAgeKey = x} -> x))) keyFromValues = (fmap PersonMaybeAgeKey . (fromPersistValue . Database.Persist.TH.headNote)) keyFromRecordM = Nothing tabulateEntityA fromField_a2v69 = ((Entity <$> fromField_a2v69 PersonMaybeAgeId) <*> ((pure PersonMaybeAge <*> fromField_a2v69 PersonMaybeAgeName) <*> fromField_a2v69 PersonMaybeAgeAge)) entityDef _ = ((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "PersonMaybeAge"))) (EntityNameDB (Data.Text.pack "PersonMaybeAge"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "PersonMaybeAgeId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) Nothing {persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityFields = [FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "name"), fieldDB = FieldNameDB (Data.Text.pack "name"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "Text"), fieldSqlType = sqlType (Proxy :: Proxy Text), fieldAttrs = [], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}, FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "age"), fieldDB = FieldNameDB (Data.Text.pack "age"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "Int"), fieldSqlType = sqlType (Proxy :: Proxy Int), fieldAttrs = [FieldAttrMaybe], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}], persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityId = EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "PersonMaybeAgeId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True), persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityForeigns = []} toPersistFields (PersonMaybeAge x_a2v5S x_a2v5T) = [toPersistValue x_a2v5S, toPersistValue x_a2v5T] fromPersistValues [x1_a2v5V, x2_a2v5W] = PersonMaybeAge <$> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "PersonMaybeAge")) (Data.Text.pack "name")) . fromPersistValue) x1_a2v5V <*> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "PersonMaybeAge")) (Data.Text.pack "age")) . fromPersistValue) x2_a2v5W fromPersistValues x_a2v5U = (Left $ (mappend (Data.Text.pack "PersonMaybeAge: fromPersistValues failed on: ")) (Data.Text.pack $ show x_a2v5U)) persistUniqueToFieldNames _ = error "Degenerate case, should never happen" persistUniqueToValues _ = error "Degenerate case, should never happen" persistUniqueKeys (PersonMaybeAge _name_a2v5X _age_a2v5Y) = [] persistFieldDef PersonMaybeAgeId = Database.Persist.TH.stripIdFieldImpl (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "PersonMaybeAgeId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True)) persistFieldDef PersonMaybeAgeName = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy PersonMaybeAge)) (FieldNameHS (Data.Text.pack "name")) persistFieldDef PersonMaybeAgeAge = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy PersonMaybeAge)) (FieldNameHS (Data.Text.pack "age")) persistIdField = PersonMaybeAgeId fieldLens PersonMaybeAgeId = (lensPTH entityKey) (\ (Entity _ value_a2v60) key_a2v61 -> (Entity key_a2v61) value_a2v60) fieldLens PersonMaybeAgeName = (lensPTH ((\ PersonMaybeAge {personMaybeAgeName = x} -> x) . entityVal)) (\ (Entity key_a2v62 value_a2v63) x_a2v64 -> (Entity key_a2v62) (case value_a2v63 of PersonMaybeAge {personMaybeAgeAge = personMaybeAgeAge_a2v66} -> PersonMaybeAge {personMaybeAgeName = x_a2v64, personMaybeAgeAge = personMaybeAgeAge})) fieldLens PersonMaybeAgeAge = (lensPTH ((\ PersonMaybeAge {personMaybeAgeAge = x} -> x) . entityVal)) (\ (Entity key_a2v62 value_a2v63) x_a2v64 -> (Entity key_a2v62) (case value_a2v63 of PersonMaybeAge {personMaybeAgeName = personMaybeAgeName_a2v67} -> PersonMaybeAge {personMaybeAgeName = personMaybeAgeName, personMaybeAgeAge = x_a2v64})) deriving stock instance Show (BackendKey backend) => Show (Key (PersonMaybeAgeGeneric backend)) deriving stock instance Read (BackendKey backend) => Read (Key (PersonMaybeAgeGeneric backend)) deriving newtype instance Eq (BackendKey backend) => Eq (Key (PersonMaybeAgeGeneric backend)) deriving newtype instance Ord (BackendKey backend) => Ord (Key (PersonMaybeAgeGeneric backend)) deriving newtype instance Web.Internal.HttpApiData.ToHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.ToHttpApiData (Key (PersonMaybeAgeGeneric backend)) deriving newtype instance Web.Internal.HttpApiData.FromHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.FromHttpApiData (Key (PersonMaybeAgeGeneric backend)) deriving newtype instance Web.PathPieces.PathPiece (BackendKey backend) => Web.PathPieces.PathPiece (Key (PersonMaybeAgeGeneric backend)) deriving newtype instance PersistField (BackendKey backend) => PersistField (Key (PersonMaybeAgeGeneric backend)) deriving newtype instance PersistFieldSql (BackendKey backend) => PersistFieldSql (Key (PersonMaybeAgeGeneric backend)) deriving newtype instance ToJSON (BackendKey backend) => ToJSON (Key (PersonMaybeAgeGeneric backend)) deriving newtype instance FromJSON (BackendKey backend) => FromJSON (Key (PersonMaybeAgeGeneric backend)) instance PersistStore backend => ToBackendKey backend (PersonMaybeAgeGeneric backend) where toBackendKey = \ PersonMaybeAgeKey {unPersonMaybeAgeKey = x} -> x fromBackendKey = PersonMaybeAgeKey type PersonMay = PersonMayGeneric SqlBackend data PersonMayGeneric backend = PersonMay {personMayName :: !(Maybe Text), personMayColor :: !(Maybe Text)} deriving stock (Show, Eq) type PersonMayId = Key PersonMay instance PersistStore backend => PersistEntity (PersonMayGeneric backend) where type PersistEntityBackend (PersonMayGeneric backend) = backend data Unique (PersonMayGeneric backend) newtype Key (PersonMayGeneric backend) = PersonMayKey {unPersonMayKey :: (BackendKey backend)} data EntityField (PersonMayGeneric backend) typ = (typ ~ Key (PersonMayGeneric backend)) => PersonMayId | (typ ~ Maybe Text) => PersonMayName | (typ ~ Maybe Text) => PersonMayColor keyToValues = ((: []) . (toPersistValue . (\ PersonMayKey {unPersonMayKey = x} -> x))) keyFromValues = (fmap PersonMayKey . (fromPersistValue . Database.Persist.TH.headNote)) keyFromRecordM = Nothing tabulateEntityA fromField_a2v6L = ((Entity <$> fromField_a2v6L PersonMayId) <*> ((pure PersonMay <*> fromField_a2v6L PersonMayName) <*> fromField_a2v6L PersonMayColor)) entityDef _ = ((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "PersonMay"))) (EntityNameDB (Data.Text.pack "PersonMay"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "PersonMayId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) [Data.Text.pack "json"]) []) []) []) [Data.Text.pack "Show", Data.Text.pack "Eq"]) Data.Map.Internal.Tip) False) Nothing {persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityFields = [FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "name"), fieldDB = FieldNameDB (Data.Text.pack "name"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "Text"), fieldSqlType = sqlType (Proxy :: Proxy Text), fieldAttrs = [FieldAttrMaybe], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}, FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "color"), fieldDB = FieldNameDB (Data.Text.pack "color"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "Text"), fieldSqlType = sqlType (Proxy :: Proxy Text), fieldAttrs = [FieldAttrMaybe], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}], persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityId = EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "PersonMayId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True), persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityForeigns = []} toPersistFields (PersonMay x_a2v6q x_a2v6r) = [toPersistValue x_a2v6q, toPersistValue x_a2v6r] fromPersistValues [x1_a2v6t, x2_a2v6u] = PersonMay <$> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "PersonMay")) (Data.Text.pack "name")) . fromPersistValue) x1_a2v6t <*> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "PersonMay")) (Data.Text.pack "color")) . fromPersistValue) x2_a2v6u fromPersistValues x_a2v6s = (Left $ (mappend (Data.Text.pack "PersonMay: fromPersistValues failed on: ")) (Data.Text.pack $ show x_a2v6s)) persistUniqueToFieldNames _ = error "Degenerate case, should never happen" persistUniqueToValues _ = error "Degenerate case, should never happen" persistUniqueKeys (PersonMay _name_a2v6v _color_a2v6w) = [] persistFieldDef PersonMayId = Database.Persist.TH.stripIdFieldImpl (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "PersonMayId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True)) persistFieldDef PersonMayName = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy PersonMay)) (FieldNameHS (Data.Text.pack "name")) persistFieldDef PersonMayColor = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy PersonMay)) (FieldNameHS (Data.Text.pack "color")) persistIdField = PersonMayId fieldLens PersonMayId = (lensPTH entityKey) (\ (Entity _ value_a2v6B) key_a2v6C -> (Entity key_a2v6C) value_a2v6B) fieldLens PersonMayName = (lensPTH ((\ PersonMay {personMayName = x} -> x) . entityVal)) (\ (Entity key_a2v6D value_a2v6E) x_a2v6F -> (Entity key_a2v6D) (case value_a2v6E of PersonMay {personMayColor = personMayColor_a2v6H} -> PersonMay {personMayName = x_a2v6F, personMayColor = personMayColor})) fieldLens PersonMayColor = (lensPTH ((\ PersonMay {personMayColor = x} -> x) . entityVal)) (\ (Entity key_a2v6D value_a2v6E) x_a2v6F -> (Entity key_a2v6D) (case value_a2v6E of PersonMay {personMayName = personMayName_a2v6I} -> PersonMay {personMayName = personMayName, personMayColor = x_a2v6F})) deriving stock instance Show (BackendKey backend) => Show (Key (PersonMayGeneric backend)) deriving stock instance Read (BackendKey backend) => Read (Key (PersonMayGeneric backend)) deriving newtype instance Eq (BackendKey backend) => Eq (Key (PersonMayGeneric backend)) deriving newtype instance Ord (BackendKey backend) => Ord (Key (PersonMayGeneric backend)) deriving newtype instance Web.Internal.HttpApiData.ToHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.ToHttpApiData (Key (PersonMayGeneric backend)) deriving newtype instance Web.Internal.HttpApiData.FromHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.FromHttpApiData (Key (PersonMayGeneric backend)) deriving newtype instance Web.PathPieces.PathPiece (BackendKey backend) => Web.PathPieces.PathPiece (Key (PersonMayGeneric backend)) deriving newtype instance PersistField (BackendKey backend) => PersistField (Key (PersonMayGeneric backend)) deriving newtype instance PersistFieldSql (BackendKey backend) => PersistFieldSql (Key (PersonMayGeneric backend)) deriving newtype instance ToJSON (BackendKey backend) => ToJSON (Key (PersonMayGeneric backend)) deriving newtype instance FromJSON (BackendKey backend) => FromJSON (Key (PersonMayGeneric backend)) instance PersistStore backend => ToBackendKey backend (PersonMayGeneric backend) where toBackendKey = \ PersonMayKey {unPersonMayKey = x} -> x fromBackendKey = PersonMayKey type Pet = PetGeneric SqlBackend data PetGeneric backend = Pet {petOwnerId :: !(Key (PersonGeneric backend)), petName :: !Text, petType :: !PetType} type PetId = Key Pet instance PersistStore backend => PersistEntity (PetGeneric backend) where type PersistEntityBackend (PetGeneric backend) = backend data Unique (PetGeneric backend) newtype Key (PetGeneric backend) = PetKey {unPetKey :: (BackendKey backend)} data EntityField (PetGeneric backend) typ = (typ ~ Key (PetGeneric backend)) => PetId | (typ ~ Key (PersonGeneric backend)) => PetOwnerId | (typ ~ Text) => PetName | (typ ~ PetType) => PetType keyToValues = ((: []) . (toPersistValue . (\ PetKey {unPetKey = x} -> x))) keyFromValues = (fmap PetKey . (fromPersistValue . Database.Persist.TH.headNote)) keyFromRecordM = Nothing tabulateEntityA fromField_a2v7T = ((Entity <$> fromField_a2v7T PetId) <*> (((pure Pet <*> fromField_a2v7T PetOwnerId) <*> fromField_a2v7T PetName) <*> fromField_a2v7T PetType)) entityDef _ = ((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "Pet"))) (EntityNameDB (Data.Text.pack "Pet"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "PetId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) Nothing {persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityFields = [FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "ownerId"), fieldDB = FieldNameDB (Data.Text.pack "ownerId"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "PersonId"), fieldSqlType = sqlType (Proxy :: Proxy PersonId), fieldAttrs = [], fieldStrict = True, fieldReference = ForeignRef (EntityNameHS (Data.Text.pack "Person")), fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}, FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "name"), fieldDB = FieldNameDB (Data.Text.pack "name"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "Text"), fieldSqlType = sqlType (Proxy :: Proxy Text), fieldAttrs = [], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}, FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "type"), fieldDB = FieldNameDB (Data.Text.pack "type"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "PetType"), fieldSqlType = sqlType (Proxy :: Proxy PetType), fieldAttrs = [], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}], persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityId = EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "PetId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True), persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityForeigns = []} toPersistFields (Pet x_a2v6S x_a2v6T x_a2v6U) = [toPersistValue x_a2v6S, toPersistValue x_a2v6T, toPersistValue x_a2v6U] fromPersistValues [x1_a2v6Y, x2_a2v6Z, x3_a2v70] = Pet <$> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "Pet")) (Data.Text.pack "ownerId")) . fromPersistValue) x1_a2v6Y <*> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "Pet")) (Data.Text.pack "name")) . fromPersistValue) x2_a2v6Z <*> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "Pet")) (Data.Text.pack "type")) . fromPersistValue) x3_a2v70 fromPersistValues x_a2v6V = (Left $ (mappend (Data.Text.pack "Pet: fromPersistValues failed on: ")) (Data.Text.pack $ show x_a2v6V)) persistUniqueToFieldNames _ = error "Degenerate case, should never happen" persistUniqueToValues _ = error "Degenerate case, should never happen" persistUniqueKeys (Pet _ownerId_a2v7d _name_a2v7e _type_a2v7h) = [] persistFieldDef PetId = Database.Persist.TH.stripIdFieldImpl (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "PetId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True)) persistFieldDef PetOwnerId = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy Pet)) (FieldNameHS (Data.Text.pack "ownerId")) persistFieldDef PetName = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy Pet)) (FieldNameHS (Data.Text.pack "name")) persistFieldDef PetType = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy Pet)) (FieldNameHS (Data.Text.pack "type")) persistIdField = PetId fieldLens PetId = (lensPTH entityKey) (\ (Entity _ value_a2v7B) key_a2v7C -> (Entity key_a2v7C) value_a2v7B) fieldLens PetOwnerId = (lensPTH ((\ Pet {petOwnerId = x} -> x) . entityVal)) (\ (Entity key_a2v7E value_a2v7F) x_a2v7G -> (Entity key_a2v7E) (case value_a2v7F of Pet {petName = petName_a2v7J, petType = petType_a2v7L} -> Pet {petOwnerId = x_a2v7G, petName = petName, petType = petType})) fieldLens PetName = (lensPTH ((\ Pet {petName = x} -> x) . entityVal)) (\ (Entity key_a2v7E value_a2v7F) x_a2v7G -> (Entity key_a2v7E) (case value_a2v7F of Pet {petOwnerId = petOwnerId_a2v7N, petType = petType_a2v7P} -> Pet {petOwnerId = petOwnerId, petName = x_a2v7G, petType = petType})) fieldLens PetType = (lensPTH ((\ Pet {petType = x} -> x) . entityVal)) (\ (Entity key_a2v7E value_a2v7F) x_a2v7G -> (Entity key_a2v7E) (case value_a2v7F of Pet {petOwnerId = petOwnerId_a2v7Q, petName = petName_a2v7R} -> Pet {petOwnerId = petOwnerId, petName = petName, petType = x_a2v7G})) deriving stock instance Show (BackendKey backend) => Show (Key (PetGeneric backend)) deriving stock instance Read (BackendKey backend) => Read (Key (PetGeneric backend)) deriving newtype instance Eq (BackendKey backend) => Eq (Key (PetGeneric backend)) deriving newtype instance Ord (BackendKey backend) => Ord (Key (PetGeneric backend)) deriving newtype instance Web.Internal.HttpApiData.ToHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.ToHttpApiData (Key (PetGeneric backend)) deriving newtype instance Web.Internal.HttpApiData.FromHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.FromHttpApiData (Key (PetGeneric backend)) deriving newtype instance Web.PathPieces.PathPiece (BackendKey backend) => Web.PathPieces.PathPiece (Key (PetGeneric backend)) deriving newtype instance PersistField (BackendKey backend) => PersistField (Key (PetGeneric backend)) deriving newtype instance PersistFieldSql (BackendKey backend) => PersistFieldSql (Key (PetGeneric backend)) deriving newtype instance ToJSON (BackendKey backend) => ToJSON (Key (PetGeneric backend)) deriving newtype instance FromJSON (BackendKey backend) => FromJSON (Key (PetGeneric backend)) instance PersistStore backend => ToBackendKey backend (PetGeneric backend) where toBackendKey = \ PetKey {unPetKey = x} -> x fromBackendKey = PetKey type MaybeOwnedPet = MaybeOwnedPetGeneric SqlBackend data MaybeOwnedPetGeneric backend = MaybeOwnedPet {maybeOwnedPetOwnerId :: !(Maybe (Key (PersonGeneric backend))), maybeOwnedPetName :: !Text, maybeOwnedPetType :: !PetType} type MaybeOwnedPetId = Key MaybeOwnedPet instance PersistStore backend => PersistEntity (MaybeOwnedPetGeneric backend) where type PersistEntityBackend (MaybeOwnedPetGeneric backend) = backend data Unique (MaybeOwnedPetGeneric backend) newtype Key (MaybeOwnedPetGeneric backend) = MaybeOwnedPetKey {unMaybeOwnedPetKey :: (BackendKey backend)} data EntityField (MaybeOwnedPetGeneric backend) typ = (typ ~ Key (MaybeOwnedPetGeneric backend)) => MaybeOwnedPetId | (typ ~ Maybe (Key (PersonGeneric backend))) => MaybeOwnedPetOwnerId | (typ ~ Text) => MaybeOwnedPetName | (typ ~ PetType) => MaybeOwnedPetType keyToValues = ((: []) . (toPersistValue . (\ MaybeOwnedPetKey {unMaybeOwnedPetKey = x} -> x))) keyFromValues = (fmap MaybeOwnedPetKey . (fromPersistValue . Database.Persist.TH.headNote)) keyFromRecordM = Nothing tabulateEntityA fromField_a2v8G = ((Entity <$> fromField_a2v8G MaybeOwnedPetId) <*> (((pure MaybeOwnedPet <*> fromField_a2v8G MaybeOwnedPetOwnerId) <*> fromField_a2v8G MaybeOwnedPetName) <*> fromField_a2v8G MaybeOwnedPetType)) entityDef _ = ((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "MaybeOwnedPet"))) (EntityNameDB (Data.Text.pack "MaybeOwnedPet"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "MaybeOwnedPetId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) Nothing {persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityFields = [FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "ownerId"), fieldDB = FieldNameDB (Data.Text.pack "ownerId"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "PersonId"), fieldSqlType = sqlType (Proxy :: Proxy PersonId), fieldAttrs = [FieldAttrMaybe], fieldStrict = True, fieldReference = ForeignRef (EntityNameHS (Data.Text.pack "Person")), fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}, FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "name"), fieldDB = FieldNameDB (Data.Text.pack "name"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "Text"), fieldSqlType = sqlType (Proxy :: Proxy Text), fieldAttrs = [], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}, FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "type"), fieldDB = FieldNameDB (Data.Text.pack "type"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "PetType"), fieldSqlType = sqlType (Proxy :: Proxy PetType), fieldAttrs = [], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}], persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityId = EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "MaybeOwnedPetId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True), persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityForeigns = []} toPersistFields (MaybeOwnedPet x_a2v8f x_a2v8g x_a2v8h) = [toPersistValue x_a2v8f, toPersistValue x_a2v8g, toPersistValue x_a2v8h] fromPersistValues [x1_a2v8j, x2_a2v8k, x3_a2v8l] = MaybeOwnedPet <$> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "MaybeOwnedPet")) (Data.Text.pack "ownerId")) . fromPersistValue) x1_a2v8j <*> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "MaybeOwnedPet")) (Data.Text.pack "name")) . fromPersistValue) x2_a2v8k <*> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "MaybeOwnedPet")) (Data.Text.pack "type")) . fromPersistValue) x3_a2v8l fromPersistValues x_a2v8i = (Left $ (mappend (Data.Text.pack "MaybeOwnedPet: fromPersistValues failed on: ")) (Data.Text.pack $ show x_a2v8i)) persistUniqueToFieldNames _ = error "Degenerate case, should never happen" persistUniqueToValues _ = error "Degenerate case, should never happen" persistUniqueKeys (MaybeOwnedPet _ownerId_a2v8m _name_a2v8n _type_a2v8o) = [] persistFieldDef MaybeOwnedPetId = Database.Persist.TH.stripIdFieldImpl (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "MaybeOwnedPetId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True)) persistFieldDef MaybeOwnedPetOwnerId = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy MaybeOwnedPet)) (FieldNameHS (Data.Text.pack "ownerId")) persistFieldDef MaybeOwnedPetName = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy MaybeOwnedPet)) (FieldNameHS (Data.Text.pack "name")) persistFieldDef MaybeOwnedPetType = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy MaybeOwnedPet)) (FieldNameHS (Data.Text.pack "type")) persistIdField = MaybeOwnedPetId fieldLens MaybeOwnedPetId = (lensPTH entityKey) (\ (Entity _ value_a2v8s) key_a2v8t -> (Entity key_a2v8t) value_a2v8s) fieldLens MaybeOwnedPetOwnerId = (lensPTH ((\ MaybeOwnedPet {maybeOwnedPetOwnerId = x} -> x) . entityVal)) (\ (Entity key_a2v8u value_a2v8v) x_a2v8w -> (Entity key_a2v8u) (case value_a2v8v of MaybeOwnedPet {maybeOwnedPetName = maybeOwnedPetName_a2v8y, maybeOwnedPetType = maybeOwnedPetType_a2v8z} -> MaybeOwnedPet {maybeOwnedPetOwnerId = x_a2v8w, maybeOwnedPetName = maybeOwnedPetName, maybeOwnedPetType = maybeOwnedPetType})) fieldLens MaybeOwnedPetName = (lensPTH ((\ MaybeOwnedPet {maybeOwnedPetName = x} -> x) . entityVal)) (\ (Entity key_a2v8u value_a2v8v) x_a2v8w -> (Entity key_a2v8u) (case value_a2v8v of MaybeOwnedPet {maybeOwnedPetOwnerId = maybeOwnedPetOwnerId_a2v8A, maybeOwnedPetType = maybeOwnedPetType_a2v8C} -> MaybeOwnedPet {maybeOwnedPetOwnerId = maybeOwnedPetOwnerId, maybeOwnedPetName = x_a2v8w, maybeOwnedPetType = maybeOwnedPetType})) fieldLens MaybeOwnedPetType = (lensPTH ((\ MaybeOwnedPet {maybeOwnedPetType = x} -> x) . entityVal)) (\ (Entity key_a2v8u value_a2v8v) x_a2v8w -> (Entity key_a2v8u) (case value_a2v8v of MaybeOwnedPet {maybeOwnedPetOwnerId = maybeOwnedPetOwnerId_a2v8D, maybeOwnedPetName = maybeOwnedPetName_a2v8E} -> MaybeOwnedPet {maybeOwnedPetOwnerId = maybeOwnedPetOwnerId, maybeOwnedPetName = maybeOwnedPetName, maybeOwnedPetType = x_a2v8w})) deriving stock instance Show (BackendKey backend) => Show (Key (MaybeOwnedPetGeneric backend)) deriving stock instance Read (BackendKey backend) => Read (Key (MaybeOwnedPetGeneric backend)) deriving newtype instance Eq (BackendKey backend) => Eq (Key (MaybeOwnedPetGeneric backend)) deriving newtype instance Ord (BackendKey backend) => Ord (Key (MaybeOwnedPetGeneric backend)) deriving newtype instance Web.Internal.HttpApiData.ToHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.ToHttpApiData (Key (MaybeOwnedPetGeneric backend)) deriving newtype instance Web.Internal.HttpApiData.FromHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.FromHttpApiData (Key (MaybeOwnedPetGeneric backend)) deriving newtype instance Web.PathPieces.PathPiece (BackendKey backend) => Web.PathPieces.PathPiece (Key (MaybeOwnedPetGeneric backend)) deriving newtype instance PersistField (BackendKey backend) => PersistField (Key (MaybeOwnedPetGeneric backend)) deriving newtype instance PersistFieldSql (BackendKey backend) => PersistFieldSql (Key (MaybeOwnedPetGeneric backend)) deriving newtype instance ToJSON (BackendKey backend) => ToJSON (Key (MaybeOwnedPetGeneric backend)) deriving newtype instance FromJSON (BackendKey backend) => FromJSON (Key (MaybeOwnedPetGeneric backend)) instance PersistStore backend => ToBackendKey backend (MaybeOwnedPetGeneric backend) where toBackendKey = \ MaybeOwnedPetKey {unMaybeOwnedPetKey = x} -> x fromBackendKey = MaybeOwnedPetKey type NeedsPet = NeedsPetGeneric SqlBackend data NeedsPetGeneric backend = NeedsPet {needsPetPetKey :: !(Key (PetGeneric backend))} type NeedsPetId = Key NeedsPet instance PersistStore backend => PersistEntity (NeedsPetGeneric backend) where type PersistEntityBackend (NeedsPetGeneric backend) = backend data Unique (NeedsPetGeneric backend) newtype Key (NeedsPetGeneric backend) = NeedsPetKey {unNeedsPetKey :: (BackendKey backend)} data EntityField (NeedsPetGeneric backend) typ = (typ ~ Key (NeedsPetGeneric backend)) => NeedsPetId | (typ ~ Key (PetGeneric backend)) => NeedsPetPetKey keyToValues = ((: []) . (toPersistValue . (\ NeedsPetKey {unNeedsPetKey = x} -> x))) keyFromValues = (fmap NeedsPetKey . (fromPersistValue . Database.Persist.TH.headNote)) keyFromRecordM = Nothing tabulateEntityA fromField_a2v96 = ((Entity <$> fromField_a2v96 NeedsPetId) <*> (pure NeedsPet <*> fromField_a2v96 NeedsPetPetKey)) entityDef _ = ((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "NeedsPet"))) (EntityNameDB (Data.Text.pack "NeedsPet"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "NeedsPetId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) Nothing {persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityFields = [FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "petKey"), fieldDB = FieldNameDB (Data.Text.pack "petKey"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "PetId"), fieldSqlType = sqlType (Proxy :: Proxy PetId), fieldAttrs = [], fieldStrict = True, fieldReference = ForeignRef (EntityNameHS (Data.Text.pack "Pet")), fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}], persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityId = EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "NeedsPetId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True), persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityForeigns = []} toPersistFields (NeedsPet x_a2v8Q) = [toPersistValue x_a2v8Q] fromPersistValues [x1_a2v8T] = NeedsPet <$> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "NeedsPet")) (Data.Text.pack "petKey")) . fromPersistValue) x1_a2v8T fromPersistValues x_a2v8R = (Left $ (mappend (Data.Text.pack "NeedsPet: fromPersistValues failed on: ")) (Data.Text.pack $ show x_a2v8R)) persistUniqueToFieldNames _ = error "Degenerate case, should never happen" persistUniqueToValues _ = error "Degenerate case, should never happen" persistUniqueKeys (NeedsPet _petKey_a2v8V) = [] persistFieldDef NeedsPetId = Database.Persist.TH.stripIdFieldImpl (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "NeedsPetId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True)) persistFieldDef NeedsPetPetKey = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy NeedsPet)) (FieldNameHS (Data.Text.pack "petKey")) persistIdField = NeedsPetId fieldLens NeedsPetId = (lensPTH entityKey) (\ (Entity _ value_a2v8Z) key_a2v90 -> (Entity key_a2v90) value_a2v8Z) fieldLens NeedsPetPetKey = (lensPTH ((\ NeedsPet {needsPetPetKey = x} -> x) . entityVal)) (\ (Entity key_a2v92 value_a2v93) x_a2v94 -> (Entity key_a2v92) (case value_a2v93 of NeedsPet {} -> NeedsPet {needsPetPetKey = x_a2v94})) deriving stock instance Show (BackendKey backend) => Show (Key (NeedsPetGeneric backend)) deriving stock instance Read (BackendKey backend) => Read (Key (NeedsPetGeneric backend)) deriving newtype instance Eq (BackendKey backend) => Eq (Key (NeedsPetGeneric backend)) deriving newtype instance Ord (BackendKey backend) => Ord (Key (NeedsPetGeneric backend)) deriving newtype instance Web.Internal.HttpApiData.ToHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.ToHttpApiData (Key (NeedsPetGeneric backend)) deriving newtype instance Web.Internal.HttpApiData.FromHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.FromHttpApiData (Key (NeedsPetGeneric backend)) deriving newtype instance Web.PathPieces.PathPiece (BackendKey backend) => Web.PathPieces.PathPiece (Key (NeedsPetGeneric backend)) deriving newtype instance PersistField (BackendKey backend) => PersistField (Key (NeedsPetGeneric backend)) deriving newtype instance PersistFieldSql (BackendKey backend) => PersistFieldSql (Key (NeedsPetGeneric backend)) deriving newtype instance ToJSON (BackendKey backend) => ToJSON (Key (NeedsPetGeneric backend)) deriving newtype instance FromJSON (BackendKey backend) => FromJSON (Key (NeedsPetGeneric backend)) instance PersistStore backend => ToBackendKey backend (NeedsPetGeneric backend) where toBackendKey = \ NeedsPetKey {unNeedsPetKey = x} -> x fromBackendKey = NeedsPetKey type OutdoorPet = OutdoorPetGeneric SqlBackend data OutdoorPetGeneric backend = OutdoorPet {outdoorPetOwnerId :: !(Key (PersonGeneric backend)), outdoorPetCollar :: !PetCollar, outdoorPetType :: !PetType} type OutdoorPetId = Key OutdoorPet instance PersistStore backend => PersistEntity (OutdoorPetGeneric backend) where type PersistEntityBackend (OutdoorPetGeneric backend) = backend data Unique (OutdoorPetGeneric backend) newtype Key (OutdoorPetGeneric backend) = OutdoorPetKey {unOutdoorPetKey :: (BackendKey backend)} data EntityField (OutdoorPetGeneric backend) typ = (typ ~ Key (OutdoorPetGeneric backend)) => OutdoorPetId | (typ ~ Key (PersonGeneric backend)) => OutdoorPetOwnerId | (typ ~ PetCollar) => OutdoorPetCollar | (typ ~ PetType) => OutdoorPetType keyToValues = ((: []) . (toPersistValue . (\ OutdoorPetKey {unOutdoorPetKey = x} -> x))) keyFromValues = (fmap OutdoorPetKey . (fromPersistValue . Database.Persist.TH.headNote)) keyFromRecordM = Nothing tabulateEntityA fromField_a2va7 = ((Entity <$> fromField_a2va7 OutdoorPetId) <*> (((pure OutdoorPet <*> fromField_a2va7 OutdoorPetOwnerId) <*> fromField_a2va7 OutdoorPetCollar) <*> fromField_a2va7 OutdoorPetType)) entityDef _ = ((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "OutdoorPet"))) (EntityNameDB (Data.Text.pack "OutdoorPet"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "OutdoorPetId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) Nothing {persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityFields = [FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "ownerId"), fieldDB = FieldNameDB (Data.Text.pack "ownerId"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "PersonId"), fieldSqlType = sqlType (Proxy :: Proxy PersonId), fieldAttrs = [], fieldStrict = True, fieldReference = ForeignRef (EntityNameHS (Data.Text.pack "Person")), fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}, FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "collar"), fieldDB = FieldNameDB (Data.Text.pack "collar"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "PetCollar"), fieldSqlType = sqlType (Proxy :: Proxy PetCollar), fieldAttrs = [], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}, FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "type"), fieldDB = FieldNameDB (Data.Text.pack "type"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "PetType"), fieldSqlType = sqlType (Proxy :: Proxy PetType), fieldAttrs = [], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}], persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityId = EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "OutdoorPetId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True), persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityForeigns = []} toPersistFields (OutdoorPet x_a2v9w x_a2v9x x_a2v9y) = [toPersistValue x_a2v9w, toPersistValue x_a2v9x, toPersistValue x_a2v9y] fromPersistValues [x1_a2v9F, x2_a2v9G, x3_a2v9H] = OutdoorPet <$> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "OutdoorPet")) (Data.Text.pack "ownerId")) . fromPersistValue) x1_a2v9F <*> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "OutdoorPet")) (Data.Text.pack "collar")) . fromPersistValue) x2_a2v9G <*> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "OutdoorPet")) (Data.Text.pack "type")) . fromPersistValue) x3_a2v9H fromPersistValues x_a2v9z = (Left $ (mappend (Data.Text.pack "OutdoorPet: fromPersistValues failed on: ")) (Data.Text.pack $ show x_a2v9z)) persistUniqueToFieldNames _ = error "Degenerate case, should never happen" persistUniqueToValues _ = error "Degenerate case, should never happen" persistUniqueKeys (OutdoorPet _ownerId_a2v9N _collar_a2v9P _type_a2v9Q) = [] persistFieldDef OutdoorPetId = Database.Persist.TH.stripIdFieldImpl (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "OutdoorPetId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True)) persistFieldDef OutdoorPetOwnerId = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy OutdoorPet)) (FieldNameHS (Data.Text.pack "ownerId")) persistFieldDef OutdoorPetCollar = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy OutdoorPet)) (FieldNameHS (Data.Text.pack "collar")) persistFieldDef OutdoorPetType = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy OutdoorPet)) (FieldNameHS (Data.Text.pack "type")) persistIdField = OutdoorPetId fieldLens OutdoorPetId = (lensPTH entityKey) (\ (Entity _ value_a2v9T) key_a2v9U -> (Entity key_a2v9U) value_a2v9T) fieldLens OutdoorPetOwnerId = (lensPTH ((\ OutdoorPet {outdoorPetOwnerId = x} -> x) . entityVal)) (\ (Entity key_a2v9V value_a2v9W) x_a2v9X -> (Entity key_a2v9V) (case value_a2v9W of OutdoorPet {outdoorPetCollar = outdoorPetCollar_a2v9Z, outdoorPetType = outdoorPetType_a2va0} -> OutdoorPet {outdoorPetOwnerId = x_a2v9X, outdoorPetCollar = outdoorPetCollar, outdoorPetType = outdoorPetType})) fieldLens OutdoorPetCollar = (lensPTH ((\ OutdoorPet {outdoorPetCollar = x} -> x) . entityVal)) (\ (Entity key_a2v9V value_a2v9W) x_a2v9X -> (Entity key_a2v9V) (case value_a2v9W of OutdoorPet {outdoorPetOwnerId = outdoorPetOwnerId_a2va1, outdoorPetType = outdoorPetType_a2va3} -> OutdoorPet {outdoorPetOwnerId = outdoorPetOwnerId, outdoorPetCollar = x_a2v9X, outdoorPetType = outdoorPetType})) fieldLens OutdoorPetType = (lensPTH ((\ OutdoorPet {outdoorPetType = x} -> x) . entityVal)) (\ (Entity key_a2v9V value_a2v9W) x_a2v9X -> (Entity key_a2v9V) (case value_a2v9W of OutdoorPet {outdoorPetOwnerId = outdoorPetOwnerId_a2va4, outdoorPetCollar = outdoorPetCollar_a2va5} -> OutdoorPet {outdoorPetOwnerId = outdoorPetOwnerId, outdoorPetCollar = outdoorPetCollar, outdoorPetType = x_a2v9X})) deriving stock instance Show (BackendKey backend) => Show (Key (OutdoorPetGeneric backend)) deriving stock instance Read (BackendKey backend) => Read (Key (OutdoorPetGeneric backend)) deriving newtype instance Eq (BackendKey backend) => Eq (Key (OutdoorPetGeneric backend)) deriving newtype instance Ord (BackendKey backend) => Ord (Key (OutdoorPetGeneric backend)) deriving newtype instance Web.Internal.HttpApiData.ToHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.ToHttpApiData (Key (OutdoorPetGeneric backend)) deriving newtype instance Web.Internal.HttpApiData.FromHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.FromHttpApiData (Key (OutdoorPetGeneric backend)) deriving newtype instance Web.PathPieces.PathPiece (BackendKey backend) => Web.PathPieces.PathPiece (Key (OutdoorPetGeneric backend)) deriving newtype instance PersistField (BackendKey backend) => PersistField (Key (OutdoorPetGeneric backend)) deriving newtype instance PersistFieldSql (BackendKey backend) => PersistFieldSql (Key (OutdoorPetGeneric backend)) deriving newtype instance ToJSON (BackendKey backend) => ToJSON (Key (OutdoorPetGeneric backend)) deriving newtype instance FromJSON (BackendKey backend) => FromJSON (Key (OutdoorPetGeneric backend)) instance PersistStore backend => ToBackendKey backend (OutdoorPetGeneric backend) where toBackendKey = \ OutdoorPetKey {unOutdoorPetKey = x} -> x fromBackendKey = OutdoorPetKey type UserPT = UserPTGeneric SqlBackend data UserPTGeneric backend = UserPT {userPTIdent :: !Text, userPTPassword :: !(Maybe Text)} type UserPTId = Key UserPT instance PersistStore backend => PersistEntity (UserPTGeneric backend) where type PersistEntityBackend (UserPTGeneric backend) = backend data Unique (UserPTGeneric backend) = UniqueUserPT Text newtype Key (UserPTGeneric backend) = UserPTKey {unUserPTKey :: (BackendKey backend)} data EntityField (UserPTGeneric backend) typ = (typ ~ Key (UserPTGeneric backend)) => UserPTId | (typ ~ Text) => UserPTIdent | (typ ~ Maybe Text) => UserPTPassword keyToValues = ((: []) . (toPersistValue . (\ UserPTKey {unUserPTKey = x} -> x))) keyFromValues = (fmap UserPTKey . (fromPersistValue . Database.Persist.TH.headNote)) keyFromRecordM = Nothing tabulateEntityA fromField_a2vax = ((Entity <$> fromField_a2vax UserPTId) <*> ((pure UserPT <*> fromField_a2vax UserPTIdent) <*> fromField_a2vax UserPTPassword)) entityDef _ = ((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "UserPT"))) (EntityNameDB (Data.Text.pack "UserPT"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "UserPTId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) [(((UniqueDef (ConstraintNameHS (Data.Text.pack "UniqueUserPT"))) (ConstraintNameDB (Data.Text.pack "UniqueUserPT"))) ((FieldNameHS (Data.Text.pack "ident"), FieldNameDB (Data.Text.pack "ident")) NEL.:| [])) []]) []) []) Data.Map.Internal.Tip) False) Nothing {persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityFields = [FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "ident"), fieldDB = FieldNameDB (Data.Text.pack "ident"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "Text"), fieldSqlType = sqlType (Proxy :: Proxy Text), fieldAttrs = [], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}, FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "password"), fieldDB = FieldNameDB (Data.Text.pack "password"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "Text"), fieldSqlType = sqlType (Proxy :: Proxy Text), fieldAttrs = [FieldAttrMaybe], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}], persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityId = EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "UserPTId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True), persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityForeigns = []} toPersistFields (UserPT x_a2vaa x_a2vab) = [toPersistValue x_a2vaa, toPersistValue x_a2vab] fromPersistValues [x1_a2vad, x2_a2vae] = UserPT <$> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "UserPT")) (Data.Text.pack "ident")) . fromPersistValue) x1_a2vad <*> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "UserPT")) (Data.Text.pack "password")) . fromPersistValue) x2_a2vae fromPersistValues x_a2vac = (Left $ (mappend (Data.Text.pack "UserPT: fromPersistValues failed on: ")) (Data.Text.pack $ show x_a2vac)) persistUniqueToFieldNames UniqueUserPT {} = ((FieldNameHS (Data.Text.pack "ident"), FieldNameDB (Data.Text.pack "ident")) NEL.:| []) persistUniqueToValues (UniqueUserPT x_a2vag) = [toPersistValue x_a2vag] persistUniqueKeys (UserPT _ident_a2vah _password_a2vai) = [UniqueUserPT _ident_a2vah] persistFieldDef UserPTId = Database.Persist.TH.stripIdFieldImpl (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "UserPTId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True)) persistFieldDef UserPTIdent = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy UserPT)) (FieldNameHS (Data.Text.pack "ident")) persistFieldDef UserPTPassword = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy UserPT)) (FieldNameHS (Data.Text.pack "password")) persistIdField = UserPTId fieldLens UserPTId = (lensPTH entityKey) (\ (Entity _ value_a2van) key_a2vao -> (Entity key_a2vao) value_a2van) fieldLens UserPTIdent = (lensPTH ((\ UserPT {userPTIdent = x} -> x) . entityVal)) (\ (Entity key_a2vaq value_a2var) x_a2vas -> (Entity key_a2vaq) (case value_a2var of UserPT {userPTPassword = userPTPassword_a2vau} -> UserPT {userPTIdent = x_a2vas, userPTPassword = userPTPassword})) fieldLens UserPTPassword = (lensPTH ((\ UserPT {userPTPassword = x} -> x) . entityVal)) (\ (Entity key_a2vaq value_a2var) x_a2vas -> (Entity key_a2vaq) (case value_a2var of UserPT {userPTIdent = userPTIdent_a2vav} -> UserPT {userPTIdent = userPTIdent, userPTPassword = x_a2vas})) deriving stock instance Show (BackendKey backend) => Show (Key (UserPTGeneric backend)) deriving stock instance Read (BackendKey backend) => Read (Key (UserPTGeneric backend)) deriving newtype instance Eq (BackendKey backend) => Eq (Key (UserPTGeneric backend)) deriving newtype instance Ord (BackendKey backend) => Ord (Key (UserPTGeneric backend)) deriving newtype instance Web.Internal.HttpApiData.ToHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.ToHttpApiData (Key (UserPTGeneric backend)) deriving newtype instance Web.Internal.HttpApiData.FromHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.FromHttpApiData (Key (UserPTGeneric backend)) deriving newtype instance Web.PathPieces.PathPiece (BackendKey backend) => Web.PathPieces.PathPiece (Key (UserPTGeneric backend)) deriving newtype instance PersistField (BackendKey backend) => PersistField (Key (UserPTGeneric backend)) deriving newtype instance PersistFieldSql (BackendKey backend) => PersistFieldSql (Key (UserPTGeneric backend)) deriving newtype instance ToJSON (BackendKey backend) => ToJSON (Key (UserPTGeneric backend)) deriving newtype instance FromJSON (BackendKey backend) => FromJSON (Key (UserPTGeneric backend)) instance PersistStore backend => ToBackendKey backend (UserPTGeneric backend) where toBackendKey = \ UserPTKey {unUserPTKey = x} -> x fromBackendKey = UserPTKey type EmailPT = EmailPTGeneric SqlBackend data EmailPTGeneric backend = EmailPT {emailPTEmail :: !Text, emailPTUser :: !(Maybe (Key (UserPTGeneric backend))), emailPTVerkey :: !(Maybe Text)} type EmailPTId = Key EmailPT instance PersistStore backend => PersistEntity (EmailPTGeneric backend) where type PersistEntityBackend (EmailPTGeneric backend) = backend data Unique (EmailPTGeneric backend) = UniqueEmailPT Text newtype Key (EmailPTGeneric backend) = EmailPTKey {unEmailPTKey :: (BackendKey backend)} data EntityField (EmailPTGeneric backend) typ = (typ ~ Key (EmailPTGeneric backend)) => EmailPTId | (typ ~ Text) => EmailPTEmail | (typ ~ Maybe (Key (UserPTGeneric backend))) => EmailPTUser | (typ ~ Maybe Text) => EmailPTVerkey keyToValues = ((: []) . (toPersistValue . (\ EmailPTKey {unEmailPTKey = x} -> x))) keyFromValues = (fmap EmailPTKey . (fromPersistValue . Database.Persist.TH.headNote)) keyFromRecordM = Nothing tabulateEntityA fromField_a2vbE = ((Entity <$> fromField_a2vbE EmailPTId) <*> (((pure EmailPT <*> fromField_a2vbE EmailPTEmail) <*> fromField_a2vbE EmailPTUser) <*> fromField_a2vbE EmailPTVerkey)) entityDef _ = ((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "EmailPT"))) (EntityNameDB (Data.Text.pack "EmailPT"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "EmailPTId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) [(((UniqueDef (ConstraintNameHS (Data.Text.pack "UniqueEmailPT"))) (ConstraintNameDB (Data.Text.pack "UniqueEmailPT"))) ((FieldNameHS (Data.Text.pack "email"), FieldNameDB (Data.Text.pack "email")) NEL.:| [])) []]) []) []) Data.Map.Internal.Tip) False) Nothing {persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityFields = [FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "email"), fieldDB = FieldNameDB (Data.Text.pack "email"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "Text"), fieldSqlType = sqlType (Proxy :: Proxy Text), fieldAttrs = [], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}, FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "user"), fieldDB = FieldNameDB (Data.Text.pack "user"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "UserPTId"), fieldSqlType = sqlType (Proxy :: Proxy UserPTId), fieldAttrs = [FieldAttrMaybe], fieldStrict = True, fieldReference = ForeignRef (EntityNameHS (Data.Text.pack "UserPT")), fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}, FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "verkey"), fieldDB = FieldNameDB (Data.Text.pack "verkey"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "Text"), fieldSqlType = sqlType (Proxy :: Proxy Text), fieldAttrs = [FieldAttrMaybe], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}], persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityId = EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "EmailPTId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True), persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityForeigns = []} toPersistFields (EmailPT x_a2vb9 x_a2vba x_a2vbb) = [toPersistValue x_a2vb9, toPersistValue x_a2vba, toPersistValue x_a2vbb] fromPersistValues [x1_a2vbe, x2_a2vbf, x3_a2vbg] = EmailPT <$> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "EmailPT")) (Data.Text.pack "email")) . fromPersistValue) x1_a2vbe <*> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "EmailPT")) (Data.Text.pack "user")) . fromPersistValue) x2_a2vbf <*> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "EmailPT")) (Data.Text.pack "verkey")) . fromPersistValue) x3_a2vbg fromPersistValues x_a2vbc = (Left $ (mappend (Data.Text.pack "EmailPT: fromPersistValues failed on: ")) (Data.Text.pack $ show x_a2vbc)) persistUniqueToFieldNames UniqueEmailPT {} = ((FieldNameHS (Data.Text.pack "email"), FieldNameDB (Data.Text.pack "email")) NEL.:| []) persistUniqueToValues (UniqueEmailPT x_a2vbh) = [toPersistValue x_a2vbh] persistUniqueKeys (EmailPT _email_a2vbi _user_a2vbj _verkey_a2vbk) = [UniqueEmailPT _email_a2vbi] persistFieldDef EmailPTId = Database.Persist.TH.stripIdFieldImpl (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "EmailPTId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True)) persistFieldDef EmailPTEmail = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy EmailPT)) (FieldNameHS (Data.Text.pack "email")) persistFieldDef EmailPTUser = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy EmailPT)) (FieldNameHS (Data.Text.pack "user")) persistFieldDef EmailPTVerkey = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy EmailPT)) (FieldNameHS (Data.Text.pack "verkey")) persistIdField = EmailPTId fieldLens EmailPTId = (lensPTH entityKey) (\ (Entity _ value_a2vbo) key_a2vbp -> (Entity key_a2vbp) value_a2vbo) fieldLens EmailPTEmail = (lensPTH ((\ EmailPT {emailPTEmail = x} -> x) . entityVal)) (\ (Entity key_a2vbq value_a2vbr) x_a2vbs -> (Entity key_a2vbq) (case value_a2vbr of EmailPT {emailPTUser = emailPTUser_a2vbu, emailPTVerkey = emailPTVerkey_a2vbv} -> EmailPT {emailPTEmail = x_a2vbs, emailPTUser = emailPTUser, emailPTVerkey = emailPTVerkey})) fieldLens EmailPTUser = (lensPTH ((\ EmailPT {emailPTUser = x} -> x) . entityVal)) (\ (Entity key_a2vbq value_a2vbr) x_a2vbs -> (Entity key_a2vbq) (case value_a2vbr of EmailPT {emailPTEmail = emailPTEmail_a2vbx, emailPTVerkey = emailPTVerkey_a2vbz} -> EmailPT {emailPTEmail = emailPTEmail, emailPTUser = x_a2vbs, emailPTVerkey = emailPTVerkey})) fieldLens EmailPTVerkey = (lensPTH ((\ EmailPT {emailPTVerkey = x} -> x) . entityVal)) (\ (Entity key_a2vbq value_a2vbr) x_a2vbs -> (Entity key_a2vbq) (case value_a2vbr of EmailPT {emailPTEmail = emailPTEmail_a2vbA, emailPTUser = emailPTUser_a2vbB} -> EmailPT {emailPTEmail = emailPTEmail, emailPTUser = emailPTUser, emailPTVerkey = x_a2vbs})) deriving stock instance Show (BackendKey backend) => Show (Key (EmailPTGeneric backend)) deriving stock instance Read (BackendKey backend) => Read (Key (EmailPTGeneric backend)) deriving newtype instance Eq (BackendKey backend) => Eq (Key (EmailPTGeneric backend)) deriving newtype instance Ord (BackendKey backend) => Ord (Key (EmailPTGeneric backend)) deriving newtype instance Web.Internal.HttpApiData.ToHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.ToHttpApiData (Key (EmailPTGeneric backend)) deriving newtype instance Web.Internal.HttpApiData.FromHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.FromHttpApiData (Key (EmailPTGeneric backend)) deriving newtype instance Web.PathPieces.PathPiece (BackendKey backend) => Web.PathPieces.PathPiece (Key (EmailPTGeneric backend)) deriving newtype instance PersistField (BackendKey backend) => PersistField (Key (EmailPTGeneric backend)) deriving newtype instance PersistFieldSql (BackendKey backend) => PersistFieldSql (Key (EmailPTGeneric backend)) deriving newtype instance ToJSON (BackendKey backend) => ToJSON (Key (EmailPTGeneric backend)) deriving newtype instance FromJSON (BackendKey backend) => FromJSON (Key (EmailPTGeneric backend)) instance PersistStore backend => ToBackendKey backend (EmailPTGeneric backend) where toBackendKey = \ EmailPTKey {unEmailPTKey = x} -> x fromBackendKey = EmailPTKey type Upsert = UpsertGeneric SqlBackend data UpsertGeneric backend = Upsert {upsertEmail :: !Text, upsertAttr :: !Text, upsertExtra :: !Text, upsertAge :: !Int} deriving stock (Eq, Show) type UpsertId = Key Upsert instance PersistStore backend => PersistEntity (UpsertGeneric backend) where type PersistEntityBackend (UpsertGeneric backend) = backend data Unique (UpsertGeneric backend) = UniqueUpsert Text newtype Key (UpsertGeneric backend) = UpsertKey {unUpsertKey :: (BackendKey backend)} data EntityField (UpsertGeneric backend) typ = (typ ~ Key (UpsertGeneric backend)) => UpsertId | (typ ~ Text) => UpsertEmail | (typ ~ Text) => UpsertAttr | (typ ~ Text) => UpsertExtra | (typ ~ Int) => UpsertAge keyToValues = ((: []) . (toPersistValue . (\ UpsertKey {unUpsertKey = x} -> x))) keyFromValues = (fmap UpsertKey . (fromPersistValue . Database.Persist.TH.headNote)) keyFromRecordM = Nothing tabulateEntityA fromField_a2vcp = ((Entity <$> fromField_a2vcp UpsertId) <*> ((((pure Upsert <*> fromField_a2vcp UpsertEmail) <*> fromField_a2vcp UpsertAttr) <*> fromField_a2vcp UpsertExtra) <*> fromField_a2vcp UpsertAge)) entityDef _ = ((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "Upsert"))) (EntityNameDB (Data.Text.pack "Upsert"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "UpsertId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) [(((UniqueDef (ConstraintNameHS (Data.Text.pack "UniqueUpsert"))) (ConstraintNameDB (Data.Text.pack "UniqueUpsert"))) ((FieldNameHS (Data.Text.pack "email"), FieldNameDB (Data.Text.pack "email")) NEL.:| [])) []]) []) [Data.Text.pack "Eq", Data.Text.pack "Show"]) Data.Map.Internal.Tip) False) Nothing {persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityFields = [FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "email"), fieldDB = FieldNameDB (Data.Text.pack "email"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "Text"), fieldSqlType = sqlType (Proxy :: Proxy Text), fieldAttrs = [], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}, FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "attr"), fieldDB = FieldNameDB (Data.Text.pack "attr"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "Text"), fieldSqlType = sqlType (Proxy :: Proxy Text), fieldAttrs = [], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}, FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "extra"), fieldDB = FieldNameDB (Data.Text.pack "extra"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "Text"), fieldSqlType = sqlType (Proxy :: Proxy Text), fieldAttrs = [], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}, FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "age"), fieldDB = FieldNameDB (Data.Text.pack "age"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "Int"), fieldSqlType = sqlType (Proxy :: Proxy Int), fieldAttrs = [], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}], persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityId = EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "UpsertId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True), persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityForeigns = []} toPersistFields (Upsert x_a2vbM x_a2vbN x_a2vbO x_a2vbP) = [toPersistValue x_a2vbM, toPersistValue x_a2vbN, toPersistValue x_a2vbO, toPersistValue x_a2vbP] fromPersistValues [x1_a2vbR, x2_a2vbS, x3_a2vbT, x4_a2vbU] = Upsert <$> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "Upsert")) (Data.Text.pack "email")) . fromPersistValue) x1_a2vbR <*> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "Upsert")) (Data.Text.pack "attr")) . fromPersistValue) x2_a2vbS <*> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "Upsert")) (Data.Text.pack "extra")) . fromPersistValue) x3_a2vbT <*> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "Upsert")) (Data.Text.pack "age")) . fromPersistValue) x4_a2vbU fromPersistValues x_a2vbQ = (Left $ (mappend (Data.Text.pack "Upsert: fromPersistValues failed on: ")) (Data.Text.pack $ show x_a2vbQ)) persistUniqueToFieldNames UniqueUpsert {} = ((FieldNameHS (Data.Text.pack "email"), FieldNameDB (Data.Text.pack "email")) NEL.:| []) persistUniqueToValues (UniqueUpsert x_a2vbV) = [toPersistValue x_a2vbV] persistUniqueKeys (Upsert _email_a2vbW _attr_a2vbX _extra_a2vbY _age_a2vbZ) = [UniqueUpsert _email_a2vbW] persistFieldDef UpsertId = Database.Persist.TH.stripIdFieldImpl (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "UpsertId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True)) persistFieldDef UpsertEmail = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy Upsert)) (FieldNameHS (Data.Text.pack "email")) persistFieldDef UpsertAttr = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy Upsert)) (FieldNameHS (Data.Text.pack "attr")) persistFieldDef UpsertExtra = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy Upsert)) (FieldNameHS (Data.Text.pack "extra")) persistFieldDef UpsertAge = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy Upsert)) (FieldNameHS (Data.Text.pack "age")) persistIdField = UpsertId fieldLens UpsertId = (lensPTH entityKey) (\ (Entity _ value_a2vc2) key_a2vc3 -> (Entity key_a2vc3) value_a2vc2) fieldLens UpsertEmail = (lensPTH ((\ Upsert {upsertEmail = x} -> x) . entityVal)) (\ (Entity key_a2vc4 value_a2vc5) x_a2vc6 -> (Entity key_a2vc4) (case value_a2vc5 of Upsert {upsertAttr = upsertAttr_a2vc8, upsertExtra = upsertExtra_a2vc9, upsertAge = upsertAge_a2vca} -> Upsert {upsertEmail = x_a2vc6, upsertAttr = upsertAttr, upsertExtra = upsertExtra, upsertAge = upsertAge})) fieldLens UpsertAttr = (lensPTH ((\ Upsert {upsertAttr = x} -> x) . entityVal)) (\ (Entity key_a2vc4 value_a2vc5) x_a2vc6 -> (Entity key_a2vc4) (case value_a2vc5 of Upsert {upsertEmail = upsertEmail_a2vcb, upsertExtra = upsertExtra_a2vcd, upsertAge = upsertAge_a2vce} -> Upsert {upsertEmail = upsertEmail, upsertAttr = x_a2vc6, upsertExtra = upsertExtra, upsertAge = upsertAge})) fieldLens UpsertExtra = (lensPTH ((\ Upsert {upsertExtra = x} -> x) . entityVal)) (\ (Entity key_a2vc4 value_a2vc5) x_a2vc6 -> (Entity key_a2vc4) (case value_a2vc5 of Upsert {upsertEmail = upsertEmail_a2vcf, upsertAttr = upsertAttr_a2vcg, upsertAge = upsertAge_a2vci} -> Upsert {upsertEmail = upsertEmail, upsertAttr = upsertAttr, upsertExtra = x_a2vc6, upsertAge = upsertAge})) fieldLens UpsertAge = (lensPTH ((\ Upsert {upsertAge = x} -> x) . entityVal)) (\ (Entity key_a2vc4 value_a2vc5) x_a2vc6 -> (Entity key_a2vc4) (case value_a2vc5 of Upsert {upsertEmail = upsertEmail_a2vcj, upsertAttr = upsertAttr_a2vck, upsertExtra = upsertExtra_a2vcl} -> Upsert {upsertEmail = upsertEmail, upsertAttr = upsertAttr, upsertExtra = upsertExtra, upsertAge = x_a2vc6})) deriving stock instance Show (BackendKey backend) => Show (Key (UpsertGeneric backend)) deriving stock instance Read (BackendKey backend) => Read (Key (UpsertGeneric backend)) deriving newtype instance Eq (BackendKey backend) => Eq (Key (UpsertGeneric backend)) deriving newtype instance Ord (BackendKey backend) => Ord (Key (UpsertGeneric backend)) deriving newtype instance Web.Internal.HttpApiData.ToHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.ToHttpApiData (Key (UpsertGeneric backend)) deriving newtype instance Web.Internal.HttpApiData.FromHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.FromHttpApiData (Key (UpsertGeneric backend)) deriving newtype instance Web.PathPieces.PathPiece (BackendKey backend) => Web.PathPieces.PathPiece (Key (UpsertGeneric backend)) deriving newtype instance PersistField (BackendKey backend) => PersistField (Key (UpsertGeneric backend)) deriving newtype instance PersistFieldSql (BackendKey backend) => PersistFieldSql (Key (UpsertGeneric backend)) deriving newtype instance ToJSON (BackendKey backend) => ToJSON (Key (UpsertGeneric backend)) deriving newtype instance FromJSON (BackendKey backend) => FromJSON (Key (UpsertGeneric backend)) instance PersistStore backend => ToBackendKey backend (UpsertGeneric backend) where toBackendKey = \ UpsertKey {unUpsertKey = x} -> x fromBackendKey = UpsertKey type UpsertBy = UpsertByGeneric SqlBackend data UpsertByGeneric backend = UpsertBy {upsertByEmail :: !Text, upsertByCity :: !Text, upsertByAttr :: !Text} deriving stock (Eq, Show) type UpsertById = Key UpsertBy instance PersistStore backend => PersistEntity (UpsertByGeneric backend) where type PersistEntityBackend (UpsertByGeneric backend) = backend data Unique (UpsertByGeneric backend) = UniqueUpsertBy Text | UniqueUpsertByCity Text newtype Key (UpsertByGeneric backend) = UpsertByKey {unUpsertByKey :: (BackendKey backend)} data EntityField (UpsertByGeneric backend) typ = (typ ~ Key (UpsertByGeneric backend)) => UpsertById | (typ ~ Text) => UpsertByEmail | (typ ~ Text) => UpsertByCity | (typ ~ Text) => UpsertByAttr keyToValues = ((: []) . (toPersistValue . (\ UpsertByKey {unUpsertByKey = x} -> x))) keyFromValues = (fmap UpsertByKey . (fromPersistValue . Database.Persist.TH.headNote)) keyFromRecordM = Nothing tabulateEntityA fromField_a2vcV = ((Entity <$> fromField_a2vcV UpsertById) <*> (((pure UpsertBy <*> fromField_a2vcV UpsertByEmail) <*> fromField_a2vcV UpsertByCity) <*> fromField_a2vcV UpsertByAttr)) entityDef _ = ((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "UpsertBy"))) (EntityNameDB (Data.Text.pack "UpsertBy"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "UpsertById"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) [(((UniqueDef (ConstraintNameHS (Data.Text.pack "UniqueUpsertBy"))) (ConstraintNameDB (Data.Text.pack "UniqueUpsertBy"))) ((FieldNameHS (Data.Text.pack "email"), FieldNameDB (Data.Text.pack "email")) NEL.:| [])) [], (((UniqueDef (ConstraintNameHS (Data.Text.pack "UniqueUpsertByCity"))) (ConstraintNameDB (Data.Text.pack "UniqueUpsertByCity"))) ((FieldNameHS (Data.Text.pack "city"), FieldNameDB (Data.Text.pack "city")) NEL.:| [])) []]) []) [Data.Text.pack "Eq", Data.Text.pack "Show"]) Data.Map.Internal.Tip) False) Nothing {persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityFields = [FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "email"), fieldDB = FieldNameDB (Data.Text.pack "email"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "Text"), fieldSqlType = sqlType (Proxy :: Proxy Text), fieldAttrs = [], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}, FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "city"), fieldDB = FieldNameDB (Data.Text.pack "city"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "Text"), fieldSqlType = sqlType (Proxy :: Proxy Text), fieldAttrs = [], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}, FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "attr"), fieldDB = FieldNameDB (Data.Text.pack "attr"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "Text"), fieldSqlType = sqlType (Proxy :: Proxy Text), fieldAttrs = [], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}], persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityId = EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "UpsertById"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True), persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityForeigns = []} toPersistFields (UpsertBy x_a2vcr x_a2vcs x_a2vct) = [toPersistValue x_a2vcr, toPersistValue x_a2vcs, toPersistValue x_a2vct] fromPersistValues [x1_a2vcv, x2_a2vcw, x3_a2vcx] = UpsertBy <$> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "UpsertBy")) (Data.Text.pack "email")) . fromPersistValue) x1_a2vcv <*> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "UpsertBy")) (Data.Text.pack "city")) . fromPersistValue) x2_a2vcw <*> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "UpsertBy")) (Data.Text.pack "attr")) . fromPersistValue) x3_a2vcx fromPersistValues x_a2vcu = (Left $ (mappend (Data.Text.pack "UpsertBy: fromPersistValues failed on: ")) (Data.Text.pack $ show x_a2vcu)) persistUniqueToFieldNames UniqueUpsertBy {} = ((FieldNameHS (Data.Text.pack "email"), FieldNameDB (Data.Text.pack "email")) NEL.:| []) persistUniqueToFieldNames UniqueUpsertByCity {} = ((FieldNameHS (Data.Text.pack "city"), FieldNameDB (Data.Text.pack "city")) NEL.:| []) persistUniqueToValues (UniqueUpsertBy x_a2vcz) = [toPersistValue x_a2vcz] persistUniqueToValues (UniqueUpsertByCity x_a2vcA) = [toPersistValue x_a2vcA] persistUniqueKeys (UpsertBy _email_a2vcB _city_a2vcC _attr_a2vcD) = [UniqueUpsertBy _email_a2vcB, UniqueUpsertByCity _city_a2vcC] persistFieldDef UpsertById = Database.Persist.TH.stripIdFieldImpl (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "UpsertById"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True)) persistFieldDef UpsertByEmail = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy UpsertBy)) (FieldNameHS (Data.Text.pack "email")) persistFieldDef UpsertByCity = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy UpsertBy)) (FieldNameHS (Data.Text.pack "city")) persistFieldDef UpsertByAttr = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy UpsertBy)) (FieldNameHS (Data.Text.pack "attr")) persistIdField = UpsertById fieldLens UpsertById = (lensPTH entityKey) (\ (Entity _ value_a2vcG) key_a2vcH -> (Entity key_a2vcH) value_a2vcG) fieldLens UpsertByEmail = (lensPTH ((\ UpsertBy {upsertByEmail = x} -> x) . entityVal)) (\ (Entity key_a2vcI value_a2vcJ) x_a2vcK -> (Entity key_a2vcI) (case value_a2vcJ of UpsertBy {upsertByCity = upsertByCity_a2vcM, upsertByAttr = upsertByAttr_a2vcN} -> UpsertBy {upsertByEmail = x_a2vcK, upsertByCity = upsertByCity, upsertByAttr = upsertByAttr})) fieldLens UpsertByCity = (lensPTH ((\ UpsertBy {upsertByCity = x} -> x) . entityVal)) (\ (Entity key_a2vcI value_a2vcJ) x_a2vcK -> (Entity key_a2vcI) (case value_a2vcJ of UpsertBy {upsertByEmail = upsertByEmail_a2vcO, upsertByAttr = upsertByAttr_a2vcQ} -> UpsertBy {upsertByEmail = upsertByEmail, upsertByCity = x_a2vcK, upsertByAttr = upsertByAttr})) fieldLens UpsertByAttr = (lensPTH ((\ UpsertBy {upsertByAttr = x} -> x) . entityVal)) (\ (Entity key_a2vcI value_a2vcJ) x_a2vcK -> (Entity key_a2vcI) (case value_a2vcJ of UpsertBy {upsertByEmail = upsertByEmail_a2vcR, upsertByCity = upsertByCity_a2vcS} -> UpsertBy {upsertByEmail = upsertByEmail, upsertByCity = upsertByCity, upsertByAttr = x_a2vcK})) deriving stock instance Show (BackendKey backend) => Show (Key (UpsertByGeneric backend)) deriving stock instance Read (BackendKey backend) => Read (Key (UpsertByGeneric backend)) deriving newtype instance Eq (BackendKey backend) => Eq (Key (UpsertByGeneric backend)) deriving newtype instance Ord (BackendKey backend) => Ord (Key (UpsertByGeneric backend)) deriving newtype instance Web.Internal.HttpApiData.ToHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.ToHttpApiData (Key (UpsertByGeneric backend)) deriving newtype instance Web.Internal.HttpApiData.FromHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.FromHttpApiData (Key (UpsertByGeneric backend)) deriving newtype instance Web.PathPieces.PathPiece (BackendKey backend) => Web.PathPieces.PathPiece (Key (UpsertByGeneric backend)) deriving newtype instance PersistField (BackendKey backend) => PersistField (Key (UpsertByGeneric backend)) deriving newtype instance PersistFieldSql (BackendKey backend) => PersistFieldSql (Key (UpsertByGeneric backend)) deriving newtype instance ToJSON (BackendKey backend) => ToJSON (Key (UpsertByGeneric backend)) deriving newtype instance FromJSON (BackendKey backend) => FromJSON (Key (UpsertByGeneric backend)) instance PersistStore backend => ToBackendKey backend (UpsertByGeneric backend) where toBackendKey = \ UpsertByKey {unUpsertByKey = x} -> x fromBackendKey = UpsertByKey type Strict = StrictGeneric SqlBackend data StrictGeneric backend = Strict {strictYes :: !Int, strictNo :: Int, strictDef :: !Int} type StrictId = Key Strict instance PersistStore backend => PersistEntity (StrictGeneric backend) where type PersistEntityBackend (StrictGeneric backend) = backend data Unique (StrictGeneric backend) newtype Key (StrictGeneric backend) = StrictKey {unStrictKey :: (BackendKey backend)} data EntityField (StrictGeneric backend) typ = (typ ~ Key (StrictGeneric backend)) => StrictId | (typ ~ Int) => StrictYes | (typ ~ Int) => StrictNo | (typ ~ Int) => StrictDef keyToValues = ((: []) . (toPersistValue . (\ StrictKey {unStrictKey = x} -> x))) keyFromValues = (fmap StrictKey . (fromPersistValue . Database.Persist.TH.headNote)) keyFromRecordM = Nothing tabulateEntityA fromField_a2vfH = ((Entity <$> fromField_a2vfH StrictId) <*> (((pure Strict <*> fromField_a2vfH StrictYes) <*> fromField_a2vfH StrictNo) <*> fromField_a2vfH StrictDef)) entityDef _ = ((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "Strict"))) (EntityNameDB (Data.Text.pack "Strict"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "StrictId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) Nothing {persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityFields = [FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "yes"), fieldDB = FieldNameDB (Data.Text.pack "yes"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "Int"), fieldSqlType = sqlType (Proxy :: Proxy Int), fieldAttrs = [], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}, FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "no"), fieldDB = FieldNameDB (Data.Text.pack "no"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "Int"), fieldSqlType = sqlType (Proxy :: Proxy Int), fieldAttrs = [], fieldStrict = False, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}, FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "def"), fieldDB = FieldNameDB (Data.Text.pack "def"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "Int"), fieldSqlType = sqlType (Proxy :: Proxy Int), fieldAttrs = [], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}], persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityId = EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "StrictId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True), persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityForeigns = []} toPersistFields (Strict x_a2vdi x_a2vdj x_a2vdk) = [toPersistValue x_a2vdi, toPersistValue x_a2vdj, toPersistValue x_a2vdk] fromPersistValues [x1_a2vdm, x2_a2vdn, x3_a2vdo] = Strict <$> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "Strict")) (Data.Text.pack "yes")) . fromPersistValue) x1_a2vdm <*> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "Strict")) (Data.Text.pack "no")) . fromPersistValue) x2_a2vdn <*> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "Strict")) (Data.Text.pack "def")) . fromPersistValue) x3_a2vdo fromPersistValues x_a2vdl = (Left $ (mappend (Data.Text.pack "Strict: fromPersistValues failed on: ")) (Data.Text.pack $ show x_a2vdl)) persistUniqueToFieldNames _ = error "Degenerate case, should never happen" persistUniqueToValues _ = error "Degenerate case, should never happen" persistUniqueKeys (Strict _yes_a2vdw _no_a2vdx _def_a2vdy) = [] persistFieldDef StrictId = Database.Persist.TH.stripIdFieldImpl (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "StrictId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True)) persistFieldDef StrictYes = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy Strict)) (FieldNameHS (Data.Text.pack "yes")) persistFieldDef StrictNo = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy Strict)) (FieldNameHS (Data.Text.pack "no")) persistFieldDef StrictDef = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy Strict)) (FieldNameHS (Data.Text.pack "def")) persistIdField = StrictId fieldLens StrictId = (lensPTH entityKey) (\ (Entity _ value_a2vfi) key_a2vfj -> (Entity key_a2vfj) value_a2vfi) fieldLens StrictYes = (lensPTH ((\ Strict {strictYes = x} -> x) . entityVal)) (\ (Entity key_a2vfp value_a2vfq) x_a2vfr -> (Entity key_a2vfp) (case value_a2vfq of Strict {strictNo = strictNo_a2vft, strictDef = strictDef_a2vfu} -> Strict {strictYes = x_a2vfr, strictNo = strictNo, strictDef = strictDef})) fieldLens StrictNo = (lensPTH ((\ Strict {strictNo = x} -> x) . entityVal)) (\ (Entity key_a2vfp value_a2vfq) x_a2vfr -> (Entity key_a2vfp) (case value_a2vfq of Strict {strictYes = strictYes_a2vfy, strictDef = strictDef_a2vfC} -> Strict {strictYes = strictYes, strictNo = x_a2vfr, strictDef = strictDef})) fieldLens StrictDef = (lensPTH ((\ Strict {strictDef = x} -> x) . entityVal)) (\ (Entity key_a2vfp value_a2vfq) x_a2vfr -> (Entity key_a2vfp) (case value_a2vfq of Strict {strictYes = strictYes_a2vfD, strictNo = strictNo_a2vfE} -> Strict {strictYes = strictYes, strictNo = strictNo, strictDef = x_a2vfr})) deriving stock instance Show (BackendKey backend) => Show (Key (StrictGeneric backend)) deriving stock instance Read (BackendKey backend) => Read (Key (StrictGeneric backend)) deriving newtype instance Eq (BackendKey backend) => Eq (Key (StrictGeneric backend)) deriving newtype instance Ord (BackendKey backend) => Ord (Key (StrictGeneric backend)) deriving newtype instance Web.Internal.HttpApiData.ToHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.ToHttpApiData (Key (StrictGeneric backend)) deriving newtype instance Web.Internal.HttpApiData.FromHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.FromHttpApiData (Key (StrictGeneric backend)) deriving newtype instance Web.PathPieces.PathPiece (BackendKey backend) => Web.PathPieces.PathPiece (Key (StrictGeneric backend)) deriving newtype instance PersistField (BackendKey backend) => PersistField (Key (StrictGeneric backend)) deriving newtype instance PersistFieldSql (BackendKey backend) => PersistFieldSql (Key (StrictGeneric backend)) deriving newtype instance ToJSON (BackendKey backend) => ToJSON (Key (StrictGeneric backend)) deriving newtype instance FromJSON (BackendKey backend) => FromJSON (Key (StrictGeneric backend)) instance PersistStore backend => ToBackendKey backend (StrictGeneric backend) where toBackendKey = \ StrictKey {unStrictKey = x} -> x fromBackendKey = StrictKey type DudeWeirdColumns = DudeWeirdColumnsGeneric SqlBackend data DudeWeirdColumnsGeneric backend = DudeWeirdColumns {dudeWeirdColumnsName :: !Text} deriving stock (Eq, Show) type DudeWeirdColumnsId = Key DudeWeirdColumns instance PersistStore backend => PersistEntity (DudeWeirdColumnsGeneric backend) where type PersistEntityBackend (DudeWeirdColumnsGeneric backend) = backend data Unique (DudeWeirdColumnsGeneric backend) = UniqueName Text newtype Key (DudeWeirdColumnsGeneric backend) = DudeWeirdColumnsKey {unDudeWeirdColumnsKey :: (BackendKey backend)} data EntityField (DudeWeirdColumnsGeneric backend) typ = (typ ~ Key (DudeWeirdColumnsGeneric backend)) => DudeWeirdColumnsId | (typ ~ Text) => DudeWeirdColumnsName keyToValues = ((: []) . (toPersistValue . (\ DudeWeirdColumnsKey {unDudeWeirdColumnsKey = x} -> x))) keyFromValues = (fmap DudeWeirdColumnsKey . (fromPersistValue . Database.Persist.TH.headNote)) keyFromRecordM = Nothing tabulateEntityA fromField_a2vgE = ((Entity <$> fromField_a2vgE DudeWeirdColumnsId) <*> (pure DudeWeirdColumns <*> fromField_a2vgE DudeWeirdColumnsName)) entityDef _ = ((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "DudeWeirdColumns"))) (EntityNameDB (Data.Text.pack "DudeWeirdColumns"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "DudeWeirdColumnsId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) [(((UniqueDef (ConstraintNameHS (Data.Text.pack "UniqueName"))) (ConstraintNameDB (Data.Text.pack "UniqueName"))) ((FieldNameHS (Data.Text.pack "name"), FieldNameDB (Data.Text.pack "name")) NEL.:| [])) []]) []) [Data.Text.pack "Eq", Data.Text.pack "Show"]) Data.Map.Internal.Tip) False) Nothing {persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityFields = [FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "name"), fieldDB = FieldNameDB (Data.Text.pack "name"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "Text"), fieldSqlType = sqlType (Proxy :: Proxy Text), fieldAttrs = [], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}, FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "foo"), fieldDB = FieldNameDB (Data.Text.pack "foo"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "Int"), fieldSqlType = sqlType (Proxy :: Proxy Int), fieldAttrs = [FieldAttrMigrationOnly, FieldAttrMaybe], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}, FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "bar"), fieldDB = FieldNameDB (Data.Text.pack "bar"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "Double"), fieldSqlType = sqlType (Proxy :: Proxy Double), fieldAttrs = [FieldAttrSafeToRemove], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}], persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityId = EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "DudeWeirdColumnsId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True), persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityForeigns = []} toPersistFields (DudeWeirdColumns x_a2vgs) = [toPersistValue x_a2vgs] fromPersistValues [x1_a2vgu] = DudeWeirdColumns <$> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "DudeWeirdColumns")) (Data.Text.pack "name")) . fromPersistValue) x1_a2vgu fromPersistValues x_a2vgt = (Left $ (mappend (Data.Text.pack "DudeWeirdColumns: fromPersistValues failed on: ")) (Data.Text.pack $ show x_a2vgt)) persistUniqueToFieldNames UniqueName {} = ((FieldNameHS (Data.Text.pack "name"), FieldNameDB (Data.Text.pack "name")) NEL.:| []) persistUniqueToValues (UniqueName x_a2vgv) = [toPersistValue x_a2vgv] persistUniqueKeys (DudeWeirdColumns _name_a2vgw) = [UniqueName _name_a2vgw] persistFieldDef DudeWeirdColumnsId = Database.Persist.TH.stripIdFieldImpl (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "DudeWeirdColumnsId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True)) persistFieldDef DudeWeirdColumnsName = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy DudeWeirdColumns)) (FieldNameHS (Data.Text.pack "name")) persistIdField = DudeWeirdColumnsId fieldLens DudeWeirdColumnsId = (lensPTH entityKey) (\ (Entity _ value_a2vgy) key_a2vgz -> (Entity key_a2vgz) value_a2vgy) fieldLens DudeWeirdColumnsName = (lensPTH ((\ DudeWeirdColumns {dudeWeirdColumnsName = x} -> x) . entityVal)) (\ (Entity key_a2vgA value_a2vgB) x_a2vgC -> (Entity key_a2vgA) (case value_a2vgB of DudeWeirdColumns {} -> DudeWeirdColumns {dudeWeirdColumnsName = x_a2vgC})) deriving stock instance Show (BackendKey backend) => Show (Key (DudeWeirdColumnsGeneric backend)) deriving stock instance Read (BackendKey backend) => Read (Key (DudeWeirdColumnsGeneric backend)) deriving newtype instance Eq (BackendKey backend) => Eq (Key (DudeWeirdColumnsGeneric backend)) deriving newtype instance Ord (BackendKey backend) => Ord (Key (DudeWeirdColumnsGeneric backend)) deriving newtype instance Web.Internal.HttpApiData.ToHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.ToHttpApiData (Key (DudeWeirdColumnsGeneric backend)) deriving newtype instance Web.Internal.HttpApiData.FromHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.FromHttpApiData (Key (DudeWeirdColumnsGeneric backend)) deriving newtype instance Web.PathPieces.PathPiece (BackendKey backend) => Web.PathPieces.PathPiece (Key (DudeWeirdColumnsGeneric backend)) deriving newtype instance PersistField (BackendKey backend) => PersistField (Key (DudeWeirdColumnsGeneric backend)) deriving newtype instance PersistFieldSql (BackendKey backend) => PersistFieldSql (Key (DudeWeirdColumnsGeneric backend)) deriving newtype instance ToJSON (BackendKey backend) => ToJSON (Key (DudeWeirdColumnsGeneric backend)) deriving newtype instance FromJSON (BackendKey backend) => FromJSON (Key (DudeWeirdColumnsGeneric backend)) instance PersistStore backend => ToBackendKey backend (DudeWeirdColumnsGeneric backend) where toBackendKey = \ DudeWeirdColumnsKey {unDudeWeirdColumnsKey = x} -> x fromBackendKey = DudeWeirdColumnsKey type Relationship = RelationshipGeneric SqlBackend data RelationshipGeneric backend = Relationship {relationshipName :: !String, relationshipParent :: !(Maybe (Key (RelationshipGeneric backend)))} type RelationshipId = Key Relationship instance PersistStore backend => PersistEntity (RelationshipGeneric backend) where type PersistEntityBackend (RelationshipGeneric backend) = backend data Unique (RelationshipGeneric backend) newtype Key (RelationshipGeneric backend) = RelationshipKey {unRelationshipKey :: (BackendKey backend)} data EntityField (RelationshipGeneric backend) typ = (typ ~ Key (RelationshipGeneric backend)) => RelationshipId | (typ ~ String) => RelationshipName | (typ ~ Maybe (Key (RelationshipGeneric backend))) => RelationshipParent keyToValues = ((: []) . (toPersistValue . (\ RelationshipKey {unRelationshipKey = x} -> x))) keyFromValues = (fmap RelationshipKey . (fromPersistValue . Database.Persist.TH.headNote)) keyFromRecordM = Nothing tabulateEntityA fromField_a2vh9 = ((Entity <$> fromField_a2vh9 RelationshipId) <*> ((pure Relationship <*> fromField_a2vh9 RelationshipName) <*> fromField_a2vh9 RelationshipParent)) entityDef _ = ((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "Relationship"))) (EntityNameDB (Data.Text.pack "Relationship"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "RelationshipId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) (Just (Data.Text.pack "This is a doc comment for a relationship. You need to put the pipe character for each line of documentation. But you can resume the doc comments afterwards. ")) {persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityFields = [FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "name"), fieldDB = FieldNameDB (Data.Text.pack "name"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "String"), fieldSqlType = sqlType (Proxy :: Proxy String), fieldAttrs = [], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Just (Data.Text.pack "Fields should be documentable. "), fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}, FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "parent"), fieldDB = FieldNameDB (Data.Text.pack "parent"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "RelationshipId"), fieldSqlType = sqlType (Proxy :: Proxy RelationshipId), fieldAttrs = [FieldAttrMaybe], fieldStrict = True, fieldReference = ForeignRef (EntityNameHS (Data.Text.pack "Relationship")), fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}], persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityId = EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "RelationshipId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True), persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityForeigns = []} toPersistFields (Relationship x_a2vgQ x_a2vgR) = [toPersistValue x_a2vgQ, toPersistValue x_a2vgR] fromPersistValues [x1_a2vgT, x2_a2vgU] = Relationship <$> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "Relationship")) (Data.Text.pack "name")) . fromPersistValue) x1_a2vgT <*> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "Relationship")) (Data.Text.pack "parent")) . fromPersistValue) x2_a2vgU fromPersistValues x_a2vgS = (Left $ (mappend (Data.Text.pack "Relationship: fromPersistValues failed on: ")) (Data.Text.pack $ show x_a2vgS)) persistUniqueToFieldNames _ = error "Degenerate case, should never happen" persistUniqueToValues _ = error "Degenerate case, should never happen" persistUniqueKeys (Relationship _name_a2vgV _parent_a2vgW) = [] persistFieldDef RelationshipId = Database.Persist.TH.stripIdFieldImpl (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "RelationshipId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True)) persistFieldDef RelationshipName = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy Relationship)) (FieldNameHS (Data.Text.pack "name")) persistFieldDef RelationshipParent = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy Relationship)) (FieldNameHS (Data.Text.pack "parent")) persistIdField = RelationshipId fieldLens RelationshipId = (lensPTH entityKey) (\ (Entity _ value_a2vgZ) key_a2vh0 -> (Entity key_a2vh0) value_a2vgZ) fieldLens RelationshipName = (lensPTH ((\ Relationship {relationshipName = x} -> x) . entityVal)) (\ (Entity key_a2vh1 value_a2vh2) x_a2vh3 -> (Entity key_a2vh1) (case value_a2vh2 of Relationship {relationshipParent = relationshipParent_a2vh6} -> Relationship {relationshipName = x_a2vh3, relationshipParent = relationshipParent})) fieldLens RelationshipParent = (lensPTH ((\ Relationship {relationshipParent = x} -> x) . entityVal)) (\ (Entity key_a2vh1 value_a2vh2) x_a2vh3 -> (Entity key_a2vh1) (case value_a2vh2 of Relationship {relationshipName = relationshipName_a2vh7} -> Relationship {relationshipName = relationshipName, relationshipParent = x_a2vh3})) deriving stock instance Show (BackendKey backend) => Show (Key (RelationshipGeneric backend)) deriving stock instance Read (BackendKey backend) => Read (Key (RelationshipGeneric backend)) deriving newtype instance Eq (BackendKey backend) => Eq (Key (RelationshipGeneric backend)) deriving newtype instance Ord (BackendKey backend) => Ord (Key (RelationshipGeneric backend)) deriving newtype instance Web.Internal.HttpApiData.ToHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.ToHttpApiData (Key (RelationshipGeneric backend)) deriving newtype instance Web.Internal.HttpApiData.FromHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.FromHttpApiData (Key (RelationshipGeneric backend)) deriving newtype instance Web.PathPieces.PathPiece (BackendKey backend) => Web.PathPieces.PathPiece (Key (RelationshipGeneric backend)) deriving newtype instance PersistField (BackendKey backend) => PersistField (Key (RelationshipGeneric backend)) deriving newtype instance PersistFieldSql (BackendKey backend) => PersistFieldSql (Key (RelationshipGeneric backend)) deriving newtype instance ToJSON (BackendKey backend) => ToJSON (Key (RelationshipGeneric backend)) deriving newtype instance FromJSON (BackendKey backend) => FromJSON (Key (RelationshipGeneric backend)) instance PersistStore backend => ToBackendKey backend (RelationshipGeneric backend) where toBackendKey = \ RelationshipKey {unRelationshipKey = x} -> x fromBackendKey = RelationshipKey type MutA = MutAGeneric SqlBackend data MutAGeneric backend = MutA {mutAMutB :: !(Key (MutBGeneric backend))} type MutAId = Key MutA instance PersistStore backend => PersistEntity (MutAGeneric backend) where type PersistEntityBackend (MutAGeneric backend) = backend data Unique (MutAGeneric backend) newtype Key (MutAGeneric backend) = MutAKey {unMutAKey :: (BackendKey backend)} data EntityField (MutAGeneric backend) typ = (typ ~ Key (MutAGeneric backend)) => MutAId | (typ ~ Key (MutBGeneric backend)) => MutAMutB keyToValues = ((: []) . (toPersistValue . (\ MutAKey {unMutAKey = x} -> x))) keyFromValues = (fmap MutAKey . (fromPersistValue . Database.Persist.TH.headNote)) keyFromRecordM = Nothing tabulateEntityA fromField_a2vhx = ((Entity <$> fromField_a2vhx MutAId) <*> (pure MutA <*> fromField_a2vhx MutAMutB)) entityDef _ = ((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "MutA"))) (EntityNameDB (Data.Text.pack "MutA"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "MutAId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) Nothing {persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityFields = [FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "mutB"), fieldDB = FieldNameDB (Data.Text.pack "mutB"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "MutBId"), fieldSqlType = sqlType (Proxy :: Proxy MutBId), fieldAttrs = [], fieldStrict = True, fieldReference = ForeignRef (EntityNameHS (Data.Text.pack "MutB")), fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}], persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityId = EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "MutAId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True), persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityForeigns = []} toPersistFields (MutA x_a2vhl) = [toPersistValue x_a2vhl] fromPersistValues [x1_a2vhn] = MutA <$> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "MutA")) (Data.Text.pack "mutB")) . fromPersistValue) x1_a2vhn fromPersistValues x_a2vhm = (Left $ (mappend (Data.Text.pack "MutA: fromPersistValues failed on: ")) (Data.Text.pack $ show x_a2vhm)) persistUniqueToFieldNames _ = error "Degenerate case, should never happen" persistUniqueToValues _ = error "Degenerate case, should never happen" persistUniqueKeys (MutA _mutB_a2vho) = [] persistFieldDef MutAId = Database.Persist.TH.stripIdFieldImpl (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "MutAId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True)) persistFieldDef MutAMutB = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy MutA)) (FieldNameHS (Data.Text.pack "mutB")) persistIdField = MutAId fieldLens MutAId = (lensPTH entityKey) (\ (Entity _ value_a2vhr) key_a2vhs -> (Entity key_a2vhs) value_a2vhr) fieldLens MutAMutB = (lensPTH ((\ MutA {mutAMutB = x} -> x) . entityVal)) (\ (Entity key_a2vht value_a2vhu) x_a2vhv -> (Entity key_a2vht) (case value_a2vhu of MutA {} -> MutA {mutAMutB = x_a2vhv})) deriving stock instance Show (BackendKey backend) => Show (Key (MutAGeneric backend)) deriving stock instance Read (BackendKey backend) => Read (Key (MutAGeneric backend)) deriving newtype instance Eq (BackendKey backend) => Eq (Key (MutAGeneric backend)) deriving newtype instance Ord (BackendKey backend) => Ord (Key (MutAGeneric backend)) deriving newtype instance Web.Internal.HttpApiData.ToHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.ToHttpApiData (Key (MutAGeneric backend)) deriving newtype instance Web.Internal.HttpApiData.FromHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.FromHttpApiData (Key (MutAGeneric backend)) deriving newtype instance Web.PathPieces.PathPiece (BackendKey backend) => Web.PathPieces.PathPiece (Key (MutAGeneric backend)) deriving newtype instance PersistField (BackendKey backend) => PersistField (Key (MutAGeneric backend)) deriving newtype instance PersistFieldSql (BackendKey backend) => PersistFieldSql (Key (MutAGeneric backend)) deriving newtype instance ToJSON (BackendKey backend) => ToJSON (Key (MutAGeneric backend)) deriving newtype instance FromJSON (BackendKey backend) => FromJSON (Key (MutAGeneric backend)) instance PersistStore backend => ToBackendKey backend (MutAGeneric backend) where toBackendKey = \ MutAKey {unMutAKey = x} -> x fromBackendKey = MutAKey type MutB = MutBGeneric SqlBackend data MutBGeneric backend = MutB {mutBMutA :: !(Key (MutAGeneric backend))} type MutBId = Key MutB instance PersistStore backend => PersistEntity (MutBGeneric backend) where type PersistEntityBackend (MutBGeneric backend) = backend data Unique (MutBGeneric backend) newtype Key (MutBGeneric backend) = MutBKey {unMutBKey :: (BackendKey backend)} data EntityField (MutBGeneric backend) typ = (typ ~ Key (MutBGeneric backend)) => MutBId | (typ ~ Key (MutAGeneric backend)) => MutBMutA keyToValues = ((: []) . (toPersistValue . (\ MutBKey {unMutBKey = x} -> x))) keyFromValues = (fmap MutBKey . (fromPersistValue . Database.Persist.TH.headNote)) keyFromRecordM = Nothing tabulateEntityA fromField_a2vhP = ((Entity <$> fromField_a2vhP MutBId) <*> (pure MutB <*> fromField_a2vhP MutBMutA)) entityDef _ = ((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "MutB"))) (EntityNameDB (Data.Text.pack "MutB"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "MutBId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) Nothing {persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityFields = [FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "mutA"), fieldDB = FieldNameDB (Data.Text.pack "mutA"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "MutAId"), fieldSqlType = sqlType (Proxy :: Proxy MutAId), fieldAttrs = [], fieldStrict = True, fieldReference = ForeignRef (EntityNameHS (Data.Text.pack "MutA")), fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}], persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityId = EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "MutBId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True), persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityForeigns = []} toPersistFields (MutB x_a2vhC) = [toPersistValue x_a2vhC] fromPersistValues [x1_a2vhE] = MutB <$> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "MutB")) (Data.Text.pack "mutA")) . fromPersistValue) x1_a2vhE fromPersistValues x_a2vhD = (Left $ (mappend (Data.Text.pack "MutB: fromPersistValues failed on: ")) (Data.Text.pack $ show x_a2vhD)) persistUniqueToFieldNames _ = error "Degenerate case, should never happen" persistUniqueToValues _ = error "Degenerate case, should never happen" persistUniqueKeys (MutB _mutA_a2vhF) = [] persistFieldDef MutBId = Database.Persist.TH.stripIdFieldImpl (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "MutBId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True)) persistFieldDef MutBMutA = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy MutB)) (FieldNameHS (Data.Text.pack "mutA")) persistIdField = MutBId fieldLens MutBId = (lensPTH entityKey) (\ (Entity _ value_a2vhJ) key_a2vhK -> (Entity key_a2vhK) value_a2vhJ) fieldLens MutBMutA = (lensPTH ((\ MutB {mutBMutA = x} -> x) . entityVal)) (\ (Entity key_a2vhL value_a2vhM) x_a2vhN -> (Entity key_a2vhL) (case value_a2vhM of MutB {} -> MutB {mutBMutA = x_a2vhN})) deriving stock instance Show (BackendKey backend) => Show (Key (MutBGeneric backend)) deriving stock instance Read (BackendKey backend) => Read (Key (MutBGeneric backend)) deriving newtype instance Eq (BackendKey backend) => Eq (Key (MutBGeneric backend)) deriving newtype instance Ord (BackendKey backend) => Ord (Key (MutBGeneric backend)) deriving newtype instance Web.Internal.HttpApiData.ToHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.ToHttpApiData (Key (MutBGeneric backend)) deriving newtype instance Web.Internal.HttpApiData.FromHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.FromHttpApiData (Key (MutBGeneric backend)) deriving newtype instance Web.PathPieces.PathPiece (BackendKey backend) => Web.PathPieces.PathPiece (Key (MutBGeneric backend)) deriving newtype instance PersistField (BackendKey backend) => PersistField (Key (MutBGeneric backend)) deriving newtype instance PersistFieldSql (BackendKey backend) => PersistFieldSql (Key (MutBGeneric backend)) deriving newtype instance ToJSON (BackendKey backend) => ToJSON (Key (MutBGeneric backend)) deriving newtype instance FromJSON (BackendKey backend) => FromJSON (Key (MutBGeneric backend)) instance PersistStore backend => ToBackendKey backend (MutBGeneric backend) where toBackendKey = \ MutBKey {unMutBKey = x} -> x fromBackendKey = MutBKey instance PersistStore backend => ToJSON (PersonGeneric backend) where toJSON (Person name_a2vhR age_a2vhS color_a2vhT) = object [(Data.Aeson.Key.fromString "name" .= name_a2vhR), (Data.Aeson.Key.fromString "age" .= age_a2vhS), (Data.Aeson.Key.fromString "color" .= color_a2vhT)] instance PersistStore backend => FromJSON (PersonGeneric backend) where parseJSON = (withObject "Person") (\ obj_a2vhQ -> (((pure Person <*> (obj_a2vhQ .: Data.Aeson.Key.fromString "name")) <*> (obj_a2vhQ .: Data.Aeson.Key.fromString "age")) <*> (obj_a2vhQ .:? Data.Aeson.Key.fromString "color"))) instance PersistStore backend => ToJSON (Entity (PersonGeneric backend)) where toJSON = entityIdToJSON instance PersistStore backend => FromJSON (Entity (PersonGeneric backend)) where parseJSON = entityIdFromJSON instance PersistStore backend => ToJSON (PersonMayGeneric backend) where toJSON (PersonMay name_a2vi1 color_a2vi2) = object [(Data.Aeson.Key.fromString "name" .= name_a2vi1), (Data.Aeson.Key.fromString "color" .= color_a2vi2)] instance PersistStore backend => FromJSON (PersonMayGeneric backend) where parseJSON = (withObject "PersonMay") (\ obj_a2vi0 -> ((pure PersonMay <*> (obj_a2vi0 .:? Data.Aeson.Key.fromString "name")) <*> (obj_a2vi0 .:? Data.Aeson.Key.fromString "color"))) instance PersistStore backend => ToJSON (Entity (PersonMayGeneric backend)) where toJSON = entityIdToJSON instance PersistStore backend => FromJSON (Entity (PersonMayGeneric backend)) where parseJSON = entityIdFromJSON instance PersistStoreWrite backend => OnlyOneUniqueKey (PersonGeneric backend) where onlyUniqueP = (head . persistUniqueKeys) instance PersistStoreWrite backend => AtLeastOneUniqueKey (PersonGeneric backend) where requireUniquesP = (NEL.fromList . persistUniqueKeys) instance (GHC.TypeLits.TypeError (NoUniqueKeysError (Person1Generic backend)), PersistStoreWrite backend) => OnlyOneUniqueKey (Person1Generic backend) where onlyUniqueP _ = error "impossible" instance (GHC.TypeLits.TypeError (MultipleUniqueKeysError (Person1Generic backend)), PersistStoreWrite backend) => AtLeastOneUniqueKey (Person1Generic backend) where requireUniquesP _ = error "impossible" instance (GHC.TypeLits.TypeError (NoUniqueKeysError (PersonMaybeAgeGeneric backend)), PersistStoreWrite backend) => OnlyOneUniqueKey (PersonMaybeAgeGeneric backend) where onlyUniqueP _ = error "impossible" instance (GHC.TypeLits.TypeError (MultipleUniqueKeysError (PersonMaybeAgeGeneric backend)), PersistStoreWrite backend) => AtLeastOneUniqueKey (PersonMaybeAgeGeneric backend) where requireUniquesP _ = error "impossible" instance (GHC.TypeLits.TypeError (NoUniqueKeysError (PersonMayGeneric backend)), PersistStoreWrite backend) => OnlyOneUniqueKey (PersonMayGeneric backend) where onlyUniqueP _ = error "impossible" instance (GHC.TypeLits.TypeError (MultipleUniqueKeysError (PersonMayGeneric backend)), PersistStoreWrite backend) => AtLeastOneUniqueKey (PersonMayGeneric backend) where requireUniquesP _ = error "impossible" instance (GHC.TypeLits.TypeError (NoUniqueKeysError (PetGeneric backend)), PersistStoreWrite backend) => OnlyOneUniqueKey (PetGeneric backend) where onlyUniqueP _ = error "impossible" instance (GHC.TypeLits.TypeError (MultipleUniqueKeysError (PetGeneric backend)), PersistStoreWrite backend) => AtLeastOneUniqueKey (PetGeneric backend) where requireUniquesP _ = error "impossible" instance (GHC.TypeLits.TypeError (NoUniqueKeysError (MaybeOwnedPetGeneric backend)), PersistStoreWrite backend) => OnlyOneUniqueKey (MaybeOwnedPetGeneric backend) where onlyUniqueP _ = error "impossible" instance (GHC.TypeLits.TypeError (MultipleUniqueKeysError (MaybeOwnedPetGeneric backend)), PersistStoreWrite backend) => AtLeastOneUniqueKey (MaybeOwnedPetGeneric backend) where requireUniquesP _ = error "impossible" instance (GHC.TypeLits.TypeError (NoUniqueKeysError (NeedsPetGeneric backend)), PersistStoreWrite backend) => OnlyOneUniqueKey (NeedsPetGeneric backend) where onlyUniqueP _ = error "impossible" instance (GHC.TypeLits.TypeError (MultipleUniqueKeysError (NeedsPetGeneric backend)), PersistStoreWrite backend) => AtLeastOneUniqueKey (NeedsPetGeneric backend) where requireUniquesP _ = error "impossible" instance (GHC.TypeLits.TypeError (NoUniqueKeysError (OutdoorPetGeneric backend)), PersistStoreWrite backend) => OnlyOneUniqueKey (OutdoorPetGeneric backend) where onlyUniqueP _ = error "impossible" instance (GHC.TypeLits.TypeError (MultipleUniqueKeysError (OutdoorPetGeneric backend)), PersistStoreWrite backend) => AtLeastOneUniqueKey (OutdoorPetGeneric backend) where requireUniquesP _ = error "impossible" instance PersistStoreWrite backend => OnlyOneUniqueKey (UserPTGeneric backend) where onlyUniqueP = (head . persistUniqueKeys) instance PersistStoreWrite backend => AtLeastOneUniqueKey (UserPTGeneric backend) where requireUniquesP = (NEL.fromList . persistUniqueKeys) instance PersistStoreWrite backend => OnlyOneUniqueKey (EmailPTGeneric backend) where onlyUniqueP = (head . persistUniqueKeys) instance PersistStoreWrite backend => AtLeastOneUniqueKey (EmailPTGeneric backend) where requireUniquesP = (NEL.fromList . persistUniqueKeys) instance PersistStoreWrite backend => OnlyOneUniqueKey (UpsertGeneric backend) where onlyUniqueP = (head . persistUniqueKeys) instance PersistStoreWrite backend => AtLeastOneUniqueKey (UpsertGeneric backend) where requireUniquesP = (NEL.fromList . persistUniqueKeys) instance (GHC.TypeLits.TypeError (MultipleUniqueKeysError (UpsertByGeneric backend)), PersistStoreWrite backend) => OnlyOneUniqueKey (UpsertByGeneric backend) where onlyUniqueP _ = error "impossible" instance PersistStoreWrite backend => AtLeastOneUniqueKey (UpsertByGeneric backend) where requireUniquesP = (NEL.fromList . persistUniqueKeys) instance (GHC.TypeLits.TypeError (NoUniqueKeysError (StrictGeneric backend)), PersistStoreWrite backend) => OnlyOneUniqueKey (StrictGeneric backend) where onlyUniqueP _ = error "impossible" instance (GHC.TypeLits.TypeError (MultipleUniqueKeysError (StrictGeneric backend)), PersistStoreWrite backend) => AtLeastOneUniqueKey (StrictGeneric backend) where requireUniquesP _ = error "impossible" instance PersistStoreWrite backend => OnlyOneUniqueKey (DudeWeirdColumnsGeneric backend) where onlyUniqueP = (head . persistUniqueKeys) instance PersistStoreWrite backend => AtLeastOneUniqueKey (DudeWeirdColumnsGeneric backend) where requireUniquesP = (NEL.fromList . persistUniqueKeys) instance (GHC.TypeLits.TypeError (NoUniqueKeysError (RelationshipGeneric backend)), PersistStoreWrite backend) => OnlyOneUniqueKey (RelationshipGeneric backend) where onlyUniqueP _ = error "impossible" instance (GHC.TypeLits.TypeError (MultipleUniqueKeysError (RelationshipGeneric backend)), PersistStoreWrite backend) => AtLeastOneUniqueKey (RelationshipGeneric backend) where requireUniquesP _ = error "impossible" instance (GHC.TypeLits.TypeError (NoUniqueKeysError (MutAGeneric backend)), PersistStoreWrite backend) => OnlyOneUniqueKey (MutAGeneric backend) where onlyUniqueP _ = error "impossible" instance (GHC.TypeLits.TypeError (MultipleUniqueKeysError (MutAGeneric backend)), PersistStoreWrite backend) => AtLeastOneUniqueKey (MutAGeneric backend) where requireUniquesP _ = error "impossible" instance (GHC.TypeLits.TypeError (NoUniqueKeysError (MutBGeneric backend)), PersistStoreWrite backend) => OnlyOneUniqueKey (MutBGeneric backend) where onlyUniqueP _ = error "impossible" instance (GHC.TypeLits.TypeError (MultipleUniqueKeysError (MutBGeneric backend)), PersistStoreWrite backend) => AtLeastOneUniqueKey (MutBGeneric backend) where requireUniquesP _ = error "impossible" instance SymbolToField "id" (PersonGeneric backend) (Key (PersonGeneric backend)) where symbolToField = PersonId instance SymbolToField "name" (PersonGeneric backend) Text where symbolToField = PersonName instance SymbolToField "age" (PersonGeneric backend) Int where symbolToField = PersonAge instance SymbolToField "color" (PersonGeneric backend) (Maybe Text) where symbolToField = PersonColor instance SymbolToField "id" (Person1Generic backend) (Key (Person1Generic backend)) where symbolToField = Person1Id instance SymbolToField "name" (Person1Generic backend) Text where symbolToField = Person1Name instance SymbolToField "age" (Person1Generic backend) Int where symbolToField = Person1Age instance SymbolToField "id" (PersonMaybeAgeGeneric backend) (Key (PersonMaybeAgeGeneric backend)) where symbolToField = PersonMaybeAgeId instance SymbolToField "name" (PersonMaybeAgeGeneric backend) Text where symbolToField = PersonMaybeAgeName instance SymbolToField "age" (PersonMaybeAgeGeneric backend) (Maybe Int) where symbolToField = PersonMaybeAgeAge instance SymbolToField "id" (PersonMayGeneric backend) (Key (PersonMayGeneric backend)) where symbolToField = PersonMayId instance SymbolToField "name" (PersonMayGeneric backend) (Maybe Text) where symbolToField = PersonMayName instance SymbolToField "color" (PersonMayGeneric backend) (Maybe Text) where symbolToField = PersonMayColor instance SymbolToField "id" (PetGeneric backend) (Key (PetGeneric backend)) where symbolToField = PetId instance SymbolToField "ownerId" (PetGeneric backend) (Key (PersonGeneric backend)) where symbolToField = PetOwnerId instance SymbolToField "name" (PetGeneric backend) Text where symbolToField = PetName instance SymbolToField "type" (PetGeneric backend) PetType where symbolToField = PetType instance SymbolToField "id" (MaybeOwnedPetGeneric backend) (Key (MaybeOwnedPetGeneric backend)) where symbolToField = MaybeOwnedPetId instance SymbolToField "ownerId" (MaybeOwnedPetGeneric backend) (Maybe (Key (PersonGeneric backend))) where symbolToField = MaybeOwnedPetOwnerId instance SymbolToField "name" (MaybeOwnedPetGeneric backend) Text where symbolToField = MaybeOwnedPetName instance SymbolToField "type" (MaybeOwnedPetGeneric backend) PetType where symbolToField = MaybeOwnedPetType instance SymbolToField "id" (NeedsPetGeneric backend) (Key (NeedsPetGeneric backend)) where symbolToField = NeedsPetId instance SymbolToField "petKey" (NeedsPetGeneric backend) (Key (PetGeneric backend)) where symbolToField = NeedsPetPetKey instance SymbolToField "id" (OutdoorPetGeneric backend) (Key (OutdoorPetGeneric backend)) where symbolToField = OutdoorPetId instance SymbolToField "ownerId" (OutdoorPetGeneric backend) (Key (PersonGeneric backend)) where symbolToField = OutdoorPetOwnerId instance SymbolToField "collar" (OutdoorPetGeneric backend) PetCollar where symbolToField = OutdoorPetCollar instance SymbolToField "type" (OutdoorPetGeneric backend) PetType where symbolToField = OutdoorPetType instance SymbolToField "id" (UserPTGeneric backend) (Key (UserPTGeneric backend)) where symbolToField = UserPTId instance SymbolToField "ident" (UserPTGeneric backend) Text where symbolToField = UserPTIdent instance SymbolToField "password" (UserPTGeneric backend) (Maybe Text) where symbolToField = UserPTPassword instance SymbolToField "id" (EmailPTGeneric backend) (Key (EmailPTGeneric backend)) where symbolToField = EmailPTId instance SymbolToField "email" (EmailPTGeneric backend) Text where symbolToField = EmailPTEmail instance SymbolToField "user" (EmailPTGeneric backend) (Maybe (Key (UserPTGeneric backend))) where symbolToField = EmailPTUser instance SymbolToField "verkey" (EmailPTGeneric backend) (Maybe Text) where symbolToField = EmailPTVerkey instance SymbolToField "id" (UpsertGeneric backend) (Key (UpsertGeneric backend)) where symbolToField = UpsertId instance SymbolToField "email" (UpsertGeneric backend) Text where symbolToField = UpsertEmail instance SymbolToField "attr" (UpsertGeneric backend) Text where symbolToField = UpsertAttr instance SymbolToField "extra" (UpsertGeneric backend) Text where symbolToField = UpsertExtra instance SymbolToField "age" (UpsertGeneric backend) Int where symbolToField = UpsertAge instance SymbolToField "id" (UpsertByGeneric backend) (Key (UpsertByGeneric backend)) where symbolToField = UpsertById instance SymbolToField "email" (UpsertByGeneric backend) Text where symbolToField = UpsertByEmail instance SymbolToField "city" (UpsertByGeneric backend) Text where symbolToField = UpsertByCity instance SymbolToField "attr" (UpsertByGeneric backend) Text where symbolToField = UpsertByAttr instance SymbolToField "id" (StrictGeneric backend) (Key (StrictGeneric backend)) where symbolToField = StrictId instance SymbolToField "yes" (StrictGeneric backend) Int where symbolToField = StrictYes instance SymbolToField "no" (StrictGeneric backend) Int where symbolToField = StrictNo instance SymbolToField "def" (StrictGeneric backend) Int where symbolToField = StrictDef instance SymbolToField "id" (DudeWeirdColumnsGeneric backend) (Key (DudeWeirdColumnsGeneric backend)) where symbolToField = DudeWeirdColumnsId instance SymbolToField "name" (DudeWeirdColumnsGeneric backend) Text where symbolToField = DudeWeirdColumnsName instance SymbolToField "id" (RelationshipGeneric backend) (Key (RelationshipGeneric backend)) where symbolToField = RelationshipId instance SymbolToField "name" (RelationshipGeneric backend) String where symbolToField = RelationshipName instance SymbolToField "parent" (RelationshipGeneric backend) (Maybe (Key (RelationshipGeneric backend))) where symbolToField = RelationshipParent instance SymbolToField "id" (MutAGeneric backend) (Key (MutAGeneric backend)) where symbolToField = MutAId instance SymbolToField "mutB" (MutAGeneric backend) (Key (MutBGeneric backend)) where symbolToField = MutAMutB instance SymbolToField "id" (MutBGeneric backend) (Key (MutBGeneric backend)) where symbolToField = MutBId instance SymbolToField "mutA" (MutBGeneric backend) (Key (MutAGeneric backend)) where symbolToField = MutBMutA instance PersistStoreWrite backend => SafeToInsert (PersonGeneric backend) instance PersistStoreWrite backend => SafeToInsert (Person1Generic backend) instance PersistStoreWrite backend => SafeToInsert (PersonMaybeAgeGeneric backend) instance PersistStoreWrite backend => SafeToInsert (PersonMayGeneric backend) instance PersistStoreWrite backend => SafeToInsert (PetGeneric backend) instance PersistStoreWrite backend => SafeToInsert (MaybeOwnedPetGeneric backend) instance PersistStoreWrite backend => SafeToInsert (NeedsPetGeneric backend) instance PersistStoreWrite backend => SafeToInsert (OutdoorPetGeneric backend) instance PersistStoreWrite backend => SafeToInsert (UserPTGeneric backend) instance PersistStoreWrite backend => SafeToInsert (EmailPTGeneric backend) instance PersistStoreWrite backend => SafeToInsert (UpsertGeneric backend) instance PersistStoreWrite backend => SafeToInsert (UpsertByGeneric backend) instance PersistStoreWrite backend => SafeToInsert (StrictGeneric backend) instance PersistStoreWrite backend => SafeToInsert (DudeWeirdColumnsGeneric backend) instance PersistStoreWrite backend => SafeToInsert (RelationshipGeneric backend) instance PersistStoreWrite backend => SafeToInsert (MutAGeneric backend) instance PersistStoreWrite backend => SafeToInsert (MutBGeneric backend) entityDefListFortestMigrate :: [EntityDef] entityDefListFortestMigrate = [entityDef (Proxy :: Proxy Person), entityDef (Proxy :: Proxy Person1), entityDef (Proxy :: Proxy PersonMaybeAge), entityDef (Proxy :: Proxy PersonMay), entityDef (Proxy :: Proxy Pet), entityDef (Proxy :: Proxy MaybeOwnedPet), entityDef (Proxy :: Proxy NeedsPet), entityDef (Proxy :: Proxy OutdoorPet), entityDef (Proxy :: Proxy UserPT), entityDef (Proxy :: Proxy EmailPT), entityDef (Proxy :: Proxy Upsert), entityDef (Proxy :: Proxy UpsertBy), entityDef (Proxy :: Proxy Strict), entityDef (Proxy :: Proxy DudeWeirdColumns), entityDef (Proxy :: Proxy Relationship), entityDef (Proxy :: Proxy MutA), entityDef (Proxy :: Proxy MutB)] testMigrate :: Migration testMigrate = migrateModels entityDefListFortestMigrate src/PersistentTestModels.hs:(141,27)-(152,2): Splicing expression template-haskell:Language.Haskell.TH.Quote.quoteExp persistLowerCase "\n\ \NoPrefix1\n\ \ someFieldName Int\n\ \NoPrefix2\n\ \ someOtherFieldName Int\n\ \ unprefixedRef NoPrefix1Id\n\ \+NoPrefixSum\n\ \ unprefixedLeft Int\n\ \ unprefixedRight String\n\ \ deriving Show Eq\n\ \\n" ======> [(((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "NoPrefix1"))) (EntityNameDB (Data.Text.pack "no_prefix1"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "NoPrefix1Id"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "someFieldName"))) (FieldNameDB (Data.Text.pack "some_field_name"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Int"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "NoPrefix2"))) (EntityNameDB (Data.Text.pack "no_prefix2"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "NoPrefix2Id"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "someOtherFieldName"))) (FieldNameDB (Data.Text.pack "some_other_field_name"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Int"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "unprefixedRef"))) (FieldNameDB (Data.Text.pack "unprefixed_ref"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "NoPrefix1Id"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "NoPrefixSum"))) (EntityNameDB (Data.Text.pack "no_prefix_sum"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "NoPrefixSumId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) [Data.Text.pack "Show", Data.Text.pack "Eq"]) Data.Map.Internal.Tip) True) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "unprefixedLeft"))) (FieldNameDB (Data.Text.pack "unprefixed_left"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Int"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "unprefixedRight"))) (FieldNameDB (Data.Text.pack "unprefixed_right"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "String"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing]] src/PersistentTestModels.hs:(134,1)-(152,2): Splicing declarations share [mkPersist persistSettings {mpsPrefixFields = False, mpsFieldLabelModifier = \ _ _ -> "", mpsConstraintLabelModifier = \ _ _ -> "", mpsGeneric = True}, mkMigrate "noPrefixMigrate"] ([(((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "NoPrefix1"))) (EntityNameDB (Data.Text.pack "no_prefix1"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "NoPrefix1Id"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "someFieldName"))) (FieldNameDB (Data.Text.pack "some_field_name"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Int"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "NoPrefix2"))) (EntityNameDB (Data.Text.pack "no_prefix2"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "NoPrefix2Id"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "someOtherFieldName"))) (FieldNameDB (Data.Text.pack "some_other_field_name"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Int"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "unprefixedRef"))) (FieldNameDB (Data.Text.pack "unprefixed_ref"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "NoPrefix1Id"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "NoPrefixSum"))) (EntityNameDB (Data.Text.pack "no_prefix_sum"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "NoPrefixSumId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) [Data.Text.pack "Show", Data.Text.pack "Eq"]) Data.Map.Internal.Tip) True) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "unprefixedLeft"))) (FieldNameDB (Data.Text.pack "unprefixed_left"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Int"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "unprefixedRight"))) (FieldNameDB (Data.Text.pack "unprefixed_right"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "String"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing]]) ======> instance PersistStore backend => PersistField (NoPrefix1Generic backend) where toPersistValue = Database.Persist.TH.entityToPersistValueHelper fromPersistValue = Database.Persist.TH.entityFromPersistValueHelper ["someFieldName"] instance PersistStore backend => PersistFieldSql (NoPrefix1Generic backend) where sqlType _ = SqlString instance PersistStore backend => PersistField (NoPrefix2Generic backend) where toPersistValue = Database.Persist.TH.entityToPersistValueHelper fromPersistValue = Database.Persist.TH.entityFromPersistValueHelper ["someOtherFieldName", "unprefixedRef"] instance PersistStore backend => PersistFieldSql (NoPrefix2Generic backend) where sqlType _ = SqlString instance PersistStore backend => PersistField (NoPrefixSumGeneric backend) where toPersistValue = Database.Persist.TH.entityToPersistValueHelper fromPersistValue = Database.Persist.TH.entityFromPersistValueHelper ["unprefixedLeft", "unprefixedRight"] instance PersistStore backend => PersistFieldSql (NoPrefixSumGeneric backend) where sqlType _ = SqlString type NoPrefix1 = NoPrefix1Generic SqlBackend data NoPrefix1Generic backend = NoPrefix1 {someFieldName :: !Int} type NoPrefix1Id = Key NoPrefix1 instance PersistStore backend => PersistEntity (NoPrefix1Generic backend) where type PersistEntityBackend (NoPrefix1Generic backend) = backend data Unique (NoPrefix1Generic backend) newtype Key (NoPrefix1Generic backend) = NoPrefix1Key {unNoPrefix1Key :: (BackendKey backend)} data EntityField (NoPrefix1Generic backend) typ = (typ ~ Key (NoPrefix1Generic backend)) => NoPrefix1Id | (typ ~ Int) => SomeFieldName keyToValues = ((: []) . (toPersistValue . (\ NoPrefix1Key {unNoPrefix1Key = x} -> x))) keyFromValues = (fmap NoPrefix1Key . (fromPersistValue . Database.Persist.TH.headNote)) keyFromRecordM = Nothing tabulateEntityA fromField_a3bWC = ((Entity <$> fromField_a3bWC NoPrefix1Id) <*> (pure NoPrefix1 <*> fromField_a3bWC SomeFieldName)) entityDef _ = ((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "NoPrefix1"))) (EntityNameDB (Data.Text.pack "no_prefix1"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "NoPrefix1Id"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) Nothing {persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityFields = [FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "someFieldName"), fieldDB = FieldNameDB (Data.Text.pack "some_field_name"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "Int"), fieldSqlType = sqlType (Proxy :: Proxy Int), fieldAttrs = [], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}], persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityId = EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "NoPrefix1Id"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True), persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityForeigns = []} toPersistFields (NoPrefix1 x_a3bWk) = [toPersistValue x_a3bWk] fromPersistValues [x1_a3bWm] = NoPrefix1 <$> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "no_prefix1")) (Data.Text.pack "someFieldName")) . fromPersistValue) x1_a3bWm fromPersistValues x_a3bWl = (Left $ (mappend (Data.Text.pack "NoPrefix1: fromPersistValues failed on: ")) (Data.Text.pack $ show x_a3bWl)) persistUniqueToFieldNames _ = error "Degenerate case, should never happen" persistUniqueToValues _ = error "Degenerate case, should never happen" persistUniqueKeys (NoPrefix1 _someFieldName_a3bWn) = [] persistFieldDef NoPrefix1Id = Database.Persist.TH.stripIdFieldImpl (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "NoPrefix1Id"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True)) persistFieldDef SomeFieldName = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy NoPrefix1)) (FieldNameHS (Data.Text.pack "someFieldName")) persistIdField = NoPrefix1Id fieldLens NoPrefix1Id = (lensPTH entityKey) (\ (Entity _ value_a3bWu) key_a3bWv -> (Entity key_a3bWv) value_a3bWu) fieldLens SomeFieldName = (lensPTH ((\ NoPrefix1 {someFieldName = x} -> x) . entityVal)) (\ (Entity key_a3bWw value_a3bWx) x_a3bWy -> (Entity key_a3bWw) (case value_a3bWx of NoPrefix1 {} -> NoPrefix1 {someFieldName = x_a3bWy})) deriving stock instance Show (BackendKey backend) => Show (Key (NoPrefix1Generic backend)) deriving stock instance Read (BackendKey backend) => Read (Key (NoPrefix1Generic backend)) deriving newtype instance Eq (BackendKey backend) => Eq (Key (NoPrefix1Generic backend)) deriving newtype instance Ord (BackendKey backend) => Ord (Key (NoPrefix1Generic backend)) deriving newtype instance Web.Internal.HttpApiData.ToHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.ToHttpApiData (Key (NoPrefix1Generic backend)) deriving newtype instance Web.Internal.HttpApiData.FromHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.FromHttpApiData (Key (NoPrefix1Generic backend)) deriving newtype instance Web.PathPieces.PathPiece (BackendKey backend) => Web.PathPieces.PathPiece (Key (NoPrefix1Generic backend)) deriving newtype instance PersistField (BackendKey backend) => PersistField (Key (NoPrefix1Generic backend)) deriving newtype instance PersistFieldSql (BackendKey backend) => PersistFieldSql (Key (NoPrefix1Generic backend)) deriving newtype instance ToJSON (BackendKey backend) => ToJSON (Key (NoPrefix1Generic backend)) deriving newtype instance FromJSON (BackendKey backend) => FromJSON (Key (NoPrefix1Generic backend)) instance PersistStore backend => ToBackendKey backend (NoPrefix1Generic backend) where toBackendKey = \ NoPrefix1Key {unNoPrefix1Key = x} -> x fromBackendKey = NoPrefix1Key type NoPrefix2 = NoPrefix2Generic SqlBackend data NoPrefix2Generic backend = NoPrefix2 {someOtherFieldName :: !Int, unprefixedRef :: !(Key (NoPrefix1Generic backend))} type NoPrefix2Id = Key NoPrefix2 instance PersistStore backend => PersistEntity (NoPrefix2Generic backend) where type PersistEntityBackend (NoPrefix2Generic backend) = backend data Unique (NoPrefix2Generic backend) newtype Key (NoPrefix2Generic backend) = NoPrefix2Key {unNoPrefix2Key :: (BackendKey backend)} data EntityField (NoPrefix2Generic backend) typ = (typ ~ Key (NoPrefix2Generic backend)) => NoPrefix2Id | (typ ~ Int) => SomeOtherFieldName | (typ ~ Key (NoPrefix1Generic backend)) => UnprefixedRef keyToValues = ((: []) . (toPersistValue . (\ NoPrefix2Key {unNoPrefix2Key = x} -> x))) keyFromValues = (fmap NoPrefix2Key . (fromPersistValue . Database.Persist.TH.headNote)) keyFromRecordM = Nothing tabulateEntityA fromField_a3bXe = ((Entity <$> fromField_a3bXe NoPrefix2Id) <*> ((pure NoPrefix2 <*> fromField_a3bXe SomeOtherFieldName) <*> fromField_a3bXe UnprefixedRef)) entityDef _ = ((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "NoPrefix2"))) (EntityNameDB (Data.Text.pack "no_prefix2"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "NoPrefix2Id"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) Nothing {persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityFields = [FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "someOtherFieldName"), fieldDB = FieldNameDB (Data.Text.pack "some_other_field_name"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "Int"), fieldSqlType = sqlType (Proxy :: Proxy Int), fieldAttrs = [], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}, FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "unprefixedRef"), fieldDB = FieldNameDB (Data.Text.pack "unprefixed_ref"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "NoPrefix1Id"), fieldSqlType = sqlType (Proxy :: Proxy NoPrefix1Id), fieldAttrs = [], fieldStrict = True, fieldReference = ForeignRef (EntityNameHS (Data.Text.pack "NoPrefix1")), fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}], persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityId = EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "NoPrefix2Id"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True), persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityForeigns = []} toPersistFields (NoPrefix2 x_a3bWN x_a3bWO) = [toPersistValue x_a3bWN, toPersistValue x_a3bWO] fromPersistValues [x1_a3bWQ, x2_a3bWR] = NoPrefix2 <$> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "no_prefix2")) (Data.Text.pack "someOtherFieldName")) . fromPersistValue) x1_a3bWQ <*> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "no_prefix2")) (Data.Text.pack "unprefixedRef")) . fromPersistValue) x2_a3bWR fromPersistValues x_a3bWP = (Left $ (mappend (Data.Text.pack "NoPrefix2: fromPersistValues failed on: ")) (Data.Text.pack $ show x_a3bWP)) persistUniqueToFieldNames _ = error "Degenerate case, should never happen" persistUniqueToValues _ = error "Degenerate case, should never happen" persistUniqueKeys (NoPrefix2 _someOtherFieldName_a3bWT _unprefixedRef_a3bWU) = [] persistFieldDef NoPrefix2Id = Database.Persist.TH.stripIdFieldImpl (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "NoPrefix2Id"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True)) persistFieldDef SomeOtherFieldName = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy NoPrefix2)) (FieldNameHS (Data.Text.pack "someOtherFieldName")) persistFieldDef UnprefixedRef = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy NoPrefix2)) (FieldNameHS (Data.Text.pack "unprefixedRef")) persistIdField = NoPrefix2Id fieldLens NoPrefix2Id = (lensPTH entityKey) (\ (Entity _ value_a3bX3) key_a3bX4 -> (Entity key_a3bX4) value_a3bX3) fieldLens SomeOtherFieldName = (lensPTH ((\ NoPrefix2 {someOtherFieldName = x} -> x) . entityVal)) (\ (Entity key_a3bX7 value_a3bX8) x_a3bX9 -> (Entity key_a3bX7) (case value_a3bX8 of NoPrefix2 {unprefixedRef = unprefixedRef_a3bXb} -> NoPrefix2 {someOtherFieldName = x_a3bX9, unprefixedRef = unprefixedRef})) fieldLens UnprefixedRef = (lensPTH ((\ NoPrefix2 {unprefixedRef = x} -> x) . entityVal)) (\ (Entity key_a3bX7 value_a3bX8) x_a3bX9 -> (Entity key_a3bX7) (case value_a3bX8 of NoPrefix2 {someOtherFieldName = someOtherFieldName_a3bXc} -> NoPrefix2 {someOtherFieldName = someOtherFieldName, unprefixedRef = x_a3bX9})) deriving stock instance Show (BackendKey backend) => Show (Key (NoPrefix2Generic backend)) deriving stock instance Read (BackendKey backend) => Read (Key (NoPrefix2Generic backend)) deriving newtype instance Eq (BackendKey backend) => Eq (Key (NoPrefix2Generic backend)) deriving newtype instance Ord (BackendKey backend) => Ord (Key (NoPrefix2Generic backend)) deriving newtype instance Web.Internal.HttpApiData.ToHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.ToHttpApiData (Key (NoPrefix2Generic backend)) deriving newtype instance Web.Internal.HttpApiData.FromHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.FromHttpApiData (Key (NoPrefix2Generic backend)) deriving newtype instance Web.PathPieces.PathPiece (BackendKey backend) => Web.PathPieces.PathPiece (Key (NoPrefix2Generic backend)) deriving newtype instance PersistField (BackendKey backend) => PersistField (Key (NoPrefix2Generic backend)) deriving newtype instance PersistFieldSql (BackendKey backend) => PersistFieldSql (Key (NoPrefix2Generic backend)) deriving newtype instance ToJSON (BackendKey backend) => ToJSON (Key (NoPrefix2Generic backend)) deriving newtype instance FromJSON (BackendKey backend) => FromJSON (Key (NoPrefix2Generic backend)) instance PersistStore backend => ToBackendKey backend (NoPrefix2Generic backend) where toBackendKey = \ NoPrefix2Key {unNoPrefix2Key = x} -> x fromBackendKey = NoPrefix2Key type NoPrefixSum = NoPrefixSumGeneric SqlBackend data NoPrefixSumGeneric backend = UnprefixedLeftSum Int | UnprefixedRightSum String deriving stock (Show, Eq) type NoPrefixSumId = Key NoPrefixSum instance PersistStore backend => PersistEntity (NoPrefixSumGeneric backend) where type PersistEntityBackend (NoPrefixSumGeneric backend) = backend data Unique (NoPrefixSumGeneric backend) newtype Key (NoPrefixSumGeneric backend) = NoPrefixSumKey {unNoPrefixSumKey :: (BackendKey backend)} data EntityField (NoPrefixSumGeneric backend) typ = (typ ~ Key (NoPrefixSumGeneric backend)) => NoPrefixSumId | (typ ~ Int) => UnprefixedLeft | (typ ~ String) => UnprefixedRight keyToValues = ((: []) . (toPersistValue . (\ NoPrefixSumKey {unNoPrefixSumKey = x} -> x))) keyFromValues = (fmap NoPrefixSumKey . (fromPersistValue . Database.Persist.TH.headNote)) keyFromRecordM = Nothing tabulateEntityA fromField_a3bXu = error "tabulateEntityA does not make sense for sum type" entityDef _ = ((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "NoPrefixSum"))) (EntityNameDB (Data.Text.pack "no_prefix_sum"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "NoPrefixSumId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) [Data.Text.pack "Show", Data.Text.pack "Eq"]) Data.Map.Internal.Tip) True) Nothing {persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityFields = [FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "unprefixedLeft"), fieldDB = FieldNameDB (Data.Text.pack "unprefixed_left"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "Int"), fieldSqlType = sqlType (Proxy :: Proxy Int), fieldAttrs = [], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}, FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "unprefixedRight"), fieldDB = FieldNameDB (Data.Text.pack "unprefixed_right"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "String"), fieldSqlType = sqlType (Proxy :: Proxy String), fieldAttrs = [], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}], persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityId = EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "NoPrefixSumId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True), persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityForeigns = []} toPersistFields (UnprefixedLeftSum x_a3bXi) = [toPersistValue x_a3bXi, PersistNull] toPersistFields (UnprefixedRightSum x_a3bXj) = [PersistNull, toPersistValue x_a3bXj] fromPersistValues [x_a3bXk, PersistNull] | Database.Persist.TH.isNotNull x_a3bXk = (UnprefixedLeftSum `fmap` fromPersistValue x_a3bXk) fromPersistValues [PersistNull, x_a3bXl] | Database.Persist.TH.isNotNull x_a3bXl = (UnprefixedRightSum `fmap` fromPersistValue x_a3bXl) fromPersistValues _ = Left ("Invalid fromPersistValues input: sum type with all nulls. Entity: " `mappend` Data.Text.pack "NoPrefixSum") persistUniqueToFieldNames _ = error "Degenerate case, should never happen" persistUniqueToValues _ = error "Degenerate case, should never happen" persistUniqueKeys _ = [] persistFieldDef NoPrefixSumId = Database.Persist.TH.stripIdFieldImpl (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "NoPrefixSumId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True)) persistFieldDef UnprefixedLeft = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy NoPrefixSum)) (FieldNameHS (Data.Text.pack "unprefixedLeft")) persistFieldDef UnprefixedRight = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy NoPrefixSum)) (FieldNameHS (Data.Text.pack "unprefixedRight")) persistIdField = NoPrefixSumId fieldLens NoPrefixSumId = (lensPTH entityKey) (\ (Entity _ value_a3bXn) key_a3bXo -> (Entity key_a3bXo) value_a3bXn) fieldLens UnprefixedLeft = (lensPTH (\ (Entity _ value_a3bXr) -> case value_a3bXr of UnprefixedLeftSum x_a3bXs -> x_a3bXs _ -> error "Tried to use fieldLens on a Sum type")) (\ (Entity key_a3bXq _) x_a3bXs -> (Entity key_a3bXq) (UnprefixedLeftSum x_a3bXs)) fieldLens UnprefixedRight = (lensPTH (\ (Entity _ value_a3bXr) -> case value_a3bXr of UnprefixedRightSum x_a3bXs -> x_a3bXs _ -> error "Tried to use fieldLens on a Sum type")) (\ (Entity key_a3bXq _) x_a3bXs -> (Entity key_a3bXq) (UnprefixedRightSum x_a3bXs)) deriving stock instance Show (BackendKey backend) => Show (Key (NoPrefixSumGeneric backend)) deriving stock instance Read (BackendKey backend) => Read (Key (NoPrefixSumGeneric backend)) deriving newtype instance Eq (BackendKey backend) => Eq (Key (NoPrefixSumGeneric backend)) deriving newtype instance Ord (BackendKey backend) => Ord (Key (NoPrefixSumGeneric backend)) deriving newtype instance Web.Internal.HttpApiData.ToHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.ToHttpApiData (Key (NoPrefixSumGeneric backend)) deriving newtype instance Web.Internal.HttpApiData.FromHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.FromHttpApiData (Key (NoPrefixSumGeneric backend)) deriving newtype instance Web.PathPieces.PathPiece (BackendKey backend) => Web.PathPieces.PathPiece (Key (NoPrefixSumGeneric backend)) deriving newtype instance PersistField (BackendKey backend) => PersistField (Key (NoPrefixSumGeneric backend)) deriving newtype instance PersistFieldSql (BackendKey backend) => PersistFieldSql (Key (NoPrefixSumGeneric backend)) deriving newtype instance ToJSON (BackendKey backend) => ToJSON (Key (NoPrefixSumGeneric backend)) deriving newtype instance FromJSON (BackendKey backend) => FromJSON (Key (NoPrefixSumGeneric backend)) instance PersistStore backend => ToBackendKey backend (NoPrefixSumGeneric backend) where toBackendKey = \ NoPrefixSumKey {unNoPrefixSumKey = x} -> x fromBackendKey = NoPrefixSumKey instance (GHC.TypeLits.TypeError (NoUniqueKeysError (NoPrefix1Generic backend)), PersistStoreWrite backend) => OnlyOneUniqueKey (NoPrefix1Generic backend) where onlyUniqueP _ = error "impossible" instance (GHC.TypeLits.TypeError (MultipleUniqueKeysError (NoPrefix1Generic backend)), PersistStoreWrite backend) => AtLeastOneUniqueKey (NoPrefix1Generic backend) where requireUniquesP _ = error "impossible" instance (GHC.TypeLits.TypeError (NoUniqueKeysError (NoPrefix2Generic backend)), PersistStoreWrite backend) => OnlyOneUniqueKey (NoPrefix2Generic backend) where onlyUniqueP _ = error "impossible" instance (GHC.TypeLits.TypeError (MultipleUniqueKeysError (NoPrefix2Generic backend)), PersistStoreWrite backend) => AtLeastOneUniqueKey (NoPrefix2Generic backend) where requireUniquesP _ = error "impossible" instance (GHC.TypeLits.TypeError (NoUniqueKeysError (NoPrefixSumGeneric backend)), PersistStoreWrite backend) => OnlyOneUniqueKey (NoPrefixSumGeneric backend) where onlyUniqueP _ = error "impossible" instance (GHC.TypeLits.TypeError (MultipleUniqueKeysError (NoPrefixSumGeneric backend)), PersistStoreWrite backend) => AtLeastOneUniqueKey (NoPrefixSumGeneric backend) where requireUniquesP _ = error "impossible" instance SymbolToField "id" (NoPrefix1Generic backend) (Key (NoPrefix1Generic backend)) where symbolToField = NoPrefix1Id instance SymbolToField "someFieldName" (NoPrefix1Generic backend) Int where symbolToField = SomeFieldName instance SymbolToField "id" (NoPrefix2Generic backend) (Key (NoPrefix2Generic backend)) where symbolToField = NoPrefix2Id instance SymbolToField "someOtherFieldName" (NoPrefix2Generic backend) Int where symbolToField = SomeOtherFieldName instance SymbolToField "unprefixedRef" (NoPrefix2Generic backend) (Key (NoPrefix1Generic backend)) where symbolToField = UnprefixedRef instance SymbolToField "id" (NoPrefixSumGeneric backend) (Key (NoPrefixSumGeneric backend)) where symbolToField = NoPrefixSumId instance SymbolToField "unprefixedLeft" (NoPrefixSumGeneric backend) Int where symbolToField = UnprefixedLeft instance SymbolToField "unprefixedRight" (NoPrefixSumGeneric backend) String where symbolToField = UnprefixedRight instance PersistStoreWrite backend => SafeToInsert (NoPrefix1Generic backend) instance PersistStoreWrite backend => SafeToInsert (NoPrefix2Generic backend) instance PersistStoreWrite backend => SafeToInsert (NoPrefixSumGeneric backend) entityDefListFornoPrefixMigrate :: [EntityDef] entityDefListFornoPrefixMigrate = [entityDef (Proxy :: Proxy NoPrefix1), entityDef (Proxy :: Proxy NoPrefix2), entityDef (Proxy :: Proxy NoPrefixSum)] noPrefixMigrate :: Migration noPrefixMigrate = migrateModels entityDefListFornoPrefixMigrate src/PersistentTestModels.hs:(173,27)-(183,2): Splicing expression template-haskell:Language.Haskell.TH.Quote.quoteExp persistLowerCase "\n\ \CustomPrefix1\n\ \ customFieldName Int\n\ \CustomPrefix2\n\ \ otherCustomFieldName Int\n\ \ customPrefixedRef CustomPrefix1Id\n\ \+CustomPrefixSum\n\ \ customPrefixedLeft Int\n\ \ customPrefixedRight String\n\ \ deriving Show Eq\n" ======> [(((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "CustomPrefix1"))) (EntityNameDB (Data.Text.pack "custom_prefix1"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "CustomPrefix1Id"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "customFieldName"))) (FieldNameDB (Data.Text.pack "custom_field_name"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Int"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "CustomPrefix2"))) (EntityNameDB (Data.Text.pack "custom_prefix2"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "CustomPrefix2Id"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "otherCustomFieldName"))) (FieldNameDB (Data.Text.pack "other_custom_field_name"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Int"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "customPrefixedRef"))) (FieldNameDB (Data.Text.pack "custom_prefixed_ref"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "CustomPrefix1Id"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "CustomPrefixSum"))) (EntityNameDB (Data.Text.pack "custom_prefix_sum"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "CustomPrefixSumId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) [Data.Text.pack "Show", Data.Text.pack "Eq"]) Data.Map.Internal.Tip) True) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "customPrefixedLeft"))) (FieldNameDB (Data.Text.pack "custom_prefixed_left"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Int"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "customPrefixedRight"))) (FieldNameDB (Data.Text.pack "custom_prefixed_right"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "String"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing]] src/PersistentTestModels.hs:(160,1)-(183,2): Splicing declarations share [mkPersist persistSettings {mpsFieldLabelModifier = \ entity_a3f31 field_a3f32 -> case entity_a3f31 of "CustomPrefix1" -> append "_cp1" field_a3f32 "CustomPrefix2" -> append "_cp2" field_a3f32 _ -> error "should not be called", mpsConstraintLabelModifier = \ entity_a3f34 field_a3f35 -> case entity_a3f34 of "CustomPrefix1" -> append "CP1" field_a3f35 "CustomPrefix2" -> append "CP2" field_a3f35 "CustomPrefixSum" -> append "CP" field_a3f35 _ -> error "should not be called", mpsGeneric = True}, mkMigrate "customPrefixMigrate"] ([(((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "CustomPrefix1"))) (EntityNameDB (Data.Text.pack "custom_prefix1"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "CustomPrefix1Id"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "customFieldName"))) (FieldNameDB (Data.Text.pack "custom_field_name"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Int"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "CustomPrefix2"))) (EntityNameDB (Data.Text.pack "custom_prefix2"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "CustomPrefix2Id"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "otherCustomFieldName"))) (FieldNameDB (Data.Text.pack "other_custom_field_name"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Int"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "customPrefixedRef"))) (FieldNameDB (Data.Text.pack "custom_prefixed_ref"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "CustomPrefix1Id"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing], (((Database.Persist.Quasi.Internal.UnboundEntityDef []) (Database.Persist.Quasi.Internal.DefaultKey (FieldNameDB (Data.Text.pack "id")))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "CustomPrefixSum"))) (EntityNameDB (Data.Text.pack "custom_prefix_sum"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "CustomPrefixSumId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) [Data.Text.pack "Show", Data.Text.pack "Eq"]) Data.Map.Internal.Tip) True) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "customPrefixedLeft"))) (FieldNameDB (Data.Text.pack "custom_prefixed_left"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "Int"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "customPrefixedRight"))) (FieldNameDB (Data.Text.pack "custom_prefixed_right"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "String"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing]]) ======> instance PersistStore backend => PersistField (CustomPrefix1Generic backend) where toPersistValue = Database.Persist.TH.entityToPersistValueHelper fromPersistValue = Database.Persist.TH.entityFromPersistValueHelper ["customFieldName"] instance PersistStore backend => PersistFieldSql (CustomPrefix1Generic backend) where sqlType _ = SqlString instance PersistStore backend => PersistField (CustomPrefix2Generic backend) where toPersistValue = Database.Persist.TH.entityToPersistValueHelper fromPersistValue = Database.Persist.TH.entityFromPersistValueHelper ["otherCustomFieldName", "customPrefixedRef"] instance PersistStore backend => PersistFieldSql (CustomPrefix2Generic backend) where sqlType _ = SqlString instance PersistStore backend => PersistField (CustomPrefixSumGeneric backend) where toPersistValue = Database.Persist.TH.entityToPersistValueHelper fromPersistValue = Database.Persist.TH.entityFromPersistValueHelper ["customPrefixedLeft", "customPrefixedRight"] instance PersistStore backend => PersistFieldSql (CustomPrefixSumGeneric backend) where sqlType _ = SqlString type CustomPrefix1 = CustomPrefix1Generic SqlBackend data CustomPrefix1Generic backend = CustomPrefix1 {_cp1CustomFieldName :: !Int} type CustomPrefix1Id = Key CustomPrefix1 instance PersistStore backend => PersistEntity (CustomPrefix1Generic backend) where type PersistEntityBackend (CustomPrefix1Generic backend) = backend data Unique (CustomPrefix1Generic backend) newtype Key (CustomPrefix1Generic backend) = CustomPrefix1Key {unCustomPrefix1Key :: (BackendKey backend)} data EntityField (CustomPrefix1Generic backend) typ = (typ ~ Key (CustomPrefix1Generic backend)) => CustomPrefix1Id | (typ ~ Int) => CP1CustomFieldName keyToValues = ((: []) . (toPersistValue . (\ CustomPrefix1Key {unCustomPrefix1Key = x} -> x))) keyFromValues = (fmap CustomPrefix1Key . (fromPersistValue . Database.Persist.TH.headNote)) keyFromRecordM = Nothing tabulateEntityA fromField_a3fJC = ((Entity <$> fromField_a3fJC CustomPrefix1Id) <*> (pure CustomPrefix1 <*> fromField_a3fJC CP1CustomFieldName)) entityDef _ = ((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "CustomPrefix1"))) (EntityNameDB (Data.Text.pack "custom_prefix1"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "CustomPrefix1Id"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) Nothing {persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityFields = [FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "customFieldName"), fieldDB = FieldNameDB (Data.Text.pack "custom_field_name"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "Int"), fieldSqlType = sqlType (Proxy :: Proxy Int), fieldAttrs = [], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}], persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityId = EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "CustomPrefix1Id"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True), persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityForeigns = []} toPersistFields (CustomPrefix1 x_a3fJr) = [toPersistValue x_a3fJr] fromPersistValues [x1_a3fJt] = CustomPrefix1 <$> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "custom_prefix1")) (Data.Text.pack "customFieldName")) . fromPersistValue) x1_a3fJt fromPersistValues x_a3fJs = (Left $ (mappend (Data.Text.pack "CustomPrefix1: fromPersistValues failed on: ")) (Data.Text.pack $ show x_a3fJs)) persistUniqueToFieldNames _ = error "Degenerate case, should never happen" persistUniqueToValues _ = error "Degenerate case, should never happen" persistUniqueKeys (CustomPrefix1 _customFieldName_a3fJu) = [] persistFieldDef CustomPrefix1Id = Database.Persist.TH.stripIdFieldImpl (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "CustomPrefix1Id"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True)) persistFieldDef CP1CustomFieldName = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy CustomPrefix1)) (FieldNameHS (Data.Text.pack "customFieldName")) persistIdField = CustomPrefix1Id fieldLens CustomPrefix1Id = (lensPTH entityKey) (\ (Entity _ value_a3fJw) key_a3fJx -> (Entity key_a3fJx) value_a3fJw) fieldLens CP1CustomFieldName = (lensPTH ((\ CustomPrefix1 {_cp1CustomFieldName = x} -> x) . entityVal)) (\ (Entity key_a3fJy value_a3fJz) x_a3fJA -> (Entity key_a3fJy) (case value_a3fJz of CustomPrefix1 {} -> CustomPrefix1 {_cp1CustomFieldName = x_a3fJA})) deriving stock instance Show (BackendKey backend) => Show (Key (CustomPrefix1Generic backend)) deriving stock instance Read (BackendKey backend) => Read (Key (CustomPrefix1Generic backend)) deriving newtype instance Eq (BackendKey backend) => Eq (Key (CustomPrefix1Generic backend)) deriving newtype instance Ord (BackendKey backend) => Ord (Key (CustomPrefix1Generic backend)) deriving newtype instance Web.Internal.HttpApiData.ToHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.ToHttpApiData (Key (CustomPrefix1Generic backend)) deriving newtype instance Web.Internal.HttpApiData.FromHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.FromHttpApiData (Key (CustomPrefix1Generic backend)) deriving newtype instance Web.PathPieces.PathPiece (BackendKey backend) => Web.PathPieces.PathPiece (Key (CustomPrefix1Generic backend)) deriving newtype instance PersistField (BackendKey backend) => PersistField (Key (CustomPrefix1Generic backend)) deriving newtype instance PersistFieldSql (BackendKey backend) => PersistFieldSql (Key (CustomPrefix1Generic backend)) deriving newtype instance ToJSON (BackendKey backend) => ToJSON (Key (CustomPrefix1Generic backend)) deriving newtype instance FromJSON (BackendKey backend) => FromJSON (Key (CustomPrefix1Generic backend)) instance PersistStore backend => ToBackendKey backend (CustomPrefix1Generic backend) where toBackendKey = \ CustomPrefix1Key {unCustomPrefix1Key = x} -> x fromBackendKey = CustomPrefix1Key type CustomPrefix2 = CustomPrefix2Generic SqlBackend data CustomPrefix2Generic backend = CustomPrefix2 {_cp2OtherCustomFieldName :: !Int, _cp2CustomPrefixedRef :: !(Key (CustomPrefix1Generic backend))} type CustomPrefix2Id = Key CustomPrefix2 instance PersistStore backend => PersistEntity (CustomPrefix2Generic backend) where type PersistEntityBackend (CustomPrefix2Generic backend) = backend data Unique (CustomPrefix2Generic backend) newtype Key (CustomPrefix2Generic backend) = CustomPrefix2Key {unCustomPrefix2Key :: (BackendKey backend)} data EntityField (CustomPrefix2Generic backend) typ = (typ ~ Key (CustomPrefix2Generic backend)) => CustomPrefix2Id | (typ ~ Int) => CP2OtherCustomFieldName | (typ ~ Key (CustomPrefix1Generic backend)) => CP2CustomPrefixedRef keyToValues = ((: []) . (toPersistValue . (\ CustomPrefix2Key {unCustomPrefix2Key = x} -> x))) keyFromValues = (fmap CustomPrefix2Key . (fromPersistValue . Database.Persist.TH.headNote)) keyFromRecordM = Nothing tabulateEntityA fromField_a3fKc = ((Entity <$> fromField_a3fKc CustomPrefix2Id) <*> ((pure CustomPrefix2 <*> fromField_a3fKc CP2OtherCustomFieldName) <*> fromField_a3fKc CP2CustomPrefixedRef)) entityDef _ = ((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "CustomPrefix2"))) (EntityNameDB (Data.Text.pack "custom_prefix2"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "CustomPrefix2Id"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) []) Data.Map.Internal.Tip) False) Nothing {persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityFields = [FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "otherCustomFieldName"), fieldDB = FieldNameDB (Data.Text.pack "other_custom_field_name"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "Int"), fieldSqlType = sqlType (Proxy :: Proxy Int), fieldAttrs = [], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}, FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "customPrefixedRef"), fieldDB = FieldNameDB (Data.Text.pack "custom_prefixed_ref"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "CustomPrefix1Id"), fieldSqlType = sqlType (Proxy :: Proxy CustomPrefix1Id), fieldAttrs = [], fieldStrict = True, fieldReference = ForeignRef (EntityNameHS (Data.Text.pack "CustomPrefix1")), fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}], persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityId = EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "CustomPrefix2Id"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True), persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityForeigns = []} toPersistFields (CustomPrefix2 x_a3fJV x_a3fJW) = [toPersistValue x_a3fJV, toPersistValue x_a3fJW] fromPersistValues [x1_a3fJY, x2_a3fJZ] = CustomPrefix2 <$> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "custom_prefix2")) (Data.Text.pack "otherCustomFieldName")) . fromPersistValue) x1_a3fJY <*> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "custom_prefix2")) (Data.Text.pack "customPrefixedRef")) . fromPersistValue) x2_a3fJZ fromPersistValues x_a3fJX = (Left $ (mappend (Data.Text.pack "CustomPrefix2: fromPersistValues failed on: ")) (Data.Text.pack $ show x_a3fJX)) persistUniqueToFieldNames _ = error "Degenerate case, should never happen" persistUniqueToValues _ = error "Degenerate case, should never happen" persistUniqueKeys (CustomPrefix2 _otherCustomFieldName_a3fK0 _customPrefixedRef_a3fK1) = [] persistFieldDef CustomPrefix2Id = Database.Persist.TH.stripIdFieldImpl (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "CustomPrefix2Id"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True)) persistFieldDef CP2OtherCustomFieldName = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy CustomPrefix2)) (FieldNameHS (Data.Text.pack "otherCustomFieldName")) persistFieldDef CP2CustomPrefixedRef = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy CustomPrefix2)) (FieldNameHS (Data.Text.pack "customPrefixedRef")) persistIdField = CustomPrefix2Id fieldLens CustomPrefix2Id = (lensPTH entityKey) (\ (Entity _ value_a3fK3) key_a3fK4 -> (Entity key_a3fK4) value_a3fK3) fieldLens CP2OtherCustomFieldName = (lensPTH ((\ CustomPrefix2 {_cp2OtherCustomFieldName = x} -> x) . entityVal)) (\ (Entity key_a3fK5 value_a3fK6) x_a3fK7 -> (Entity key_a3fK5) (case value_a3fK6 of CustomPrefix2 {_cp2CustomPrefixedRef = _cp2CustomPrefixedRef_a3fK9} -> CustomPrefix2 {_cp2OtherCustomFieldName = x_a3fK7, _cp2CustomPrefixedRef = _cp2CustomPrefixedRef})) fieldLens CP2CustomPrefixedRef = (lensPTH ((\ CustomPrefix2 {_cp2CustomPrefixedRef = x} -> x) . entityVal)) (\ (Entity key_a3fK5 value_a3fK6) x_a3fK7 -> (Entity key_a3fK5) (case value_a3fK6 of CustomPrefix2 {_cp2OtherCustomFieldName = _cp2OtherCustomFieldName_a3fKa} -> CustomPrefix2 {_cp2OtherCustomFieldName = _cp2OtherCustomFieldName, _cp2CustomPrefixedRef = x_a3fK7})) deriving stock instance Show (BackendKey backend) => Show (Key (CustomPrefix2Generic backend)) deriving stock instance Read (BackendKey backend) => Read (Key (CustomPrefix2Generic backend)) deriving newtype instance Eq (BackendKey backend) => Eq (Key (CustomPrefix2Generic backend)) deriving newtype instance Ord (BackendKey backend) => Ord (Key (CustomPrefix2Generic backend)) deriving newtype instance Web.Internal.HttpApiData.ToHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.ToHttpApiData (Key (CustomPrefix2Generic backend)) deriving newtype instance Web.Internal.HttpApiData.FromHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.FromHttpApiData (Key (CustomPrefix2Generic backend)) deriving newtype instance Web.PathPieces.PathPiece (BackendKey backend) => Web.PathPieces.PathPiece (Key (CustomPrefix2Generic backend)) deriving newtype instance PersistField (BackendKey backend) => PersistField (Key (CustomPrefix2Generic backend)) deriving newtype instance PersistFieldSql (BackendKey backend) => PersistFieldSql (Key (CustomPrefix2Generic backend)) deriving newtype instance ToJSON (BackendKey backend) => ToJSON (Key (CustomPrefix2Generic backend)) deriving newtype instance FromJSON (BackendKey backend) => FromJSON (Key (CustomPrefix2Generic backend)) instance PersistStore backend => ToBackendKey backend (CustomPrefix2Generic backend) where toBackendKey = \ CustomPrefix2Key {unCustomPrefix2Key = x} -> x fromBackendKey = CustomPrefix2Key type CustomPrefixSum = CustomPrefixSumGeneric SqlBackend data CustomPrefixSumGeneric backend = CPCustomPrefixedLeftSum Int | CPCustomPrefixedRightSum String deriving stock (Show, Eq) type CustomPrefixSumId = Key CustomPrefixSum instance PersistStore backend => PersistEntity (CustomPrefixSumGeneric backend) where type PersistEntityBackend (CustomPrefixSumGeneric backend) = backend data Unique (CustomPrefixSumGeneric backend) newtype Key (CustomPrefixSumGeneric backend) = CustomPrefixSumKey {unCustomPrefixSumKey :: (BackendKey backend)} data EntityField (CustomPrefixSumGeneric backend) typ = (typ ~ Key (CustomPrefixSumGeneric backend)) => CustomPrefixSumId | (typ ~ Int) => CPCustomPrefixedLeft | (typ ~ String) => CPCustomPrefixedRight keyToValues = ((: []) . (toPersistValue . (\ CustomPrefixSumKey {unCustomPrefixSumKey = x} -> x))) keyFromValues = (fmap CustomPrefixSumKey . (fromPersistValue . Database.Persist.TH.headNote)) keyFromRecordM = Nothing tabulateEntityA fromField_a3fKp = error "tabulateEntityA does not make sense for sum type" entityDef _ = ((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "CustomPrefixSum"))) (EntityNameDB (Data.Text.pack "custom_prefix_sum"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "CustomPrefixSumId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) []) []) []) []) [Data.Text.pack "Show", Data.Text.pack "Eq"]) Data.Map.Internal.Tip) True) Nothing {persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityFields = [FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "customPrefixedLeft"), fieldDB = FieldNameDB (Data.Text.pack "custom_prefixed_left"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "Int"), fieldSqlType = sqlType (Proxy :: Proxy Int), fieldAttrs = [], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}, FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "customPrefixedRight"), fieldDB = FieldNameDB (Data.Text.pack "custom_prefixed_right"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "String"), fieldSqlType = sqlType (Proxy :: Proxy String), fieldAttrs = [], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}], persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityId = EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "CustomPrefixSumId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True), persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityForeigns = []} toPersistFields (CPCustomPrefixedLeftSum x_a3fKf) = [toPersistValue x_a3fKf, PersistNull] toPersistFields (CPCustomPrefixedRightSum x_a3fKg) = [PersistNull, toPersistValue x_a3fKg] fromPersistValues [x_a3fKh, PersistNull] | Database.Persist.TH.isNotNull x_a3fKh = (CPCustomPrefixedLeftSum `fmap` fromPersistValue x_a3fKh) fromPersistValues [PersistNull, x_a3fKi] | Database.Persist.TH.isNotNull x_a3fKi = (CPCustomPrefixedRightSum `fmap` fromPersistValue x_a3fKi) fromPersistValues _ = Left ("Invalid fromPersistValues input: sum type with all nulls. Entity: " `mappend` Data.Text.pack "CustomPrefixSum") persistUniqueToFieldNames _ = error "Degenerate case, should never happen" persistUniqueToValues _ = error "Degenerate case, should never happen" persistUniqueKeys _ = [] persistFieldDef CustomPrefixSumId = Database.Persist.TH.stripIdFieldImpl (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "CustomPrefixSumId"))) SqlInt64) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True)) persistFieldDef CPCustomPrefixedLeft = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy CustomPrefixSum)) (FieldNameHS (Data.Text.pack "customPrefixedLeft")) persistFieldDef CPCustomPrefixedRight = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy CustomPrefixSum)) (FieldNameHS (Data.Text.pack "customPrefixedRight")) persistIdField = CustomPrefixSumId fieldLens CustomPrefixSumId = (lensPTH entityKey) (\ (Entity _ value_a3fKk) key_a3fKl -> (Entity key_a3fKl) value_a3fKk) fieldLens CPCustomPrefixedLeft = (lensPTH (\ (Entity _ value_a3fKn) -> case value_a3fKn of CPCustomPrefixedLeftSum x_a3fKo -> x_a3fKo _ -> error "Tried to use fieldLens on a Sum type")) (\ (Entity key_a3fKm _) x_a3fKo -> (Entity key_a3fKm) (CPCustomPrefixedLeftSum x_a3fKo)) fieldLens CPCustomPrefixedRight = (lensPTH (\ (Entity _ value_a3fKn) -> case value_a3fKn of CPCustomPrefixedRightSum x_a3fKo -> x_a3fKo _ -> error "Tried to use fieldLens on a Sum type")) (\ (Entity key_a3fKm _) x_a3fKo -> (Entity key_a3fKm) (CPCustomPrefixedRightSum x_a3fKo)) deriving stock instance Show (BackendKey backend) => Show (Key (CustomPrefixSumGeneric backend)) deriving stock instance Read (BackendKey backend) => Read (Key (CustomPrefixSumGeneric backend)) deriving newtype instance Eq (BackendKey backend) => Eq (Key (CustomPrefixSumGeneric backend)) deriving newtype instance Ord (BackendKey backend) => Ord (Key (CustomPrefixSumGeneric backend)) deriving newtype instance Web.Internal.HttpApiData.ToHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.ToHttpApiData (Key (CustomPrefixSumGeneric backend)) deriving newtype instance Web.Internal.HttpApiData.FromHttpApiData (BackendKey backend) => Web.Internal.HttpApiData.FromHttpApiData (Key (CustomPrefixSumGeneric backend)) deriving newtype instance Web.PathPieces.PathPiece (BackendKey backend) => Web.PathPieces.PathPiece (Key (CustomPrefixSumGeneric backend)) deriving newtype instance PersistField (BackendKey backend) => PersistField (Key (CustomPrefixSumGeneric backend)) deriving newtype instance PersistFieldSql (BackendKey backend) => PersistFieldSql (Key (CustomPrefixSumGeneric backend)) deriving newtype instance ToJSON (BackendKey backend) => ToJSON (Key (CustomPrefixSumGeneric backend)) deriving newtype instance FromJSON (BackendKey backend) => FromJSON (Key (CustomPrefixSumGeneric backend)) instance PersistStore backend => ToBackendKey backend (CustomPrefixSumGeneric backend) where toBackendKey = \ CustomPrefixSumKey {unCustomPrefixSumKey = x} -> x fromBackendKey = CustomPrefixSumKey instance (GHC.TypeLits.TypeError (NoUniqueKeysError (CustomPrefix1Generic backend)), PersistStoreWrite backend) => OnlyOneUniqueKey (CustomPrefix1Generic backend) where onlyUniqueP _ = error "impossible" instance (GHC.TypeLits.TypeError (MultipleUniqueKeysError (CustomPrefix1Generic backend)), PersistStoreWrite backend) => AtLeastOneUniqueKey (CustomPrefix1Generic backend) where requireUniquesP _ = error "impossible" instance (GHC.TypeLits.TypeError (NoUniqueKeysError (CustomPrefix2Generic backend)), PersistStoreWrite backend) => OnlyOneUniqueKey (CustomPrefix2Generic backend) where onlyUniqueP _ = error "impossible" instance (GHC.TypeLits.TypeError (MultipleUniqueKeysError (CustomPrefix2Generic backend)), PersistStoreWrite backend) => AtLeastOneUniqueKey (CustomPrefix2Generic backend) where requireUniquesP _ = error "impossible" instance (GHC.TypeLits.TypeError (NoUniqueKeysError (CustomPrefixSumGeneric backend)), PersistStoreWrite backend) => OnlyOneUniqueKey (CustomPrefixSumGeneric backend) where onlyUniqueP _ = error "impossible" instance (GHC.TypeLits.TypeError (MultipleUniqueKeysError (CustomPrefixSumGeneric backend)), PersistStoreWrite backend) => AtLeastOneUniqueKey (CustomPrefixSumGeneric backend) where requireUniquesP _ = error "impossible" instance SymbolToField "id" (CustomPrefix1Generic backend) (Key (CustomPrefix1Generic backend)) where symbolToField = CustomPrefix1Id instance SymbolToField "customFieldName" (CustomPrefix1Generic backend) Int where symbolToField = CP1CustomFieldName instance SymbolToField "id" (CustomPrefix2Generic backend) (Key (CustomPrefix2Generic backend)) where symbolToField = CustomPrefix2Id instance SymbolToField "otherCustomFieldName" (CustomPrefix2Generic backend) Int where symbolToField = CP2OtherCustomFieldName instance SymbolToField "customPrefixedRef" (CustomPrefix2Generic backend) (Key (CustomPrefix1Generic backend)) where symbolToField = CP2CustomPrefixedRef instance SymbolToField "id" (CustomPrefixSumGeneric backend) (Key (CustomPrefixSumGeneric backend)) where symbolToField = CustomPrefixSumId instance SymbolToField "customPrefixedLeft" (CustomPrefixSumGeneric backend) Int where symbolToField = CPCustomPrefixedLeft instance SymbolToField "customPrefixedRight" (CustomPrefixSumGeneric backend) String where symbolToField = CPCustomPrefixedRight instance PersistStoreWrite backend => SafeToInsert (CustomPrefix1Generic backend) instance PersistStoreWrite backend => SafeToInsert (CustomPrefix2Generic backend) instance PersistStoreWrite backend => SafeToInsert (CustomPrefixSumGeneric backend) entityDefListForcustomPrefixMigrate :: [EntityDef] entityDefListForcustomPrefixMigrate = [entityDef (Proxy :: Proxy CustomPrefix1), entityDef (Proxy :: Proxy CustomPrefix2), entityDef (Proxy :: Proxy CustomPrefixSum)] customPrefixMigrate :: Migration customPrefixMigrate = migrateModels entityDefListForcustomPrefixMigrate src/PersistentTestModels.hs:(193,27)-(200,2): Splicing expression template-haskell:Language.Haskell.TH.Quote.quoteExp persistLowerCase "\n\ \\n\ \Tree sql=trees\n\ \ name String\n\ \ parent String Maybe\n\ \ Primary name\n\ \ Foreign Tree fkparent parent\n" ======> [(((Database.Persist.Quasi.Internal.UnboundEntityDef [(Database.Persist.Quasi.Internal.UnboundForeignDef (Database.Persist.Quasi.Internal.FieldListImpliedId (FieldNameHS (Data.Text.pack "parent") NEL.:| []))) (((((((((ForeignDef (EntityNameHS (Data.Text.pack "Tree"))) (EntityNameDB (Data.Text.pack "tree"))) (ConstraintNameHS (Data.Text.pack "fkparent"))) (ConstraintNameDB (Data.Text.pack "treefkparent"))) ((FieldCascade Nothing) Nothing)) []) []) False) True)]) (Database.Persist.Quasi.Internal.NaturalKey ((Database.Persist.Quasi.Internal.UnboundCompositeDef (FieldNameHS (Data.Text.pack "name") NEL.:| [])) []))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "Tree"))) (EntityNameDB (Data.Text.pack "trees"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "TreeId"))) (SqlOther (Data.Text.pack "Primary Key"))) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) [Data.Text.pack "sql=trees"]) []) [(((UniqueDef (ConstraintNameHS (Data.Text.pack "TreePrimaryKey"))) (ConstraintNameDB (Data.Text.pack "primary_key"))) ((FieldNameHS (Data.Text.pack "name"), FieldNameDB (Data.Text.pack "name")) NEL.:| [])) []]) []) []) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "name"))) (FieldNameDB (Data.Text.pack "name"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "String"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "parent"))) (FieldNameDB (Data.Text.pack "parent"))) [FieldAttrMaybe]) True) ((FTTypeCon Nothing) (Data.Text.pack "String"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing]] src/PersistentTestModels.hs:(191,1)-(200,2): Splicing declarations share [mkPersist persistSettings {mpsPrefixFields = False, mpsGeneric = False}, mkMigrate "treeMigrate"] ([(((Database.Persist.Quasi.Internal.UnboundEntityDef [(Database.Persist.Quasi.Internal.UnboundForeignDef (Database.Persist.Quasi.Internal.FieldListImpliedId (FieldNameHS (Data.Text.pack "parent") NEL.:| []))) (((((((((ForeignDef (EntityNameHS (Data.Text.pack "Tree"))) (EntityNameDB (Data.Text.pack "tree"))) (ConstraintNameHS (Data.Text.pack "fkparent"))) (ConstraintNameDB (Data.Text.pack "treefkparent"))) ((FieldCascade Nothing) Nothing)) []) []) False) True)]) (Database.Persist.Quasi.Internal.NaturalKey ((Database.Persist.Quasi.Internal.UnboundCompositeDef (FieldNameHS (Data.Text.pack "name") NEL.:| [])) []))) (((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "Tree"))) (EntityNameDB (Data.Text.pack "trees"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "TreeId"))) (SqlOther (Data.Text.pack "Primary Key"))) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) [Data.Text.pack "sql=trees"]) []) [(((UniqueDef (ConstraintNameHS (Data.Text.pack "TreePrimaryKey"))) (ConstraintNameDB (Data.Text.pack "primary_key"))) ((FieldNameHS (Data.Text.pack "name"), FieldNameDB (Data.Text.pack "name")) NEL.:| [])) []]) []) []) Data.Map.Internal.Tip) False) Nothing)) [(((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "name"))) (FieldNameDB (Data.Text.pack "name"))) []) True) ((FTTypeCon Nothing) (Data.Text.pack "String"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing, (((((((Database.Persist.Quasi.Internal.UnboundFieldDef (FieldNameHS (Data.Text.pack "parent"))) (FieldNameDB (Data.Text.pack "parent"))) [FieldAttrMaybe]) True) ((FTTypeCon Nothing) (Data.Text.pack "String"))) ((FieldCascade Nothing) Nothing)) Nothing) Nothing]]) ======> instance PersistField Tree where toPersistValue = Database.Persist.TH.entityToPersistValueHelper fromPersistValue = Database.Persist.TH.entityFromPersistValueHelper ["name", "parent"] instance PersistFieldSql Tree where sqlType _ = SqlString data Tree = Tree {name :: !String, parent :: !(Maybe String)} fkparent :: Tree -> Maybe (Key Tree) fkparent record_mkForeignKeysComposite_a3l3m = (fmap TreeKey) (ghc-prim:GHC.Prim.coerce (parent record_mkForeignKeysComposite_a3l3m)) type TreeId = Key Tree instance PersistEntity Tree where type PersistEntityBackend Tree = SqlBackend data Unique Tree = TreePrimaryKey String newtype Key Tree = TreeKey {unTreeKey :: String} deriving stock Show deriving stock Read deriving newtype Eq deriving newtype Ord deriving newtype Web.PathPieces.PathPiece deriving newtype Web.Internal.HttpApiData.ToHttpApiData deriving newtype Web.Internal.HttpApiData.FromHttpApiData deriving newtype PersistField deriving newtype PersistFieldSql deriving newtype ToJSON deriving newtype FromJSON data EntityField Tree typ = (typ ~ TreeId) => TreeId | (typ ~ String) => Name | (typ ~ Maybe String) => Parent keyToValues record_a3l3n = [toPersistValue ((\ TreeKey {unTreeKey = x} -> x) record_a3l3n)] keyFromValues [x1_a3l3p] = TreeKey <$> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "trees")) (Data.Text.pack "name")) . fromPersistValue) x1_a3l3p keyFromValues x_a3l3o = (Left $ (mappend (Data.Text.pack "Tree: keyFromValues failed on: ")) (Data.Text.pack $ show x_a3l3o)) keyFromRecordM = Just (\ Tree {name = name_a3l3z} -> TreeKey name_a3l3z) tabulateEntityA fromField_a3l3A = ((Entity <$> fromField_a3l3A TreeId) <*> ((pure Tree <*> fromField_a3l3A Name) <*> fromField_a3l3A Parent)) entityDef _ = ((((((((((persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.EntityDef (EntityNameHS (Data.Text.pack "Tree"))) (EntityNameDB (Data.Text.pack "trees"))) (EntityIdField (((((((((((FieldDef (FieldNameHS (Data.Text.pack "Id"))) (FieldNameDB (Data.Text.pack "id"))) ((FTTypeCon Nothing) (Data.Text.pack "TreeId"))) (SqlOther (Data.Text.pack "Primary Key"))) []) True) NoReference) ((FieldCascade Nothing) Nothing)) Nothing) Nothing) True))) [Data.Text.pack "sql=trees"]) []) [(((UniqueDef (ConstraintNameHS (Data.Text.pack "TreePrimaryKey"))) (ConstraintNameDB (Data.Text.pack "primary_key"))) ((FieldNameHS (Data.Text.pack "name"), FieldNameDB (Data.Text.pack "name")) NEL.:| [])) []]) []) []) Data.Map.Internal.Tip) False) Nothing {persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityFields = [FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "name"), fieldDB = FieldNameDB (Data.Text.pack "name"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "String"), fieldSqlType = sqlType (Proxy :: Proxy String), fieldAttrs = [], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}, FieldDef {fieldHaskell = FieldNameHS (Data.Text.pack "parent"), fieldDB = FieldNameDB (Data.Text.pack "parent"), fieldType = (FTTypeCon Nothing) (Data.Text.pack "String"), fieldSqlType = sqlType (Proxy :: Proxy String), fieldAttrs = [FieldAttrMaybe], fieldStrict = True, fieldReference = NoReference, fieldCascade = (FieldCascade Nothing) Nothing, fieldComments = Nothing, fieldGenerated = Nothing, fieldIsImplicitIdColumn = False}], persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityId = EntityIdNaturalKey CompositeDef {compositeFields = NEL.fromList [(Database.Persist.TH.lookupEntityField (Proxy :: Proxy Tree)) (FieldNameHS (Data.Text.pack "name"))], compositeAttrs = []}, persistent-2.14.5.1-JuP2y6R0Er36ecX17MXPj7:Database.Persist.Types.Base.entityForeigns = [((((((((ForeignDef (EntityNameHS (Data.Text.pack "Tree"))) (EntityNameDB (Data.Text.pack "tree"))) (ConstraintNameHS (Data.Text.pack "fkparent"))) (ConstraintNameDB (Data.Text.pack "treefkparent"))) ((FieldCascade Nothing) Nothing)) []) []) False) True {foreignFields = [((FieldNameHS (Data.Text.pack "parent"), FieldNameDB (Data.Text.pack "parent")), (FieldNameHS (Data.Text.pack "name"), FieldNameDB (Data.Text.pack "name")))], foreignNullable = True, foreignRefTableDBName = EntityNameDB (Data.Text.pack "trees")}]} toPersistFields (Tree x_a3l3e x_a3l3f) = [toPersistValue x_a3l3e, toPersistValue x_a3l3f] fromPersistValues [x1_a3l3h, x2_a3l3i] = Tree <$> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "trees")) (Data.Text.pack "name")) . fromPersistValue) x1_a3l3h <*> (Database.Persist.TH.mapLeft ((fieldError (Data.Text.pack "trees")) (Data.Text.pack "parent")) . fromPersistValue) x2_a3l3i fromPersistValues x_a3l3g = (Left $ (mappend (Data.Text.pack "Tree: fromPersistValues failed on: ")) (Data.Text.pack $ show x_a3l3g)) persistUniqueToFieldNames TreePrimaryKey {} = ((FieldNameHS (Data.Text.pack "name"), FieldNameDB (Data.Text.pack "name")) NEL.:| []) persistUniqueToValues (TreePrimaryKey x_a3l3j) = [toPersistValue x_a3l3j] persistUniqueKeys (Tree _name_a3l3k _parent_a3l3l) = [TreePrimaryKey _name_a3l3k] persistFieldDef TreeId = Database.Persist.TH.stripIdFieldImpl (EntityIdNaturalKey CompositeDef {compositeFields = NEL.fromList [(Database.Persist.TH.lookupEntityField (Proxy :: Proxy Tree)) (FieldNameHS (Data.Text.pack "name"))], compositeAttrs = []}) persistFieldDef Name = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy Tree)) (FieldNameHS (Data.Text.pack "name")) persistFieldDef Parent = (Database.Persist.TH.lookupEntityField (Proxy :: Proxy Tree)) (FieldNameHS (Data.Text.pack "parent")) persistIdField = TreeId fieldLens TreeId = (lensPTH entityKey) (\ (Entity _ value_a3l3q) key_a3l3r -> (Entity key_a3l3r) value_a3l3q) fieldLens Name = (lensPTH ((\ Tree {name = x} -> x) . entityVal)) (\ (Entity key_a3l3s value_a3l3t) x_a3l3u -> (Entity key_a3l3s) (case value_a3l3t of Tree {parent = parent_a3l3w} -> Tree {name = x_a3l3u, parent = parent})) fieldLens Parent = (lensPTH ((\ Tree {parent = x} -> x) . entityVal)) (\ (Entity key_a3l3s value_a3l3t) x_a3l3u -> (Entity key_a3l3s) (case value_a3l3t of Tree {name = name_a3l3x} -> Tree {name = name, parent = x_a3l3u})) instance OnlyOneUniqueKey Tree where onlyUniqueP = (head . persistUniqueKeys) instance AtLeastOneUniqueKey Tree where requireUniquesP = (NEL.fromList . persistUniqueKeys) instance SymbolToField "name" Tree String where symbolToField = Name instance SymbolToField "parent" Tree (Maybe String) where symbolToField = Parent instance SafeToInsert Tree entityDefListFortreeMigrate :: [EntityDef] entityDefListFortreeMigrate = [entityDef (Proxy :: Proxy Tree)] treeMigrate :: Migration treeMigrate = migrateModels entityDefListFortreeMigrate src/PersistentTestModels.hs:25:36: warning: [-Wdeprecations] In the use of `mpsGeneric' (imported from Init, but defined in Database.Persist.TH): Deprecated: "The mpsGeneric function adds a considerable amount of overhead and complexity to the library without bringing significant benefit. We would like to remove it. If you require this feature, please comment on the linked GitHub issue, and we'll either keep it around, or we can figure out a nicer way to solve your problem. Github: https://github.com/yesodweb/persistent/issues/1204" | 25 | share [mkPersist persistSettings { mpsGeneric = True }, mkMigrate "testMigrate"] [persistUpperCase| | ^^^^^^^^^^ src/PersistentTestModels.hs:134:1: warning: persistent has deprecated sum type entities as of 2.14.0.0. We will delete support for these entities in 2.15.0.0. If you need these, please add a comment on this GitHub issue: https://github.com/yesodweb/persistent/issues/987 | 134 | share [mkPersist persistSettings { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... src/PersistentTestModels.hs:138:11: warning: [-Wdeprecations] In the use of `mpsGeneric' (imported from Init, but defined in Database.Persist.TH): Deprecated: "The mpsGeneric function adds a considerable amount of overhead and complexity to the library without bringing significant benefit. We would like to remove it. If you require this feature, please comment on the linked GitHub issue, and we'll either keep it around, or we can figure out a nicer way to solve your problem. Github: https://github.com/yesodweb/persistent/issues/1204" | 138 | , mpsGeneric = True | ^^^^^^^^^^ src/PersistentTestModels.hs:160:1: warning: persistent has deprecated sum type entities as of 2.14.0.0. We will delete support for these entities in 2.15.0.0. If you need these, please add a comment on this GitHub issue: https://github.com/yesodweb/persistent/issues/987 | 160 | share [mkPersist persistSettings { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... src/PersistentTestModels.hs:170:11: warning: [-Wdeprecations] In the use of `mpsGeneric' (imported from Init, but defined in Database.Persist.TH): Deprecated: "The mpsGeneric function adds a considerable amount of overhead and complexity to the library without bringing significant benefit. We would like to remove it. If you require this feature, please comment on the linked GitHub issue, and we'll either keep it around, or we can figure out a nicer way to solve your problem. Github: https://github.com/yesodweb/persistent/issues/1204" | 170 | , mpsGeneric = True | ^^^^^^^^^^ src/PersistentTestModels.hs:191:61: warning: [-Wdeprecations] In the use of `mpsGeneric' (imported from Init, but defined in Database.Persist.TH): Deprecated: "The mpsGeneric function adds a considerable amount of overhead and complexity to the library without bringing significant benefit. We would like to remove it. If you require this feature, please comment on the linked GitHub issue, and we'll either keep it around, or we can figure out a nicer way to solve your problem. Github: https://github.com/yesodweb/persistent/issues/1204" | 191 | share [mkPersist persistSettings { mpsPrefixFields = False, mpsGeneric = False } | ^^^^^^^^^^ src/PersistentTestModels.hs:207:10: warning: [-Wmissing-methods] * No explicit implementation for `tabulateEntityA' * In the instance declaration for `PersistEntity (ReverseFieldOrder a)' | 207 | instance (PersistEntity a) => PersistEntity (ReverseFieldOrder a) where | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [28 of 41] Compiling PersistentTest ( src/PersistentTest.hs, dist/build/PersistentTest.dyn_o ) [29 of 41] Compiling MpsNoPrefixTest ( src/MpsNoPrefixTest.hs, dist/build/MpsNoPrefixTest.dyn_o ) [30 of 41] Compiling MpsCustomPrefixTest ( src/MpsCustomPrefixTest.hs, dist/build/MpsCustomPrefixTest.dyn_o ) [31 of 41] Compiling PrimaryTest ( src/PrimaryTest.hs, dist/build/PrimaryTest.dyn_o ) src/PrimaryTest.hs:10:36: warning: [-Wdeprecations] In the use of `mpsGeneric' (imported from Init, but defined in Database.Persist.TH): Deprecated: "The mpsGeneric function adds a considerable amount of overhead and complexity to the library without bringing significant benefit. We would like to remove it. If you require this feature, please comment on the linked GitHub issue, and we'll either keep it around, or we can figure out a nicer way to solve your problem. Github: https://github.com/yesodweb/persistent/issues/1204" | 10 | share [mkPersist persistSettings { mpsGeneric = False }, mkMigrate "migration"] [persistLowerCase| | ^^^^^^^^^^ [32 of 41] Compiling RawSqlTest ( src/RawSqlTest.hs, dist/build/RawSqlTest.dyn_o ) [33 of 41] Compiling ReadWriteTest ( src/ReadWriteTest.hs, dist/build/ReadWriteTest.dyn_o ) [34 of 41] Compiling Recursive ( src/Recursive.hs, dist/build/Recursive.dyn_o ) src/Recursive.hs:9:32: warning: [-Wdeprecations] In the use of `mpsGeneric' (imported from Init, but defined in Database.Persist.TH): Deprecated: "The mpsGeneric function adds a considerable amount of overhead and complexity to the library without bringing significant benefit. We would like to remove it. If you require this feature, please comment on the linked GitHub issue, and we'll either keep it around, or we can figure out a nicer way to solve your problem. Github: https://github.com/yesodweb/persistent/issues/1204" | 9 | share [mkPersist sqlSettings { mpsGeneric = True }, mkMigrate "recursiveMigrate"] [persistLowerCase| | ^^^^^^^^^^ [35 of 41] Compiling RenameTest ( src/RenameTest.hs, dist/build/RenameTest.dyn_o ) src/RenameTest.hs:16:32: warning: [-Wdeprecations] In the use of `mpsGeneric' (imported from Init, but defined in Database.Persist.TH): Deprecated: "The mpsGeneric function adds a considerable amount of overhead and complexity to the library without bringing significant benefit. We would like to remove it. If you require this feature, please comment on the linked GitHub issue, and we'll either keep it around, or we can figure out a nicer way to solve your problem. Github: https://github.com/yesodweb/persistent/issues/1204" | 16 | share [mkPersist sqlSettings { mpsGeneric = True }, mkMigrate "migration"] [persistLowerCase| | ^^^^^^^^^^ [36 of 41] Compiling SumTypeTest ( src/SumTypeTest.hs, dist/build/SumTypeTest.dyn_o ) src/SumTypeTest.hs:11:1: warning: persistent has deprecated sum type entities as of 2.14.0.0. We will delete support for these entities in 2.15.0.0. If you need these, please add a comment on this GitHub issue: https://github.com/yesodweb/persistent/issues/987 | 11 | share [mkPersist persistSettings { mpsGeneric = True }, mkMigrate "sumTypeMigrate"] [persistLowerCase| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... src/SumTypeTest.hs:11:36: warning: [-Wdeprecations] In the use of `mpsGeneric' (imported from Init, but defined in Database.Persist.TH): Deprecated: "The mpsGeneric function adds a considerable amount of overhead and complexity to the library without bringing significant benefit. We would like to remove it. If you require this feature, please comment on the linked GitHub issue, and we'll either keep it around, or we can figure out a nicer way to solve your problem. Github: https://github.com/yesodweb/persistent/issues/1204" | 11 | share [mkPersist persistSettings { mpsGeneric = True }, mkMigrate "sumTypeMigrate"] [persistLowerCase| | ^^^^^^^^^^ [37 of 41] Compiling TransactionLevelTest ( src/TransactionLevelTest.hs, dist/build/TransactionLevelTest.dyn_o ) [38 of 41] Compiling TreeTest ( src/TreeTest.hs, dist/build/TreeTest.dyn_o ) src/TreeTest.hs:12:35: warning: [-Wdeprecations] In the use of `mpsGeneric' (imported from Init, but defined in Database.Persist.TH): Deprecated: "The mpsGeneric function adds a considerable amount of overhead and complexity to the library without bringing significant benefit. We would like to remove it. If you require this feature, please comment on the linked GitHub issue, and we'll either keep it around, or we can figure out a nicer way to solve your problem. Github: https://github.com/yesodweb/persistent/issues/1204" | 12 | [ mkPersist persistSettings { mpsGeneric = False } | ^^^^^^^^^^ [39 of 41] Compiling TypeLitFieldDefsTest ( src/TypeLitFieldDefsTest.hs, dist/build/TypeLitFieldDefsTest.dyn_o ) src/TypeLitFieldDefsTest.hs:32:32: warning: [-Wdeprecations] In the use of `mpsGeneric' (imported from Init, but defined in Database.Persist.TH): Deprecated: "The mpsGeneric function adds a considerable amount of overhead and complexity to the library without bringing significant benefit. We would like to remove it. If you require this feature, please comment on the linked GitHub issue, and we'll either keep it around, or we can figure out a nicer way to solve your problem. Github: https://github.com/yesodweb/persistent/issues/1204" | 32 | share [mkPersist sqlSettings { mpsGeneric = True }, mkMigrate "typeLitFieldDefsMigrate"] [persistLowerCase| | ^^^^^^^^^^ [40 of 41] Compiling UniqueTest ( src/UniqueTest.hs, dist/build/UniqueTest.dyn_o ) [41 of 41] Compiling UpsertTest ( src/UpsertTest.hs, dist/build/UpsertTest.dyn_o ) Unregistering persistent-test-2.13.1.3... ==> Entering fakeroot environment... ==> Starting package()... Installing library in /tmp/archlinux-ci/haskell-persistent-test-archlinuxrb-build-TYk876Ll/haskell-persistent-test/pkg/haskell-persistent-test/usr/lib/ghc-9.2.8/site-local/persistent-test-2.13.1.3 ==> Tidying install... -> Removing libtool files... -> Purging unwanted files... -> Removing static library files... -> Stripping unneeded symbols from binaries and libraries... -> Compressing man and info pages... ==> Checking for packaging issues... ==> Creating package "haskell-persistent-test"... -> Generating .PKGINFO file... -> Generating .BUILDINFO file... -> Generating .MTREE file... -> Compressing package... ==> Creating package "haskell-persistent-test-debug"... -> Generating .PKGINFO file... -> Generating .BUILDINFO file... -> Generating .MTREE file... -> Compressing package... ==> Leaving fakeroot environment. ==> Finished making: haskell-persistent-test 2.13.1.3-6 (Fri Apr 11 03:21:40 2025)