From 21bf268a9d078689e888e5eb47128235ce4f1a59 Mon Sep 17 00:00:00 2001 From: Edsko de Vries Date: Thu, 30 May 2024 08:28:27 +0200 Subject: [PATCH] Support ghc 9.6 Co-authored-by: Tristan Cacqueray Co-authored-by: Gabriele Sales --- .github/workflows/haskell-ci.yml | 94 +++----- beam-large-records/beam-large-records.cabal | 4 +- cabal.project | 3 +- large-anon/CHANGELOG.md | 5 + large-anon/large-anon.cabal | 19 +- large-anon/src/Data/Record/Anon/Advanced.hs | 8 +- .../Record/Anon/Internal/Core/FieldName.hs | 2 +- .../Anon/Internal/Plugin/Source/GhcShim.hs | 76 +++++-- .../Plugin/TC/Constraints/AllFields.hs | 17 +- .../Anon/Internal/Plugin/TC/GhcTcPluginAPI.hs | 11 +- .../Anon/Internal/Plugin/TC/NameResolution.hs | 4 +- .../Record/Anon/Internal/Util/StrictArray.hs | 18 +- .../Record/Anon/Plugin/Internal/Runtime.hs | 19 +- large-generics/CHANGELOG.md | 5 + large-generics/large-generics.cabal | 12 +- .../superrecord/Common/RowOfSize/Row010.hs | 23 -- .../superrecord/Common/RowOfSize/Row020.hs | 34 --- .../superrecord/Common/RowOfSize/Row030.hs | 45 ---- .../superrecord/Common/RowOfSize/Row040.hs | 56 ----- .../superrecord/Common/RowOfSize/Row050.hs | 67 ------ .../superrecord/Common/RowOfSize/Row060.hs | 78 ------- .../superrecord/Common/RowOfSize/Row070.hs | 89 -------- .../superrecord/Common/RowOfSize/Row080.hs | 100 --------- .../Experiment/SR_Construct/Sized/R000.hs | 8 - .../Experiment/SR_Construct/Sized/R010.hs | 30 --- .../Experiment/SR_Construct/Sized/R020.hs | 41 ---- .../Experiment/SR_Construct/Sized/R030.hs | 52 ----- .../Experiment/SR_Construct/Sized/R040.hs | 63 ------ .../Experiment/SR_GetEvens/Sized/R000.hs | 8 - .../Experiment/SR_GetEvens/Sized/R010.hs | 27 --- .../Experiment/SR_GetEvens/Sized/R020.hs | 33 --- .../Experiment/SR_GetEvens/Sized/R030.hs | 39 ---- .../Experiment/SR_GetEvens/Sized/R040.hs | 45 ---- .../Experiment/SR_GetEvens/Sized/R050.hs | 51 ----- .../Experiment/SR_GetEvens/Sized/R060.hs | 57 ----- .../Experiment/SR_GetEvens/Sized/R070.hs | 63 ------ .../Experiment/SR_GetEvens/Sized/R080.hs | 69 ------ .../Experiment/SR_ParseJSON/Sized/R000.hs | 8 - .../Experiment/SR_ParseJSON/Sized/R010.hs | 19 -- .../Experiment/SR_ParseJSON/Sized/R020.hs | 19 -- .../Experiment/SR_ParseJSON/Sized/R030.hs | 19 -- .../Experiment/SR_ParseJSON/Sized/R040.hs | 19 -- .../Experiment/SR_ParseJSON/Sized/R050.hs | 19 -- .../Experiment/SR_ParseJSON/Sized/R060.hs | 19 -- .../Experiment/SR_ParseJSON/Sized/R070.hs | 19 -- .../Experiment/SR_ParseJSON/Sized/R080.hs | 19 -- .../Experiment/SR_SetEvens/Sized/R000.hs | 8 - .../Experiment/SR_SetEvens/Sized/R010.hs | 27 --- .../Experiment/SR_SetEvens/Sized/R020.hs | 33 --- .../Experiment/SR_SetEvens/Sized/R030.hs | 39 ---- .../Experiment/SR_SetEvens/Sized/R040.hs | 45 ---- .../Experiment/SR_SetEvens/Sized/R050.hs | 51 ----- .../Experiment/SR_SetEvens/Sized/R060.hs | 57 ----- .../Experiment/SR_SetEvens/Sized/R070.hs | 63 ------ .../Experiment/SR_SetEvens/Sized/R080.hs | 69 ------ .../Experiment/SR_ToJSON/Sized/R000.hs | 8 - .../Experiment/SR_ToJSON/Sized/R010.hs | 16 -- .../Experiment/SR_ToJSON/Sized/R020.hs | 16 -- .../Experiment/SR_ToJSON/Sized/R030.hs | 16 -- .../Experiment/SR_ToJSON/Sized/R040.hs | 16 -- .../Experiment/SR_ToJSON/Sized/R050.hs | 16 -- .../Experiment/SR_ToJSON/Sized/R060.hs | 16 -- .../Experiment/SR_ToJSON/Sized/R070.hs | 16 -- .../Experiment/SR_ToJSON/Sized/R080.hs | 16 -- .../Experiment/SR_Unsafe/Sized/R000.hs | 8 - .../Experiment/SR_Unsafe/Sized/R010.hs | 31 --- .../Experiment/SR_Unsafe/Sized/R020.hs | 41 ---- .../Experiment/SR_Unsafe/Sized/R030.hs | 52 ----- .../Experiment/SR_Unsafe/Sized/R040.hs | 63 ------ .../Experiment/SR_Unsafe/Sized/R050.hs | 74 ------ .../Experiment/SR_Unsafe/Sized/R060.hs | 85 ------- .../Experiment/SR_Unsafe/Sized/R070.hs | 96 -------- .../Experiment/SR_Unsafe/Sized/R080.hs | 107 --------- .../Experiment/SR_UpdateOne/Sized/R000.hs | 8 - .../Experiment/SR_UpdateOne/Sized/R010.hs | 19 -- .../Experiment/SR_UpdateOne/Sized/R020.hs | 19 -- .../Experiment/SR_UpdateOne/Sized/R030.hs | 19 -- .../Experiment/SR_UpdateOne/Sized/R040.hs | 19 -- .../Experiment/SR_UpdateOne/Sized/R050.hs | 19 -- .../Experiment/SR_UpdateOne/Sized/R060.hs | 19 -- .../Experiment/SR_UpdateOne/Sized/R070.hs | 19 -- .../Experiment/SR_UpdateOne/Sized/R080.hs | 19 -- .../bench/superrecord/Main.hs | 211 ------------------ .../large-records-benchmarks.cabal | 110 +-------- large-records/CHANGELOG.md | 5 + large-records/large-records.cabal | 12 +- .../src/Data/Record/Internal/GHC/Shim.hs | 60 +++-- .../Internal/GHC/TemplateHaskellStyle.hs | 49 +++- .../Data/Record/Internal/Plugin/Options.hs | 5 + large-records/src/Data/Record/Plugin.hs | 27 ++- large-records/test/Test/Record/Util.hs | 5 +- typelet/CHANGELOG.md | 5 + typelet/src/TypeLet/Plugin.hs | 2 +- typelet/src/TypeLet/Plugin/GhcTcPluginAPI.hs | 25 ++- typelet/src/TypeLet/Plugin/Substitution.hs | 2 +- typelet/src/TypeLet/UserAPI.hs | 2 + typelet/typelet.cabal | 8 +- 97 files changed, 336 insertions(+), 2972 deletions(-) delete mode 100644 large-records-benchmarks/bench/superrecord/Common/RowOfSize/Row010.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Common/RowOfSize/Row020.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Common/RowOfSize/Row030.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Common/RowOfSize/Row040.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Common/RowOfSize/Row050.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Common/RowOfSize/Row060.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Common/RowOfSize/Row070.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Common/RowOfSize/Row080.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_Construct/Sized/R000.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_Construct/Sized/R010.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_Construct/Sized/R020.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_Construct/Sized/R030.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_Construct/Sized/R040.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R000.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R010.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R020.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R030.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R040.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R050.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R060.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R070.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R080.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_ParseJSON/Sized/R000.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_ParseJSON/Sized/R010.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_ParseJSON/Sized/R020.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_ParseJSON/Sized/R030.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_ParseJSON/Sized/R040.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_ParseJSON/Sized/R050.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_ParseJSON/Sized/R060.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_ParseJSON/Sized/R070.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_ParseJSON/Sized/R080.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R000.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R010.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R020.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R030.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R040.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R050.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R060.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R070.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R080.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_ToJSON/Sized/R000.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_ToJSON/Sized/R010.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_ToJSON/Sized/R020.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_ToJSON/Sized/R030.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_ToJSON/Sized/R040.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_ToJSON/Sized/R050.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_ToJSON/Sized/R060.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_ToJSON/Sized/R070.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_ToJSON/Sized/R080.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_Unsafe/Sized/R000.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_Unsafe/Sized/R010.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_Unsafe/Sized/R020.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_Unsafe/Sized/R030.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_Unsafe/Sized/R040.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_Unsafe/Sized/R050.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_Unsafe/Sized/R060.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_Unsafe/Sized/R070.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_Unsafe/Sized/R080.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R000.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R010.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R020.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R030.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R040.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R050.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R060.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R070.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R080.hs delete mode 100644 large-records-benchmarks/bench/superrecord/Main.hs diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index ae103b43..cad0e03a 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -8,9 +8,9 @@ # # For more information, see https://github.com/haskell-CI/haskell-ci # -# version: 0.16.5 +# version: 0.19.20240514 # -# REGENDATA ("0.16.5",["github","cabal.project"]) +# REGENDATA ("0.19.20240514",["github","cabal.project"]) # name: Haskell-CI on: @@ -27,24 +27,24 @@ jobs: timeout-minutes: 60 container: - image: buildpack-deps:bionic + image: buildpack-deps:jammy continue-on-error: ${{ matrix.allow-failure }} strategy: matrix: include: - - compiler: ghc-9.4.5 + - compiler: ghc-9.6.4 compilerKind: ghc - compilerVersion: 9.4.5 + compilerVersion: 9.6.4 setup-method: ghcup allow-failure: false - - compiler: ghc-9.2.8 + - compiler: ghc-9.4.8 compilerKind: ghc - compilerVersion: 9.2.8 + compilerVersion: 9.4.8 setup-method: ghcup allow-failure: false - - compiler: ghc-9.0.2 + - compiler: ghc-9.2.8 compilerKind: ghc - compilerVersion: 9.0.2 + compilerVersion: 9.2.8 setup-method: ghcup allow-failure: false - compiler: ghc-8.10.7 @@ -52,32 +52,17 @@ jobs: compilerVersion: 8.10.7 setup-method: ghcup allow-failure: false - - compiler: ghc-8.8.4 - compilerKind: ghc - compilerVersion: 8.8.4 - setup-method: hvr-ppa - allow-failure: false fail-fast: false steps: - name: apt run: | apt-get update apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 - if [ "${{ matrix.setup-method }}" = ghcup ]; then - mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup" - chmod a+x "$HOME/.ghcup/bin/ghcup" - "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) - "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) - else - apt-add-repository -y 'ppa:hvr/ghc' - apt-get update - apt-get install -y "$HCNAME" - mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup" - chmod a+x "$HOME/.ghcup/bin/ghcup" - "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) - fi + mkdir -p "$HOME/.ghcup/bin" + curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" + chmod a+x "$HOME/.ghcup/bin/ghcup" + "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) + "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) env: HCKIND: ${{ matrix.compilerKind }} HCNAME: ${{ matrix.compiler }} @@ -89,20 +74,13 @@ jobs: echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV" echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV" HCDIR=/opt/$HCKIND/$HCVER - if [ "${{ matrix.setup-method }}" = ghcup ]; then - HC=$HOME/.ghcup/bin/$HCKIND-$HCVER - echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV" - echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV" - echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" - else - HC=$HCDIR/bin/$HCKIND - echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV" - echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV" - echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" - fi - + HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER") + HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#') + HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#') + echo "HC=$HC" >> "$GITHUB_ENV" + echo "HCPKG=$HCPKG" >> "$GITHUB_ENV" + echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV" + echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))') echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV" echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" @@ -161,14 +139,14 @@ jobs: - name: install cabal-docspec run: | mkdir -p $HOME/.cabal/bin - curl -sL https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20230517/cabal-docspec-0.0.0.20230517-x86_64-linux.xz > cabal-docspec.xz - echo '3b31bbe463ad4d671abbc103db49628562ec48a6604cab278207b5b6acd21ed7 cabal-docspec.xz' | sha256sum -c - + curl -sL https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20240414/cabal-docspec-0.0.0.20240414-x86_64-linux.xz > cabal-docspec.xz + echo '2d18a3f79619e8ec5f11870f926f6dc2616e02a6c889315b7f82044b95a1adb9 cabal-docspec.xz' | sha256sum -c - xz -d < cabal-docspec.xz > $HOME/.cabal/bin/cabal-docspec rm -f cabal-docspec.xz chmod a+x $HOME/.cabal/bin/cabal-docspec cabal-docspec --version - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: source - name: initial cabal.project for sdist @@ -176,7 +154,7 @@ jobs: touch cabal.project echo "packages: $GITHUB_WORKSPACE/source/large-generics" >> cabal.project echo "packages: $GITHUB_WORKSPACE/source/large-records" >> cabal.project - if [ $((HCNUMVER < 81000)) -ne 0 ] ; then echo "packages: $GITHUB_WORKSPACE/source/large-records-benchmarks" >> cabal.project ; fi + if [ $((HCNUMVER < 90200)) -ne 0 ] ; then echo "packages: $GITHUB_WORKSPACE/source/large-records-benchmarks" >> cabal.project ; fi echo "packages: $GITHUB_WORKSPACE/source/large-anon" >> cabal.project echo "packages: $GITHUB_WORKSPACE/source/beam-large-records" >> cabal.project echo "packages: $GITHUB_WORKSPACE/source/typelet" >> cabal.project @@ -208,7 +186,7 @@ jobs: touch cabal.project.local echo "packages: ${PKGDIR_large_generics}" >> cabal.project echo "packages: ${PKGDIR_large_records}" >> cabal.project - if [ $((HCNUMVER < 81000)) -ne 0 ] ; then echo "packages: ${PKGDIR_large_records_benchmarks}" >> cabal.project ; fi + if [ $((HCNUMVER < 90200)) -ne 0 ] ; then echo "packages: ${PKGDIR_large_records_benchmarks}" >> cabal.project ; fi echo "packages: ${PKGDIR_large_anon}" >> cabal.project echo "packages: ${PKGDIR_beam_large_records}" >> cabal.project echo "packages: ${PKGDIR_typelet}" >> cabal.project @@ -216,8 +194,8 @@ jobs: echo " ghc-options: -Werror=missing-methods" >> cabal.project echo "package large-records" >> cabal.project echo " ghc-options: -Werror=missing-methods" >> cabal.project - if [ $((HCNUMVER < 81000)) -ne 0 ] ; then echo "package large-records-benchmarks" >> cabal.project ; fi - if [ $((HCNUMVER < 81000)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi + if [ $((HCNUMVER < 90200)) -ne 0 ] ; then echo "package large-records-benchmarks" >> cabal.project ; fi + if [ $((HCNUMVER < 90200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi echo "package large-anon" >> cabal.project echo " ghc-options: -Werror=missing-methods" >> cabal.project echo "package beam-large-records" >> cabal.project @@ -228,19 +206,19 @@ jobs: source-repository-package type: git location: https://github.com/well-typed/beam - tag: f13fedc299727b2706f26cdfeff3913923cb1a79 + tag: 57a12e68727c027f0f1c25752f8c5704ddbe1516 subdir: beam-core source-repository-package type: git location: https://github.com/well-typed/beam - tag: f13fedc299727b2706f26cdfeff3913923cb1a79 + tag: 57a12e68727c027f0f1c25752f8c5704ddbe1516 subdir: beam-migrate source-repository-package type: git location: https://github.com/well-typed/beam - tag: f13fedc299727b2706f26cdfeff3913923cb1a79 + tag: 57a12e68727c027f0f1c25752f8c5704ddbe1516 subdir: beam-sqlite package large-generics @@ -261,7 +239,7 @@ jobs: package typelet ghc-options: -Werror EOF - $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(beam-large-records|large-anon|large-generics|large-records|large-records-benchmarks|typelet)$/; }' >> cabal.project.local + $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(beam-large-records|large-anon|large-generics|large-records|large-records-benchmarks|typelet)$/; }' >> cabal.project.local cat cabal.project cat cabal.project.local - name: dump install plan @@ -269,7 +247,7 @@ jobs: $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all cabal-plan - name: restore cache - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 with: key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} path: ~/.cabal/store @@ -289,8 +267,8 @@ jobs: $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct - name: docspec run: | - if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all ; fi - if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then cabal-docspec $ARG_COMPILER ; fi + if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all ; fi + if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then cabal-docspec $ARG_COMPILER ; fi - name: haddock run: | $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all @@ -299,7 +277,7 @@ jobs: rm -f cabal.project.local $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all - name: save cache - uses: actions/cache/save@v3 + uses: actions/cache/save@v4 if: always() with: key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} diff --git a/beam-large-records/beam-large-records.cabal b/beam-large-records/beam-large-records.cabal index f19e78a7..18ac04c6 100644 --- a/beam-large-records/beam-large-records.cabal +++ b/beam-large-records/beam-large-records.cabal @@ -11,7 +11,7 @@ author: Edsko de Vries maintainer: edsko@well-typed.com category: Database extra-source-files: CHANGELOG.md -tested-with: GHC ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.5 +tested-with: GHC ==8.10.7 || ==9.2.8 || ==9.4.8 || ==9.6.4 source-repository head type: git @@ -31,7 +31,7 @@ library Data.Record.Beam.ZipDatabase Data.Record.Beam.ZipTables build-depends: - base >= 4.13 && < 4.18 + base >= 4.14 && < 4.19 , beam-core >= 0.9 , large-generics , microlens diff --git a/cabal.project b/cabal.project index 1f8c4b36..58c10643 100644 --- a/cabal.project +++ b/cabal.project @@ -9,7 +9,7 @@ packages: large-generics source-repository-package type: git location: https://github.com/well-typed/beam - tag: f13fedc299727b2706f26cdfeff3913923cb1a79 + tag: 57a12e68727c027f0f1c25752f8c5704ddbe1516 subdir: beam-core beam-migrate beam-sqlite -- enable for GHC head @@ -33,7 +33,6 @@ package large-records-benchmarks package large-anon tests: True - ghc-options: -dcore-lint package beam-large-records tests: True diff --git a/large-anon/CHANGELOG.md b/large-anon/CHANGELOG.md index f35632fd..f3e75ad3 100644 --- a/large-anon/CHANGELOG.md +++ b/large-anon/CHANGELOG.md @@ -1,5 +1,10 @@ # Revision history for large-anon +## 0.3.1 -- 2024-05-30 + +* Support ghc 9.6 (and drop ghc <= 8.8) + [together with Gabriele Sales] + ## 0.3 -- 2023-07-04 * Critical bugfix (#146): incremental record construction was fundamentally diff --git a/large-anon/large-anon.cabal b/large-anon/large-anon.cabal index 0ac5e819..bfe9abc7 100644 --- a/large-anon/large-anon.cabal +++ b/large-anon/large-anon.cabal @@ -1,6 +1,6 @@ cabal-version: 2.4 name: large-anon -version: 0.3.0 +version: 0.3.1 synopsis: Scalable anonymous records description: The @large-anon@ package provides support for anonymous records in Haskell, with a focus on compile-time (and @@ -12,7 +12,7 @@ maintainer: edsko@well-typed.com category: Records extra-source-files: CHANGELOG.md test/Test/Sanity/RebindableSyntax/Tests.hs -tested-with: GHC ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.5 +tested-with: GHC ==8.10.7 || ==9.2.8 || ==9.4.8 || ==9.6.4 library exposed-modules: @@ -70,15 +70,15 @@ library Data.Record.Anon.Internal.Plugin.Source.Options build-depends: - base >= 4.13 && < 4.18 - , aeson >= 1.4.4 && < 2.2 - , containers >= 0.6.2 && < 0.7 - , deepseq >= 1.4.4 && < 1.5 - , ghc-tcplugin-api >= 0.10 && < 0.11 + base >= 4.14 && < 4.19 + , aeson >= 1.4.4 && < 2.3 + , containers >= 0.6.2 && < 0.8 + , deepseq >= 1.4.4 && < 1.6 + , ghc-tcplugin-api >= 0.11 && < 0.12 , hashable >= 1.3 && < 1.5 - , mtl >= 2.2.1 && < 2.3 + , mtl >= 2.2.1 && < 2.4 , optics-core >= 0.3 && < 0.5 - , primitive >= 0.8 && < 0.9 + , primitive >= 0.8 && < 0.10 , record-hasfield >= 1.0 && < 1.1 , sop-core >= 0.5 && < 0.6 , syb >= 0.7 && < 0.8 @@ -184,6 +184,7 @@ test-suite test-large-anon -Wredundant-constraints -Wno-unticked-promoted-constructors -fno-show-valid-hole-fits + -dcore-lint -- Not sure why, but ghc warns about record-hasfield being unused, -- despite it actually being required. So for now we just disable this check. diff --git a/large-anon/src/Data/Record/Anon/Advanced.hs b/large-anon/src/Data/Record/Anon/Advanced.hs index 4ef3c316..ccd20149 100644 --- a/large-anon/src/Data/Record/Anon/Advanced.hs +++ b/large-anon/src/Data/Record/Anon/Advanced.hs @@ -205,7 +205,7 @@ applyPending = A.applyPending -- absentField r = get #c r -- :} -- ... --- ...No instance for (RowHasField "c"... +-- ...No instance for...RowHasField "c"... -- ... -- -- Type mismatches will result in regular type errors: @@ -226,7 +226,7 @@ applyPending = A.applyPending -- unknownField r = get #b r -- :} -- ... --- ...No instance for (RowHasField "b"... +-- ...No instance for...RowHasField "b"... -- ... -- -- (Note that @x@ here is a variable, not a string.) It is important that the @@ -280,7 +280,7 @@ set = A.set -- example = project -- :} -- ... --- ...No instance for (SubRow... +-- ...No instance for...SubRow... -- ... -- -- Type inference will work through projections: field types are unified based @@ -347,7 +347,7 @@ lens = A.lens -- example r = get #b r -- :} -- ... --- ...No instance for (RowHasField "b"... +-- ...No instance for...RowHasField "b"... -- ... merge :: Record f r -> Record f r' -> Record f (Merge r r') merge = A.merge diff --git a/large-anon/src/Data/Record/Anon/Internal/Core/FieldName.hs b/large-anon/src/Data/Record/Anon/Internal/Core/FieldName.hs index 48a83a31..a3141a2c 100644 --- a/large-anon/src/Data/Record/Anon/Internal/Core/FieldName.hs +++ b/large-anon/src/Data/Record/Anon/Internal/Core/FieldName.hs @@ -63,6 +63,6 @@ instance Show FieldName where showString "fromString " . showsPrec 11 (fieldNameLabel n) instance Outputable FieldName where - ppr = ppr . fieldNameLabel + ppr = pprString . fieldNameLabel diff --git a/large-anon/src/Data/Record/Anon/Internal/Plugin/Source/GhcShim.hs b/large-anon/src/Data/Record/Anon/Internal/Plugin/Source/GhcShim.hs index a07864ab..90b01d56 100644 --- a/large-anon/src/Data/Record/Anon/Internal/Plugin/Source/GhcShim.hs +++ b/large-anon/src/Data/Record/Anon/Internal/Plugin/Source/GhcShim.hs @@ -1,4 +1,5 @@ {-# LANGUAGE CPP #-} +{-# LANGUAGE DisambiguateRecordFields #-} -- | Thin shim around the GHC API -- @@ -102,7 +103,6 @@ import GHC.Driver.Session (getDynFlags) import GHC.Types.Name (mkInternalName) import GHC.Types.Name.Occurrence import GHC.Types.Name.Reader (RdrName(Exact), rdrNameOcc, mkRdrQual, mkRdrUnqual) -import GHC.Types.SrcLoc (LayoutInfo(NoLayoutInfo)) import GHC.Types.Unique (Unique) import GHC.Types.Unique.Supply (takeUniqFromSupply) import GHC.Utils.Monad @@ -113,13 +113,16 @@ import GHC.Driver.Env.Types import GHC.Driver.Errors import GHC.Types.SourceText (SourceText(NoSourceText)) import GHC.Unit.Finder (findImportedModule, FindResult(Found)) -import GHC.Unit.Types (IsBootInterface(NotBoot)) #else import GHC.Driver.Finder (findImportedModule) import GHC.Driver.Types import GHC.Types.Basic (SourceText(NoSourceText)) #endif +#if __GLASGOW_HASKELL__ >= 902 && __GLASGOW_HASKELL__ < 906 +import GHC.Unit.Types (IsBootInterface(NotBoot)) +#endif + #if __GLASGOW_HASKELL__ < 904 import Data.IORef @@ -131,14 +134,22 @@ import GHC.Driver.Config.Diagnostic (initDiagOpts) import GHC.Driver.Errors.Types (GhcMessage(..)) import GHC.Iface.Env (lookupNameCache) import GHC.Rename.Names (renamePkgQual) -import GHC.Types.Error (MsgEnvelope(..), mkMessages) import GHC.Types.Name.Cache (NameCache, takeUniqFromNameCache) import GHC.Types.PkgQual (RawPkgQual(NoRawPkgQual)) import GHC.Utils.Error (mkPlainError) +import qualified GHC.Types.Error as Err #endif #endif +#if __GLASGOW_HASKELL__ >= 900 && __GLASGOW_HASKELL__ < 906 +import GHC.Types.SrcLoc (LayoutInfo(NoLayoutInfo)) +#endif + +#if __GLASGOW_HASKELL__ >= 906 +import GHC.Driver.Config.Diagnostic (initPrintConfig) +#endif + {------------------------------------------------------------------------------- Names -------------------------------------------------------------------------------} @@ -206,8 +217,18 @@ hscNameCacheIO = hsc_NC -- | Optionally @qualified@ import declaration importDecl :: Bool -> ModuleName -> LImportDecl GhcPs importDecl qualified name = reLocA $ noLoc $ ImportDecl { +#if __GLASGOW_HASKELL__ < 906 ideclExt = defExt +#else + ideclExt = XImportDeclPass { + ideclAnn = defExt + , ideclSourceText = NoSourceText + , ideclImplicit = False + } +#endif +#if __GLASGOW_HASKELL__ < 906 , ideclSourceSrc = NoSourceText +#endif , ideclName = reLocA $ noLoc name #if __GLASGOW_HASKELL__ >= 904 , ideclPkgQual = NoRawPkgQual @@ -215,18 +236,21 @@ importDecl qualified name = reLocA $ noLoc $ ImportDecl { , ideclPkgQual = Nothing #endif , ideclSafe = False +#if __GLASGOW_HASKELL__ < 906 , ideclImplicit = False +#endif , ideclAs = Nothing +#if __GLASGOW_HASKELL__ < 906 , ideclHiding = Nothing -#if __GLASGOW_HASKELL__ < 810 - , ideclQualified = qualified -#else - , ideclQualified = if qualified then QualifiedPre else NotQualified #endif + , ideclQualified = if qualified then QualifiedPre else NotQualified #if __GLASGOW_HASKELL__ < 900 , ideclSource = False #else , ideclSource = NotBoot +#endif +#if __GLASGOW_HASKELL__ >= 906 + , ideclImportList = Nothing #endif } @@ -239,11 +263,31 @@ issueWarning l errMsg = do mkWarnMsg l neverQualify errMsg #elif __GLASGOW_HASKELL__ >= 904 logger <- getLogger - liftIO $ printOrThrowDiagnostics logger (initDiagOpts dynFlags) . mkMessages . bag $ - MsgEnvelope { + +#if __GLASGOW_HASKELL__ < 906 + let printOrThrow :: Err.Messages GhcMessage -> IO () + printOrThrow = printOrThrowDiagnostics + logger + (initDiagOpts dynFlags) + + let msg :: Err.DiagnosticMessage + msg = mkPlainError [] errMsg +#else + let printOrThrow :: Err.Messages GhcMessage -> IO () + printOrThrow = printOrThrowDiagnostics + logger + (initPrintConfig dynFlags) + (initDiagOpts dynFlags) + + let msg :: Err.UnknownDiagnostic + msg = Err.UnknownDiagnostic $ + mkPlainError [] errMsg +#endif + liftIO $ printOrThrow . Err.mkMessages . bag $ + Err.MsgEnvelope { errMsgSpan = l , errMsgContext = neverQualify - , errMsgDiagnostic = GhcUnknownMessage $ mkPlainError [] errMsg + , errMsgDiagnostic = GhcUnknownMessage msg , errMsgSeverity = SevWarning } #else @@ -269,15 +313,10 @@ mkHsApps = foldl' mkHsApp class HasDefaultExt a where defExt :: a -#if __GLASGOW_HASKELL__ < 810 -instance HasDefaultExt NoExt where - defExt = noExt -#else instance HasDefaultExt NoExtField where defExt = noExtField -#endif -#if __GLASGOW_HASKELL__ >= 900 +#if __GLASGOW_HASKELL__ >= 900 && __GLASGOW_HASKELL__ < 906 instance HasDefaultExt LayoutInfo where defExt = NoLayoutInfo #endif @@ -307,6 +346,9 @@ mkLabel :: SrcSpan -> FastString -> LHsExpr GhcPs mkLabel l n = reLocA $ L l $ HsOverLabel defExt #if __GLASGOW_HASKELL__ < 902 - Nothing + Nothing -- RebindableSyntax +#elif __GLASGOW_HASKELL__ >= 906 + NoSourceText #endif + n diff --git a/large-anon/src/Data/Record/Anon/Internal/Plugin/TC/Constraints/AllFields.hs b/large-anon/src/Data/Record/Anon/Internal/Plugin/TC/Constraints/AllFields.hs index 20f1b4a5..feec6d3c 100644 --- a/large-anon/src/Data/Record/Anon/Internal/Plugin/TC/Constraints/AllFields.hs +++ b/large-anon/src/Data/Record/Anon/Internal/Plugin/TC/Constraints/AllFields.hs @@ -117,22 +117,11 @@ evidenceAllFields ResolvedNames{..} CAllFields{..} fields = do dictForField :: KnownField (Type, EvVar) -> TcPluginM 'Solve EvExpr dictForField KnownField{ knownFieldInfo = (fieldType, dict) } = do - return $ mkCoreConApps dataConDictAny $ concat [ - map Type typeArgsDict - , [ -- We have a dictionary of type @c a@ from the evidence we get - -- from ghc; we cast it to @c Any@ to serve as arg to @DictAny@. - mkCoreApps (Var idUnsafeCoerce) [ - Type $ mkAppTy allFieldsTypeConstraint fieldType - , Type $ mkAppTy allFieldsTypeConstraint anyAtKind - , Var dict - ] - ] + return $ mkCoreApps (Var idMkDictAny) $ concat [ + map Type (typeArgsDict ++ [fieldType]) + , [Var dict] ] - -- Any at kind @k@ - anyAtKind :: Type - anyAtKind = mkTyConApp anyTyCon [allFieldsTypeKind] - {------------------------------------------------------------------------------- Solver -------------------------------------------------------------------------------} diff --git a/large-anon/src/Data/Record/Anon/Internal/Plugin/TC/GhcTcPluginAPI.hs b/large-anon/src/Data/Record/Anon/Internal/Plugin/TC/GhcTcPluginAPI.hs index 4603dc51..b3fefac8 100644 --- a/large-anon/src/Data/Record/Anon/Internal/Plugin/TC/GhcTcPluginAPI.hs +++ b/large-anon/src/Data/Record/Anon/Internal/Plugin/TC/GhcTcPluginAPI.hs @@ -21,6 +21,7 @@ module Data.Record.Anon.Internal.Plugin.TC.GhcTcPluginAPI ( -- * New functonality , isCanonicalVarEq , getModule + , pprString ) where import GHC.Stack @@ -36,10 +37,6 @@ import GHC.Builtin.Types.Prim import GHC.Core.Make import GHC.Utils.Outputable -#if __GLASGOW_HASKELL__ >= 808 && __GLASGOW_HASKELL__ < 810 -import TcRnTypes (Ct(..)) -#endif - #if __GLASGOW_HASKELL__ >= 810 && __GLASGOW_HASKELL__ < 900 import Constraint (Ct(..)) #endif @@ -53,7 +50,7 @@ import GHC.Tc.Types.Constraint (Ct(..), CanEqLHS(..)) #endif isCanonicalVarEq :: Ct -> Maybe (TcTyVar, Type) -#if __GLASGOW_HASKELL__ >= 808 && __GLASGOW_HASKELL__ < 902 +#if __GLASGOW_HASKELL__ >= 810 && __GLASGOW_HASKELL__ < 902 isCanonicalVarEq = \case CTyEqCan{..} -> Just (cc_tyvar, cc_rhs) CFunEqCan{..} -> Just (cc_fsk, mkTyConApp cc_fun cc_tyargs) @@ -98,3 +95,7 @@ getModule pkg modl = do , " in package " , pkg ] + +pprString :: String -> SDoc +pprString = text + diff --git a/large-anon/src/Data/Record/Anon/Internal/Plugin/TC/NameResolution.hs b/large-anon/src/Data/Record/Anon/Internal/Plugin/TC/NameResolution.hs index d7662f57..941c9116 100644 --- a/large-anon/src/Data/Record/Anon/Internal/Plugin/TC/NameResolution.hs +++ b/large-anon/src/Data/Record/Anon/Internal/Plugin/TC/NameResolution.hs @@ -23,7 +23,7 @@ data ResolvedNames = ResolvedNames { , idEvidenceKnownHash :: Id , idEvidenceRowHasField :: Id , idEvidenceSubRow :: Id - , idUnsafeCoerce :: Id + , idMkDictAny :: Id , tyConDictAny :: TyCon , tyConMerge :: TyCon , tyConFieldTypes :: TyCon @@ -60,7 +60,7 @@ nameResolution = do idEvidenceKnownHash <- getVar "evidenceKnownHash" idEvidenceRowHasField <- getVar "evidenceRowHasField" idEvidenceSubRow <- getVar "evidenceSubRow" - idUnsafeCoerce <- getVar "noInlineUnsafeCo" + idMkDictAny <- getVar "mkDictAny" tyConDictAny <- getTyCon "DictAny" tyConFieldTypes <- getTyCon "FieldTypes" diff --git a/large-anon/src/Data/Record/Anon/Internal/Util/StrictArray.hs b/large-anon/src/Data/Record/Anon/Internal/Util/StrictArray.hs index 9c6b12e4..1455ed2c 100644 --- a/large-anon/src/Data/Record/Anon/Internal/Util/StrictArray.hs +++ b/large-anon/src/Data/Record/Anon/Internal/Util/StrictArray.hs @@ -254,11 +254,11 @@ indexSmallArray arr i = boundsCheck arr i' $ i' = arrayIndex (sizeofSmallArray arr) i writeSmallArray :: ArrayIndex i => SmallMutableArray s a -> i -> a -> ST s () -writeSmallArray arr i a = boundsCheckM arr i' $ - SmallArray.writeSmallArray arr i' a - where - i' :: Int - i' = arrayIndex (sizeofSmallMutableArray arr) i +writeSmallArray arr i a = do + sz <- getSizeofSmallMutableArray arr + let i' = arrayIndex sz i + boundsCheckM arr i' $ + SmallArray.writeSmallArray arr i' a #ifdef DEBUG boundsCheck :: HasCallStack => SmallArray a -> Int -> r -> r @@ -288,3 +288,11 @@ boundsCheckM :: SmallMutableArray s a -> Int -> r -> r boundsCheckM _arr _i k = k #endif +{------------------------------------------------------------------------------- + Auxiliary: support primitive < 0.9 +-------------------------------------------------------------------------------} + +#if !MIN_VERSION_primitive(0,9,0) +getSizeofSmallMutableArray :: SmallMutableArray s a -> ST s Int +getSizeofSmallMutableArray = return . sizeofSmallMutableArray +#endif \ No newline at end of file diff --git a/large-anon/src/Data/Record/Anon/Plugin/Internal/Runtime.hs b/large-anon/src/Data/Record/Anon/Plugin/Internal/Runtime.hs index 3adc5a58..68ec3aec 100644 --- a/large-anon/src/Data/Record/Anon/Plugin/Internal/Runtime.hs +++ b/large-anon/src/Data/Record/Anon/Plugin/Internal/Runtime.hs @@ -10,11 +10,14 @@ {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} +-- Since this module is intended for codegen, where we generate explicit type +-- arguments anyway, ambiguous types are a non-issue. +{-# LANGUAGE AllowAmbiguousTypes #-} + +-- Users should not need to import from this module directly. {-# OPTIONS_HADDOCK hide #-} -- | Runtime for code generated by the plugin --- --- Users should not need to import from this module directly. module Data.Record.Anon.Plugin.Internal.Runtime ( -- * Row Pair(..) @@ -34,6 +37,7 @@ module Data.Record.Anon.Plugin.Internal.Runtime ( -- * AllFields , AllFields(..) , DictAny(..) + , mkDictAny , DictAllFields , evidenceAllFields -- * KnownHash @@ -184,6 +188,17 @@ type DictAllFields k (r :: Row k) (c :: k -> Constraint) = data DictAny c where DictAny :: c Any => DictAny c +mkDictAny :: forall k (c :: k -> Constraint) (a :: k). c a => DictAny c +mkDictAny = aux $ noInlineUnsafeCo @(Dict c a) @(Dict c Any) Dict + where + aux :: Dict c Any -> DictAny c + aux Dict = DictAny + +-- | Construct evidence for the 'AllFields' class +-- +-- For reasons currently unclear, /must/ be marked NOINLINE, otherwise we get +-- @-dcore-lint@ errors in @ghc 9.6@. +{-# NOINLINE evidenceAllFields #-} evidenceAllFields :: forall k r c. [DictAny c] -> DictAllFields k r c evidenceAllFields = Tagged . smallArrayFromList diff --git a/large-generics/CHANGELOG.md b/large-generics/CHANGELOG.md index 90a16db4..f079c6fa 100644 --- a/large-generics/CHANGELOG.md +++ b/large-generics/CHANGELOG.md @@ -1,5 +1,10 @@ # Revision history for large-generics +## 0.2.2 -- 2024-05-30 + +* Support ghc 9.6 (and drop ghc <= 8.8) + [together with Tristan Cacqueray and Gabriele Sales] + ## 0.2.1 -- 2023-03-06 * Support ghc 9.4 diff --git a/large-generics/large-generics.cabal b/large-generics/large-generics.cabal index c898707e..52a0d9a9 100644 --- a/large-generics/large-generics.cabal +++ b/large-generics/large-generics.cabal @@ -1,6 +1,6 @@ cabal-version: 2.4 name: large-generics -version: 0.2.1 +version: 0.2.2 synopsis: Generic programming API for large-records and large-anon description: The large-generics package offers a style of generic programming inspired by generics-sop, but optimized for @@ -13,7 +13,7 @@ author: Edsko de Vries maintainer: edsko@well-typed.com category: Generics extra-source-files: CHANGELOG.md -tested-with: GHC ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.5 +tested-with: GHC ==8.10.7 || ==9.2.8 || ==9.4.8 || ==9.6.4 library exposed-modules: @@ -42,12 +42,12 @@ library hs-source-dirs: src build-depends: - base >= 4.13 && < 4.18 - , aeson >= 1.4.4 && < 2.2 - , deepseq >= 1.4.4 && < 1.5 + base >= 4.14 && < 4.19 + , aeson >= 1.4.4 && < 2.3 + , deepseq >= 1.4.4 && < 1.6 , generics-sop >= 0.5 && < 0.6 , sop-core >= 0.5 && < 0.6 - , primitive >= 0.8 && < 0.9 + , primitive >= 0.8 && < 0.10 if impl(ghc >= 8.10) ghc-options: -Wunused-packages diff --git a/large-records-benchmarks/bench/superrecord/Common/RowOfSize/Row010.hs b/large-records-benchmarks/bench/superrecord/Common/RowOfSize/Row010.hs deleted file mode 100644 index f34df673..00000000 --- a/large-records-benchmarks/bench/superrecord/Common/RowOfSize/Row010.hs +++ /dev/null @@ -1,23 +0,0 @@ -{-# LANGUAGE DataKinds #-} -{-# LANGUAGE TypeOperators #-} - -module Common.RowOfSize.Row010 (ExampleRow) where - -import SuperRecord - -import Bench.Types - -type ExampleRow = [ - -- 00 .. 09 - "t00" := T 00 - , "t01" := T 01 - , "t02" := T 02 - , "t03" := T 03 - , "t04" := T 04 - , "t05" := T 05 - , "t06" := T 06 - , "t07" := T 07 - , "t08" := T 08 - , "t09" := T 09 - ] - diff --git a/large-records-benchmarks/bench/superrecord/Common/RowOfSize/Row020.hs b/large-records-benchmarks/bench/superrecord/Common/RowOfSize/Row020.hs deleted file mode 100644 index 737ab0a0..00000000 --- a/large-records-benchmarks/bench/superrecord/Common/RowOfSize/Row020.hs +++ /dev/null @@ -1,34 +0,0 @@ -{-# LANGUAGE DataKinds #-} -{-# LANGUAGE TypeOperators #-} - -module Common.RowOfSize.Row020 (ExampleRow) where - -import SuperRecord - -import Bench.Types - -type ExampleRow = [ - -- 00 .. 09 - "t00" := T 00 - , "t01" := T 01 - , "t02" := T 02 - , "t03" := T 03 - , "t04" := T 04 - , "t05" := T 05 - , "t06" := T 06 - , "t07" := T 07 - , "t08" := T 08 - , "t09" := T 09 - -- 10 .. 19 - , "t10" := T 10 - , "t11" := T 11 - , "t12" := T 12 - , "t13" := T 13 - , "t14" := T 14 - , "t15" := T 15 - , "t16" := T 16 - , "t17" := T 17 - , "t18" := T 18 - , "t19" := T 19 - ] - diff --git a/large-records-benchmarks/bench/superrecord/Common/RowOfSize/Row030.hs b/large-records-benchmarks/bench/superrecord/Common/RowOfSize/Row030.hs deleted file mode 100644 index 23f06d27..00000000 --- a/large-records-benchmarks/bench/superrecord/Common/RowOfSize/Row030.hs +++ /dev/null @@ -1,45 +0,0 @@ -{-# LANGUAGE DataKinds #-} -{-# LANGUAGE TypeOperators #-} - -module Common.RowOfSize.Row030 (ExampleRow) where - -import SuperRecord - -import Bench.Types - -type ExampleRow = [ - -- 00 .. 09 - "t00" := T 00 - , "t01" := T 01 - , "t02" := T 02 - , "t03" := T 03 - , "t04" := T 04 - , "t05" := T 05 - , "t06" := T 06 - , "t07" := T 07 - , "t08" := T 08 - , "t09" := T 09 - -- 10 .. 19 - , "t10" := T 10 - , "t11" := T 11 - , "t12" := T 12 - , "t13" := T 13 - , "t14" := T 14 - , "t15" := T 15 - , "t16" := T 16 - , "t17" := T 17 - , "t18" := T 18 - , "t19" := T 19 - -- 20 .. 29 - , "t20" := T 20 - , "t21" := T 21 - , "t22" := T 22 - , "t23" := T 23 - , "t24" := T 24 - , "t25" := T 25 - , "t26" := T 26 - , "t27" := T 27 - , "t28" := T 28 - , "t29" := T 29 - ] - diff --git a/large-records-benchmarks/bench/superrecord/Common/RowOfSize/Row040.hs b/large-records-benchmarks/bench/superrecord/Common/RowOfSize/Row040.hs deleted file mode 100644 index cdb54084..00000000 --- a/large-records-benchmarks/bench/superrecord/Common/RowOfSize/Row040.hs +++ /dev/null @@ -1,56 +0,0 @@ -{-# LANGUAGE DataKinds #-} -{-# LANGUAGE TypeOperators #-} - -module Common.RowOfSize.Row040 (ExampleRow) where - -import SuperRecord - -import Bench.Types - -type ExampleRow = [ - -- 00 .. 09 - "t00" := T 00 - , "t01" := T 01 - , "t02" := T 02 - , "t03" := T 03 - , "t04" := T 04 - , "t05" := T 05 - , "t06" := T 06 - , "t07" := T 07 - , "t08" := T 08 - , "t09" := T 09 - -- 10 .. 19 - , "t10" := T 10 - , "t11" := T 11 - , "t12" := T 12 - , "t13" := T 13 - , "t14" := T 14 - , "t15" := T 15 - , "t16" := T 16 - , "t17" := T 17 - , "t18" := T 18 - , "t19" := T 19 - -- 20 .. 29 - , "t20" := T 20 - , "t21" := T 21 - , "t22" := T 22 - , "t23" := T 23 - , "t24" := T 24 - , "t25" := T 25 - , "t26" := T 26 - , "t27" := T 27 - , "t28" := T 28 - , "t29" := T 29 - -- 30 .. 39 - , "t30" := T 30 - , "t31" := T 31 - , "t32" := T 32 - , "t33" := T 33 - , "t34" := T 34 - , "t35" := T 35 - , "t36" := T 36 - , "t37" := T 37 - , "t38" := T 38 - , "t39" := T 39 - ] - diff --git a/large-records-benchmarks/bench/superrecord/Common/RowOfSize/Row050.hs b/large-records-benchmarks/bench/superrecord/Common/RowOfSize/Row050.hs deleted file mode 100644 index 2abee3ec..00000000 --- a/large-records-benchmarks/bench/superrecord/Common/RowOfSize/Row050.hs +++ /dev/null @@ -1,67 +0,0 @@ -{-# LANGUAGE DataKinds #-} -{-# LANGUAGE TypeOperators #-} - -module Common.RowOfSize.Row050 (ExampleRow) where - -import SuperRecord - -import Bench.Types - -type ExampleRow = [ - -- 00 .. 09 - "t00" := T 00 - , "t01" := T 01 - , "t02" := T 02 - , "t03" := T 03 - , "t04" := T 04 - , "t05" := T 05 - , "t06" := T 06 - , "t07" := T 07 - , "t08" := T 08 - , "t09" := T 09 - -- 10 .. 19 - , "t10" := T 10 - , "t11" := T 11 - , "t12" := T 12 - , "t13" := T 13 - , "t14" := T 14 - , "t15" := T 15 - , "t16" := T 16 - , "t17" := T 17 - , "t18" := T 18 - , "t19" := T 19 - -- 20 .. 29 - , "t20" := T 20 - , "t21" := T 21 - , "t22" := T 22 - , "t23" := T 23 - , "t24" := T 24 - , "t25" := T 25 - , "t26" := T 26 - , "t27" := T 27 - , "t28" := T 28 - , "t29" := T 29 - -- 30 .. 39 - , "t30" := T 30 - , "t31" := T 31 - , "t32" := T 32 - , "t33" := T 33 - , "t34" := T 34 - , "t35" := T 35 - , "t36" := T 36 - , "t37" := T 37 - , "t38" := T 38 - , "t39" := T 39 - -- 40 .. 49 - , "t40" := T 40 - , "t41" := T 41 - , "t42" := T 42 - , "t43" := T 43 - , "t44" := T 44 - , "t45" := T 45 - , "t46" := T 46 - , "t47" := T 47 - , "t48" := T 48 - , "t49" := T 49 - ] - diff --git a/large-records-benchmarks/bench/superrecord/Common/RowOfSize/Row060.hs b/large-records-benchmarks/bench/superrecord/Common/RowOfSize/Row060.hs deleted file mode 100644 index e35be254..00000000 --- a/large-records-benchmarks/bench/superrecord/Common/RowOfSize/Row060.hs +++ /dev/null @@ -1,78 +0,0 @@ -{-# LANGUAGE DataKinds #-} -{-# LANGUAGE TypeOperators #-} - -module Common.RowOfSize.Row060 (ExampleRow) where - -import SuperRecord - -import Bench.Types - -type ExampleRow = [ - -- 00 .. 09 - "t00" := T 00 - , "t01" := T 01 - , "t02" := T 02 - , "t03" := T 03 - , "t04" := T 04 - , "t05" := T 05 - , "t06" := T 06 - , "t07" := T 07 - , "t08" := T 08 - , "t09" := T 09 - -- 10 .. 19 - , "t10" := T 10 - , "t11" := T 11 - , "t12" := T 12 - , "t13" := T 13 - , "t14" := T 14 - , "t15" := T 15 - , "t16" := T 16 - , "t17" := T 17 - , "t18" := T 18 - , "t19" := T 19 - -- 20 .. 29 - , "t20" := T 20 - , "t21" := T 21 - , "t22" := T 22 - , "t23" := T 23 - , "t24" := T 24 - , "t25" := T 25 - , "t26" := T 26 - , "t27" := T 27 - , "t28" := T 28 - , "t29" := T 29 - -- 30 .. 39 - , "t30" := T 30 - , "t31" := T 31 - , "t32" := T 32 - , "t33" := T 33 - , "t34" := T 34 - , "t35" := T 35 - , "t36" := T 36 - , "t37" := T 37 - , "t38" := T 38 - , "t39" := T 39 - -- 40 .. 49 - , "t40" := T 40 - , "t41" := T 41 - , "t42" := T 42 - , "t43" := T 43 - , "t44" := T 44 - , "t45" := T 45 - , "t46" := T 46 - , "t47" := T 47 - , "t48" := T 48 - , "t49" := T 49 - -- 50 .. 59 - , "t50" := T 50 - , "t51" := T 51 - , "t52" := T 52 - , "t53" := T 53 - , "t54" := T 54 - , "t55" := T 55 - , "t56" := T 56 - , "t57" := T 57 - , "t58" := T 58 - , "t59" := T 59 - ] - diff --git a/large-records-benchmarks/bench/superrecord/Common/RowOfSize/Row070.hs b/large-records-benchmarks/bench/superrecord/Common/RowOfSize/Row070.hs deleted file mode 100644 index 7f41c737..00000000 --- a/large-records-benchmarks/bench/superrecord/Common/RowOfSize/Row070.hs +++ /dev/null @@ -1,89 +0,0 @@ -{-# LANGUAGE DataKinds #-} -{-# LANGUAGE TypeOperators #-} - -module Common.RowOfSize.Row070 (ExampleRow) where - -import SuperRecord - -import Bench.Types - -type ExampleRow = [ - -- 00 .. 09 - "t00" := T 00 - , "t01" := T 01 - , "t02" := T 02 - , "t03" := T 03 - , "t04" := T 04 - , "t05" := T 05 - , "t06" := T 06 - , "t07" := T 07 - , "t08" := T 08 - , "t09" := T 09 - -- 10 .. 19 - , "t10" := T 10 - , "t11" := T 11 - , "t12" := T 12 - , "t13" := T 13 - , "t14" := T 14 - , "t15" := T 15 - , "t16" := T 16 - , "t17" := T 17 - , "t18" := T 18 - , "t19" := T 19 - -- 20 .. 29 - , "t20" := T 20 - , "t21" := T 21 - , "t22" := T 22 - , "t23" := T 23 - , "t24" := T 24 - , "t25" := T 25 - , "t26" := T 26 - , "t27" := T 27 - , "t28" := T 28 - , "t29" := T 29 - -- 30 .. 39 - , "t30" := T 30 - , "t31" := T 31 - , "t32" := T 32 - , "t33" := T 33 - , "t34" := T 34 - , "t35" := T 35 - , "t36" := T 36 - , "t37" := T 37 - , "t38" := T 38 - , "t39" := T 39 - -- 40 .. 49 - , "t40" := T 40 - , "t41" := T 41 - , "t42" := T 42 - , "t43" := T 43 - , "t44" := T 44 - , "t45" := T 45 - , "t46" := T 46 - , "t47" := T 47 - , "t48" := T 48 - , "t49" := T 49 - -- 50 .. 59 - , "t50" := T 50 - , "t51" := T 51 - , "t52" := T 52 - , "t53" := T 53 - , "t54" := T 54 - , "t55" := T 55 - , "t56" := T 56 - , "t57" := T 57 - , "t58" := T 58 - , "t59" := T 59 - -- 60 .. 69 - , "t60" := T 60 - , "t61" := T 61 - , "t62" := T 62 - , "t63" := T 63 - , "t64" := T 64 - , "t65" := T 65 - , "t66" := T 66 - , "t67" := T 67 - , "t68" := T 68 - , "t69" := T 69 - ] - diff --git a/large-records-benchmarks/bench/superrecord/Common/RowOfSize/Row080.hs b/large-records-benchmarks/bench/superrecord/Common/RowOfSize/Row080.hs deleted file mode 100644 index e11ad5ee..00000000 --- a/large-records-benchmarks/bench/superrecord/Common/RowOfSize/Row080.hs +++ /dev/null @@ -1,100 +0,0 @@ -{-# LANGUAGE DataKinds #-} -{-# LANGUAGE TypeOperators #-} - -module Common.RowOfSize.Row080 (ExampleRow) where - -import SuperRecord - -import Bench.Types - -type ExampleRow = [ - -- 00 .. 09 - "t00" := T 00 - , "t01" := T 01 - , "t02" := T 02 - , "t03" := T 03 - , "t04" := T 04 - , "t05" := T 05 - , "t06" := T 06 - , "t07" := T 07 - , "t08" := T 08 - , "t09" := T 09 - -- 10 .. 19 - , "t10" := T 10 - , "t11" := T 11 - , "t12" := T 12 - , "t13" := T 13 - , "t14" := T 14 - , "t15" := T 15 - , "t16" := T 16 - , "t17" := T 17 - , "t18" := T 18 - , "t19" := T 19 - -- 20 .. 29 - , "t20" := T 20 - , "t21" := T 21 - , "t22" := T 22 - , "t23" := T 23 - , "t24" := T 24 - , "t25" := T 25 - , "t26" := T 26 - , "t27" := T 27 - , "t28" := T 28 - , "t29" := T 29 - -- 30 .. 39 - , "t30" := T 30 - , "t31" := T 31 - , "t32" := T 32 - , "t33" := T 33 - , "t34" := T 34 - , "t35" := T 35 - , "t36" := T 36 - , "t37" := T 37 - , "t38" := T 38 - , "t39" := T 39 - -- 40 .. 49 - , "t40" := T 40 - , "t41" := T 41 - , "t42" := T 42 - , "t43" := T 43 - , "t44" := T 44 - , "t45" := T 45 - , "t46" := T 46 - , "t47" := T 47 - , "t48" := T 48 - , "t49" := T 49 - -- 50 .. 59 - , "t50" := T 50 - , "t51" := T 51 - , "t52" := T 52 - , "t53" := T 53 - , "t54" := T 54 - , "t55" := T 55 - , "t56" := T 56 - , "t57" := T 57 - , "t58" := T 58 - , "t59" := T 59 - -- 60 .. 69 - , "t60" := T 60 - , "t61" := T 61 - , "t62" := T 62 - , "t63" := T 63 - , "t64" := T 64 - , "t65" := T 65 - , "t66" := T 66 - , "t67" := T 67 - , "t68" := T 68 - , "t69" := T 69 - -- 70 .. 79 - , "t70" := T 70 - , "t71" := T 71 - , "t72" := T 72 - , "t73" := T 73 - , "t74" := T 74 - , "t75" := T 75 - , "t76" := T 76 - , "t77" := T 77 - , "t78" := T 78 - , "t79" := T 79 - ] - diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_Construct/Sized/R000.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_Construct/Sized/R000.hs deleted file mode 100644 index dcf7451f..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_Construct/Sized/R000.hs +++ /dev/null @@ -1,8 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -module Experiment.SR_Construct.Sized.R000 where diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_Construct/Sized/R010.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_Construct/Sized/R010.hs deleted file mode 100644 index 8706767c..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_Construct/Sized/R010.hs +++ /dev/null @@ -1,30 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif -{-# LANGUAGE OverloadedLabels #-} - -module Experiment.SR_Construct.Sized.R010 where - -import SuperRecord (Rec, (:=)(..)) -import qualified SuperRecord as SR - -import Bench.Types -import Common.RowOfSize.Row010 (ExampleRow) - -record :: Word -> Rec ExampleRow -record x = - -- 00 .. 09 - SR.rcons (#t00 := MkT x) - $ SR.rcons (#t01 := MkT x) - $ SR.rcons (#t02 := MkT x) - $ SR.rcons (#t03 := MkT x) - $ SR.rcons (#t04 := MkT x) - $ SR.rcons (#t05 := MkT x) - $ SR.rcons (#t06 := MkT x) - $ SR.rcons (#t07 := MkT x) - $ SR.rcons (#t08 := MkT x) - $ SR.rcons (#t09 := MkT x) - $ SR.rnil diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_Construct/Sized/R020.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_Construct/Sized/R020.hs deleted file mode 100644 index 9657352d..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_Construct/Sized/R020.hs +++ /dev/null @@ -1,41 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif -{-# LANGUAGE OverloadedLabels #-} - -module Experiment.SR_Construct.Sized.R020 where - -import SuperRecord (Rec, (:=)(..)) -import qualified SuperRecord as SR - -import Bench.Types -import Common.RowOfSize.Row020 (ExampleRow) - -record :: Word -> Rec ExampleRow -record x = - -- 00 .. 09 - SR.rcons (#t00 := MkT x) - $ SR.rcons (#t01 := MkT x) - $ SR.rcons (#t02 := MkT x) - $ SR.rcons (#t03 := MkT x) - $ SR.rcons (#t04 := MkT x) - $ SR.rcons (#t05 := MkT x) - $ SR.rcons (#t06 := MkT x) - $ SR.rcons (#t07 := MkT x) - $ SR.rcons (#t08 := MkT x) - $ SR.rcons (#t09 := MkT x) - -- 10 .. 19 - $ SR.rcons (#t10 := MkT x) - $ SR.rcons (#t11 := MkT x) - $ SR.rcons (#t12 := MkT x) - $ SR.rcons (#t13 := MkT x) - $ SR.rcons (#t14 := MkT x) - $ SR.rcons (#t15 := MkT x) - $ SR.rcons (#t16 := MkT x) - $ SR.rcons (#t17 := MkT x) - $ SR.rcons (#t18 := MkT x) - $ SR.rcons (#t19 := MkT x) - $ SR.rnil diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_Construct/Sized/R030.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_Construct/Sized/R030.hs deleted file mode 100644 index 503601bb..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_Construct/Sized/R030.hs +++ /dev/null @@ -1,52 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif -{-# LANGUAGE OverloadedLabels #-} - -module Experiment.SR_Construct.Sized.R030 where - -import SuperRecord (Rec, (:=)(..)) -import qualified SuperRecord as SR - -import Bench.Types -import Common.RowOfSize.Row030 (ExampleRow) - -record :: Word -> Rec ExampleRow -record x = - -- 00 .. 09 - SR.rcons (#t00 := MkT x) - $ SR.rcons (#t01 := MkT x) - $ SR.rcons (#t02 := MkT x) - $ SR.rcons (#t03 := MkT x) - $ SR.rcons (#t04 := MkT x) - $ SR.rcons (#t05 := MkT x) - $ SR.rcons (#t06 := MkT x) - $ SR.rcons (#t07 := MkT x) - $ SR.rcons (#t08 := MkT x) - $ SR.rcons (#t09 := MkT x) - -- 10 .. 19 - $ SR.rcons (#t10 := MkT x) - $ SR.rcons (#t11 := MkT x) - $ SR.rcons (#t12 := MkT x) - $ SR.rcons (#t13 := MkT x) - $ SR.rcons (#t14 := MkT x) - $ SR.rcons (#t15 := MkT x) - $ SR.rcons (#t16 := MkT x) - $ SR.rcons (#t17 := MkT x) - $ SR.rcons (#t18 := MkT x) - $ SR.rcons (#t19 := MkT x) - -- 20 .. 29 - $ SR.rcons (#t20 := MkT x) - $ SR.rcons (#t21 := MkT x) - $ SR.rcons (#t22 := MkT x) - $ SR.rcons (#t23 := MkT x) - $ SR.rcons (#t24 := MkT x) - $ SR.rcons (#t25 := MkT x) - $ SR.rcons (#t26 := MkT x) - $ SR.rcons (#t27 := MkT x) - $ SR.rcons (#t28 := MkT x) - $ SR.rcons (#t29 := MkT x) - $ SR.rnil diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_Construct/Sized/R040.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_Construct/Sized/R040.hs deleted file mode 100644 index 394ad5d6..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_Construct/Sized/R040.hs +++ /dev/null @@ -1,63 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif -{-# LANGUAGE OverloadedLabels #-} - -module Experiment.SR_Construct.Sized.R040 where - -import SuperRecord (Rec, (:=)(..)) -import qualified SuperRecord as SR - -import Bench.Types -import Common.RowOfSize.Row040 (ExampleRow) - -record :: Word -> Rec ExampleRow -record x = - -- 00 .. 09 - SR.rcons (#t00 := MkT x) - $ SR.rcons (#t01 := MkT x) - $ SR.rcons (#t02 := MkT x) - $ SR.rcons (#t03 := MkT x) - $ SR.rcons (#t04 := MkT x) - $ SR.rcons (#t05 := MkT x) - $ SR.rcons (#t06 := MkT x) - $ SR.rcons (#t07 := MkT x) - $ SR.rcons (#t08 := MkT x) - $ SR.rcons (#t09 := MkT x) - -- 10 .. 19 - $ SR.rcons (#t10 := MkT x) - $ SR.rcons (#t11 := MkT x) - $ SR.rcons (#t12 := MkT x) - $ SR.rcons (#t13 := MkT x) - $ SR.rcons (#t14 := MkT x) - $ SR.rcons (#t15 := MkT x) - $ SR.rcons (#t16 := MkT x) - $ SR.rcons (#t17 := MkT x) - $ SR.rcons (#t18 := MkT x) - $ SR.rcons (#t19 := MkT x) - -- 20 .. 29 - $ SR.rcons (#t20 := MkT x) - $ SR.rcons (#t21 := MkT x) - $ SR.rcons (#t22 := MkT x) - $ SR.rcons (#t23 := MkT x) - $ SR.rcons (#t24 := MkT x) - $ SR.rcons (#t25 := MkT x) - $ SR.rcons (#t26 := MkT x) - $ SR.rcons (#t27 := MkT x) - $ SR.rcons (#t28 := MkT x) - $ SR.rcons (#t29 := MkT x) - -- 30 .. 39 - $ SR.rcons (#t30 := MkT x) - $ SR.rcons (#t31 := MkT x) - $ SR.rcons (#t32 := MkT x) - $ SR.rcons (#t33 := MkT x) - $ SR.rcons (#t34 := MkT x) - $ SR.rcons (#t35 := MkT x) - $ SR.rcons (#t36 := MkT x) - $ SR.rcons (#t37 := MkT x) - $ SR.rcons (#t38 := MkT x) - $ SR.rcons (#t39 := MkT x) - $ SR.rnil diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R000.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R000.hs deleted file mode 100644 index 9d504346..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R000.hs +++ /dev/null @@ -1,8 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -module Experiment.SR_GetEvens.Sized.R000 where diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R010.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R010.hs deleted file mode 100644 index f1c66eb0..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R010.hs +++ /dev/null @@ -1,27 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -{-# LANGUAGE OverloadedLabels #-} - -module Experiment.SR_GetEvens.Sized.R010 where - -import SuperRecord (Rec) -import qualified SuperRecord as SR - -import Bench.EvensOfSize.Evens010 -import Common.RowOfSize.Row010 - -getEvens :: Rec ExampleRow -> Evens -getEvens r = Evens { - -- 00 .. 09 - evens00 = SR.get #t00 r - , evens02 = SR.get #t02 r - , evens04 = SR.get #t04 r - , evens06 = SR.get #t06 r - , evens08 = SR.get #t08 r - } - diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R020.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R020.hs deleted file mode 100644 index 625cd3f9..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R020.hs +++ /dev/null @@ -1,33 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -{-# LANGUAGE OverloadedLabels #-} - -module Experiment.SR_GetEvens.Sized.R020 where - -import SuperRecord (Rec) -import qualified SuperRecord as SR - -import Bench.EvensOfSize.Evens020 -import Common.RowOfSize.Row020 - -getEvens :: Rec ExampleRow -> Evens -getEvens r = Evens { - -- 00 .. 09 - evens00 = SR.get #t00 r - , evens02 = SR.get #t02 r - , evens04 = SR.get #t04 r - , evens06 = SR.get #t06 r - , evens08 = SR.get #t08 r - -- 10 .. 19 - , evens10 = SR.get #t10 r - , evens12 = SR.get #t12 r - , evens14 = SR.get #t14 r - , evens16 = SR.get #t16 r - , evens18 = SR.get #t18 r - } - diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R030.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R030.hs deleted file mode 100644 index 2994db07..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R030.hs +++ /dev/null @@ -1,39 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -{-# LANGUAGE OverloadedLabels #-} - -module Experiment.SR_GetEvens.Sized.R030 where - -import SuperRecord (Rec) -import qualified SuperRecord as SR - -import Bench.EvensOfSize.Evens030 -import Common.RowOfSize.Row030 - -getEvens :: Rec ExampleRow -> Evens -getEvens r = Evens { - -- 00 .. 09 - evens00 = SR.get #t00 r - , evens02 = SR.get #t02 r - , evens04 = SR.get #t04 r - , evens06 = SR.get #t06 r - , evens08 = SR.get #t08 r - -- 10 .. 19 - , evens10 = SR.get #t10 r - , evens12 = SR.get #t12 r - , evens14 = SR.get #t14 r - , evens16 = SR.get #t16 r - , evens18 = SR.get #t18 r - -- 20 .. 29 - , evens20 = SR.get #t20 r - , evens22 = SR.get #t22 r - , evens24 = SR.get #t24 r - , evens26 = SR.get #t26 r - , evens28 = SR.get #t28 r - } - diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R040.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R040.hs deleted file mode 100644 index 56f85fef..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R040.hs +++ /dev/null @@ -1,45 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -{-# LANGUAGE OverloadedLabels #-} - -module Experiment.SR_GetEvens.Sized.R040 where - -import SuperRecord (Rec) -import qualified SuperRecord as SR - -import Bench.EvensOfSize.Evens040 -import Common.RowOfSize.Row040 - -getEvens :: Rec ExampleRow -> Evens -getEvens r = Evens { - -- 00 .. 09 - evens00 = SR.get #t00 r - , evens02 = SR.get #t02 r - , evens04 = SR.get #t04 r - , evens06 = SR.get #t06 r - , evens08 = SR.get #t08 r - -- 10 .. 19 - , evens10 = SR.get #t10 r - , evens12 = SR.get #t12 r - , evens14 = SR.get #t14 r - , evens16 = SR.get #t16 r - , evens18 = SR.get #t18 r - -- 20 .. 29 - , evens20 = SR.get #t20 r - , evens22 = SR.get #t22 r - , evens24 = SR.get #t24 r - , evens26 = SR.get #t26 r - , evens28 = SR.get #t28 r - -- 30 .. 39 - , evens30 = SR.get #t30 r - , evens32 = SR.get #t32 r - , evens34 = SR.get #t34 r - , evens36 = SR.get #t36 r - , evens38 = SR.get #t38 r - } - diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R050.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R050.hs deleted file mode 100644 index 2261012a..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R050.hs +++ /dev/null @@ -1,51 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -{-# LANGUAGE OverloadedLabels #-} - -module Experiment.SR_GetEvens.Sized.R050 where - -import SuperRecord (Rec) -import qualified SuperRecord as SR - -import Bench.EvensOfSize.Evens050 -import Common.RowOfSize.Row050 - -getEvens :: Rec ExampleRow -> Evens -getEvens r = Evens { - -- 00 .. 09 - evens00 = SR.get #t00 r - , evens02 = SR.get #t02 r - , evens04 = SR.get #t04 r - , evens06 = SR.get #t06 r - , evens08 = SR.get #t08 r - -- 10 .. 19 - , evens10 = SR.get #t10 r - , evens12 = SR.get #t12 r - , evens14 = SR.get #t14 r - , evens16 = SR.get #t16 r - , evens18 = SR.get #t18 r - -- 20 .. 29 - , evens20 = SR.get #t20 r - , evens22 = SR.get #t22 r - , evens24 = SR.get #t24 r - , evens26 = SR.get #t26 r - , evens28 = SR.get #t28 r - -- 30 .. 39 - , evens30 = SR.get #t30 r - , evens32 = SR.get #t32 r - , evens34 = SR.get #t34 r - , evens36 = SR.get #t36 r - , evens38 = SR.get #t38 r - -- 40 .. 49 - , evens40 = SR.get #t40 r - , evens42 = SR.get #t42 r - , evens44 = SR.get #t44 r - , evens46 = SR.get #t46 r - , evens48 = SR.get #t48 r - } - diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R060.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R060.hs deleted file mode 100644 index 8e238848..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R060.hs +++ /dev/null @@ -1,57 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -{-# LANGUAGE OverloadedLabels #-} - -module Experiment.SR_GetEvens.Sized.R060 where - -import SuperRecord (Rec) -import qualified SuperRecord as SR - -import Bench.EvensOfSize.Evens060 -import Common.RowOfSize.Row060 - -getEvens :: Rec ExampleRow -> Evens -getEvens r = Evens { - -- 00 .. 09 - evens00 = SR.get #t00 r - , evens02 = SR.get #t02 r - , evens04 = SR.get #t04 r - , evens06 = SR.get #t06 r - , evens08 = SR.get #t08 r - -- 10 .. 19 - , evens10 = SR.get #t10 r - , evens12 = SR.get #t12 r - , evens14 = SR.get #t14 r - , evens16 = SR.get #t16 r - , evens18 = SR.get #t18 r - -- 20 .. 29 - , evens20 = SR.get #t20 r - , evens22 = SR.get #t22 r - , evens24 = SR.get #t24 r - , evens26 = SR.get #t26 r - , evens28 = SR.get #t28 r - -- 30 .. 39 - , evens30 = SR.get #t30 r - , evens32 = SR.get #t32 r - , evens34 = SR.get #t34 r - , evens36 = SR.get #t36 r - , evens38 = SR.get #t38 r - -- 40 .. 49 - , evens40 = SR.get #t40 r - , evens42 = SR.get #t42 r - , evens44 = SR.get #t44 r - , evens46 = SR.get #t46 r - , evens48 = SR.get #t48 r - -- 50 .. 59 - , evens50 = SR.get #t50 r - , evens52 = SR.get #t52 r - , evens54 = SR.get #t54 r - , evens56 = SR.get #t56 r - , evens58 = SR.get #t58 r - } - diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R070.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R070.hs deleted file mode 100644 index e9061f82..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R070.hs +++ /dev/null @@ -1,63 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -{-# LANGUAGE OverloadedLabels #-} - -module Experiment.SR_GetEvens.Sized.R070 where - -import SuperRecord (Rec) -import qualified SuperRecord as SR - -import Bench.EvensOfSize.Evens070 -import Common.RowOfSize.Row070 - -getEvens :: Rec ExampleRow -> Evens -getEvens r = Evens { - -- 00 .. 09 - evens00 = SR.get #t00 r - , evens02 = SR.get #t02 r - , evens04 = SR.get #t04 r - , evens06 = SR.get #t06 r - , evens08 = SR.get #t08 r - -- 10 .. 19 - , evens10 = SR.get #t10 r - , evens12 = SR.get #t12 r - , evens14 = SR.get #t14 r - , evens16 = SR.get #t16 r - , evens18 = SR.get #t18 r - -- 20 .. 29 - , evens20 = SR.get #t20 r - , evens22 = SR.get #t22 r - , evens24 = SR.get #t24 r - , evens26 = SR.get #t26 r - , evens28 = SR.get #t28 r - -- 30 .. 39 - , evens30 = SR.get #t30 r - , evens32 = SR.get #t32 r - , evens34 = SR.get #t34 r - , evens36 = SR.get #t36 r - , evens38 = SR.get #t38 r - -- 40 .. 49 - , evens40 = SR.get #t40 r - , evens42 = SR.get #t42 r - , evens44 = SR.get #t44 r - , evens46 = SR.get #t46 r - , evens48 = SR.get #t48 r - -- 50 .. 59 - , evens50 = SR.get #t50 r - , evens52 = SR.get #t52 r - , evens54 = SR.get #t54 r - , evens56 = SR.get #t56 r - , evens58 = SR.get #t58 r - -- 60 .. 69 - , evens60 = SR.get #t60 r - , evens62 = SR.get #t62 r - , evens64 = SR.get #t64 r - , evens66 = SR.get #t66 r - , evens68 = SR.get #t68 r - } - diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R080.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R080.hs deleted file mode 100644 index f8d6f8b7..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_GetEvens/Sized/R080.hs +++ /dev/null @@ -1,69 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -{-# LANGUAGE OverloadedLabels #-} - -module Experiment.SR_GetEvens.Sized.R080 where - -import SuperRecord (Rec) -import qualified SuperRecord as SR - -import Bench.EvensOfSize.Evens080 -import Common.RowOfSize.Row080 - -getEvens :: Rec ExampleRow -> Evens -getEvens r = Evens { - -- 00 .. 09 - evens00 = SR.get #t00 r - , evens02 = SR.get #t02 r - , evens04 = SR.get #t04 r - , evens06 = SR.get #t06 r - , evens08 = SR.get #t08 r - -- 10 .. 19 - , evens10 = SR.get #t10 r - , evens12 = SR.get #t12 r - , evens14 = SR.get #t14 r - , evens16 = SR.get #t16 r - , evens18 = SR.get #t18 r - -- 20 .. 29 - , evens20 = SR.get #t20 r - , evens22 = SR.get #t22 r - , evens24 = SR.get #t24 r - , evens26 = SR.get #t26 r - , evens28 = SR.get #t28 r - -- 30 .. 39 - , evens30 = SR.get #t30 r - , evens32 = SR.get #t32 r - , evens34 = SR.get #t34 r - , evens36 = SR.get #t36 r - , evens38 = SR.get #t38 r - -- 40 .. 49 - , evens40 = SR.get #t40 r - , evens42 = SR.get #t42 r - , evens44 = SR.get #t44 r - , evens46 = SR.get #t46 r - , evens48 = SR.get #t48 r - -- 50 .. 59 - , evens50 = SR.get #t50 r - , evens52 = SR.get #t52 r - , evens54 = SR.get #t54 r - , evens56 = SR.get #t56 r - , evens58 = SR.get #t58 r - -- 60 .. 69 - , evens60 = SR.get #t60 r - , evens62 = SR.get #t62 r - , evens64 = SR.get #t64 r - , evens66 = SR.get #t66 r - , evens68 = SR.get #t68 r - -- 70 .. 79 - , evens70 = SR.get #t70 r - , evens72 = SR.get #t72 r - , evens74 = SR.get #t74 r - , evens76 = SR.get #t76 r - , evens78 = SR.get #t78 r - } - diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_ParseJSON/Sized/R000.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_ParseJSON/Sized/R000.hs deleted file mode 100644 index f7bdf5ae..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_ParseJSON/Sized/R000.hs +++ /dev/null @@ -1,8 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -module Experiment.SR_ParseJSON.Sized.R000 where diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_ParseJSON/Sized/R010.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_ParseJSON/Sized/R010.hs deleted file mode 100644 index 5b52689d..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_ParseJSON/Sized/R010.hs +++ /dev/null @@ -1,19 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -module Experiment.SR_ParseJSON.Sized.R010 where - -import Data.Aeson -import Data.Aeson.Types (parseMaybe) -import Data.Maybe (fromJust) -import SuperRecord (Rec, recJsonParser) - -import Common.RowOfSize.Row010 - -recFromJSON :: Value -> Rec ExampleRow -recFromJSON = fromJust . parseMaybe recJsonParser - diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_ParseJSON/Sized/R020.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_ParseJSON/Sized/R020.hs deleted file mode 100644 index a6a39479..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_ParseJSON/Sized/R020.hs +++ /dev/null @@ -1,19 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -module Experiment.SR_ParseJSON.Sized.R020 where - -import Data.Aeson -import Data.Aeson.Types (parseMaybe) -import Data.Maybe (fromJust) -import SuperRecord (Rec, recJsonParser) - -import Common.RowOfSize.Row020 - -recFromJSON :: Value -> Rec ExampleRow -recFromJSON = fromJust . parseMaybe recJsonParser - diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_ParseJSON/Sized/R030.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_ParseJSON/Sized/R030.hs deleted file mode 100644 index 5327ae6c..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_ParseJSON/Sized/R030.hs +++ /dev/null @@ -1,19 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -module Experiment.SR_ParseJSON.Sized.R030 where - -import Data.Aeson -import Data.Aeson.Types (parseMaybe) -import Data.Maybe (fromJust) -import SuperRecord (Rec, recJsonParser) - -import Common.RowOfSize.Row030 - -recFromJSON :: Value -> Rec ExampleRow -recFromJSON = fromJust . parseMaybe recJsonParser - diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_ParseJSON/Sized/R040.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_ParseJSON/Sized/R040.hs deleted file mode 100644 index d32b994e..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_ParseJSON/Sized/R040.hs +++ /dev/null @@ -1,19 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -module Experiment.SR_ParseJSON.Sized.R040 where - -import Data.Aeson -import Data.Aeson.Types (parseMaybe) -import Data.Maybe (fromJust) -import SuperRecord (Rec, recJsonParser) - -import Common.RowOfSize.Row040 - -recFromJSON :: Value -> Rec ExampleRow -recFromJSON = fromJust . parseMaybe recJsonParser - diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_ParseJSON/Sized/R050.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_ParseJSON/Sized/R050.hs deleted file mode 100644 index 0f395aba..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_ParseJSON/Sized/R050.hs +++ /dev/null @@ -1,19 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -module Experiment.SR_ParseJSON.Sized.R050 where - -import Data.Aeson -import Data.Aeson.Types (parseMaybe) -import Data.Maybe (fromJust) -import SuperRecord (Rec, recJsonParser) - -import Common.RowOfSize.Row050 - -recFromJSON :: Value -> Rec ExampleRow -recFromJSON = fromJust . parseMaybe recJsonParser - diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_ParseJSON/Sized/R060.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_ParseJSON/Sized/R060.hs deleted file mode 100644 index ca17891f..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_ParseJSON/Sized/R060.hs +++ /dev/null @@ -1,19 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -module Experiment.SR_ParseJSON.Sized.R060 where - -import Data.Aeson -import Data.Aeson.Types (parseMaybe) -import Data.Maybe (fromJust) -import SuperRecord (Rec, recJsonParser) - -import Common.RowOfSize.Row060 - -recFromJSON :: Value -> Rec ExampleRow -recFromJSON = fromJust . parseMaybe recJsonParser - diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_ParseJSON/Sized/R070.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_ParseJSON/Sized/R070.hs deleted file mode 100644 index a42b5f05..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_ParseJSON/Sized/R070.hs +++ /dev/null @@ -1,19 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -module Experiment.SR_ParseJSON.Sized.R070 where - -import Data.Aeson -import Data.Aeson.Types (parseMaybe) -import Data.Maybe (fromJust) -import SuperRecord (Rec, recJsonParser) - -import Common.RowOfSize.Row070 - -recFromJSON :: Value -> Rec ExampleRow -recFromJSON = fromJust . parseMaybe recJsonParser - diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_ParseJSON/Sized/R080.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_ParseJSON/Sized/R080.hs deleted file mode 100644 index e4268d0d..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_ParseJSON/Sized/R080.hs +++ /dev/null @@ -1,19 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -module Experiment.SR_ParseJSON.Sized.R080 where - -import Data.Aeson -import Data.Aeson.Types (parseMaybe) -import Data.Maybe (fromJust) -import SuperRecord (Rec, recJsonParser) - -import Common.RowOfSize.Row080 - -recFromJSON :: Value -> Rec ExampleRow -recFromJSON = fromJust . parseMaybe recJsonParser - diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R000.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R000.hs deleted file mode 100644 index 392ff717..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R000.hs +++ /dev/null @@ -1,8 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -module Experiment.SR_SetEvens.Sized.R000 where \ No newline at end of file diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R010.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R010.hs deleted file mode 100644 index 41a9696c..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R010.hs +++ /dev/null @@ -1,27 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -{-# LANGUAGE OverloadedLabels #-} -{-# LANGUAGE RecordWildCards #-} - -module Experiment.SR_SetEvens.Sized.R010 where - -import SuperRecord (Rec) -import qualified SuperRecord as SR - -import Bench.EvensOfSize.Evens010 -import Common.RowOfSize.Row010 - -setEvens :: Evens -> Rec ExampleRow -> Rec ExampleRow -setEvens Evens{..} r = - -- 00 .. 09 - SR.set #t00 evens00 - . SR.set #t02 evens02 - . SR.set #t04 evens04 - . SR.set #t06 evens06 - . SR.set #t08 evens08 - $ r diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R020.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R020.hs deleted file mode 100644 index 74b249fa..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R020.hs +++ /dev/null @@ -1,33 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -{-# LANGUAGE OverloadedLabels #-} -{-# LANGUAGE RecordWildCards #-} - -module Experiment.SR_SetEvens.Sized.R020 where - -import SuperRecord (Rec) -import qualified SuperRecord as SR - -import Bench.EvensOfSize.Evens020 -import Common.RowOfSize.Row020 - -setEvens :: Evens -> Rec ExampleRow -> Rec ExampleRow -setEvens Evens{..} r = - -- 00 .. 09 - SR.set #t00 evens00 - . SR.set #t02 evens02 - . SR.set #t04 evens04 - . SR.set #t06 evens06 - . SR.set #t08 evens08 - -- 10 .. 19 - . SR.set #t10 evens10 - . SR.set #t12 evens12 - . SR.set #t14 evens14 - . SR.set #t16 evens16 - . SR.set #t18 evens18 - $ r diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R030.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R030.hs deleted file mode 100644 index 931489ec..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R030.hs +++ /dev/null @@ -1,39 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -{-# LANGUAGE OverloadedLabels #-} -{-# LANGUAGE RecordWildCards #-} - -module Experiment.SR_SetEvens.Sized.R030 where - -import SuperRecord (Rec) -import qualified SuperRecord as SR - -import Bench.EvensOfSize.Evens030 -import Common.RowOfSize.Row030 - -setEvens :: Evens -> Rec ExampleRow -> Rec ExampleRow -setEvens Evens{..} r = - -- 00 .. 09 - SR.set #t00 evens00 - . SR.set #t02 evens02 - . SR.set #t04 evens04 - . SR.set #t06 evens06 - . SR.set #t08 evens08 - -- 10 .. 19 - . SR.set #t10 evens10 - . SR.set #t12 evens12 - . SR.set #t14 evens14 - . SR.set #t16 evens16 - . SR.set #t18 evens18 - -- 20 .. 29 - . SR.set #t20 evens20 - . SR.set #t22 evens22 - . SR.set #t24 evens24 - . SR.set #t26 evens26 - . SR.set #t28 evens28 - $ r diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R040.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R040.hs deleted file mode 100644 index 0f144ff2..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R040.hs +++ /dev/null @@ -1,45 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -{-# LANGUAGE OverloadedLabels #-} -{-# LANGUAGE RecordWildCards #-} - -module Experiment.SR_SetEvens.Sized.R040 where - -import SuperRecord (Rec) -import qualified SuperRecord as SR - -import Bench.EvensOfSize.Evens040 -import Common.RowOfSize.Row040 - -setEvens :: Evens -> Rec ExampleRow -> Rec ExampleRow -setEvens Evens{..} r = - -- 00 .. 09 - SR.set #t00 evens00 - . SR.set #t02 evens02 - . SR.set #t04 evens04 - . SR.set #t06 evens06 - . SR.set #t08 evens08 - -- 10 .. 19 - . SR.set #t10 evens10 - . SR.set #t12 evens12 - . SR.set #t14 evens14 - . SR.set #t16 evens16 - . SR.set #t18 evens18 - -- 20 .. 29 - . SR.set #t20 evens20 - . SR.set #t22 evens22 - . SR.set #t24 evens24 - . SR.set #t26 evens26 - . SR.set #t28 evens28 - -- 30 .. 39 - . SR.set #t30 evens30 - . SR.set #t32 evens32 - . SR.set #t34 evens34 - . SR.set #t36 evens36 - . SR.set #t38 evens38 - $ r diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R050.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R050.hs deleted file mode 100644 index 41caf175..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R050.hs +++ /dev/null @@ -1,51 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -{-# LANGUAGE OverloadedLabels #-} -{-# LANGUAGE RecordWildCards #-} - -module Experiment.SR_SetEvens.Sized.R050 where - -import SuperRecord (Rec) -import qualified SuperRecord as SR - -import Bench.EvensOfSize.Evens050 -import Common.RowOfSize.Row050 - -setEvens :: Evens -> Rec ExampleRow -> Rec ExampleRow -setEvens Evens{..} r = - -- 00 .. 09 - SR.set #t00 evens00 - . SR.set #t02 evens02 - . SR.set #t04 evens04 - . SR.set #t06 evens06 - . SR.set #t08 evens08 - -- 10 .. 19 - . SR.set #t10 evens10 - . SR.set #t12 evens12 - . SR.set #t14 evens14 - . SR.set #t16 evens16 - . SR.set #t18 evens18 - -- 20 .. 29 - . SR.set #t20 evens20 - . SR.set #t22 evens22 - . SR.set #t24 evens24 - . SR.set #t26 evens26 - . SR.set #t28 evens28 - -- 30 .. 39 - . SR.set #t30 evens30 - . SR.set #t32 evens32 - . SR.set #t34 evens34 - . SR.set #t36 evens36 - . SR.set #t38 evens38 - -- 40 .. 49 - . SR.set #t40 evens40 - . SR.set #t42 evens42 - . SR.set #t44 evens44 - . SR.set #t46 evens46 - . SR.set #t48 evens48 - $ r diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R060.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R060.hs deleted file mode 100644 index 9af036ac..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R060.hs +++ /dev/null @@ -1,57 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -{-# LANGUAGE OverloadedLabels #-} -{-# LANGUAGE RecordWildCards #-} - -module Experiment.SR_SetEvens.Sized.R060 where - -import SuperRecord (Rec) -import qualified SuperRecord as SR - -import Bench.EvensOfSize.Evens060 -import Common.RowOfSize.Row060 - -setEvens :: Evens -> Rec ExampleRow -> Rec ExampleRow -setEvens Evens{..} r = - -- 00 .. 09 - SR.set #t00 evens00 - . SR.set #t02 evens02 - . SR.set #t04 evens04 - . SR.set #t06 evens06 - . SR.set #t08 evens08 - -- 10 .. 19 - . SR.set #t10 evens10 - . SR.set #t12 evens12 - . SR.set #t14 evens14 - . SR.set #t16 evens16 - . SR.set #t18 evens18 - -- 20 .. 29 - . SR.set #t20 evens20 - . SR.set #t22 evens22 - . SR.set #t24 evens24 - . SR.set #t26 evens26 - . SR.set #t28 evens28 - -- 30 .. 39 - . SR.set #t30 evens30 - . SR.set #t32 evens32 - . SR.set #t34 evens34 - . SR.set #t36 evens36 - . SR.set #t38 evens38 - -- 40 .. 49 - . SR.set #t40 evens40 - . SR.set #t42 evens42 - . SR.set #t44 evens44 - . SR.set #t46 evens46 - . SR.set #t48 evens48 - -- 50 .. 59 - . SR.set #t50 evens50 - . SR.set #t52 evens52 - . SR.set #t54 evens54 - . SR.set #t56 evens56 - . SR.set #t58 evens58 - $ r diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R070.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R070.hs deleted file mode 100644 index 5f481c28..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R070.hs +++ /dev/null @@ -1,63 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -{-# LANGUAGE OverloadedLabels #-} -{-# LANGUAGE RecordWildCards #-} - -module Experiment.SR_SetEvens.Sized.R070 where - -import SuperRecord (Rec) -import qualified SuperRecord as SR - -import Bench.EvensOfSize.Evens070 -import Common.RowOfSize.Row070 - -setEvens :: Evens -> Rec ExampleRow -> Rec ExampleRow -setEvens Evens{..} r = - -- 00 .. 09 - SR.set #t00 evens00 - . SR.set #t02 evens02 - . SR.set #t04 evens04 - . SR.set #t06 evens06 - . SR.set #t08 evens08 - -- 10 .. 19 - . SR.set #t10 evens10 - . SR.set #t12 evens12 - . SR.set #t14 evens14 - . SR.set #t16 evens16 - . SR.set #t18 evens18 - -- 20 .. 29 - . SR.set #t20 evens20 - . SR.set #t22 evens22 - . SR.set #t24 evens24 - . SR.set #t26 evens26 - . SR.set #t28 evens28 - -- 30 .. 39 - . SR.set #t30 evens30 - . SR.set #t32 evens32 - . SR.set #t34 evens34 - . SR.set #t36 evens36 - . SR.set #t38 evens38 - -- 40 .. 49 - . SR.set #t40 evens40 - . SR.set #t42 evens42 - . SR.set #t44 evens44 - . SR.set #t46 evens46 - . SR.set #t48 evens48 - -- 50 .. 59 - . SR.set #t50 evens50 - . SR.set #t52 evens52 - . SR.set #t54 evens54 - . SR.set #t56 evens56 - . SR.set #t58 evens58 - -- 60 .. 69 - . SR.set #t60 evens60 - . SR.set #t62 evens62 - . SR.set #t64 evens64 - . SR.set #t66 evens66 - . SR.set #t68 evens68 - $ r diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R080.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R080.hs deleted file mode 100644 index 0eedc593..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R080.hs +++ /dev/null @@ -1,69 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -{-# LANGUAGE OverloadedLabels #-} -{-# LANGUAGE RecordWildCards #-} - -module Experiment.SR_SetEvens.Sized.R080 where - -import SuperRecord (Rec) -import qualified SuperRecord as SR - -import Bench.EvensOfSize.Evens080 -import Common.RowOfSize.Row080 - -setEvens :: Evens -> Rec ExampleRow -> Rec ExampleRow -setEvens Evens{..} r = - -- 00 .. 09 - SR.set #t00 evens00 - . SR.set #t02 evens02 - . SR.set #t04 evens04 - . SR.set #t06 evens06 - . SR.set #t08 evens08 - -- 10 .. 19 - . SR.set #t10 evens10 - . SR.set #t12 evens12 - . SR.set #t14 evens14 - . SR.set #t16 evens16 - . SR.set #t18 evens18 - -- 20 .. 29 - . SR.set #t20 evens20 - . SR.set #t22 evens22 - . SR.set #t24 evens24 - . SR.set #t26 evens26 - . SR.set #t28 evens28 - -- 30 .. 39 - . SR.set #t30 evens30 - . SR.set #t32 evens32 - . SR.set #t34 evens34 - . SR.set #t36 evens36 - . SR.set #t38 evens38 - -- 40 .. 49 - . SR.set #t40 evens40 - . SR.set #t42 evens42 - . SR.set #t44 evens44 - . SR.set #t46 evens46 - . SR.set #t48 evens48 - -- 50 .. 59 - . SR.set #t50 evens50 - . SR.set #t52 evens52 - . SR.set #t54 evens54 - . SR.set #t56 evens56 - . SR.set #t58 evens58 - -- 60 .. 69 - . SR.set #t60 evens60 - . SR.set #t62 evens62 - . SR.set #t64 evens64 - . SR.set #t66 evens66 - . SR.set #t68 evens68 - -- 70 .. 79 - . SR.set #t70 evens70 - . SR.set #t72 evens72 - . SR.set #t74 evens74 - . SR.set #t76 evens76 - . SR.set #t78 evens78 - $ r diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_ToJSON/Sized/R000.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_ToJSON/Sized/R000.hs deleted file mode 100644 index 8924a5ca..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_ToJSON/Sized/R000.hs +++ /dev/null @@ -1,8 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -module Experiment.SR_ToJSON.Sized.R000 where diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_ToJSON/Sized/R010.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_ToJSON/Sized/R010.hs deleted file mode 100644 index 68034361..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_ToJSON/Sized/R010.hs +++ /dev/null @@ -1,16 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -module Experiment.SR_ToJSON.Sized.R010 where - -import Data.Aeson (Value) -import SuperRecord (Rec, recToValue) - -import Common.RowOfSize.Row010 - -recToJSON :: Rec ExampleRow -> Value -recToJSON = recToValue \ No newline at end of file diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_ToJSON/Sized/R020.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_ToJSON/Sized/R020.hs deleted file mode 100644 index f4095081..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_ToJSON/Sized/R020.hs +++ /dev/null @@ -1,16 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -module Experiment.SR_ToJSON.Sized.R020 where - -import Data.Aeson (Value) -import SuperRecord (Rec, recToValue) - -import Common.RowOfSize.Row020 - -recToJSON :: Rec ExampleRow -> Value -recToJSON = recToValue \ No newline at end of file diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_ToJSON/Sized/R030.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_ToJSON/Sized/R030.hs deleted file mode 100644 index d21f1d67..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_ToJSON/Sized/R030.hs +++ /dev/null @@ -1,16 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -module Experiment.SR_ToJSON.Sized.R030 where - -import Data.Aeson (Value) -import SuperRecord (Rec, recToValue) - -import Common.RowOfSize.Row030 - -recToJSON :: Rec ExampleRow -> Value -recToJSON = recToValue \ No newline at end of file diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_ToJSON/Sized/R040.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_ToJSON/Sized/R040.hs deleted file mode 100644 index 97cc153c..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_ToJSON/Sized/R040.hs +++ /dev/null @@ -1,16 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -module Experiment.SR_ToJSON.Sized.R040 where - -import Data.Aeson (Value) -import SuperRecord (Rec, recToValue) - -import Common.RowOfSize.Row040 - -recToJSON :: Rec ExampleRow -> Value -recToJSON = recToValue \ No newline at end of file diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_ToJSON/Sized/R050.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_ToJSON/Sized/R050.hs deleted file mode 100644 index b8886e8c..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_ToJSON/Sized/R050.hs +++ /dev/null @@ -1,16 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -module Experiment.SR_ToJSON.Sized.R050 where - -import Data.Aeson (Value) -import SuperRecord (Rec, recToValue) - -import Common.RowOfSize.Row050 - -recToJSON :: Rec ExampleRow -> Value -recToJSON = recToValue \ No newline at end of file diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_ToJSON/Sized/R060.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_ToJSON/Sized/R060.hs deleted file mode 100644 index 7eff272a..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_ToJSON/Sized/R060.hs +++ /dev/null @@ -1,16 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -module Experiment.SR_ToJSON.Sized.R060 where - -import Data.Aeson (Value) -import SuperRecord (Rec, recToValue) - -import Common.RowOfSize.Row060 - -recToJSON :: Rec ExampleRow -> Value -recToJSON = recToValue \ No newline at end of file diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_ToJSON/Sized/R070.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_ToJSON/Sized/R070.hs deleted file mode 100644 index 6a1daeb0..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_ToJSON/Sized/R070.hs +++ /dev/null @@ -1,16 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -module Experiment.SR_ToJSON.Sized.R070 where - -import Data.Aeson (Value) -import SuperRecord (Rec, recToValue) - -import Common.RowOfSize.Row070 - -recToJSON :: Rec ExampleRow -> Value -recToJSON = recToValue \ No newline at end of file diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_ToJSON/Sized/R080.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_ToJSON/Sized/R080.hs deleted file mode 100644 index 8b2909ab..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_ToJSON/Sized/R080.hs +++ /dev/null @@ -1,16 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -module Experiment.SR_ToJSON.Sized.R080 where - -import Data.Aeson (Value) -import SuperRecord (Rec, recToValue) - -import Common.RowOfSize.Row080 - -recToJSON :: Rec ExampleRow -> Value -recToJSON = recToValue \ No newline at end of file diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_Unsafe/Sized/R000.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_Unsafe/Sized/R000.hs deleted file mode 100644 index 910618dc..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_Unsafe/Sized/R000.hs +++ /dev/null @@ -1,8 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -module Experiment.SR_Unsafe.Sized.R000 where diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_Unsafe/Sized/R010.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_Unsafe/Sized/R010.hs deleted file mode 100644 index 7ed39ede..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_Unsafe/Sized/R010.hs +++ /dev/null @@ -1,31 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -{-# LANGUAGE OverloadedLabels #-} - -module Experiment.SR_Unsafe.Sized.R010 where - -import SuperRecord (Rec, (:=)(..)) -import qualified SuperRecord as SR - -import Bench.Types -import Common.RowOfSize.Row010 (ExampleRow) - -record :: Word -> Rec ExampleRow -record x = - -- 00 .. 09 - SR.unsafeRCons (#t00 := MkT x) - $ SR.unsafeRCons (#t01 := MkT x) - $ SR.unsafeRCons (#t02 := MkT x) - $ SR.unsafeRCons (#t03 := MkT x) - $ SR.unsafeRCons (#t04 := MkT x) - $ SR.unsafeRCons (#t05 := MkT x) - $ SR.unsafeRCons (#t06 := MkT x) - $ SR.unsafeRCons (#t07 := MkT x) - $ SR.unsafeRCons (#t08 := MkT x) - $ SR.unsafeRCons (#t09 := MkT x) - $ SR.unsafeRNil 10 diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_Unsafe/Sized/R020.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_Unsafe/Sized/R020.hs deleted file mode 100644 index ea2c93a5..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_Unsafe/Sized/R020.hs +++ /dev/null @@ -1,41 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif -{-# LANGUAGE OverloadedLabels #-} - -module Experiment.SR_Unsafe.Sized.R020 where - -import SuperRecord (Rec, (:=)(..)) -import qualified SuperRecord as SR - -import Bench.Types -import Common.RowOfSize.Row020 (ExampleRow) - -record :: Word -> Rec ExampleRow -record x = - -- 00 .. 09 - SR.unsafeRCons (#t00 := MkT x) - $ SR.unsafeRCons (#t01 := MkT x) - $ SR.unsafeRCons (#t02 := MkT x) - $ SR.unsafeRCons (#t03 := MkT x) - $ SR.unsafeRCons (#t04 := MkT x) - $ SR.unsafeRCons (#t05 := MkT x) - $ SR.unsafeRCons (#t06 := MkT x) - $ SR.unsafeRCons (#t07 := MkT x) - $ SR.unsafeRCons (#t08 := MkT x) - $ SR.unsafeRCons (#t09 := MkT x) - -- 10 .. 19 - $ SR.unsafeRCons (#t10 := MkT x) - $ SR.unsafeRCons (#t11 := MkT x) - $ SR.unsafeRCons (#t12 := MkT x) - $ SR.unsafeRCons (#t13 := MkT x) - $ SR.unsafeRCons (#t14 := MkT x) - $ SR.unsafeRCons (#t15 := MkT x) - $ SR.unsafeRCons (#t16 := MkT x) - $ SR.unsafeRCons (#t17 := MkT x) - $ SR.unsafeRCons (#t18 := MkT x) - $ SR.unsafeRCons (#t19 := MkT x) - $ SR.unsafeRNil 20 diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_Unsafe/Sized/R030.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_Unsafe/Sized/R030.hs deleted file mode 100644 index 9c8fc621..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_Unsafe/Sized/R030.hs +++ /dev/null @@ -1,52 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif -{-# LANGUAGE OverloadedLabels #-} - -module Experiment.SR_Unsafe.Sized.R030 where - -import SuperRecord (Rec, (:=)(..)) -import qualified SuperRecord as SR - -import Bench.Types -import Common.RowOfSize.Row030 (ExampleRow) - -record :: Word -> Rec ExampleRow -record x = - -- 00 .. 09 - SR.unsafeRCons (#t00 := MkT x) - $ SR.unsafeRCons (#t01 := MkT x) - $ SR.unsafeRCons (#t02 := MkT x) - $ SR.unsafeRCons (#t03 := MkT x) - $ SR.unsafeRCons (#t04 := MkT x) - $ SR.unsafeRCons (#t05 := MkT x) - $ SR.unsafeRCons (#t06 := MkT x) - $ SR.unsafeRCons (#t07 := MkT x) - $ SR.unsafeRCons (#t08 := MkT x) - $ SR.unsafeRCons (#t09 := MkT x) - -- 10 .. 19 - $ SR.unsafeRCons (#t10 := MkT x) - $ SR.unsafeRCons (#t11 := MkT x) - $ SR.unsafeRCons (#t12 := MkT x) - $ SR.unsafeRCons (#t13 := MkT x) - $ SR.unsafeRCons (#t14 := MkT x) - $ SR.unsafeRCons (#t15 := MkT x) - $ SR.unsafeRCons (#t16 := MkT x) - $ SR.unsafeRCons (#t17 := MkT x) - $ SR.unsafeRCons (#t18 := MkT x) - $ SR.unsafeRCons (#t19 := MkT x) - -- 20 .. 29 - $ SR.unsafeRCons (#t20 := MkT x) - $ SR.unsafeRCons (#t21 := MkT x) - $ SR.unsafeRCons (#t22 := MkT x) - $ SR.unsafeRCons (#t23 := MkT x) - $ SR.unsafeRCons (#t24 := MkT x) - $ SR.unsafeRCons (#t25 := MkT x) - $ SR.unsafeRCons (#t26 := MkT x) - $ SR.unsafeRCons (#t27 := MkT x) - $ SR.unsafeRCons (#t28 := MkT x) - $ SR.unsafeRCons (#t29 := MkT x) - $ SR.unsafeRNil 30 diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_Unsafe/Sized/R040.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_Unsafe/Sized/R040.hs deleted file mode 100644 index d2c6b70d..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_Unsafe/Sized/R040.hs +++ /dev/null @@ -1,63 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif -{-# LANGUAGE OverloadedLabels #-} - -module Experiment.SR_Unsafe.Sized.R040 where - -import SuperRecord (Rec, (:=)(..)) -import qualified SuperRecord as SR - -import Bench.Types -import Common.RowOfSize.Row040 (ExampleRow) - -record :: Word -> Rec ExampleRow -record x = - -- 00 .. 09 - SR.unsafeRCons (#t00 := MkT x) - $ SR.unsafeRCons (#t01 := MkT x) - $ SR.unsafeRCons (#t02 := MkT x) - $ SR.unsafeRCons (#t03 := MkT x) - $ SR.unsafeRCons (#t04 := MkT x) - $ SR.unsafeRCons (#t05 := MkT x) - $ SR.unsafeRCons (#t06 := MkT x) - $ SR.unsafeRCons (#t07 := MkT x) - $ SR.unsafeRCons (#t08 := MkT x) - $ SR.unsafeRCons (#t09 := MkT x) - -- 10 .. 19 - $ SR.unsafeRCons (#t10 := MkT x) - $ SR.unsafeRCons (#t11 := MkT x) - $ SR.unsafeRCons (#t12 := MkT x) - $ SR.unsafeRCons (#t13 := MkT x) - $ SR.unsafeRCons (#t14 := MkT x) - $ SR.unsafeRCons (#t15 := MkT x) - $ SR.unsafeRCons (#t16 := MkT x) - $ SR.unsafeRCons (#t17 := MkT x) - $ SR.unsafeRCons (#t18 := MkT x) - $ SR.unsafeRCons (#t19 := MkT x) - -- 20 .. 29 - $ SR.unsafeRCons (#t20 := MkT x) - $ SR.unsafeRCons (#t21 := MkT x) - $ SR.unsafeRCons (#t22 := MkT x) - $ SR.unsafeRCons (#t23 := MkT x) - $ SR.unsafeRCons (#t24 := MkT x) - $ SR.unsafeRCons (#t25 := MkT x) - $ SR.unsafeRCons (#t26 := MkT x) - $ SR.unsafeRCons (#t27 := MkT x) - $ SR.unsafeRCons (#t28 := MkT x) - $ SR.unsafeRCons (#t29 := MkT x) - -- 30 .. 39 - $ SR.unsafeRCons (#t30 := MkT x) - $ SR.unsafeRCons (#t31 := MkT x) - $ SR.unsafeRCons (#t32 := MkT x) - $ SR.unsafeRCons (#t33 := MkT x) - $ SR.unsafeRCons (#t34 := MkT x) - $ SR.unsafeRCons (#t35 := MkT x) - $ SR.unsafeRCons (#t36 := MkT x) - $ SR.unsafeRCons (#t37 := MkT x) - $ SR.unsafeRCons (#t38 := MkT x) - $ SR.unsafeRCons (#t39 := MkT x) - $ SR.unsafeRNil 40 diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_Unsafe/Sized/R050.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_Unsafe/Sized/R050.hs deleted file mode 100644 index b3b05209..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_Unsafe/Sized/R050.hs +++ /dev/null @@ -1,74 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif -{-# LANGUAGE OverloadedLabels #-} - -module Experiment.SR_Unsafe.Sized.R050 where - -import SuperRecord (Rec, (:=)(..)) -import qualified SuperRecord as SR - -import Bench.Types -import Common.RowOfSize.Row050 (ExampleRow) - -record :: Word -> Rec ExampleRow -record x = - -- 00 .. 09 - SR.unsafeRCons (#t00 := MkT x) - $ SR.unsafeRCons (#t01 := MkT x) - $ SR.unsafeRCons (#t02 := MkT x) - $ SR.unsafeRCons (#t03 := MkT x) - $ SR.unsafeRCons (#t04 := MkT x) - $ SR.unsafeRCons (#t05 := MkT x) - $ SR.unsafeRCons (#t06 := MkT x) - $ SR.unsafeRCons (#t07 := MkT x) - $ SR.unsafeRCons (#t08 := MkT x) - $ SR.unsafeRCons (#t09 := MkT x) - -- 10 .. 19 - $ SR.unsafeRCons (#t10 := MkT x) - $ SR.unsafeRCons (#t11 := MkT x) - $ SR.unsafeRCons (#t12 := MkT x) - $ SR.unsafeRCons (#t13 := MkT x) - $ SR.unsafeRCons (#t14 := MkT x) - $ SR.unsafeRCons (#t15 := MkT x) - $ SR.unsafeRCons (#t16 := MkT x) - $ SR.unsafeRCons (#t17 := MkT x) - $ SR.unsafeRCons (#t18 := MkT x) - $ SR.unsafeRCons (#t19 := MkT x) - -- 20 .. 29 - $ SR.unsafeRCons (#t20 := MkT x) - $ SR.unsafeRCons (#t21 := MkT x) - $ SR.unsafeRCons (#t22 := MkT x) - $ SR.unsafeRCons (#t23 := MkT x) - $ SR.unsafeRCons (#t24 := MkT x) - $ SR.unsafeRCons (#t25 := MkT x) - $ SR.unsafeRCons (#t26 := MkT x) - $ SR.unsafeRCons (#t27 := MkT x) - $ SR.unsafeRCons (#t28 := MkT x) - $ SR.unsafeRCons (#t29 := MkT x) - -- 30 .. 39 - $ SR.unsafeRCons (#t30 := MkT x) - $ SR.unsafeRCons (#t31 := MkT x) - $ SR.unsafeRCons (#t32 := MkT x) - $ SR.unsafeRCons (#t33 := MkT x) - $ SR.unsafeRCons (#t34 := MkT x) - $ SR.unsafeRCons (#t35 := MkT x) - $ SR.unsafeRCons (#t36 := MkT x) - $ SR.unsafeRCons (#t37 := MkT x) - $ SR.unsafeRCons (#t38 := MkT x) - $ SR.unsafeRCons (#t39 := MkT x) - -- 40 .. 49 - $ SR.unsafeRCons (#t40 := MkT x) - $ SR.unsafeRCons (#t41 := MkT x) - $ SR.unsafeRCons (#t42 := MkT x) - $ SR.unsafeRCons (#t43 := MkT x) - $ SR.unsafeRCons (#t44 := MkT x) - $ SR.unsafeRCons (#t45 := MkT x) - $ SR.unsafeRCons (#t46 := MkT x) - $ SR.unsafeRCons (#t47 := MkT x) - $ SR.unsafeRCons (#t48 := MkT x) - $ SR.unsafeRCons (#t49 := MkT x) - $ SR.unsafeRNil 50 diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_Unsafe/Sized/R060.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_Unsafe/Sized/R060.hs deleted file mode 100644 index 98364cb6..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_Unsafe/Sized/R060.hs +++ /dev/null @@ -1,85 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif -{-# LANGUAGE OverloadedLabels #-} - -module Experiment.SR_Unsafe.Sized.R060 where - -import SuperRecord (Rec, (:=)(..)) -import qualified SuperRecord as SR - -import Bench.Types -import Common.RowOfSize.Row060 (ExampleRow) - -record :: Word -> Rec ExampleRow -record x = - -- 00 .. 09 - SR.unsafeRCons (#t00 := MkT x) - $ SR.unsafeRCons (#t01 := MkT x) - $ SR.unsafeRCons (#t02 := MkT x) - $ SR.unsafeRCons (#t03 := MkT x) - $ SR.unsafeRCons (#t04 := MkT x) - $ SR.unsafeRCons (#t05 := MkT x) - $ SR.unsafeRCons (#t06 := MkT x) - $ SR.unsafeRCons (#t07 := MkT x) - $ SR.unsafeRCons (#t08 := MkT x) - $ SR.unsafeRCons (#t09 := MkT x) - -- 10 .. 19 - $ SR.unsafeRCons (#t10 := MkT x) - $ SR.unsafeRCons (#t11 := MkT x) - $ SR.unsafeRCons (#t12 := MkT x) - $ SR.unsafeRCons (#t13 := MkT x) - $ SR.unsafeRCons (#t14 := MkT x) - $ SR.unsafeRCons (#t15 := MkT x) - $ SR.unsafeRCons (#t16 := MkT x) - $ SR.unsafeRCons (#t17 := MkT x) - $ SR.unsafeRCons (#t18 := MkT x) - $ SR.unsafeRCons (#t19 := MkT x) - -- 20 .. 29 - $ SR.unsafeRCons (#t20 := MkT x) - $ SR.unsafeRCons (#t21 := MkT x) - $ SR.unsafeRCons (#t22 := MkT x) - $ SR.unsafeRCons (#t23 := MkT x) - $ SR.unsafeRCons (#t24 := MkT x) - $ SR.unsafeRCons (#t25 := MkT x) - $ SR.unsafeRCons (#t26 := MkT x) - $ SR.unsafeRCons (#t27 := MkT x) - $ SR.unsafeRCons (#t28 := MkT x) - $ SR.unsafeRCons (#t29 := MkT x) - -- 30 .. 39 - $ SR.unsafeRCons (#t30 := MkT x) - $ SR.unsafeRCons (#t31 := MkT x) - $ SR.unsafeRCons (#t32 := MkT x) - $ SR.unsafeRCons (#t33 := MkT x) - $ SR.unsafeRCons (#t34 := MkT x) - $ SR.unsafeRCons (#t35 := MkT x) - $ SR.unsafeRCons (#t36 := MkT x) - $ SR.unsafeRCons (#t37 := MkT x) - $ SR.unsafeRCons (#t38 := MkT x) - $ SR.unsafeRCons (#t39 := MkT x) - -- 40 .. 49 - $ SR.unsafeRCons (#t40 := MkT x) - $ SR.unsafeRCons (#t41 := MkT x) - $ SR.unsafeRCons (#t42 := MkT x) - $ SR.unsafeRCons (#t43 := MkT x) - $ SR.unsafeRCons (#t44 := MkT x) - $ SR.unsafeRCons (#t45 := MkT x) - $ SR.unsafeRCons (#t46 := MkT x) - $ SR.unsafeRCons (#t47 := MkT x) - $ SR.unsafeRCons (#t48 := MkT x) - $ SR.unsafeRCons (#t49 := MkT x) - -- 50 .. 59 - $ SR.unsafeRCons (#t50 := MkT x) - $ SR.unsafeRCons (#t51 := MkT x) - $ SR.unsafeRCons (#t52 := MkT x) - $ SR.unsafeRCons (#t53 := MkT x) - $ SR.unsafeRCons (#t54 := MkT x) - $ SR.unsafeRCons (#t55 := MkT x) - $ SR.unsafeRCons (#t56 := MkT x) - $ SR.unsafeRCons (#t57 := MkT x) - $ SR.unsafeRCons (#t58 := MkT x) - $ SR.unsafeRCons (#t59 := MkT x) - $ SR.unsafeRNil 60 diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_Unsafe/Sized/R070.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_Unsafe/Sized/R070.hs deleted file mode 100644 index 3a399d32..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_Unsafe/Sized/R070.hs +++ /dev/null @@ -1,96 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif -{-# LANGUAGE OverloadedLabels #-} - -module Experiment.SR_Unsafe.Sized.R070 where - -import SuperRecord (Rec, (:=)(..)) -import qualified SuperRecord as SR - -import Bench.Types -import Common.RowOfSize.Row070 (ExampleRow) - -record :: Word -> Rec ExampleRow -record x = - -- 00 .. 09 - SR.unsafeRCons (#t00 := MkT x) - $ SR.unsafeRCons (#t01 := MkT x) - $ SR.unsafeRCons (#t02 := MkT x) - $ SR.unsafeRCons (#t03 := MkT x) - $ SR.unsafeRCons (#t04 := MkT x) - $ SR.unsafeRCons (#t05 := MkT x) - $ SR.unsafeRCons (#t06 := MkT x) - $ SR.unsafeRCons (#t07 := MkT x) - $ SR.unsafeRCons (#t08 := MkT x) - $ SR.unsafeRCons (#t09 := MkT x) - -- 10 .. 19 - $ SR.unsafeRCons (#t10 := MkT x) - $ SR.unsafeRCons (#t11 := MkT x) - $ SR.unsafeRCons (#t12 := MkT x) - $ SR.unsafeRCons (#t13 := MkT x) - $ SR.unsafeRCons (#t14 := MkT x) - $ SR.unsafeRCons (#t15 := MkT x) - $ SR.unsafeRCons (#t16 := MkT x) - $ SR.unsafeRCons (#t17 := MkT x) - $ SR.unsafeRCons (#t18 := MkT x) - $ SR.unsafeRCons (#t19 := MkT x) - -- 20 .. 29 - $ SR.unsafeRCons (#t20 := MkT x) - $ SR.unsafeRCons (#t21 := MkT x) - $ SR.unsafeRCons (#t22 := MkT x) - $ SR.unsafeRCons (#t23 := MkT x) - $ SR.unsafeRCons (#t24 := MkT x) - $ SR.unsafeRCons (#t25 := MkT x) - $ SR.unsafeRCons (#t26 := MkT x) - $ SR.unsafeRCons (#t27 := MkT x) - $ SR.unsafeRCons (#t28 := MkT x) - $ SR.unsafeRCons (#t29 := MkT x) - -- 30 .. 39 - $ SR.unsafeRCons (#t30 := MkT x) - $ SR.unsafeRCons (#t31 := MkT x) - $ SR.unsafeRCons (#t32 := MkT x) - $ SR.unsafeRCons (#t33 := MkT x) - $ SR.unsafeRCons (#t34 := MkT x) - $ SR.unsafeRCons (#t35 := MkT x) - $ SR.unsafeRCons (#t36 := MkT x) - $ SR.unsafeRCons (#t37 := MkT x) - $ SR.unsafeRCons (#t38 := MkT x) - $ SR.unsafeRCons (#t39 := MkT x) - -- 40 .. 49 - $ SR.unsafeRCons (#t40 := MkT x) - $ SR.unsafeRCons (#t41 := MkT x) - $ SR.unsafeRCons (#t42 := MkT x) - $ SR.unsafeRCons (#t43 := MkT x) - $ SR.unsafeRCons (#t44 := MkT x) - $ SR.unsafeRCons (#t45 := MkT x) - $ SR.unsafeRCons (#t46 := MkT x) - $ SR.unsafeRCons (#t47 := MkT x) - $ SR.unsafeRCons (#t48 := MkT x) - $ SR.unsafeRCons (#t49 := MkT x) - -- 50 .. 59 - $ SR.unsafeRCons (#t50 := MkT x) - $ SR.unsafeRCons (#t51 := MkT x) - $ SR.unsafeRCons (#t52 := MkT x) - $ SR.unsafeRCons (#t53 := MkT x) - $ SR.unsafeRCons (#t54 := MkT x) - $ SR.unsafeRCons (#t55 := MkT x) - $ SR.unsafeRCons (#t56 := MkT x) - $ SR.unsafeRCons (#t57 := MkT x) - $ SR.unsafeRCons (#t58 := MkT x) - $ SR.unsafeRCons (#t59 := MkT x) - -- 60 .. 69 - $ SR.unsafeRCons (#t60 := MkT x) - $ SR.unsafeRCons (#t61 := MkT x) - $ SR.unsafeRCons (#t62 := MkT x) - $ SR.unsafeRCons (#t63 := MkT x) - $ SR.unsafeRCons (#t64 := MkT x) - $ SR.unsafeRCons (#t65 := MkT x) - $ SR.unsafeRCons (#t66 := MkT x) - $ SR.unsafeRCons (#t67 := MkT x) - $ SR.unsafeRCons (#t68 := MkT x) - $ SR.unsafeRCons (#t69 := MkT x) - $ SR.unsafeRNil 70 diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_Unsafe/Sized/R080.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_Unsafe/Sized/R080.hs deleted file mode 100644 index ef8dfea5..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_Unsafe/Sized/R080.hs +++ /dev/null @@ -1,107 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif -{-# LANGUAGE OverloadedLabels #-} - -module Experiment.SR_Unsafe.Sized.R080 where - -import SuperRecord (Rec, (:=)(..)) -import qualified SuperRecord as SR - -import Bench.Types -import Common.RowOfSize.Row080 (ExampleRow) - -record :: Word -> Rec ExampleRow -record x = - -- 00 .. 09 - SR.unsafeRCons (#t00 := MkT x) - $ SR.unsafeRCons (#t01 := MkT x) - $ SR.unsafeRCons (#t02 := MkT x) - $ SR.unsafeRCons (#t03 := MkT x) - $ SR.unsafeRCons (#t04 := MkT x) - $ SR.unsafeRCons (#t05 := MkT x) - $ SR.unsafeRCons (#t06 := MkT x) - $ SR.unsafeRCons (#t07 := MkT x) - $ SR.unsafeRCons (#t08 := MkT x) - $ SR.unsafeRCons (#t09 := MkT x) - -- 10 .. 19 - $ SR.unsafeRCons (#t10 := MkT x) - $ SR.unsafeRCons (#t11 := MkT x) - $ SR.unsafeRCons (#t12 := MkT x) - $ SR.unsafeRCons (#t13 := MkT x) - $ SR.unsafeRCons (#t14 := MkT x) - $ SR.unsafeRCons (#t15 := MkT x) - $ SR.unsafeRCons (#t16 := MkT x) - $ SR.unsafeRCons (#t17 := MkT x) - $ SR.unsafeRCons (#t18 := MkT x) - $ SR.unsafeRCons (#t19 := MkT x) - -- 20 .. 29 - $ SR.unsafeRCons (#t20 := MkT x) - $ SR.unsafeRCons (#t21 := MkT x) - $ SR.unsafeRCons (#t22 := MkT x) - $ SR.unsafeRCons (#t23 := MkT x) - $ SR.unsafeRCons (#t24 := MkT x) - $ SR.unsafeRCons (#t25 := MkT x) - $ SR.unsafeRCons (#t26 := MkT x) - $ SR.unsafeRCons (#t27 := MkT x) - $ SR.unsafeRCons (#t28 := MkT x) - $ SR.unsafeRCons (#t29 := MkT x) - -- 30 .. 39 - $ SR.unsafeRCons (#t30 := MkT x) - $ SR.unsafeRCons (#t31 := MkT x) - $ SR.unsafeRCons (#t32 := MkT x) - $ SR.unsafeRCons (#t33 := MkT x) - $ SR.unsafeRCons (#t34 := MkT x) - $ SR.unsafeRCons (#t35 := MkT x) - $ SR.unsafeRCons (#t36 := MkT x) - $ SR.unsafeRCons (#t37 := MkT x) - $ SR.unsafeRCons (#t38 := MkT x) - $ SR.unsafeRCons (#t39 := MkT x) - -- 40 .. 49 - $ SR.unsafeRCons (#t40 := MkT x) - $ SR.unsafeRCons (#t41 := MkT x) - $ SR.unsafeRCons (#t42 := MkT x) - $ SR.unsafeRCons (#t43 := MkT x) - $ SR.unsafeRCons (#t44 := MkT x) - $ SR.unsafeRCons (#t45 := MkT x) - $ SR.unsafeRCons (#t46 := MkT x) - $ SR.unsafeRCons (#t47 := MkT x) - $ SR.unsafeRCons (#t48 := MkT x) - $ SR.unsafeRCons (#t49 := MkT x) - -- 50 .. 59 - $ SR.unsafeRCons (#t50 := MkT x) - $ SR.unsafeRCons (#t51 := MkT x) - $ SR.unsafeRCons (#t52 := MkT x) - $ SR.unsafeRCons (#t53 := MkT x) - $ SR.unsafeRCons (#t54 := MkT x) - $ SR.unsafeRCons (#t55 := MkT x) - $ SR.unsafeRCons (#t56 := MkT x) - $ SR.unsafeRCons (#t57 := MkT x) - $ SR.unsafeRCons (#t58 := MkT x) - $ SR.unsafeRCons (#t59 := MkT x) - -- 60 .. 69 - $ SR.unsafeRCons (#t60 := MkT x) - $ SR.unsafeRCons (#t61 := MkT x) - $ SR.unsafeRCons (#t62 := MkT x) - $ SR.unsafeRCons (#t63 := MkT x) - $ SR.unsafeRCons (#t64 := MkT x) - $ SR.unsafeRCons (#t65 := MkT x) - $ SR.unsafeRCons (#t66 := MkT x) - $ SR.unsafeRCons (#t67 := MkT x) - $ SR.unsafeRCons (#t68 := MkT x) - $ SR.unsafeRCons (#t69 := MkT x) - -- 70 .. 79 - $ SR.unsafeRCons (#t70 := MkT x) - $ SR.unsafeRCons (#t71 := MkT x) - $ SR.unsafeRCons (#t72 := MkT x) - $ SR.unsafeRCons (#t73 := MkT x) - $ SR.unsafeRCons (#t74 := MkT x) - $ SR.unsafeRCons (#t75 := MkT x) - $ SR.unsafeRCons (#t76 := MkT x) - $ SR.unsafeRCons (#t77 := MkT x) - $ SR.unsafeRCons (#t78 := MkT x) - $ SR.unsafeRCons (#t79 := MkT x) - $ SR.unsafeRNil 80 diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R000.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R000.hs deleted file mode 100644 index 30a0175f..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R000.hs +++ /dev/null @@ -1,8 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -module Experiment.SR_UpdateOne.Sized.R000 where diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R010.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R010.hs deleted file mode 100644 index 3fb963e1..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R010.hs +++ /dev/null @@ -1,19 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -{-# LANGUAGE OverloadedLabels #-} - -module Experiment.SR_UpdateOne.Sized.R010 where - -import SuperRecord (Rec) -import qualified SuperRecord as SR - -import Bench.Types -import Common.RowOfSize.Row010 - -updateOne :: Rec ExampleRow -> Rec ExampleRow -updateOne = SR.set #t00 (MkT 0) diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R020.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R020.hs deleted file mode 100644 index 8ce6f618..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R020.hs +++ /dev/null @@ -1,19 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -{-# LANGUAGE OverloadedLabels #-} - -module Experiment.SR_UpdateOne.Sized.R020 where - -import SuperRecord (Rec) -import qualified SuperRecord as SR - -import Bench.Types -import Common.RowOfSize.Row020 - -updateOne :: Rec ExampleRow -> Rec ExampleRow -updateOne = SR.set #t00 (MkT 0) diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R030.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R030.hs deleted file mode 100644 index 831db461..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R030.hs +++ /dev/null @@ -1,19 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -{-# LANGUAGE OverloadedLabels #-} - -module Experiment.SR_UpdateOne.Sized.R030 where - -import SuperRecord (Rec) -import qualified SuperRecord as SR - -import Bench.Types -import Common.RowOfSize.Row030 - -updateOne :: Rec ExampleRow -> Rec ExampleRow -updateOne = SR.set #t00 (MkT 0) diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R040.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R040.hs deleted file mode 100644 index dd504ee5..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R040.hs +++ /dev/null @@ -1,19 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -{-# LANGUAGE OverloadedLabels #-} - -module Experiment.SR_UpdateOne.Sized.R040 where - -import SuperRecord (Rec) -import qualified SuperRecord as SR - -import Bench.Types -import Common.RowOfSize.Row040 - -updateOne :: Rec ExampleRow -> Rec ExampleRow -updateOne = SR.set #t00 (MkT 0) diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R050.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R050.hs deleted file mode 100644 index 3378919c..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R050.hs +++ /dev/null @@ -1,19 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -{-# LANGUAGE OverloadedLabels #-} - -module Experiment.SR_UpdateOne.Sized.R050 where - -import SuperRecord (Rec) -import qualified SuperRecord as SR - -import Bench.Types -import Common.RowOfSize.Row050 - -updateOne :: Rec ExampleRow -> Rec ExampleRow -updateOne = SR.set #t00 (MkT 0) diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R060.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R060.hs deleted file mode 100644 index 919678f2..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R060.hs +++ /dev/null @@ -1,19 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -{-# LANGUAGE OverloadedLabels #-} - -module Experiment.SR_UpdateOne.Sized.R060 where - -import SuperRecord (Rec) -import qualified SuperRecord as SR - -import Bench.Types -import Common.RowOfSize.Row060 - -updateOne :: Rec ExampleRow -> Rec ExampleRow -updateOne = SR.set #t00 (MkT 0) diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R070.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R070.hs deleted file mode 100644 index e21054ce..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R070.hs +++ /dev/null @@ -1,19 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -{-# LANGUAGE OverloadedLabels #-} - -module Experiment.SR_UpdateOne.Sized.R070 where - -import SuperRecord (Rec) -import qualified SuperRecord as SR - -import Bench.Types -import Common.RowOfSize.Row070 - -updateOne :: Rec ExampleRow -> Rec ExampleRow -updateOne = SR.set #t00 (MkT 0) diff --git a/large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R080.hs b/large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R080.hs deleted file mode 100644 index 8fb9b71d..00000000 --- a/large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R080.hs +++ /dev/null @@ -1,19 +0,0 @@ -#if PROFILE_CORESIZE -{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-} -#endif -#if PROFILE_TIMING -{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} -#endif - -{-# LANGUAGE OverloadedLabels #-} - -module Experiment.SR_UpdateOne.Sized.R080 where - -import SuperRecord (Rec) -import qualified SuperRecord as SR - -import Bench.Types -import Common.RowOfSize.Row080 - -updateOne :: Rec ExampleRow -> Rec ExampleRow -updateOne = SR.set #t00 (MkT 0) diff --git a/large-records-benchmarks/bench/superrecord/Main.hs b/large-records-benchmarks/bench/superrecord/Main.hs deleted file mode 100644 index fa34893a..00000000 --- a/large-records-benchmarks/bench/superrecord/Main.hs +++ /dev/null @@ -1,211 +0,0 @@ -{-# LANGUAGE BangPatterns #-} - -module Main (main) where - -#if PROFILE_RUNTIME - -import Criterion.Main -import Bench.Util.Criterion - -import qualified Bench.EvensOfSize.Evens010 -import qualified Bench.EvensOfSize.Evens020 -import qualified Bench.EvensOfSize.Evens030 -import qualified Bench.EvensOfSize.Evens040 -import qualified Bench.EvensOfSize.Evens050 -import qualified Bench.EvensOfSize.Evens060 -import qualified Bench.EvensOfSize.Evens070 -import qualified Bench.EvensOfSize.Evens080 - -import qualified Experiment.SR_Construct.Sized.R010 -import qualified Experiment.SR_Construct.Sized.R020 -import qualified Experiment.SR_Construct.Sized.R030 -import qualified Experiment.SR_Construct.Sized.R040 - -import qualified Experiment.SR_Unsafe.Sized.R010 -import qualified Experiment.SR_Unsafe.Sized.R020 -import qualified Experiment.SR_Unsafe.Sized.R030 -import qualified Experiment.SR_Unsafe.Sized.R040 -import qualified Experiment.SR_Unsafe.Sized.R050 -import qualified Experiment.SR_Unsafe.Sized.R060 -import qualified Experiment.SR_Unsafe.Sized.R070 -import qualified Experiment.SR_Unsafe.Sized.R080 - -import qualified Experiment.SR_GetEvens.Sized.R010 -import qualified Experiment.SR_GetEvens.Sized.R020 -import qualified Experiment.SR_GetEvens.Sized.R030 -import qualified Experiment.SR_GetEvens.Sized.R040 -import qualified Experiment.SR_GetEvens.Sized.R050 -import qualified Experiment.SR_GetEvens.Sized.R060 -import qualified Experiment.SR_GetEvens.Sized.R070 -import qualified Experiment.SR_GetEvens.Sized.R080 - -import qualified Experiment.SR_SetEvens.Sized.R010 -import qualified Experiment.SR_SetEvens.Sized.R020 -import qualified Experiment.SR_SetEvens.Sized.R030 -import qualified Experiment.SR_SetEvens.Sized.R040 -import qualified Experiment.SR_SetEvens.Sized.R050 -import qualified Experiment.SR_SetEvens.Sized.R060 -import qualified Experiment.SR_SetEvens.Sized.R070 -import qualified Experiment.SR_SetEvens.Sized.R080 - -import qualified Experiment.SR_UpdateOne.Sized.R010 -import qualified Experiment.SR_UpdateOne.Sized.R020 -import qualified Experiment.SR_UpdateOne.Sized.R030 -import qualified Experiment.SR_UpdateOne.Sized.R040 -import qualified Experiment.SR_UpdateOne.Sized.R050 -import qualified Experiment.SR_UpdateOne.Sized.R060 -import qualified Experiment.SR_UpdateOne.Sized.R070 -import qualified Experiment.SR_UpdateOne.Sized.R080 - -import qualified Experiment.SR_ToJSON.Sized.R010 -import qualified Experiment.SR_ToJSON.Sized.R020 -import qualified Experiment.SR_ToJSON.Sized.R030 -import qualified Experiment.SR_ToJSON.Sized.R040 -import qualified Experiment.SR_ToJSON.Sized.R050 -import qualified Experiment.SR_ToJSON.Sized.R060 -import qualified Experiment.SR_ToJSON.Sized.R070 -import qualified Experiment.SR_ToJSON.Sized.R080 - -import qualified Experiment.SR_ParseJSON.Sized.R010 -import qualified Experiment.SR_ParseJSON.Sized.R020 -import qualified Experiment.SR_ParseJSON.Sized.R030 -import qualified Experiment.SR_ParseJSON.Sized.R040 -import qualified Experiment.SR_ParseJSON.Sized.R050 -import qualified Experiment.SR_ParseJSON.Sized.R060 -import qualified Experiment.SR_ParseJSON.Sized.R070 -import qualified Experiment.SR_ParseJSON.Sized.R080 - -main :: IO () -main = defaultMain [ - bgroup "SR_Construct" [ - bench "010" $ whnf Experiment.SR_Construct.Sized.R010.record 0 - , bench "020" $ whnf Experiment.SR_Construct.Sized.R020.record 0 - , bench "030" $ whnf Experiment.SR_Construct.Sized.R030.record 0 - , bench "040" $ whnf Experiment.SR_Construct.Sized.R040.record 0 - ] - , bgroup "SR_Unsafe" [ - bench "010" $ whnf Experiment.SR_Unsafe.Sized.R010.record 0 - , bench "020" $ whnf Experiment.SR_Unsafe.Sized.R020.record 0 - , bench "030" $ whnf Experiment.SR_Unsafe.Sized.R030.record 0 - , bench "040" $ whnf Experiment.SR_Unsafe.Sized.R040.record 0 - , bench "050" $ whnf Experiment.SR_Unsafe.Sized.R050.record 0 - , bench "060" $ whnf Experiment.SR_Unsafe.Sized.R060.record 0 - , bench "070" $ whnf Experiment.SR_Unsafe.Sized.R070.record 0 - , bench "080" $ whnf Experiment.SR_Unsafe.Sized.R080.record 0 - ] - , bgroup "SR_GetEvens" [ - envPureWHNF (Experiment.SR_Unsafe.Sized.R010.record 0) $ \r -> - bench "010" $ whnf Experiment.SR_GetEvens.Sized.R010.getEvens r - , envPureWHNF (Experiment.SR_Unsafe.Sized.R020.record 0) $ \r -> - bench "020" $ whnf Experiment.SR_GetEvens.Sized.R020.getEvens r - , envPureWHNF (Experiment.SR_Unsafe.Sized.R030.record 0) $ \r -> - bench "030" $ whnf Experiment.SR_GetEvens.Sized.R030.getEvens r - , envPureWHNF (Experiment.SR_Unsafe.Sized.R040.record 0) $ \r -> - bench "040" $ whnf Experiment.SR_GetEvens.Sized.R040.getEvens r - , envPureWHNF (Experiment.SR_Unsafe.Sized.R050.record 0) $ \r -> - bench "050" $ whnf Experiment.SR_GetEvens.Sized.R050.getEvens r - , envPureWHNF (Experiment.SR_Unsafe.Sized.R060.record 0) $ \r -> - bench "060" $ whnf Experiment.SR_GetEvens.Sized.R060.getEvens r - , envPureWHNF (Experiment.SR_Unsafe.Sized.R070.record 0) $ \r -> - bench "070" $ whnf Experiment.SR_GetEvens.Sized.R070.getEvens r - , envPureWHNF (Experiment.SR_Unsafe.Sized.R080.record 0) $ \r -> - bench "080" $ whnf Experiment.SR_GetEvens.Sized.R080.getEvens r - ] - , bgroup "SR_SetEvens" [ - envPureWHNF (Experiment.SR_Unsafe.Sized.R010.record 0) $ \r -> - bench "010" $ whnf (Experiment.SR_SetEvens.Sized.R010.setEvens evens010) r - , envPureWHNF (Experiment.SR_Unsafe.Sized.R020.record 0) $ \r -> - bench "020" $ whnf (Experiment.SR_SetEvens.Sized.R020.setEvens evens020) r - , envPureWHNF (Experiment.SR_Unsafe.Sized.R030.record 0) $ \r -> - bench "030" $ whnf (Experiment.SR_SetEvens.Sized.R030.setEvens evens030) r - , envPureWHNF (Experiment.SR_Unsafe.Sized.R040.record 0) $ \r -> - bench "040" $ whnf (Experiment.SR_SetEvens.Sized.R040.setEvens evens040) r - , envPureWHNF (Experiment.SR_Unsafe.Sized.R050.record 0) $ \r -> - bench "050" $ whnf (Experiment.SR_SetEvens.Sized.R050.setEvens evens050) r - , envPureWHNF (Experiment.SR_Unsafe.Sized.R060.record 0) $ \r -> - bench "060" $ whnf (Experiment.SR_SetEvens.Sized.R060.setEvens evens060) r - , envPureWHNF (Experiment.SR_Unsafe.Sized.R070.record 0) $ \r -> - bench "070" $ whnf (Experiment.SR_SetEvens.Sized.R070.setEvens evens070) r - , envPureWHNF (Experiment.SR_Unsafe.Sized.R080.record 0) $ \r -> - bench "080" $ whnf (Experiment.SR_SetEvens.Sized.R080.setEvens evens080) r - ] - , bgroup "SR_UpdateOne" [ - envPureWHNF (Experiment.SR_Unsafe.Sized.R010.record 0) $ \r -> - bench "010" $ whnf Experiment.SR_UpdateOne.Sized.R010.updateOne r - , envPureWHNF (Experiment.SR_Unsafe.Sized.R020.record 0) $ \r -> - bench "020" $ whnf Experiment.SR_UpdateOne.Sized.R020.updateOne r - , envPureWHNF (Experiment.SR_Unsafe.Sized.R030.record 0) $ \r -> - bench "030" $ whnf Experiment.SR_UpdateOne.Sized.R030.updateOne r - , envPureWHNF (Experiment.SR_Unsafe.Sized.R040.record 0) $ \r -> - bench "040" $ whnf Experiment.SR_UpdateOne.Sized.R040.updateOne r - , envPureWHNF (Experiment.SR_Unsafe.Sized.R050.record 0) $ \r -> - bench "050" $ whnf Experiment.SR_UpdateOne.Sized.R050.updateOne r - , envPureWHNF (Experiment.SR_Unsafe.Sized.R060.record 0) $ \r -> - bench "060" $ whnf Experiment.SR_UpdateOne.Sized.R060.updateOne r - , envPureWHNF (Experiment.SR_Unsafe.Sized.R070.record 0) $ \r -> - bench "070" $ whnf Experiment.SR_UpdateOne.Sized.R070.updateOne r - , envPureWHNF (Experiment.SR_Unsafe.Sized.R080.record 0) $ \r -> - bench "080" $ whnf Experiment.SR_UpdateOne.Sized.R080.updateOne r - ] - , bgroup "SR_ToJSON" [ - envPureWHNF (Experiment.SR_Unsafe.Sized.R010.record 0) $ \r -> - bench "010" $ nf Experiment.SR_ToJSON.Sized.R010.recToJSON r - , envPureWHNF (Experiment.SR_Unsafe.Sized.R020.record 0) $ \r -> - bench "020" $ nf Experiment.SR_ToJSON.Sized.R020.recToJSON r - , envPureWHNF (Experiment.SR_Unsafe.Sized.R030.record 0) $ \r -> - bench "030" $ nf Experiment.SR_ToJSON.Sized.R030.recToJSON r - , envPureWHNF (Experiment.SR_Unsafe.Sized.R040.record 0) $ \r -> - bench "040" $ nf Experiment.SR_ToJSON.Sized.R040.recToJSON r - , envPureWHNF (Experiment.SR_Unsafe.Sized.R050.record 0) $ \r -> - bench "050" $ nf Experiment.SR_ToJSON.Sized.R050.recToJSON r - , envPureWHNF (Experiment.SR_Unsafe.Sized.R060.record 0) $ \r -> - bench "060" $ nf Experiment.SR_ToJSON.Sized.R060.recToJSON r - , envPureWHNF (Experiment.SR_Unsafe.Sized.R070.record 0) $ \r -> - bench "070" $ nf Experiment.SR_ToJSON.Sized.R070.recToJSON r - , envPureWHNF (Experiment.SR_Unsafe.Sized.R080.record 0) $ \r -> - bench "080" $ nf Experiment.SR_ToJSON.Sized.R080.recToJSON r - ] - , bgroup "SR_ParseJSON" [ - envPureNF (Experiment.SR_ToJSON.Sized.R010.recToJSON $ Experiment.SR_Unsafe.Sized.R010.record 0) $ \r -> - bench "010" $ whnf Experiment.SR_ParseJSON.Sized.R010.recFromJSON r - , envPureNF (Experiment.SR_ToJSON.Sized.R020.recToJSON $ Experiment.SR_Unsafe.Sized.R020.record 0) $ \r -> - bench "020" $ whnf Experiment.SR_ParseJSON.Sized.R020.recFromJSON r - , envPureNF (Experiment.SR_ToJSON.Sized.R030.recToJSON $ Experiment.SR_Unsafe.Sized.R030.record 0) $ \r -> - bench "030" $ whnf Experiment.SR_ParseJSON.Sized.R030.recFromJSON r - , envPureNF (Experiment.SR_ToJSON.Sized.R040.recToJSON $ Experiment.SR_Unsafe.Sized.R040.record 0) $ \r -> - bench "040" $ whnf Experiment.SR_ParseJSON.Sized.R040.recFromJSON r - , envPureNF (Experiment.SR_ToJSON.Sized.R050.recToJSON $ Experiment.SR_Unsafe.Sized.R050.record 0) $ \r -> - bench "050" $ whnf Experiment.SR_ParseJSON.Sized.R050.recFromJSON r - , envPureNF (Experiment.SR_ToJSON.Sized.R060.recToJSON $ Experiment.SR_Unsafe.Sized.R060.record 0) $ \r -> - bench "060" $ whnf Experiment.SR_ParseJSON.Sized.R060.recFromJSON r - , envPureNF (Experiment.SR_ToJSON.Sized.R070.recToJSON $ Experiment.SR_Unsafe.Sized.R070.record 0) $ \r -> - bench "070" $ whnf Experiment.SR_ParseJSON.Sized.R070.recFromJSON r - , envPureNF (Experiment.SR_ToJSON.Sized.R080.recToJSON $ Experiment.SR_Unsafe.Sized.R080.record 0) $ \r -> - bench "080" $ whnf Experiment.SR_ParseJSON.Sized.R080.recFromJSON r - ] - ] - where - evens010 :: Bench.EvensOfSize.Evens010.Evens - evens020 :: Bench.EvensOfSize.Evens020.Evens - evens030 :: Bench.EvensOfSize.Evens030.Evens - evens040 :: Bench.EvensOfSize.Evens040.Evens - evens050 :: Bench.EvensOfSize.Evens050.Evens - evens060 :: Bench.EvensOfSize.Evens060.Evens - evens070 :: Bench.EvensOfSize.Evens070.Evens - evens080 :: Bench.EvensOfSize.Evens080.Evens - - !evens010 = Bench.EvensOfSize.Evens010.evens - !evens020 = Bench.EvensOfSize.Evens020.evens - !evens030 = Bench.EvensOfSize.Evens030.evens - !evens040 = Bench.EvensOfSize.Evens040.evens - !evens050 = Bench.EvensOfSize.Evens050.evens - !evens060 = Bench.EvensOfSize.Evens060.evens - !evens070 = Bench.EvensOfSize.Evens070.evens - !evens080 = Bench.EvensOfSize.Evens080.evens - -#else - -main :: IO () -main = return () - -#endif \ No newline at end of file diff --git a/large-records-benchmarks/large-records-benchmarks.cabal b/large-records-benchmarks/large-records-benchmarks.cabal index 53ea5a67..3d39008b 100644 --- a/large-records-benchmarks/large-records-benchmarks.cabal +++ b/large-records-benchmarks/large-records-benchmarks.cabal @@ -11,7 +11,7 @@ license: BSD-3-Clause author: Edsko de Vries maintainer: edsko@well-typed.com category: Generics -tested-with: GHC ==8.8.4 +tested-with: GHC ==8.10.7 source-repository head type: git @@ -21,7 +21,7 @@ common defaults default-language: Haskell2010 build-depends: - base >= 4.13 && < 4.18 + base >= 4.14 && < 4.19 ghc-options: -Wall @@ -633,112 +633,6 @@ executable bench-large-anon ghc-options: -O1 -executable bench-superrecord - import: - defaults - , benchmark - main-is: - Main.hs - hs-source-dirs: - bench/superrecord - build-depends: - superrecord - , aeson - other-modules: - - -- - -- The SR_Construct benchmark is expensive: only measure up to 40 fields. - -- - -- The other benchmarks also get expensive for larger records, but we - -- can go up to 80 without things getting /too/ ridiculous. - -- - -- (These benchmarks are /especially/ expensive when we measure the core - -- size using @-ddump-ds-preopt@ and friends.) - -- - - Common.RowOfSize.Row010 - Common.RowOfSize.Row020 - Common.RowOfSize.Row030 - Common.RowOfSize.Row040 - Common.RowOfSize.Row050 - Common.RowOfSize.Row060 - Common.RowOfSize.Row070 - Common.RowOfSize.Row080 - - Experiment.SR_Construct.Sized.R000 - Experiment.SR_Construct.Sized.R010 - Experiment.SR_Construct.Sized.R020 - Experiment.SR_Construct.Sized.R030 - Experiment.SR_Construct.Sized.R040 - - Experiment.SR_Unsafe.Sized.R000 - Experiment.SR_Unsafe.Sized.R010 - Experiment.SR_Unsafe.Sized.R020 - Experiment.SR_Unsafe.Sized.R030 - Experiment.SR_Unsafe.Sized.R040 - Experiment.SR_Unsafe.Sized.R050 - Experiment.SR_Unsafe.Sized.R060 - Experiment.SR_Unsafe.Sized.R070 - Experiment.SR_Unsafe.Sized.R080 - - Experiment.SR_GetEvens.Sized.R000 - Experiment.SR_GetEvens.Sized.R010 - Experiment.SR_GetEvens.Sized.R020 - Experiment.SR_GetEvens.Sized.R030 - Experiment.SR_GetEvens.Sized.R040 - Experiment.SR_GetEvens.Sized.R050 - Experiment.SR_GetEvens.Sized.R060 - Experiment.SR_GetEvens.Sized.R070 - Experiment.SR_GetEvens.Sized.R080 - - Experiment.SR_SetEvens.Sized.R000 - Experiment.SR_SetEvens.Sized.R010 - Experiment.SR_SetEvens.Sized.R020 - Experiment.SR_SetEvens.Sized.R030 - Experiment.SR_SetEvens.Sized.R040 - Experiment.SR_SetEvens.Sized.R050 - Experiment.SR_SetEvens.Sized.R060 - Experiment.SR_SetEvens.Sized.R070 - Experiment.SR_SetEvens.Sized.R080 - - Experiment.SR_UpdateOne.Sized.R000 - Experiment.SR_UpdateOne.Sized.R010 - Experiment.SR_UpdateOne.Sized.R020 - Experiment.SR_UpdateOne.Sized.R030 - Experiment.SR_UpdateOne.Sized.R040 - Experiment.SR_UpdateOne.Sized.R050 - Experiment.SR_UpdateOne.Sized.R060 - Experiment.SR_UpdateOne.Sized.R070 - Experiment.SR_UpdateOne.Sized.R080 - - Experiment.SR_ToJSON.Sized.R000 - Experiment.SR_ToJSON.Sized.R010 - Experiment.SR_ToJSON.Sized.R020 - Experiment.SR_ToJSON.Sized.R030 - Experiment.SR_ToJSON.Sized.R040 - Experiment.SR_ToJSON.Sized.R050 - Experiment.SR_ToJSON.Sized.R060 - Experiment.SR_ToJSON.Sized.R070 - Experiment.SR_ToJSON.Sized.R080 - - Experiment.SR_ParseJSON.Sized.R000 - Experiment.SR_ParseJSON.Sized.R010 - Experiment.SR_ParseJSON.Sized.R020 - Experiment.SR_ParseJSON.Sized.R030 - Experiment.SR_ParseJSON.Sized.R040 - Experiment.SR_ParseJSON.Sized.R050 - Experiment.SR_ParseJSON.Sized.R060 - Experiment.SR_ParseJSON.Sized.R070 - Experiment.SR_ParseJSON.Sized.R080 - - if flag(profile-runtime) - ghc-options: - -O1 - - if impl(ghc >= 9.0) - -- superrecord is not yet (2023-02-20) supported for ghc >= 9 - buildable: False - -- -- TEST SUITE -- diff --git a/large-records/CHANGELOG.md b/large-records/CHANGELOG.md index 9cd580ef..6249078f 100644 --- a/large-records/CHANGELOG.md +++ b/large-records/CHANGELOG.md @@ -1,5 +1,10 @@ # Revision history for large-records +## 0.4.1 -- 2024-05-30 + +* Support ghc 9.6 (and drop ghc <= 8.8) + [together with Tristan Cacqueray and Gabriele Sales] + ## 0.4 -- 2023-03-06 * Fix issue with operator type families used in fields (#120). diff --git a/large-records/large-records.cabal b/large-records/large-records.cabal index 1409ecef..1dbcc21a 100644 --- a/large-records/large-records.cabal +++ b/large-records/large-records.cabal @@ -1,6 +1,6 @@ cabal-version: 2.4 name: large-records -version: 0.4 +version: 0.4.1 synopsis: Efficient compilation for large records, linear in the size of the record description: For many reasons, the internal code generated for modules that contain records is quadratic in the number of record @@ -16,7 +16,7 @@ author: Edsko de Vries maintainer: edsko@well-typed.com category: Generics extra-source-files: CHANGELOG.md -tested-with: GHC ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.5 +tested-with: GHC ==8.10.7 || ==9.2.8 || ==9.4.8 || ==9.6.4 source-repository head type: git @@ -44,10 +44,10 @@ library Data.Record.Internal.Plugin.Record build-depends: - base >= 4.13 && < 4.18 - , containers >= 0.6.2 && < 0.7 - , mtl >= 2.2.1 && < 2.3 - , primitive >= 0.8 && < 0.9 + base >= 4.14 && < 4.19 + , containers >= 0.6.2 && < 0.8 + , mtl >= 2.2.1 && < 2.4 + , primitive >= 0.8 && < 0.10 , syb >= 0.7 && < 0.8 , record-hasfield >= 1.0 && < 1.1 diff --git a/large-records/src/Data/Record/Internal/GHC/Shim.hs b/large-records/src/Data/Record/Internal/GHC/Shim.hs index c6b555ea..92d919e7 100644 --- a/large-records/src/Data/Record/Internal/GHC/Shim.hs +++ b/large-records/src/Data/Record/Internal/GHC/Shim.hs @@ -165,6 +165,11 @@ import GHC.Types.Name.Cache (NameCache, takeUniqFromNameCache) #endif +#if __GLASGOW_HASKELL__ >= 906 +import Language.Haskell.Syntax.Basic (FieldLabelString (..)) +import qualified GHC.Types.Basic +#endif + {------------------------------------------------------------------------------- Name resolution -------------------------------------------------------------------------------} @@ -224,29 +229,42 @@ lookupOrigIO env modl occ = lookupNameCache (hsc_NC env) modl occ -------------------------------------------------------------------------------} -- | Optionally @qualified@ import declaration -importDecl :: ModuleName -> Bool -> LImportDecl GhcPs -importDecl name qualified = noLocA $ ImportDecl { +importDecl :: Bool -> ModuleName -> LImportDecl GhcPs +importDecl qualified name = reLocA $ noLoc $ ImportDecl { +#if __GLASGOW_HASKELL__ < 906 ideclExt = defExt +#else + ideclExt = XImportDeclPass { + ideclAnn = defExt + , ideclSourceText = NoSourceText + , ideclImplicit = False + } +#endif +#if __GLASGOW_HASKELL__ < 906 , ideclSourceSrc = NoSourceText - , ideclName = noLocA name +#endif + , ideclName = reLocA $ noLoc name #if __GLASGOW_HASKELL__ >= 904 , ideclPkgQual = NoRawPkgQual #else , ideclPkgQual = Nothing #endif , ideclSafe = False +#if __GLASGOW_HASKELL__ < 906 , ideclImplicit = False +#endif , ideclAs = Nothing +#if __GLASGOW_HASKELL__ < 906 , ideclHiding = Nothing -#if __GLASGOW_HASKELL__ < 810 - , ideclQualified = qualified -#else - , ideclQualified = if qualified then QualifiedPre else NotQualified #endif + , ideclQualified = if qualified then QualifiedPre else NotQualified #if __GLASGOW_HASKELL__ < 900 , ideclSource = False #else , ideclSource = NotBoot +#endif +#if __GLASGOW_HASKELL__ >= 906 + , ideclImportList = Nothing #endif } @@ -258,11 +276,7 @@ conPat x y = ConPat defExt (reLocA x) y #endif mkFunBind :: Located RdrName -> [LMatch GhcPs (LHsExpr GhcPs)] -> HsBind GhcPs -#if __GLASGOW_HASKELL__ < 810 -mkFunBind = GHC.mkFunBind -#else mkFunBind (reLocA -> n) = GHC.mkFunBind Generated n -#endif #if __GLASGOW_HASKELL__ < 900 type HsModule = GHC.HsModule GhcPs @@ -270,7 +284,11 @@ type HsModule = GHC.HsModule GhcPs type HsModule = GHC.HsModule #endif +#if __GLASGOW_HASKELL__ >= 906 +type LHsModule = Located (HsModule GhcPs) +#else type LHsModule = Located HsModule +#endif type LRdrName = Located RdrName {------------------------------------------------------------------------------- @@ -323,15 +341,17 @@ mapXRec = fmap class HasDefaultExt a where defExt :: a -#if __GLASGOW_HASKELL__ < 810 -instance HasDefaultExt NoExt where - defExt = noExt -#else instance HasDefaultExt NoExtField where defExt = noExtField -#endif -#if __GLASGOW_HASKELL__ >= 900 +#if __GLASGOW_HASKELL__ >= 906 +instance HasDefaultExt (LayoutInfo GhcPs) where + defExt = NoLayoutInfo +instance HasDefaultExt GHC.Types.Basic.Origin where + defExt = Generated +instance HasDefaultExt SourceText where + defExt = NoSourceText +#elif __GLASGOW_HASKELL__ >= 900 instance HasDefaultExt LayoutInfo where defExt = NoLayoutInfo #endif @@ -559,7 +579,11 @@ simpleRecordUpdates = isSingleLabel :: FieldLabelStrings GhcPs -> Maybe LRdrName isSingleLabel (FieldLabelStrings labels) = case labels of +#if __GLASGOW_HASKELL__ >= 906 + [L _ (DotFieldOcc _ (L l (FieldLabelString label)))] -> +#else [L _ (DotFieldOcc _ (L l label))] -> +#endif Just $ reLoc $ L l (Unqual $ mkVarOccFS label) _otherwise -> Nothing @@ -614,4 +638,4 @@ simpleRecordUpdates = isUnambigous (Unambiguous _ name) = Just $ reLoc name isUnambigous _ = Nothing -#endif \ No newline at end of file +#endif diff --git a/large-records/src/Data/Record/Internal/GHC/TemplateHaskellStyle.hs b/large-records/src/Data/Record/Internal/GHC/TemplateHaskellStyle.hs index ea2a1d79..644102ce 100644 --- a/large-records/src/Data/Record/Internal/GHC/TemplateHaskellStyle.hs +++ b/large-records/src/Data/Record/Internal/GHC/TemplateHaskellStyle.hs @@ -289,7 +289,11 @@ listE es = inheritLoc es $ ExplicitList defExt lamE :: NonEmpty (LPat GhcPs) -> LHsExpr GhcPs -> LHsExpr GhcPs lamE pats body = inheritLoc body $ HsLam defExt $ +#if __GLASGOW_HASKELL__ >= 906 + MG defExt (inheritLoc body [inheritLoc body match]) +#else MG defExt (inheritLoc body [inheritLoc body match]) Generated +#endif where match :: Match GhcPs (LHsExpr GhcPs) match = Match defExt LambdaExpr (NE.toList pats) (simpleGHRSs body) @@ -301,7 +305,11 @@ lamE1 p = lamE (p :| []) -- | Equivalent of 'Language.Haskell.TH.Lib.caseE' caseE :: LHsExpr GhcPs -> [(LPat GhcPs, LHsExpr GhcPs)] -> LHsExpr GhcPs caseE x alts = inheritLoc x $ +#if __GLASGOW_HASKELL__ >= 906 + HsCase defExt x (MG defExt (inheritLoc x (map mkAlt alts))) +#else HsCase defExt x (MG defExt (inheritLoc x (map mkAlt alts)) Generated) +#endif where mkAlt :: (LPat GhcPs, LHsExpr GhcPs) -> LMatch GhcPs (LHsExpr GhcPs) mkAlt (pat, body) = inheritLoc x $ @@ -314,6 +322,9 @@ appsE = foldl' appE -- | Equivalent of 'Language.Haskell.TH.Lib.appT' appTypeE :: LHsExpr GhcPs -> LHsType GhcPs -> LHsExpr GhcPs appTypeE expr typ = inheritLoc expr $ +#if __GLASGOW_HASKELL__ >= 906 + HsAppType noExtField expr noHsTok (HsWC defExt typ) +#else HsAppType #if __GLASGOW_HASKELL__ >= 902 (toSrcSpan expr) @@ -322,7 +333,7 @@ appTypeE expr typ = inheritLoc expr $ #endif expr (HsWC defExt typ) - +#endif -- | Equivalent of 'Language.Haskell.TH.Lib.tupE' tupE :: NonEmpty (LHsExpr GhcPs) -> LHsExpr GhcPs tupE xs = inheritLoc xs $ @@ -353,7 +364,11 @@ parensT :: LHsType GhcPs -> LHsType GhcPs parensT = noLocA . HsParTy defExt -- | Equivalent of 'Language.Haskell.TH.Lib.litT' +#if __GLASGOW_HASKELL__ >= 906 +litT :: HsTyLit GhcPs -> LHsType GhcPs +#else litT :: HsTyLit -> LHsType GhcPs +#endif litT = noLocA . HsTyLit defExt -- | Equivalent of 'Language.Haskell.TH.Lib.varT' @@ -604,7 +619,10 @@ dataD typeName tyVars cons derivs = inheritLoc typeName $ , tcdFixity = Prefix , tcdDataDefn = HsDataDefn { dd_ext = defExt +#if __GLASGOW_HASKELL__ >= 906 +#else , dd_ND = DataType +#endif #if __GLASGOW_HASKELL__ >= 902 , dd_ctxt = Nothing #else @@ -612,7 +630,11 @@ dataD typeName tyVars cons derivs = inheritLoc typeName $ #endif , dd_cType = Nothing , dd_kindSig = Nothing +#if __GLASGOW_HASKELL__ >= 906 + , dd_cons = DataTypeCons False cons +#else , dd_cons = cons +#endif , dd_derivs = inheritLoc typeName derivs } } @@ -635,15 +657,21 @@ viewDataD , tcdTyVars = HsQTvs {hsq_explicit = tyVars} , tcdFixity = Prefix , tcdDataDefn = HsDataDefn { - dd_ND = DataType #if __GLASGOW_HASKELL__ >= 902 - , dd_ctxt = Nothing + dd_ctxt = Nothing #else - , dd_ctxt = L _ [] + dd_ctxt = L _ [] +#endif +#if !__GLASGOW_HASKELL__ >= 906 + , dd_ND = DataType #endif , dd_cType = Nothing , dd_kindSig = Nothing +#if __GLASGOW_HASKELL__ >= 906 + , dd_cons = DataTypeCons False cons +#else , dd_cons = cons +#endif #if __GLASGOW_HASKELL__ >= 902 , dd_derivs = derivs #else @@ -746,6 +774,9 @@ classD :: classD = \ctx name clsVars sigs -> inheritLoc name $ TyClD defExt $ ClassDecl { tcdCExt = defExt +#if __GLASGOW_HASKELL__ >= 906 + , tcdLayout = NoLayoutInfo +#endif #if __GLASGOW_HASKELL__ >= 902 , tcdCtxt = Just (inheritLoc name ctx) #else @@ -821,14 +852,22 @@ pattern TypeAnnotation name <- (viewTypeAnnotation -> Just name) -- | Equivalent of 'Language.Haskell.TH.Lib.pragAnnD' pragAnnD :: AnnProvenancePs -> LHsExpr GhcPs -> AnnDecl GhcPs pragAnnD prov value = +#if __GLASGOW_HASKELL__ >= 906 + HsAnnotation defExt prov value +#else HsAnnotation defExt NoSourceText prov value +#endif viewPragAnnD :: AnnDecl GhcPs -> (AnnProvenancePs, LHsExpr GhcPs) +#if __GLASGOW_HASKELL__ >= 906 +viewPragAnnD (HsAnnotation _ prov value) = (prov, value) +#else viewPragAnnD (HsAnnotation _ _ prov value) = (prov, value) +#endif #if __GLASGOW_HASKELL__ < 900 viewPragAnnD _ = panic "viewPragAnnD" #endif @@ -881,5 +920,3 @@ simpleGHRSs body = GRHSs defExt [inheritLoc body $ GRHS defExt [] body] (inheritLoc body $ EmptyLocalBinds defExt) - - diff --git a/large-records/src/Data/Record/Internal/Plugin/Options.hs b/large-records/src/Data/Record/Internal/Plugin/Options.hs index c62e55dd..d1614938 100644 --- a/large-records/src/Data/Record/Internal/Plugin/Options.hs +++ b/large-records/src/Data/Record/Internal/Plugin/Options.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DerivingStrategies #-} @@ -67,7 +68,11 @@ instance HasField "debugLargeRecords" LargeRecordOptions Bool where -- | Extract all 'LargeRecordOptions' in a module -- -- Additionally returns the location of the ANN pragma. +#if __GLASGOW_HASKELL__ >= 906 +getLargeRecordOptions :: HsModule GhcPs -> Map String [(SrcSpan, LargeRecordOptions)] +#else getLargeRecordOptions :: HsModule -> Map String [(SrcSpan, LargeRecordOptions)] +#endif getLargeRecordOptions = Map.fromListWith (++) . map (second (:[])) diff --git a/large-records/src/Data/Record/Plugin.hs b/large-records/src/Data/Record/Plugin.hs index 7ae35da3..1976f97f 100644 --- a/large-records/src/Data/Record/Plugin.hs +++ b/large-records/src/Data/Record/Plugin.hs @@ -39,8 +39,10 @@ module Data.Record.Plugin ( , plugin ) where -import Control.Monad.Except -import Control.Monad.Trans.Writer.CPS +import Control.Monad +import Control.Monad.Trans.Class (lift) +import Control.Monad.Except (runExcept) +import Control.Monad.Trans.Writer.CPS (WriterT, tell, runWriterT) import Data.List (intersperse) import Data.Map.Strict (Map) import Data.Set (Set) @@ -76,6 +78,11 @@ import GHC.Types.Error (mkPlainError, mkMessages, mkPlainDiagnostic) import GHC.Utils.Error (mkMsgEnvelope, mkErrorMsgEnvelope) #endif +#if __GLASGOW_HASKELL__ >= 906 +import GHC.Types.Error (UnknownDiagnostic(..)) +import GHC.Driver.Config.Diagnostic (initPrintConfig) +#endif + {------------------------------------------------------------------------------- Top-level: the plugin proper -------------------------------------------------------------------------------} @@ -213,6 +220,12 @@ issueError l errMsg = do #if __GLASGOW_HASKELL__ == 902 throwOneError $ mkErr l neverQualify (mkDecorated [errMsg]) +#elif __GLASGOW_HASKELL__ >= 906 + throwOneError $ + mkErrorMsgEnvelope + l + neverQualify + (GhcUnknownMessage $ UnknownDiagnostic $ mkPlainError [] errMsg) #elif __GLASGOW_HASKELL__ >= 904 throwOneError $ mkErrorMsgEnvelope @@ -232,6 +245,16 @@ issueWarning l errMsg = do logger <- getLogger liftIO $ printOrThrowWarnings logger dynFlags . bag $ mkWarnMsg l neverQualify errMsg +#elif __GLASGOW_HASKELL__ >= 906 + logger <- getLogger + dflags <- getDynFlags + let print_config = initPrintConfig dflags + liftIO $ printOrThrowDiagnostics logger print_config (initDiagOpts dynFlags) . mkMessages . bag $ + mkMsgEnvelope + (initDiagOpts dynFlags) + l + neverQualify + (GhcUnknownMessage $ UnknownDiagnostic $ mkPlainDiagnostic WarningWithoutFlag [] errMsg) #elif __GLASGOW_HASKELL__ >= 904 logger <- getLogger liftIO $ printOrThrowDiagnostics logger (initDiagOpts dynFlags) . mkMessages . bag $ diff --git a/large-records/test/Test/Record/Util.hs b/large-records/test/Test/Record/Util.hs index 23892a8c..674b72f7 100644 --- a/large-records/test/Test/Record/Util.hs +++ b/large-records/test/Test/Record/Util.hs @@ -18,8 +18,9 @@ module Test.Record.Util ( ) where import Control.Exception -import Control.Monad.Except hiding (lift) -import Control.Monad.State hiding (lift) +import Control.Monad.Except (ExceptT(..), runExceptT, throwError) +import Control.Monad.IO.Class +import Control.Monad.State (StateT(..), modify) import Data.Bifunctor import Data.List (isPrefixOf) import Language.Haskell.TH diff --git a/typelet/CHANGELOG.md b/typelet/CHANGELOG.md index 4077c9cb..f974757f 100644 --- a/typelet/CHANGELOG.md +++ b/typelet/CHANGELOG.md @@ -1,5 +1,10 @@ # Revision history for typelet +## 0.1.4 -- 2024-05-30 + +* Support ghc 9.6 (and drop ghc <= 8.8) + [together with Gabriele Sales] + ## 0.1.3 -- 2023-03-06 * Support ghc 9.4 diff --git a/typelet/src/TypeLet/Plugin.hs b/typelet/src/TypeLet/Plugin.hs index e5ed6869..bea0fba9 100644 --- a/typelet/src/TypeLet/Plugin.hs +++ b/typelet/src/TypeLet/Plugin.hs @@ -95,7 +95,7 @@ simplifyWanteds rn given wanted = do -- Solve an Equal constraint by applying the substitution and turning it -- into a nominal equality constraint solveEqual :: - TCvSubst + Subst -> Ct -- Original Equal constraint -> GenLocated CtLoc CEqual -- Parsed Equal constraint -> TcPluginM 'Solve ((EvTerm, Ct), Ct) diff --git a/typelet/src/TypeLet/Plugin/GhcTcPluginAPI.hs b/typelet/src/TypeLet/Plugin/GhcTcPluginAPI.hs index 325a7df5..dbc3ecca 100644 --- a/typelet/src/TypeLet/Plugin/GhcTcPluginAPI.hs +++ b/typelet/src/TypeLet/Plugin/GhcTcPluginAPI.hs @@ -8,7 +8,7 @@ module TypeLet.Plugin.GhcTcPluginAPI ( -- * Additional re-exports -- ** Substitutions - , TCvSubst + , Subst -- opaque , Subst.substTy , Subst.substTyWith , Subst.zipTvSubst @@ -22,7 +22,6 @@ import GHC.Utils.Outputable #if MIN_VERSION_ghc(9,0,0) import GHC.Core.TyCo.FVs (tyCoVarsOfType) -import GHC.Core.TyCo.Subst (TCvSubst) import GHC.Types.Var.Set (elemVarSet) import qualified GHC.Core.TyCo.Subst as Subst @@ -30,9 +29,29 @@ import qualified GHC.Core.TyCo.Subst as Subst #else import VarSet (elemVarSet) -import TcType (TCvSubst, tyCoVarsOfType) +import TcType (tyCoVarsOfType) import qualified TcType as Subst #endif +{------------------------------------------------------------------------------- + TCvSubst was renamed to Subst in ghc 9.6 +-------------------------------------------------------------------------------} + +#if MIN_VERSION_ghc(9,6,0) +import GHC.Core.TyCo.Subst (Subst) +#elif MIN_VERSION_ghc(9,0,0) +import GHC.Core.TyCo.Subst (TCvSubst) +#else +import TcType (TCvSubst) +#endif + +#if !MIN_VERSION_ghc(9,6,0) +type Subst = TCvSubst +#endif + + + + + diff --git a/typelet/src/TypeLet/Plugin/Substitution.hs b/typelet/src/TypeLet/Plugin/Substitution.hs index 5c2735fb..e1f428c7 100644 --- a/typelet/src/TypeLet/Plugin/Substitution.hs +++ b/typelet/src/TypeLet/Plugin/Substitution.hs @@ -23,7 +23,7 @@ import TypeLet.Plugin.GhcTcPluginAPI -- our use case is simpler? Needs more thought. letsToSubst :: [GenLocated CtLoc CLet] - -> Either (Cycle (GenLocated CtLoc CLet)) TCvSubst + -> Either (Cycle (GenLocated CtLoc CLet)) Subst letsToSubst = fmap (uncurry zipTvSubst . unzip . go []) . inorder where go :: [(TyVar, Type)] -> [(TyVar, Type)] -> [(TyVar, Type)] diff --git a/typelet/src/TypeLet/UserAPI.hs b/typelet/src/TypeLet/UserAPI.hs index 5af552e0..a0a36e70 100644 --- a/typelet/src/TypeLet/UserAPI.hs +++ b/typelet/src/TypeLet/UserAPI.hs @@ -22,6 +22,8 @@ import Unsafe.Coerce (unsafeCoerce) -- $setup -- >>> :set -fplugin=TypeLet +-- >>> :set -XFlexibleContexts +-- >>> :set -XScopedTypeVariables {------------------------------------------------------------------------------- Main classes diff --git a/typelet/typelet.cabal b/typelet/typelet.cabal index 8129400c..8019e906 100644 --- a/typelet/typelet.cabal +++ b/typelet/typelet.cabal @@ -1,7 +1,7 @@ cabal-version: 2.4 build-type: Simple name: typelet -version: 0.1.3 +version: 0.1.4 synopsis: Plugin to faciliate type-level let description: For a certain class of programs, type-level let is essential in order to be able to write these programs in such a way @@ -17,7 +17,7 @@ maintainer: edsko@well-typed.com copyright: Well-Typed LLP, Juspay Technologies Pvt Ltd category: Plugin extra-source-files: CHANGELOG.md -tested-with: GHC ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.5 +tested-with: GHC ==8.10.7 || ==9.2.8 || ==9.4.8 || ==9.6.4 source-repository head type: git @@ -34,8 +34,8 @@ library TypeLet.Plugin.NameResolution TypeLet.Plugin.Substitution build-depends: - base >= 4.13 && < 4.18 - , ghc-tcplugin-api >= 0.10 && < 0.11 + base >= 4.14 && < 4.19 + , ghc-tcplugin-api >= 0.11 && < 0.12 -- whichever versions are bundled with ghc: , containers