From 01112861b29e0f377d9008fb46a6ea5dab781880 Mon Sep 17 00:00:00 2001 From: Ryan Scott Date: Mon, 29 Sep 2025 20:53:28 -0400 Subject: [PATCH] singletons-{th,base,base-code-generator}: Require building with GHC 9.14 Towards #625. --- .github/workflows/haskell-ci.yml | 89 +++++++++++++------ README.md | 2 +- cabal.haskell-ci | 2 - singletons-base-code-generator/CHANGES.md | 4 + .../singletons-base-code-generator.cabal | 4 +- singletons-base/CHANGES.md | 4 + singletons-base/README.md | 2 +- singletons-base/singletons-base.cabal | 10 +-- .../src/GHC/TypeLits/Singletons.hs | 6 +- .../src/GHC/TypeLits/Singletons/Internal.hs | 6 +- .../GradingClient/Database.golden | 8 +- .../Singletons/Classes.golden | 16 ++-- .../Singletons/DataValues.golden | 6 +- .../Singletons/EmptyShowDeriving.golden | 14 +-- .../Singletons/EnumDeriving.golden | 49 +++++----- .../compile-and-dump/Singletons/Maybe.golden | 11 +-- .../compile-and-dump/Singletons/Nat.golden | 8 +- .../Singletons/PatternMatching.golden | 6 +- .../Singletons/ShowDeriving.golden | 20 ++--- .../Singletons/StandaloneDeriving.golden | 32 +++---- .../compile-and-dump/Singletons/Star.golden | 4 +- .../compile-and-dump/Singletons/T136.golden | 26 +++--- .../compile-and-dump/Singletons/T190.golden | 24 ++--- .../compile-and-dump/Singletons/T204.golden | 4 +- .../compile-and-dump/Singletons/T313.golden | 8 +- .../compile-and-dump/Singletons/T358.golden | 8 +- .../compile-and-dump/Singletons/T371.golden | 24 ++--- .../compile-and-dump/Singletons/T555.golden | 4 +- .../compile-and-dump/Singletons/T581.golden | 16 ++-- .../compile-and-dump/Singletons/T89.golden | 16 ++-- singletons-th/CHANGES.md | 4 + singletons-th/README.md | 2 +- singletons-th/singletons-th.cabal | 8 +- singletons/singletons.cabal | 3 +- 34 files changed, 258 insertions(+), 192 deletions(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index a797dc19..6ab4946d 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -29,6 +29,11 @@ jobs: strategy: matrix: include: + - compiler: ghc-9.14.0.20250908 + compilerKind: ghc + compilerVersion: 9.14.0.20250908 + setup-method: ghcup-prerelease + allow-failure: false - compiler: ghc-9.12.2 compilerKind: ghc compilerVersion: 9.12.2 @@ -107,8 +112,8 @@ jobs: chmod a+x "$HOME/.ghcup/bin/ghcup" - name: Install cabal-install run: | - "$HOME/.ghcup/bin/ghcup" install cabal 3.14.1.1-p1 || (cat "$HOME"/.ghcup/logs/*.* && false) - echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.1.1-p1 -vnormal+nowrap" >> "$GITHUB_ENV" + "$HOME/.ghcup/bin/ghcup" install cabal 3.16.0.0 || (cat "$HOME"/.ghcup/logs/*.* && false) + echo "CABAL=$HOME/.ghcup/bin/cabal-3.16.0.0 -vnormal+nowrap" >> "$GITHUB_ENV" - name: Install GHC (GHCup) if: matrix.setup-method == 'ghcup' run: | @@ -123,6 +128,21 @@ jobs: HCKIND: ${{ matrix.compilerKind }} HCNAME: ${{ matrix.compiler }} HCVER: ${{ matrix.compilerVersion }} + - name: Install GHC (GHCup prerelease) + if: matrix.setup-method == 'ghcup-prerelease' + run: | + "$HOME/.ghcup/bin/ghcup" config add-release-channel prereleases + "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) + 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" + env: + HCKIND: ${{ matrix.compilerKind }} + HCNAME: ${{ matrix.compiler }} + HCVER: ${{ matrix.compilerVersion }} - name: Set PATH and environment variables run: | echo "$HOME/.cabal/bin" >> $GITHUB_PATH @@ -133,7 +153,7 @@ jobs: echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV" echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV" - echo "HEADHACKAGE=false" >> "$GITHUB_ENV" + if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV" env: HCKIND: ${{ matrix.compilerKind }} @@ -161,6 +181,18 @@ jobs: repository hackage.haskell.org url: http://hackage.haskell.org/ EOF + if $HEADHACKAGE; then + cat >> $CABAL_CONFIG <> $CABAL_CONFIG <> cabal.project - if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo "packages: $GITHUB_WORKSPACE/source/./singletons-th" >> cabal.project ; fi - if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo "packages: $GITHUB_WORKSPACE/source/./singletons-base" >> cabal.project ; fi - if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo "packages: $GITHUB_WORKSPACE/source/./singletons-base-code-generator" >> cabal.project ; fi + if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "packages: $GITHUB_WORKSPACE/source/./singletons-th" >> cabal.project ; fi + if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "packages: $GITHUB_WORKSPACE/source/./singletons-base" >> cabal.project ; fi + if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "packages: $GITHUB_WORKSPACE/source/./singletons-base-code-generator" >> cabal.project ; fi cat cabal.project - name: sdist run: | @@ -217,31 +249,34 @@ jobs: touch cabal.project touch cabal.project.local echo "packages: ${PKGDIR_singletons}" >> cabal.project - if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo "packages: ${PKGDIR_singletons_th}" >> cabal.project ; fi - if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo "packages: ${PKGDIR_singletons_base}" >> cabal.project ; fi - if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo "packages: ${PKGDIR_singletons_base_code_generator}" >> cabal.project ; fi + if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "packages: ${PKGDIR_singletons_th}" >> cabal.project ; fi + if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "packages: ${PKGDIR_singletons_base}" >> cabal.project ; fi + if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "packages: ${PKGDIR_singletons_base_code_generator}" >> cabal.project ; fi if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package singletons" >> cabal.project ; fi if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project ; fi - if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo "package singletons-th" >> cabal.project ; fi - if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project ; fi - if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo "package singletons-base" >> cabal.project ; fi - if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project ; fi - if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo "package singletons-base-code-generator" >> cabal.project ; fi - if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project ; fi + if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "package singletons-th" >> cabal.project ; fi + if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project ; fi + if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "package singletons-base" >> cabal.project ; fi + if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project ; fi + if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "package singletons-base-code-generator" >> cabal.project ; fi + if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project ; fi if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package singletons" >> cabal.project ; fi if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi - if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo "package singletons-th" >> cabal.project ; fi - if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi - if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo "package singletons-base" >> cabal.project ; fi - if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi - if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo "package singletons-base-code-generator" >> cabal.project ; fi - if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi + if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "package singletons-th" >> cabal.project ; fi + if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi + if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "package singletons-base" >> cabal.project ; fi + if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi + if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "package singletons-base-code-generator" >> cabal.project ; fi + if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi cat >> cabal.project <> cabal.project + fi $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(Cabal|Cabal-syntax|singletons|singletons-base|singletons-base-code-generator|singletons-th)$/; }' >> cabal.project.local cat cabal.project cat cabal.project.local @@ -269,12 +304,12 @@ jobs: run: | cd ${PKGDIR_singletons} || false ${CABAL} -vnormal check - if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then cd ${PKGDIR_singletons_th} || false ; fi - if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then ${CABAL} -vnormal check ; fi - if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then cd ${PKGDIR_singletons_base} || false ; fi - if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then ${CABAL} -vnormal check ; fi - if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then cd ${PKGDIR_singletons_base_code_generator} || false ; fi - if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then ${CABAL} -vnormal check ; fi + if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then cd ${PKGDIR_singletons_th} || false ; fi + if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then ${CABAL} -vnormal check ; fi + if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then cd ${PKGDIR_singletons_base} || false ; fi + if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then ${CABAL} -vnormal check ; fi + if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then cd ${PKGDIR_singletons_base_code_generator} || false ; fi + if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then ${CABAL} -vnormal check ; fi - name: haddock run: | $CABAL v2-haddock --disable-documentation $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all diff --git a/README.md b/README.md index b4bdd947..f80e5b2c 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ windows for requirements on the compiler version needed to build each library: GHC language extensions, even more so than `singletons` itself. As such, it is difficult to maintain support for multiple GHC versions in any given release of either library, so they only support the latest major GHC version - (currently GHC 9.12). + (currently GHC 9.14). Any code that uses the singleton-generation functionality from `singletons-th` or `singletons-base` needs to enable a long list of GHC extensions. This list diff --git a/cabal.haskell-ci b/cabal.haskell-ci index b36bf176..80ef7f2b 100644 --- a/cabal.haskell-ci +++ b/cabal.haskell-ci @@ -6,8 +6,6 @@ jobs-selection: any haddock-components: libs -- Needed to avoid https://github.com/haskell/cabal/issues/9917 installed: +all -Cabal -Cabal-syntax --- Work around https://github.com/haskell-CI/haskell-ci/issues/766 -cabal-install-version: 3.14.1.1 -- -Wunused-packages mistakenly flags some of singletons-base-test-suite's -- dependencies as unused. error-unused-packages: False diff --git a/singletons-base-code-generator/CHANGES.md b/singletons-base-code-generator/CHANGES.md index 09fc0ac8..bc31d4ea 100644 --- a/singletons-base-code-generator/CHANGES.md +++ b/singletons-base-code-generator/CHANGES.md @@ -1,6 +1,10 @@ Changelog for the `singletons-base-code-generator` project ========================================================== +next [????.??.??] +----------------- +* Require building with GHC 9.14. + 0.1 [2024.12.11] ---------------- * Initial release. diff --git a/singletons-base-code-generator/singletons-base-code-generator.cabal b/singletons-base-code-generator/singletons-base-code-generator.cabal index 3610105e..3a6bf899 100644 --- a/singletons-base-code-generator/singletons-base-code-generator.cabal +++ b/singletons-base-code-generator/singletons-base-code-generator.cabal @@ -8,7 +8,7 @@ author: Ryan Scott maintainer: Ryan Scott bug-reports: https://github.com/goldfirere/singletons/issues stability: experimental -tested-with: GHC == 9.12.2 +tested-with: GHC == 9.14.1 extra-doc-files: CHANGES.md extra-source-files: README.md license: BSD-3-Clause @@ -38,6 +38,6 @@ executable singletons-base-code-generator ghc-options: -Wall -Wcompat -threaded default-language: GHC2021 main-is: SingletonsBaseCodeGenerator.hs - build-depends: base >= 4.21 && < 4.22, + build-depends: base >= 4.22 && < 4.23, directory >= 1.2 && < 1.4, filepath >= 1.3 && < 1.6 diff --git a/singletons-base/CHANGES.md b/singletons-base/CHANGES.md index 317f356d..8389031e 100644 --- a/singletons-base/CHANGES.md +++ b/singletons-base/CHANGES.md @@ -1,6 +1,10 @@ Changelog for the `singletons-base` project =========================================== +next [????.??.??] +----------------- +* Require building with GHC 9.14. + 3.5 [2024.12.11] ---------------- * Require building with GHC 9.12. diff --git a/singletons-base/README.md b/singletons-base/README.md index 28605667..8aec60c0 100644 --- a/singletons-base/README.md +++ b/singletons-base/README.md @@ -18,7 +18,7 @@ that code with `singletons-base`. `singletons-base` uses code that relies on bleeding-edge GHC language extensions. As such, `singletons-base` only supports the latest major version -of GHC (currently GHC 9.12). For more information, +of GHC (currently GHC 9.14). For more information, consult the `singletons` [`README`](https://github.com/goldfirere/singletons/blob/master/README.md). diff --git a/singletons-base/singletons-base.cabal b/singletons-base/singletons-base.cabal index 41369275..12ba8a9f 100644 --- a/singletons-base/singletons-base.cabal +++ b/singletons-base/singletons-base.cabal @@ -8,7 +8,7 @@ author: Richard Eisenberg , Jan Stolarek bug-reports: https://github.com/goldfirere/singletons/issues stability: experimental -tested-with: GHC == 9.12.2 +tested-with: GHC == 9.14.1 extra-doc-files: CHANGES.md extra-source-files: README.md tests/README.md @@ -40,7 +40,7 @@ description: . @singletons-base@ uses code that relies on bleeding-edge GHC language extensions. As such, @singletons-base@ only supports the latest major version - of GHC (currently GHC 9.12). For more information, + of GHC (currently GHC 9.14). For more information, consult the @singletons@ @@. . @@ -67,11 +67,11 @@ source-repository head library hs-source-dirs: src - build-depends: base >= 4.21 && < 4.22, + build-depends: base >= 4.22 && < 4.23, pretty, singletons == 3.0.*, singletons-th >= 3.5 && < 3.6, - template-haskell >= 2.23 && < 2.24, + template-haskell >= 2.24 && < 2.25, text >= 1.2 default-language: GHC2024 other-extensions: TemplateHaskell @@ -149,7 +149,7 @@ test-suite singletons-base-test-suite main-is: SingletonsBaseTestSuite.hs other-modules: SingletonsBaseTestSuiteUtils - build-depends: base >= 4.21 && < 4.22, + build-depends: base >= 4.22 && < 4.23, bytestring >= 0.10.9, deepseq >= 1.4.4, filepath >= 1.3, diff --git a/singletons-base/src/GHC/TypeLits/Singletons.hs b/singletons-base/src/GHC/TypeLits/Singletons.hs index 84c01394..6129073c 100644 --- a/singletons-base/src/GHC/TypeLits/Singletons.hs +++ b/singletons-base/src/GHC/TypeLits/Singletons.hs @@ -21,9 +21,9 @@ module GHC.TypeLits.Singletons ( Natural, Symbol, Char, Sing, - SNat, pattern SNat, - SSymbol, pattern SSymbol, pattern SSym, - SChar, pattern SChar, + SNat, data SNat, + SSymbol, data SSymbol, data SSym, + SChar, data SChar, withKnownNat, withKnownSymbol, withKnownChar, Error, sError, ErrorWithoutStackTrace, sErrorWithoutStackTrace, diff --git a/singletons-base/src/GHC/TypeLits/Singletons/Internal.hs b/singletons-base/src/GHC/TypeLits/Singletons/Internal.hs index d84ddc70..243bc440 100644 --- a/singletons-base/src/GHC/TypeLits/Singletons/Internal.hs +++ b/singletons-base/src/GHC/TypeLits/Singletons/Internal.hs @@ -24,9 +24,9 @@ module GHC.TypeLits.Singletons.Internal ( Sing, Natural, TL.Symbol, Char, - TN.SNat, pattern TN.SNat, - TL.SSymbol, pattern TL.SSymbol, pattern SSym, - TL.SChar, pattern TL.SChar, + TN.SNat, data TN.SNat, + TL.SSymbol, data TL.SSymbol, data SSym, + TL.SChar, data TL.SChar, TN.withKnownNat, TL.withKnownSymbol, TL.withKnownChar, Error, sError, ErrorWithoutStackTrace, sErrorWithoutStackTrace, diff --git a/singletons-base/tests/compile-and-dump/GradingClient/Database.golden b/singletons-base/tests/compile-and-dump/GradingClient/Database.golden index 02e4470d..52c5bb4f 100644 --- a/singletons-base/tests/compile-and-dump/GradingClient/Database.golden +++ b/singletons-base/tests/compile-and-dump/GradingClient/Database.golden @@ -501,18 +501,18 @@ GradingClient/Database.hs:(0,0)-(0,0): Splicing declarations TFHelper_0123456789876543210 (VEC a_0123456789876543210 a_0123456789876543210) (VEC b_0123456789876543210 b_0123456789876543210) = Apply (Apply (&&@#@$) (Apply (Apply (==@#@$) a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (==@#@$) a_0123456789876543210) b_0123456789876543210) instance PEq U where type (==) a a = TFHelper_0123456789876543210 a a - type ShowsPrec_0123456789876543210 :: GHC.Num.Natural.Natural + type ShowsPrec_0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural -> U -> Symbol -> Symbol - type family ShowsPrec_0123456789876543210 (a :: GHC.Num.Natural.Natural) (a :: U) (a :: Symbol) :: Symbol where + type family ShowsPrec_0123456789876543210 (a :: GHC.Internal.Bignum.Natural.Natural) (a :: U) (a :: Symbol) :: Symbol where ShowsPrec_0123456789876543210 _ BOOL a_0123456789876543210 = Apply (Apply ShowStringSym0 "BOOL") a_0123456789876543210 ShowsPrec_0123456789876543210 _ STRING a_0123456789876543210 = Apply (Apply ShowStringSym0 "STRING") a_0123456789876543210 ShowsPrec_0123456789876543210 _ NAT a_0123456789876543210 = Apply (Apply ShowStringSym0 "NAT") a_0123456789876543210 ShowsPrec_0123456789876543210 p_0123456789876543210 (VEC arg_0123456789876543210 arg_0123456789876543210) a_0123456789876543210 = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "VEC ")) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210)) (Apply (Apply (.@#@$) ShowSpaceSym0) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210))))) a_0123456789876543210 instance PShow U where type ShowsPrec a a a = ShowsPrec_0123456789876543210 a a a - type ShowsPrec_0123456789876543210 :: GHC.Num.Natural.Natural + type ShowsPrec_0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural -> AChar -> Symbol -> Symbol - type family ShowsPrec_0123456789876543210 (a :: GHC.Num.Natural.Natural) (a :: AChar) (a :: Symbol) :: Symbol where + type family ShowsPrec_0123456789876543210 (a :: GHC.Internal.Bignum.Natural.Natural) (a :: AChar) (a :: Symbol) :: Symbol where ShowsPrec_0123456789876543210 _ CA a_0123456789876543210 = Apply (Apply ShowStringSym0 "CA") a_0123456789876543210 ShowsPrec_0123456789876543210 _ CB a_0123456789876543210 = Apply (Apply ShowStringSym0 "CB") a_0123456789876543210 ShowsPrec_0123456789876543210 _ CC a_0123456789876543210 = Apply (Apply ShowStringSym0 "CC") a_0123456789876543210 diff --git a/singletons-base/tests/compile-and-dump/Singletons/Classes.golden b/singletons-base/tests/compile-and-dump/Singletons/Classes.golden index 4db42e09..d6596448 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/Classes.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/Classes.golden @@ -16,20 +16,20 @@ Singletons/Classes.hs:(0,0)-(0,0): Splicing declarations data Foo = A | B data Foo2 = F | G + instance Eq Foo2 where + F == F = True + G == G = True + F == G = False + G == F = False + instance MyOrd Foo where + mycompare = fooCompare instance MyOrd () where mycompare _ = const EQ instance MyOrd Nat where Zero `mycompare` Zero = EQ Zero `mycompare` (Succ _) = LT (Succ _) `mycompare` Zero = GT - (Succ n) `mycompare` (Succ m) = m `mycompare` n - instance MyOrd Foo where - mycompare = fooCompare - instance Eq Foo2 where - F == F = True - G == G = True - F == G = False - G == F = False |] + (Succ n) `mycompare` (Succ m) = m `mycompare` n |] ======> const :: a -> b -> a const x _ = x diff --git a/singletons-base/tests/compile-and-dump/Singletons/DataValues.golden b/singletons-base/tests/compile-and-dump/Singletons/DataValues.golden index 93391aa4..1d542e1b 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/DataValues.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/DataValues.golden @@ -52,10 +52,10 @@ Singletons/DataValues.hs:(0,0)-(0,0): Splicing declarations type family Pr where Pr = Apply (Apply PairSym0 (Apply SuccSym0 ZeroSym0)) (Apply (Apply (:@#@$) ZeroSym0) NilSym0) type ShowsPrec_0123456789876543210 :: forall a - b. GHC.Num.Natural.Natural + b. GHC.Internal.Bignum.Natural.Natural -> Pair a b -> Symbol -> Symbol - type family ShowsPrec_0123456789876543210 @a @b (a :: GHC.Num.Natural.Natural) (a :: Pair a b) (a :: Symbol) :: Symbol where - ShowsPrec_0123456789876543210 @a @b (p_0123456789876543210 :: GHC.Num.Natural.Natural) (Pair arg_0123456789876543210 arg_0123456789876543210 :: Pair a b) (a_0123456789876543210 :: Symbol) = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "Pair ")) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210)) (Apply (Apply (.@#@$) ShowSpaceSym0) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210))))) a_0123456789876543210 + type family ShowsPrec_0123456789876543210 @a @b (a :: GHC.Internal.Bignum.Natural.Natural) (a :: Pair a b) (a :: Symbol) :: Symbol where + ShowsPrec_0123456789876543210 @a @b (p_0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) (Pair arg_0123456789876543210 arg_0123456789876543210 :: Pair a b) (a_0123456789876543210 :: Symbol) = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "Pair ")) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210)) (Apply (Apply (.@#@$) ShowSpaceSym0) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210))))) a_0123456789876543210 instance PShow (Pair a b) where type ShowsPrec a a a = ShowsPrec_0123456789876543210 a a a sAList :: Sing @_ AList diff --git a/singletons-base/tests/compile-and-dump/Singletons/EmptyShowDeriving.golden b/singletons-base/tests/compile-and-dump/Singletons/EmptyShowDeriving.golden index 238849e4..aa4a16aa 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/EmptyShowDeriving.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/EmptyShowDeriving.golden @@ -6,8 +6,8 @@ Singletons/EmptyShowDeriving.hs:(0,0)-(0,0): Splicing declarations ======> data Foo deriving instance Show Foo - type family LamCases_0123456789876543210 (v_01234567898765432100123456789876543210 :: Foo) (a_01234567898765432100123456789876543210 :: GHC.Types.Symbol) a_0123456789876543210 where - data LamCases_0123456789876543210Sym0 (v_01234567898765432100123456789876543210 :: Foo) (a_01234567898765432100123456789876543210 :: GHC.Types.Symbol) a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 (v_01234567898765432100123456789876543210 :: Foo) (a_01234567898765432100123456789876543210 :: GHC.Internal.Types.Symbol) a_0123456789876543210 where + data LamCases_0123456789876543210Sym0 (v_01234567898765432100123456789876543210 :: Foo) (a_01234567898765432100123456789876543210 :: GHC.Internal.Types.Symbol) a_01234567898765432100123456789876543210 where LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 v_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym1 v_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => LamCases_0123456789876543210Sym0 v_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 @@ -15,11 +15,13 @@ Singletons/EmptyShowDeriving.hs:(0,0)-(0,0): Splicing declarations instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 v_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) - type family LamCases_0123456789876543210Sym1 (v_01234567898765432100123456789876543210 :: Foo) (a_01234567898765432100123456789876543210 :: GHC.Types.Symbol) a_01234567898765432100123456789876543210 where + type family LamCases_0123456789876543210Sym1 (v_01234567898765432100123456789876543210 :: Foo) (a_01234567898765432100123456789876543210 :: GHC.Internal.Types.Symbol) a_01234567898765432100123456789876543210 where LamCases_0123456789876543210Sym1 v_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 v_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 - type ShowsPrec_0123456789876543210 :: GHC.Num.Natural.Natural - -> Foo -> GHC.Types.Symbol -> GHC.Types.Symbol - type family ShowsPrec_0123456789876543210 (a :: GHC.Num.Natural.Natural) (a :: Foo) (a :: GHC.Types.Symbol) :: GHC.Types.Symbol where + type ShowsPrec_0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural + -> Foo + -> GHC.Internal.Types.Symbol + -> GHC.Internal.Types.Symbol + type family ShowsPrec_0123456789876543210 (a :: GHC.Internal.Bignum.Natural.Natural) (a :: Foo) (a :: GHC.Internal.Types.Symbol) :: GHC.Internal.Types.Symbol where ShowsPrec_0123456789876543210 _ v_0123456789876543210 a_0123456789876543210 = Apply (Apply (LamCases_0123456789876543210Sym0 v_0123456789876543210 a_0123456789876543210) v_0123456789876543210) a_0123456789876543210 instance PShow Foo where type ShowsPrec a a a = ShowsPrec_0123456789876543210 a a a diff --git a/singletons-base/tests/compile-and-dump/Singletons/EnumDeriving.golden b/singletons-base/tests/compile-and-dump/Singletons/EnumDeriving.golden index 9b33449b..42f14b43 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/EnumDeriving.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/EnumDeriving.golden @@ -24,10 +24,10 @@ Singletons/EnumDeriving.hs:(0,0)-(0,0): Splicing declarations type Q2Sym0 :: Quux type family Q2Sym0 :: Quux where Q2Sym0 = Q2 - type family LamCases_0123456789876543210 (n0123456789876543210 :: GHC.Num.Natural.Natural) a_0123456789876543210 where + type family LamCases_0123456789876543210 (n0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) a_0123456789876543210 where LamCases_0123456789876543210 n 'True = BumSym0 LamCases_0123456789876543210 n 'False = Apply ErrorSym0 "toEnum: bad argument" - data LamCases_0123456789876543210Sym0 (n0123456789876543210 :: GHC.Num.Natural.Natural) a_01234567898765432100123456789876543210 + data LamCases_0123456789876543210Sym0 (n0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) a_01234567898765432100123456789876543210 where LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 n0123456789876543210) arg) (LamCases_0123456789876543210Sym1 n0123456789876543210 arg) => LamCases_0123456789876543210Sym0 n0123456789876543210 a_01234567898765432100123456789876543210 @@ -35,12 +35,12 @@ Singletons/EnumDeriving.hs:(0,0)-(0,0): Splicing declarations instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 n0123456789876543210) where suppressUnusedWarnings = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) - type family LamCases_0123456789876543210Sym1 (n0123456789876543210 :: GHC.Num.Natural.Natural) a_01234567898765432100123456789876543210 where + type family LamCases_0123456789876543210Sym1 (n0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) a_01234567898765432100123456789876543210 where LamCases_0123456789876543210Sym1 n0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 n0123456789876543210 a_01234567898765432100123456789876543210 - type family LamCases_0123456789876543210 (n0123456789876543210 :: GHC.Num.Natural.Natural) a_0123456789876543210 where + type family LamCases_0123456789876543210 (n0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) a_0123456789876543210 where LamCases_0123456789876543210 n 'True = BazSym0 LamCases_0123456789876543210 n 'False = Apply (LamCases_0123456789876543210Sym0 n) (Apply (Apply (==@#@$) n) (FromInteger 2)) - data LamCases_0123456789876543210Sym0 (n0123456789876543210 :: GHC.Num.Natural.Natural) a_01234567898765432100123456789876543210 + data LamCases_0123456789876543210Sym0 (n0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) a_01234567898765432100123456789876543210 where LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 n0123456789876543210) arg) (LamCases_0123456789876543210Sym1 n0123456789876543210 arg) => LamCases_0123456789876543210Sym0 n0123456789876543210 a_01234567898765432100123456789876543210 @@ -48,12 +48,12 @@ Singletons/EnumDeriving.hs:(0,0)-(0,0): Splicing declarations instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 n0123456789876543210) where suppressUnusedWarnings = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) - type family LamCases_0123456789876543210Sym1 (n0123456789876543210 :: GHC.Num.Natural.Natural) a_01234567898765432100123456789876543210 where + type family LamCases_0123456789876543210Sym1 (n0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) a_01234567898765432100123456789876543210 where LamCases_0123456789876543210Sym1 n0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 n0123456789876543210 a_01234567898765432100123456789876543210 - type family LamCases_0123456789876543210 (n0123456789876543210 :: GHC.Num.Natural.Natural) a_0123456789876543210 where + type family LamCases_0123456789876543210 (n0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) a_0123456789876543210 where LamCases_0123456789876543210 n 'True = BarSym0 LamCases_0123456789876543210 n 'False = Apply (LamCases_0123456789876543210Sym0 n) (Apply (Apply (==@#@$) n) (FromInteger 1)) - data LamCases_0123456789876543210Sym0 (n0123456789876543210 :: GHC.Num.Natural.Natural) a_01234567898765432100123456789876543210 + data LamCases_0123456789876543210Sym0 (n0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) a_01234567898765432100123456789876543210 where LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 n0123456789876543210) arg) (LamCases_0123456789876543210Sym1 n0123456789876543210 arg) => LamCases_0123456789876543210Sym0 n0123456789876543210 a_01234567898765432100123456789876543210 @@ -61,13 +61,15 @@ Singletons/EnumDeriving.hs:(0,0)-(0,0): Splicing declarations instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 n0123456789876543210) where suppressUnusedWarnings = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) - type family LamCases_0123456789876543210Sym1 (n0123456789876543210 :: GHC.Num.Natural.Natural) a_01234567898765432100123456789876543210 where + type family LamCases_0123456789876543210Sym1 (n0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) a_01234567898765432100123456789876543210 where LamCases_0123456789876543210Sym1 n0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 n0123456789876543210 a_01234567898765432100123456789876543210 - type ToEnum_0123456789876543210 :: GHC.Num.Natural.Natural -> Foo - type family ToEnum_0123456789876543210 (a :: GHC.Num.Natural.Natural) :: Foo where + type ToEnum_0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural + -> Foo + type family ToEnum_0123456789876543210 (a :: GHC.Internal.Bignum.Natural.Natural) :: Foo where ToEnum_0123456789876543210 n = Apply (LamCases_0123456789876543210Sym0 n) (Apply (Apply (==@#@$) n) (FromInteger 0)) - type FromEnum_0123456789876543210 :: Foo -> GHC.Num.Natural.Natural - type family FromEnum_0123456789876543210 (a :: Foo) :: GHC.Num.Natural.Natural where + type FromEnum_0123456789876543210 :: Foo + -> GHC.Internal.Bignum.Natural.Natural + type family FromEnum_0123456789876543210 (a :: Foo) :: GHC.Internal.Bignum.Natural.Natural where FromEnum_0123456789876543210 Bar = FromInteger 0 FromEnum_0123456789876543210 Baz = FromInteger 1 FromEnum_0123456789876543210 Bum = FromInteger 2 @@ -147,10 +149,10 @@ Singletons/EnumDeriving.hs:(0,0)-(0,0): Splicing declarations Singletons/EnumDeriving.hs:0:0:: Splicing declarations singEnumInstance ''Quux ======> - type family LamCases_0123456789876543210 (n0123456789876543210 :: GHC.Num.Natural.Natural) a_0123456789876543210 where + type family LamCases_0123456789876543210 (n0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) a_0123456789876543210 where LamCases_0123456789876543210 n 'True = Q2Sym0 LamCases_0123456789876543210 n 'False = Apply ErrorSym0 "toEnum: bad argument" - data LamCases_0123456789876543210Sym0 (n0123456789876543210 :: GHC.Num.Natural.Natural) a_01234567898765432100123456789876543210 + data LamCases_0123456789876543210Sym0 (n0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) a_01234567898765432100123456789876543210 where LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 n0123456789876543210) arg) (LamCases_0123456789876543210Sym1 n0123456789876543210 arg) => LamCases_0123456789876543210Sym0 n0123456789876543210 a_01234567898765432100123456789876543210 @@ -158,12 +160,12 @@ Singletons/EnumDeriving.hs:0:0:: Splicing declarations instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 n0123456789876543210) where suppressUnusedWarnings = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) - type family LamCases_0123456789876543210Sym1 (n0123456789876543210 :: GHC.Num.Natural.Natural) a_01234567898765432100123456789876543210 where + type family LamCases_0123456789876543210Sym1 (n0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) a_01234567898765432100123456789876543210 where LamCases_0123456789876543210Sym1 n0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 n0123456789876543210 a_01234567898765432100123456789876543210 - type family LamCases_0123456789876543210 (n0123456789876543210 :: GHC.Num.Natural.Natural) a_0123456789876543210 where + type family LamCases_0123456789876543210 (n0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) a_0123456789876543210 where LamCases_0123456789876543210 n 'True = Q1Sym0 LamCases_0123456789876543210 n 'False = Apply (LamCases_0123456789876543210Sym0 n) (Apply (Apply (==@#@$) n) (FromInteger 1)) - data LamCases_0123456789876543210Sym0 (n0123456789876543210 :: GHC.Num.Natural.Natural) a_01234567898765432100123456789876543210 + data LamCases_0123456789876543210Sym0 (n0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) a_01234567898765432100123456789876543210 where LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 n0123456789876543210) arg) (LamCases_0123456789876543210Sym1 n0123456789876543210 arg) => LamCases_0123456789876543210Sym0 n0123456789876543210 a_01234567898765432100123456789876543210 @@ -171,14 +173,15 @@ Singletons/EnumDeriving.hs:0:0:: Splicing declarations instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 n0123456789876543210) where suppressUnusedWarnings = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) - type family LamCases_0123456789876543210Sym1 (n0123456789876543210 :: GHC.Num.Natural.Natural) a_01234567898765432100123456789876543210 where + type family LamCases_0123456789876543210Sym1 (n0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) a_01234567898765432100123456789876543210 where LamCases_0123456789876543210Sym1 n0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 n0123456789876543210 a_01234567898765432100123456789876543210 - type ToEnum_0123456789876543210 :: GHC.Num.Natural.Natural -> Quux - type family ToEnum_0123456789876543210 (a :: GHC.Num.Natural.Natural) :: Quux where + type ToEnum_0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural + -> Quux + type family ToEnum_0123456789876543210 (a :: GHC.Internal.Bignum.Natural.Natural) :: Quux where ToEnum_0123456789876543210 n = Apply (LamCases_0123456789876543210Sym0 n) (Apply (Apply (==@#@$) n) (FromInteger 0)) type FromEnum_0123456789876543210 :: Quux - -> GHC.Num.Natural.Natural - type family FromEnum_0123456789876543210 (a :: Quux) :: GHC.Num.Natural.Natural where + -> GHC.Internal.Bignum.Natural.Natural + type family FromEnum_0123456789876543210 (a :: Quux) :: GHC.Internal.Bignum.Natural.Natural where FromEnum_0123456789876543210 'Q1 = FromInteger 0 FromEnum_0123456789876543210 'Q2 = FromInteger 1 instance PEnum Quux where diff --git a/singletons-base/tests/compile-and-dump/Singletons/Maybe.golden b/singletons-base/tests/compile-and-dump/Singletons/Maybe.golden index ef5e22b8..8c93ee41 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/Maybe.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/Maybe.golden @@ -30,12 +30,13 @@ Singletons/Maybe.hs:(0,0)-(0,0): Splicing declarations TFHelper_0123456789876543210 @a (Just a_0123456789876543210 :: Maybe a) (Just b_0123456789876543210 :: Maybe a) = Apply (Apply (==@#@$) a_0123456789876543210) b_0123456789876543210 instance PEq (Maybe a) where type (==) a a = TFHelper_0123456789876543210 a a - type ShowsPrec_0123456789876543210 :: forall a. GHC.Num.Natural.Natural + type ShowsPrec_0123456789876543210 :: forall a. GHC.Internal.Bignum.Natural.Natural -> Maybe a - -> GHC.Types.Symbol -> GHC.Types.Symbol - type family ShowsPrec_0123456789876543210 @a (a :: GHC.Num.Natural.Natural) (a :: Maybe a) (a :: GHC.Types.Symbol) :: GHC.Types.Symbol where - ShowsPrec_0123456789876543210 @a (_ :: GHC.Num.Natural.Natural) (Nothing :: Maybe a) (a_0123456789876543210 :: GHC.Types.Symbol) = Apply (Apply ShowStringSym0 "Nothing") a_0123456789876543210 - ShowsPrec_0123456789876543210 @a (p_0123456789876543210 :: GHC.Num.Natural.Natural) (Just arg_0123456789876543210 :: Maybe a) (a_0123456789876543210 :: GHC.Types.Symbol) = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "Just ")) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210))) a_0123456789876543210 + -> GHC.Internal.Types.Symbol + -> GHC.Internal.Types.Symbol + type family ShowsPrec_0123456789876543210 @a (a :: GHC.Internal.Bignum.Natural.Natural) (a :: Maybe a) (a :: GHC.Internal.Types.Symbol) :: GHC.Internal.Types.Symbol where + ShowsPrec_0123456789876543210 @a (_ :: GHC.Internal.Bignum.Natural.Natural) (Nothing :: Maybe a) (a_0123456789876543210 :: GHC.Internal.Types.Symbol) = Apply (Apply ShowStringSym0 "Nothing") a_0123456789876543210 + ShowsPrec_0123456789876543210 @a (p_0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) (Just arg_0123456789876543210 :: Maybe a) (a_0123456789876543210 :: GHC.Internal.Types.Symbol) = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "Just ")) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210))) a_0123456789876543210 instance PShow (Maybe a) where type ShowsPrec a a a = ShowsPrec_0123456789876543210 a a a data SMaybe :: forall a. Maybe a -> Type diff --git a/singletons-base/tests/compile-and-dump/Singletons/Nat.golden b/singletons-base/tests/compile-and-dump/Singletons/Nat.golden index ed7eefa8..20aa989e 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/Nat.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/Nat.golden @@ -84,9 +84,11 @@ Singletons/Nat.hs:(0,0)-(0,0): Splicing declarations TFHelper_0123456789876543210 (Succ a_0123456789876543210) (Succ b_0123456789876543210) = Apply (Apply (==@#@$) a_0123456789876543210) b_0123456789876543210 instance PEq Nat where type (==) a a = TFHelper_0123456789876543210 a a - type ShowsPrec_0123456789876543210 :: GHC.Num.Natural.Natural - -> Nat -> GHC.Types.Symbol -> GHC.Types.Symbol - type family ShowsPrec_0123456789876543210 (a :: GHC.Num.Natural.Natural) (a :: Nat) (a :: GHC.Types.Symbol) :: GHC.Types.Symbol where + type ShowsPrec_0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural + -> Nat + -> GHC.Internal.Types.Symbol + -> GHC.Internal.Types.Symbol + type family ShowsPrec_0123456789876543210 (a :: GHC.Internal.Bignum.Natural.Natural) (a :: Nat) (a :: GHC.Internal.Types.Symbol) :: GHC.Internal.Types.Symbol where ShowsPrec_0123456789876543210 _ Zero a_0123456789876543210 = Apply (Apply ShowStringSym0 "Zero") a_0123456789876543210 ShowsPrec_0123456789876543210 p_0123456789876543210 (Succ arg_0123456789876543210) a_0123456789876543210 = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "Succ ")) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210))) a_0123456789876543210 instance PShow Nat where diff --git a/singletons-base/tests/compile-and-dump/Singletons/PatternMatching.golden b/singletons-base/tests/compile-and-dump/Singletons/PatternMatching.golden index e99d61f1..e81aabbe 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/PatternMatching.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/PatternMatching.golden @@ -52,10 +52,10 @@ Singletons/PatternMatching.hs:(0,0)-(0,0): Splicing declarations type family Pr where Pr = Apply (Apply PairSym0 (Apply SuccSym0 ZeroSym0)) (Apply (Apply (:@#@$) ZeroSym0) NilSym0) type ShowsPrec_0123456789876543210 :: forall a - b. GHC.Num.Natural.Natural + b. GHC.Internal.Bignum.Natural.Natural -> Pair a b -> Symbol -> Symbol - type family ShowsPrec_0123456789876543210 @a @b (a :: GHC.Num.Natural.Natural) (a :: Pair a b) (a :: Symbol) :: Symbol where - ShowsPrec_0123456789876543210 @a @b (p_0123456789876543210 :: GHC.Num.Natural.Natural) (Pair arg_0123456789876543210 arg_0123456789876543210 :: Pair a b) (a_0123456789876543210 :: Symbol) = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "Pair ")) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210)) (Apply (Apply (.@#@$) ShowSpaceSym0) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210))))) a_0123456789876543210 + type family ShowsPrec_0123456789876543210 @a @b (a :: GHC.Internal.Bignum.Natural.Natural) (a :: Pair a b) (a :: Symbol) :: Symbol where + ShowsPrec_0123456789876543210 @a @b (p_0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) (Pair arg_0123456789876543210 arg_0123456789876543210 :: Pair a b) (a_0123456789876543210 :: Symbol) = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "Pair ")) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210)) (Apply (Apply (.@#@$) ShowSpaceSym0) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210))))) a_0123456789876543210 instance PShow (Pair a b) where type ShowsPrec a a a = ShowsPrec_0123456789876543210 a a a sAList :: Sing @_ AList diff --git a/singletons-base/tests/compile-and-dump/Singletons/ShowDeriving.golden b/singletons-base/tests/compile-and-dump/Singletons/ShowDeriving.golden index b27b2f65..f4f53374 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/ShowDeriving.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/ShowDeriving.golden @@ -159,24 +159,24 @@ Singletons/ShowDeriving.hs:(0,0)-(0,0): Splicing declarations type GetFoo3a :: Foo3 -> Bool type family GetFoo3a (a :: Foo3) :: Bool where GetFoo3a (MkFoo3 field _) = field - type ShowsPrec_0123456789876543210 :: GHC.Num.Natural.Natural + type ShowsPrec_0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural -> Foo1 -> Symbol -> Symbol - type family ShowsPrec_0123456789876543210 (a :: GHC.Num.Natural.Natural) (a :: Foo1) (a :: Symbol) :: Symbol where + type family ShowsPrec_0123456789876543210 (a :: GHC.Internal.Bignum.Natural.Natural) (a :: Foo1) (a :: Symbol) :: Symbol where ShowsPrec_0123456789876543210 _ MkFoo1 a_0123456789876543210 = Apply (Apply ShowStringSym0 "MkFoo1") a_0123456789876543210 instance PShow Foo1 where type ShowsPrec a a a = ShowsPrec_0123456789876543210 a a a - type ShowsPrec_0123456789876543210 :: forall a. GHC.Num.Natural.Natural + type ShowsPrec_0123456789876543210 :: forall a. GHC.Internal.Bignum.Natural.Natural -> Foo2 a -> Symbol -> Symbol - type family ShowsPrec_0123456789876543210 @a (a :: GHC.Num.Natural.Natural) (a :: Foo2 a) (a :: Symbol) :: Symbol where - ShowsPrec_0123456789876543210 @a (p_0123456789876543210 :: GHC.Num.Natural.Natural) (MkFoo2a arg_0123456789876543210 arg_0123456789876543210 :: Foo2 a) (a_0123456789876543210 :: Symbol) = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "MkFoo2a ")) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210)) (Apply (Apply (.@#@$) ShowSpaceSym0) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210))))) a_0123456789876543210 - ShowsPrec_0123456789876543210 @a (p_0123456789876543210 :: GHC.Num.Natural.Natural) (MkFoo2b argL_0123456789876543210 argR_0123456789876543210 :: Foo2 a) (a_0123456789876543210 :: Symbol) = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 5))) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 6)) argL_0123456789876543210)) (Apply (Apply (.@#@$) (Apply ShowStringSym0 " `MkFoo2b` ")) (Apply (Apply ShowsPrecSym0 (FromInteger 6)) argR_0123456789876543210)))) a_0123456789876543210 - ShowsPrec_0123456789876543210 @a (p_0123456789876543210 :: GHC.Num.Natural.Natural) ((:*:) arg_0123456789876543210 arg_0123456789876543210 :: Foo2 a) (a_0123456789876543210 :: Symbol) = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "(:*:) ")) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210)) (Apply (Apply (.@#@$) ShowSpaceSym0) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210))))) a_0123456789876543210 - ShowsPrec_0123456789876543210 @a (p_0123456789876543210 :: GHC.Num.Natural.Natural) ((:&:) argL_0123456789876543210 argR_0123456789876543210 :: Foo2 a) (a_0123456789876543210 :: Symbol) = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 5))) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 6)) argL_0123456789876543210)) (Apply (Apply (.@#@$) (Apply ShowStringSym0 " :&: ")) (Apply (Apply ShowsPrecSym0 (FromInteger 6)) argR_0123456789876543210)))) a_0123456789876543210 + type family ShowsPrec_0123456789876543210 @a (a :: GHC.Internal.Bignum.Natural.Natural) (a :: Foo2 a) (a :: Symbol) :: Symbol where + ShowsPrec_0123456789876543210 @a (p_0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) (MkFoo2a arg_0123456789876543210 arg_0123456789876543210 :: Foo2 a) (a_0123456789876543210 :: Symbol) = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "MkFoo2a ")) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210)) (Apply (Apply (.@#@$) ShowSpaceSym0) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210))))) a_0123456789876543210 + ShowsPrec_0123456789876543210 @a (p_0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) (MkFoo2b argL_0123456789876543210 argR_0123456789876543210 :: Foo2 a) (a_0123456789876543210 :: Symbol) = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 5))) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 6)) argL_0123456789876543210)) (Apply (Apply (.@#@$) (Apply ShowStringSym0 " `MkFoo2b` ")) (Apply (Apply ShowsPrecSym0 (FromInteger 6)) argR_0123456789876543210)))) a_0123456789876543210 + ShowsPrec_0123456789876543210 @a (p_0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) ((:*:) arg_0123456789876543210 arg_0123456789876543210 :: Foo2 a) (a_0123456789876543210 :: Symbol) = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "(:*:) ")) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210)) (Apply (Apply (.@#@$) ShowSpaceSym0) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210))))) a_0123456789876543210 + ShowsPrec_0123456789876543210 @a (p_0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) ((:&:) argL_0123456789876543210 argR_0123456789876543210 :: Foo2 a) (a_0123456789876543210 :: Symbol) = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 5))) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 6)) argL_0123456789876543210)) (Apply (Apply (.@#@$) (Apply ShowStringSym0 " :&: ")) (Apply (Apply ShowsPrecSym0 (FromInteger 6)) argR_0123456789876543210)))) a_0123456789876543210 instance PShow (Foo2 a) where type ShowsPrec a a a = ShowsPrec_0123456789876543210 a a a - type ShowsPrec_0123456789876543210 :: GHC.Num.Natural.Natural + type ShowsPrec_0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural -> Foo3 -> Symbol -> Symbol - type family ShowsPrec_0123456789876543210 (a :: GHC.Num.Natural.Natural) (a :: Foo3) (a :: Symbol) :: Symbol where + type family ShowsPrec_0123456789876543210 (a :: GHC.Internal.Bignum.Natural.Natural) (a :: Foo3) (a :: Symbol) :: Symbol where ShowsPrec_0123456789876543210 p_0123456789876543210 (MkFoo3 arg_0123456789876543210 arg_0123456789876543210) a_0123456789876543210 = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "MkFoo3 ")) (Apply (Apply (.@#@$) (Apply ShowCharSym0 '{')) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "getFoo3a = ")) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 0)) arg_0123456789876543210)) (Apply (Apply (.@#@$) ShowCommaSpaceSym0) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "(***) = ")) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 0)) arg_0123456789876543210)) (Apply ShowCharSym0 '}'))))))))) a_0123456789876543210 instance PShow Foo3 where type ShowsPrec a a a = ShowsPrec_0123456789876543210 a a a diff --git a/singletons-base/tests/compile-and-dump/Singletons/StandaloneDeriving.golden b/singletons-base/tests/compile-and-dump/Singletons/StandaloneDeriving.golden index 43963a97..92d0c9f4 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/StandaloneDeriving.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/StandaloneDeriving.golden @@ -65,10 +65,10 @@ Singletons/StandaloneDeriving.hs:(0,0)-(0,0): Splicing declarations Compare_0123456789876543210 @a ((:*:) a_0123456789876543210 a_0123456789876543210 :: T a ()) ((:*:) b_0123456789876543210 b_0123456789876543210 :: T a ()) = Apply (Apply (Apply FoldlSym0 (<>@#@$)) EQSym0) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) NilSym0)) instance POrd (T a ()) where type Compare a a = Compare_0123456789876543210 a a - type ShowsPrec_0123456789876543210 :: forall a. GHC.Num.Natural.Natural + type ShowsPrec_0123456789876543210 :: forall a. GHC.Internal.Bignum.Natural.Natural -> T a () -> Symbol -> Symbol - type family ShowsPrec_0123456789876543210 @a (a :: GHC.Num.Natural.Natural) (a :: T a ()) (a :: Symbol) :: Symbol where - ShowsPrec_0123456789876543210 @a (p_0123456789876543210 :: GHC.Num.Natural.Natural) ((:*:) argL_0123456789876543210 argR_0123456789876543210 :: T a ()) (a_0123456789876543210 :: Symbol) = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 6))) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 7)) argL_0123456789876543210)) (Apply (Apply (.@#@$) (Apply ShowStringSym0 " :*: ")) (Apply (Apply ShowsPrecSym0 (FromInteger 7)) argR_0123456789876543210)))) a_0123456789876543210 + type family ShowsPrec_0123456789876543210 @a (a :: GHC.Internal.Bignum.Natural.Natural) (a :: T a ()) (a :: Symbol) :: Symbol where + ShowsPrec_0123456789876543210 @a (p_0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) ((:*:) argL_0123456789876543210 argR_0123456789876543210 :: T a ()) (a_0123456789876543210 :: Symbol) = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 6))) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 7)) argL_0123456789876543210)) (Apply (Apply (.@#@$) (Apply ShowStringSym0 " :*: ")) (Apply (Apply ShowsPrecSym0 (FromInteger 7)) argR_0123456789876543210)))) a_0123456789876543210 instance PShow (T a ()) where type ShowsPrec a a a = ShowsPrec_0123456789876543210 a a a type TFHelper_0123456789876543210 :: S -> S -> Bool @@ -87,9 +87,9 @@ Singletons/StandaloneDeriving.hs:(0,0)-(0,0): Splicing declarations Compare_0123456789876543210 S2 S1 = GTSym0 instance POrd S where type Compare a a = Compare_0123456789876543210 a a - type ShowsPrec_0123456789876543210 :: GHC.Num.Natural.Natural + type ShowsPrec_0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural -> S -> Symbol -> Symbol - type family ShowsPrec_0123456789876543210 (a :: GHC.Num.Natural.Natural) (a :: S) (a :: Symbol) :: Symbol where + type family ShowsPrec_0123456789876543210 (a :: GHC.Internal.Bignum.Natural.Natural) (a :: S) (a :: Symbol) :: Symbol where ShowsPrec_0123456789876543210 _ S1 a_0123456789876543210 = Apply (Apply ShowStringSym0 "S1") a_0123456789876543210 ShowsPrec_0123456789876543210 _ S2 a_0123456789876543210 = Apply (Apply ShowStringSym0 "S2") a_0123456789876543210 instance PShow S where @@ -103,10 +103,10 @@ Singletons/StandaloneDeriving.hs:(0,0)-(0,0): Splicing declarations instance PBounded S where type MinBound = MinBound_0123456789876543210 type MaxBound = MaxBound_0123456789876543210 - type family LamCases_0123456789876543210 (n0123456789876543210 :: GHC.Num.Natural.Natural) a_0123456789876543210 where + type family LamCases_0123456789876543210 (n0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) a_0123456789876543210 where LamCases_0123456789876543210 n 'True = S2Sym0 LamCases_0123456789876543210 n 'False = Apply ErrorSym0 "toEnum: bad argument" - data LamCases_0123456789876543210Sym0 (n0123456789876543210 :: GHC.Num.Natural.Natural) a_01234567898765432100123456789876543210 + data LamCases_0123456789876543210Sym0 (n0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) a_01234567898765432100123456789876543210 where LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 n0123456789876543210) arg) (LamCases_0123456789876543210Sym1 n0123456789876543210 arg) => LamCases_0123456789876543210Sym0 n0123456789876543210 a_01234567898765432100123456789876543210 @@ -114,12 +114,12 @@ Singletons/StandaloneDeriving.hs:(0,0)-(0,0): Splicing declarations instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 n0123456789876543210) where suppressUnusedWarnings = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) - type family LamCases_0123456789876543210Sym1 (n0123456789876543210 :: GHC.Num.Natural.Natural) a_01234567898765432100123456789876543210 where + type family LamCases_0123456789876543210Sym1 (n0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) a_01234567898765432100123456789876543210 where LamCases_0123456789876543210Sym1 n0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 n0123456789876543210 a_01234567898765432100123456789876543210 - type family LamCases_0123456789876543210 (n0123456789876543210 :: GHC.Num.Natural.Natural) a_0123456789876543210 where + type family LamCases_0123456789876543210 (n0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) a_0123456789876543210 where LamCases_0123456789876543210 n 'True = S1Sym0 LamCases_0123456789876543210 n 'False = Apply (LamCases_0123456789876543210Sym0 n) (Apply (Apply (==@#@$) n) (FromInteger 1)) - data LamCases_0123456789876543210Sym0 (n0123456789876543210 :: GHC.Num.Natural.Natural) a_01234567898765432100123456789876543210 + data LamCases_0123456789876543210Sym0 (n0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) a_01234567898765432100123456789876543210 where LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 n0123456789876543210) arg) (LamCases_0123456789876543210Sym1 n0123456789876543210 arg) => LamCases_0123456789876543210Sym0 n0123456789876543210 a_01234567898765432100123456789876543210 @@ -127,13 +127,15 @@ Singletons/StandaloneDeriving.hs:(0,0)-(0,0): Splicing declarations instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 n0123456789876543210) where suppressUnusedWarnings = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) - type family LamCases_0123456789876543210Sym1 (n0123456789876543210 :: GHC.Num.Natural.Natural) a_01234567898765432100123456789876543210 where + type family LamCases_0123456789876543210Sym1 (n0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) a_01234567898765432100123456789876543210 where LamCases_0123456789876543210Sym1 n0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 n0123456789876543210 a_01234567898765432100123456789876543210 - type ToEnum_0123456789876543210 :: GHC.Num.Natural.Natural -> S - type family ToEnum_0123456789876543210 (a :: GHC.Num.Natural.Natural) :: S where + type ToEnum_0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural + -> S + type family ToEnum_0123456789876543210 (a :: GHC.Internal.Bignum.Natural.Natural) :: S where ToEnum_0123456789876543210 n = Apply (LamCases_0123456789876543210Sym0 n) (Apply (Apply (==@#@$) n) (FromInteger 0)) - type FromEnum_0123456789876543210 :: S -> GHC.Num.Natural.Natural - type family FromEnum_0123456789876543210 (a :: S) :: GHC.Num.Natural.Natural where + type FromEnum_0123456789876543210 :: S + -> GHC.Internal.Bignum.Natural.Natural + type family FromEnum_0123456789876543210 (a :: S) :: GHC.Internal.Bignum.Natural.Natural where FromEnum_0123456789876543210 S1 = FromInteger 0 FromEnum_0123456789876543210 S2 = FromInteger 1 instance PEnum S where diff --git a/singletons-base/tests/compile-and-dump/Singletons/Star.golden b/singletons-base/tests/compile-and-dump/Singletons/Star.golden index caad101e..af9b33db 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/Star.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/Star.golden @@ -106,9 +106,9 @@ Singletons/Star.hs:0:0:: Splicing declarations Compare_0123456789876543210 (Vec _ _) (Maybe _) = GTSym0 instance POrd Type where type Compare a a = Compare_0123456789876543210 a a - type ShowsPrec_0123456789876543210 :: GHC.Num.Natural.Natural + type ShowsPrec_0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural -> Type -> Symbol -> Symbol - type family ShowsPrec_0123456789876543210 (a :: GHC.Num.Natural.Natural) (a :: Type) (a :: Symbol) :: Symbol where + type family ShowsPrec_0123456789876543210 (a :: GHC.Internal.Bignum.Natural.Natural) (a :: Type) (a :: Symbol) :: Symbol where ShowsPrec_0123456789876543210 _ Nat a_0123456789876543210 = Apply (Apply ShowStringSym0 "Nat") a_0123456789876543210 ShowsPrec_0123456789876543210 _ Int a_0123456789876543210 = Apply (Apply ShowStringSym0 "Int") a_0123456789876543210 ShowsPrec_0123456789876543210 _ String a_0123456789876543210 = Apply (Apply ShowStringSym0 "String") a_0123456789876543210 diff --git a/singletons-base/tests/compile-and-dump/Singletons/T136.golden b/singletons-base/tests/compile-and-dump/Singletons/T136.golden index 036fbe6e..0d409599 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T136.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T136.golden @@ -39,10 +39,10 @@ Singletons/T136.hs:(0,0)-(0,0): Splicing declarations Pred_0123456789876543210 '[] = Apply ErrorSym0 "pred 0" Pred_0123456789876543210 ('(:) 'False as) = Apply (Apply (:@#@$) TrueSym0) (Apply PredSym0 as) Pred_0123456789876543210 ('(:) 'True as) = Apply (Apply (:@#@$) FalseSym0) as - type family LamCases_0123456789876543210 i0123456789876543210 (arg_01234567898765432100123456789876543210 :: GHC.Num.Natural.Natural) a_0123456789876543210 where + type family LamCases_0123456789876543210 i0123456789876543210 (arg_01234567898765432100123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) a_0123456789876543210 where LamCases_0123456789876543210 i arg_0123456789876543210 'True = NilSym0 LamCases_0123456789876543210 i arg_0123456789876543210 'False = Apply SuccSym0 (Apply ToEnumSym0 (Apply PredSym0 i)) - data LamCases_0123456789876543210Sym0 i0123456789876543210 (arg_01234567898765432100123456789876543210 :: GHC.Num.Natural.Natural) a_01234567898765432100123456789876543210 + data LamCases_0123456789876543210Sym0 i0123456789876543210 (arg_01234567898765432100123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) a_01234567898765432100123456789876543210 where LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 i0123456789876543210 arg_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym1 i0123456789876543210 arg_01234567898765432100123456789876543210 arg) => LamCases_0123456789876543210Sym0 i0123456789876543210 arg_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 @@ -50,12 +50,12 @@ Singletons/T136.hs:(0,0)-(0,0): Splicing declarations instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 i0123456789876543210 arg_01234567898765432100123456789876543210) where suppressUnusedWarnings = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) - type family LamCases_0123456789876543210Sym1 i0123456789876543210 (arg_01234567898765432100123456789876543210 :: GHC.Num.Natural.Natural) a_01234567898765432100123456789876543210 where + type family LamCases_0123456789876543210Sym1 i0123456789876543210 (arg_01234567898765432100123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) a_01234567898765432100123456789876543210 where LamCases_0123456789876543210Sym1 i0123456789876543210 arg_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 i0123456789876543210 arg_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 - type family LamCases_0123456789876543210 i0123456789876543210 (arg_01234567898765432100123456789876543210 :: GHC.Num.Natural.Natural) a_0123456789876543210 where + type family LamCases_0123456789876543210 i0123456789876543210 (arg_01234567898765432100123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) a_0123456789876543210 where LamCases_0123456789876543210 i arg_0123456789876543210 'True = Apply ErrorSym0 "negative toEnum" LamCases_0123456789876543210 i arg_0123456789876543210 'False = Apply (LamCases_0123456789876543210Sym0 i arg_0123456789876543210) (Apply (Apply (==@#@$) i) (FromInteger 0)) - data LamCases_0123456789876543210Sym0 i0123456789876543210 (arg_01234567898765432100123456789876543210 :: GHC.Num.Natural.Natural) a_01234567898765432100123456789876543210 + data LamCases_0123456789876543210Sym0 i0123456789876543210 (arg_01234567898765432100123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) a_01234567898765432100123456789876543210 where LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 i0123456789876543210 arg_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym1 i0123456789876543210 arg_01234567898765432100123456789876543210 arg) => LamCases_0123456789876543210Sym0 i0123456789876543210 arg_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 @@ -63,11 +63,11 @@ Singletons/T136.hs:(0,0)-(0,0): Splicing declarations instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 i0123456789876543210 arg_01234567898765432100123456789876543210) where suppressUnusedWarnings = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) - type family LamCases_0123456789876543210Sym1 i0123456789876543210 (arg_01234567898765432100123456789876543210 :: GHC.Num.Natural.Natural) a_01234567898765432100123456789876543210 where + type family LamCases_0123456789876543210Sym1 i0123456789876543210 (arg_01234567898765432100123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) a_01234567898765432100123456789876543210 where LamCases_0123456789876543210Sym1 i0123456789876543210 arg_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 i0123456789876543210 arg_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 - type family LamCases_0123456789876543210 (arg_01234567898765432100123456789876543210 :: GHC.Num.Natural.Natural) a_0123456789876543210 where + type family LamCases_0123456789876543210 (arg_01234567898765432100123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) a_0123456789876543210 where LamCases_0123456789876543210 arg_0123456789876543210 i = Apply (LamCases_0123456789876543210Sym0 i arg_0123456789876543210) (Apply (Apply (<@#@$) i) (FromInteger 0)) - data LamCases_0123456789876543210Sym0 (arg_01234567898765432100123456789876543210 :: GHC.Num.Natural.Natural) a_01234567898765432100123456789876543210 + data LamCases_0123456789876543210Sym0 (arg_01234567898765432100123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) a_01234567898765432100123456789876543210 where LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 arg_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym1 arg_01234567898765432100123456789876543210 arg) => LamCases_0123456789876543210Sym0 arg_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 @@ -75,15 +75,15 @@ Singletons/T136.hs:(0,0)-(0,0): Splicing declarations instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 arg_01234567898765432100123456789876543210) where suppressUnusedWarnings = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) - type family LamCases_0123456789876543210Sym1 (arg_01234567898765432100123456789876543210 :: GHC.Num.Natural.Natural) a_01234567898765432100123456789876543210 where + type family LamCases_0123456789876543210Sym1 (arg_01234567898765432100123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) a_01234567898765432100123456789876543210 where LamCases_0123456789876543210Sym1 arg_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 arg_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 - type ToEnum_0123456789876543210 :: GHC.Num.Natural.Natural + type ToEnum_0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural -> [Bool] - type family ToEnum_0123456789876543210 (a :: GHC.Num.Natural.Natural) :: [Bool] where + type family ToEnum_0123456789876543210 (a :: GHC.Internal.Bignum.Natural.Natural) :: [Bool] where ToEnum_0123456789876543210 arg_0123456789876543210 = Apply (LamCases_0123456789876543210Sym0 arg_0123456789876543210) arg_0123456789876543210 type FromEnum_0123456789876543210 :: [Bool] - -> GHC.Num.Natural.Natural - type family FromEnum_0123456789876543210 (a :: [Bool]) :: GHC.Num.Natural.Natural where + -> GHC.Internal.Bignum.Natural.Natural + type family FromEnum_0123456789876543210 (a :: [Bool]) :: GHC.Internal.Bignum.Natural.Natural where FromEnum_0123456789876543210 '[] = FromInteger 0 FromEnum_0123456789876543210 ('(:) 'False as) = Apply (Apply (*@#@$) (FromInteger 2)) (Apply FromEnumSym0 as) FromEnum_0123456789876543210 ('(:) 'True as) = Apply (Apply (+@#@$) (FromInteger 1)) (Apply (Apply (*@#@$) (FromInteger 2)) (Apply FromEnumSym0 as)) diff --git a/singletons-base/tests/compile-and-dump/Singletons/T190.golden b/singletons-base/tests/compile-and-dump/Singletons/T190.golden index 19ed1c13..b1685732 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T190.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T190.golden @@ -20,10 +20,10 @@ Singletons/T190.hs:0:0:: Splicing declarations Compare_0123456789876543210 T T = Apply (Apply (Apply FoldlSym0 (<>@#@$)) EQSym0) NilSym0 instance POrd T where type Compare a a = Compare_0123456789876543210 a a - type family LamCases_0123456789876543210 (n0123456789876543210 :: GHC.Num.Natural.Natural) a_0123456789876543210 where + type family LamCases_0123456789876543210 (n0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) a_0123456789876543210 where LamCases_0123456789876543210 n 'True = TSym0 LamCases_0123456789876543210 n 'False = Apply ErrorSym0 "toEnum: bad argument" - data LamCases_0123456789876543210Sym0 (n0123456789876543210 :: GHC.Num.Natural.Natural) a_01234567898765432100123456789876543210 + data LamCases_0123456789876543210Sym0 (n0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) a_01234567898765432100123456789876543210 where LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 n0123456789876543210) arg) (LamCases_0123456789876543210Sym1 n0123456789876543210 arg) => LamCases_0123456789876543210Sym0 n0123456789876543210 a_01234567898765432100123456789876543210 @@ -31,13 +31,15 @@ Singletons/T190.hs:0:0:: Splicing declarations instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 n0123456789876543210) where suppressUnusedWarnings = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) - type family LamCases_0123456789876543210Sym1 (n0123456789876543210 :: GHC.Num.Natural.Natural) a_01234567898765432100123456789876543210 where + type family LamCases_0123456789876543210Sym1 (n0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) a_01234567898765432100123456789876543210 where LamCases_0123456789876543210Sym1 n0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 n0123456789876543210 a_01234567898765432100123456789876543210 - type ToEnum_0123456789876543210 :: GHC.Num.Natural.Natural -> T - type family ToEnum_0123456789876543210 (a :: GHC.Num.Natural.Natural) :: T where + type ToEnum_0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural + -> T + type family ToEnum_0123456789876543210 (a :: GHC.Internal.Bignum.Natural.Natural) :: T where ToEnum_0123456789876543210 n = Apply (LamCases_0123456789876543210Sym0 n) (Apply (Apply (==@#@$) n) (FromInteger 0)) - type FromEnum_0123456789876543210 :: T -> GHC.Num.Natural.Natural - type family FromEnum_0123456789876543210 (a :: T) :: GHC.Num.Natural.Natural where + type FromEnum_0123456789876543210 :: T + -> GHC.Internal.Bignum.Natural.Natural + type family FromEnum_0123456789876543210 (a :: T) :: GHC.Internal.Bignum.Natural.Natural where FromEnum_0123456789876543210 T = FromInteger 0 instance PEnum T where type ToEnum a = ToEnum_0123456789876543210 a @@ -51,9 +53,11 @@ Singletons/T190.hs:0:0:: Splicing declarations instance PBounded T where type MinBound = MinBound_0123456789876543210 type MaxBound = MaxBound_0123456789876543210 - type ShowsPrec_0123456789876543210 :: GHC.Num.Natural.Natural - -> T -> GHC.Types.Symbol -> GHC.Types.Symbol - type family ShowsPrec_0123456789876543210 (a :: GHC.Num.Natural.Natural) (a :: T) (a :: GHC.Types.Symbol) :: GHC.Types.Symbol where + type ShowsPrec_0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural + -> T + -> GHC.Internal.Types.Symbol + -> GHC.Internal.Types.Symbol + type family ShowsPrec_0123456789876543210 (a :: GHC.Internal.Bignum.Natural.Natural) (a :: T) (a :: GHC.Internal.Types.Symbol) :: GHC.Internal.Types.Symbol where ShowsPrec_0123456789876543210 _ T a_0123456789876543210 = Apply (Apply ShowStringSym0 "T") a_0123456789876543210 instance PShow T where type ShowsPrec a a a = ShowsPrec_0123456789876543210 a a a diff --git a/singletons-base/tests/compile-and-dump/Singletons/T204.golden b/singletons-base/tests/compile-and-dump/Singletons/T204.golden index 9934e4ec..79245e5e 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T204.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T204.golden @@ -53,7 +53,7 @@ Singletons/T204.hs:(0,0)-(0,0): Splicing declarations type (:%%@#@$$$) :: forall a. a -> a -> Ratio2 a type family (:%%@#@$$$) @a (a0123456789876543210 :: a) (a0123456789876543210 :: a) :: Ratio2 a where (:%%@#@$$$) a0123456789876543210 a0123456789876543210 = (:%%) a0123456789876543210 a0123456789876543210 - data SRatio1 :: forall a. Ratio1 a -> GHC.Types.Type + data SRatio1 :: forall a. Ratio1 a -> GHC.Internal.Types.Type where (:^%) :: forall a (n :: a) (n :: a). (Sing n) -> (Sing n) -> SRatio1 ((:%) n n :: Ratio1 a) @@ -64,7 +64,7 @@ Singletons/T204.hs:(0,0)-(0,0): Splicing declarations toSing ((:%) (b :: Demote a) (b :: Demote a)) = (\cases (SomeSing c) (SomeSing c) -> SomeSing ((:^%) c c)) (toSing b :: SomeSing a) (toSing b :: SomeSing a) - data SRatio2 :: forall a. Ratio2 a -> GHC.Types.Type + data SRatio2 :: forall a. Ratio2 a -> GHC.Internal.Types.Type where (:^%%) :: forall a (n :: a) (n :: a). (Sing n) -> (Sing n) -> SRatio2 ((:%%) n n :: Ratio2 a) diff --git a/singletons-base/tests/compile-and-dump/Singletons/T313.golden b/singletons-base/tests/compile-and-dump/Singletons/T313.golden index 5278d6d5..9a91c60e 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T313.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T313.golden @@ -8,9 +8,9 @@ Singletons/T313.hs:(0,0)-(0,0): Splicing declarations type PFoo4 a type PFoo4 a = Maybe a - type instance PFoo2 a = Maybe a instance PC a where - type PFoo4 a = Maybe a |] + type PFoo4 a = Maybe a + type instance PFoo2 a = Maybe a |] ======> type PFoo1 a = Maybe a type family PFoo2 a @@ -70,9 +70,9 @@ Singletons/T313.hs:(0,0)-(0,0): Splicing declarations type SFoo4 a type SFoo4 a = Maybe a - type instance SFoo2 a = Maybe a instance SC a where - type SFoo4 a = Maybe a |] + type SFoo4 a = Maybe a + type instance SFoo2 a = Maybe a |] ======> type SFoo1 a = Maybe a type family SFoo2 a diff --git a/singletons-base/tests/compile-and-dump/Singletons/T358.golden b/singletons-base/tests/compile-and-dump/Singletons/T358.golden index 08a2a25e..2cd21cec 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T358.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T358.golden @@ -5,13 +5,13 @@ Singletons/T358.hs:(0,0)-(0,0): Splicing declarations class C2 a where method2a, method2b :: forall b. b -> a - instance C1 [] where - method1 :: [a] - method1 = [] instance C2 [a] where method2a _ = [] method2b :: forall b. b -> [a] - method2b _ = [] |] + method2b _ = [] + instance C1 [] where + method1 :: [a] + method1 = [] |] ======> class C1 (f :: k -> Type) where method1 :: f a diff --git a/singletons-base/tests/compile-and-dump/Singletons/T371.golden b/singletons-base/tests/compile-and-dump/Singletons/T371.golden index dfa286ea..9ebb8b58 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T371.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T371.golden @@ -41,18 +41,22 @@ Singletons/T371.hs:(0,0)-(0,0): Splicing declarations type Y2Sym1 :: forall (a :: Type). X a -> Y a type family Y2Sym1 @(a :: Type) (a0123456789876543210 :: X a) :: Y a where Y2Sym1 a0123456789876543210 = Y2 a0123456789876543210 - type ShowsPrec_0123456789876543210 :: forall a. GHC.Num.Natural.Natural - -> X a -> GHC.Types.Symbol -> GHC.Types.Symbol - type family ShowsPrec_0123456789876543210 @a (a :: GHC.Num.Natural.Natural) (a :: X a) (a :: GHC.Types.Symbol) :: GHC.Types.Symbol where - ShowsPrec_0123456789876543210 @a (_ :: GHC.Num.Natural.Natural) (X1 :: X a) (a_0123456789876543210 :: GHC.Types.Symbol) = Apply (Apply ShowStringSym0 "X1") a_0123456789876543210 - ShowsPrec_0123456789876543210 @a (p_0123456789876543210 :: GHC.Num.Natural.Natural) (X2 arg_0123456789876543210 :: X a) (a_0123456789876543210 :: GHC.Types.Symbol) = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "X2 ")) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210))) a_0123456789876543210 + type ShowsPrec_0123456789876543210 :: forall a. GHC.Internal.Bignum.Natural.Natural + -> X a + -> GHC.Internal.Types.Symbol + -> GHC.Internal.Types.Symbol + type family ShowsPrec_0123456789876543210 @a (a :: GHC.Internal.Bignum.Natural.Natural) (a :: X a) (a :: GHC.Internal.Types.Symbol) :: GHC.Internal.Types.Symbol where + ShowsPrec_0123456789876543210 @a (_ :: GHC.Internal.Bignum.Natural.Natural) (X1 :: X a) (a_0123456789876543210 :: GHC.Internal.Types.Symbol) = Apply (Apply ShowStringSym0 "X1") a_0123456789876543210 + ShowsPrec_0123456789876543210 @a (p_0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) (X2 arg_0123456789876543210 :: X a) (a_0123456789876543210 :: GHC.Internal.Types.Symbol) = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "X2 ")) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210))) a_0123456789876543210 instance PShow (X a) where type ShowsPrec a a a = ShowsPrec_0123456789876543210 a a a - type ShowsPrec_0123456789876543210 :: forall a. GHC.Num.Natural.Natural - -> Y a -> GHC.Types.Symbol -> GHC.Types.Symbol - type family ShowsPrec_0123456789876543210 @a (a :: GHC.Num.Natural.Natural) (a :: Y a) (a :: GHC.Types.Symbol) :: GHC.Types.Symbol where - ShowsPrec_0123456789876543210 @a (_ :: GHC.Num.Natural.Natural) (Y1 :: Y a) (a_0123456789876543210 :: GHC.Types.Symbol) = Apply (Apply ShowStringSym0 "Y1") a_0123456789876543210 - ShowsPrec_0123456789876543210 @a (p_0123456789876543210 :: GHC.Num.Natural.Natural) (Y2 arg_0123456789876543210 :: Y a) (a_0123456789876543210 :: GHC.Types.Symbol) = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "Y2 ")) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210))) a_0123456789876543210 + type ShowsPrec_0123456789876543210 :: forall a. GHC.Internal.Bignum.Natural.Natural + -> Y a + -> GHC.Internal.Types.Symbol + -> GHC.Internal.Types.Symbol + type family ShowsPrec_0123456789876543210 @a (a :: GHC.Internal.Bignum.Natural.Natural) (a :: Y a) (a :: GHC.Internal.Types.Symbol) :: GHC.Internal.Types.Symbol where + ShowsPrec_0123456789876543210 @a (_ :: GHC.Internal.Bignum.Natural.Natural) (Y1 :: Y a) (a_0123456789876543210 :: GHC.Internal.Types.Symbol) = Apply (Apply ShowStringSym0 "Y1") a_0123456789876543210 + ShowsPrec_0123456789876543210 @a (p_0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) (Y2 arg_0123456789876543210 :: Y a) (a_0123456789876543210 :: GHC.Internal.Types.Symbol) = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "Y2 ")) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210))) a_0123456789876543210 instance PShow (Y a) where type ShowsPrec a a a = ShowsPrec_0123456789876543210 a a a data SX :: forall (a :: Type). X a -> Type diff --git a/singletons-base/tests/compile-and-dump/Singletons/T555.golden b/singletons-base/tests/compile-and-dump/Singletons/T555.golden index 24f82cde..d6f7b7fb 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T555.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T555.golden @@ -31,9 +31,9 @@ Singletons/T555.hs:(0,0)-(0,0): Splicing declarations Compare_0123456789876543210 Quaternion Location = GTSym0 instance POrd MyPropKind where type Compare a a = Compare_0123456789876543210 a a - type ShowsPrec_0123456789876543210 :: GHC.Num.Natural.Natural + type ShowsPrec_0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural -> MyPropKind -> Symbol -> Symbol - type family ShowsPrec_0123456789876543210 (a :: GHC.Num.Natural.Natural) (a :: MyPropKind) (a :: Symbol) :: Symbol where + type family ShowsPrec_0123456789876543210 (a :: GHC.Internal.Bignum.Natural.Natural) (a :: MyPropKind) (a :: Symbol) :: Symbol where ShowsPrec_0123456789876543210 _ Location a_0123456789876543210 = Apply (Apply ShowStringSym0 "Location") a_0123456789876543210 ShowsPrec_0123456789876543210 _ Quaternion a_0123456789876543210 = Apply (Apply ShowStringSym0 "Quaternion") a_0123456789876543210 instance PShow MyPropKind where diff --git a/singletons-base/tests/compile-and-dump/Singletons/T581.golden b/singletons-base/tests/compile-and-dump/Singletons/T581.golden index c1b3a86b..d3079354 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T581.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T581.golden @@ -10,19 +10,19 @@ Singletons/T581.hs:(0,0)-(0,0): Splicing declarations m3 :: forall b. a -> b -> (a, b) m3 x y = (x, y) :: (a, b) - instance C1 [a] where - m1 :: forall b. [a] -> Maybe ([a], b) - m1 _ = Nothing :: Maybe ([a], b) + instance C3 [a] where + m3 x y = (fmap (\ xx -> (xx :: a)) x, y) + instance C3 (Maybe a) where + m3 :: Maybe a -> b -> (Maybe a, b) + m3 x y = (fmap (\ xx -> (xx :: a)) x, y) instance C2 (Maybe a) where m2 _ = Nothing :: Maybe (Maybe a) instance C2 [a] where m2 :: b -> Maybe [a] m2 _ = Nothing :: Maybe [a] - instance C3 [a] where - m3 x y = (fmap (\ xx -> (xx :: a)) x, y) - instance C3 (Maybe a) where - m3 :: Maybe a -> b -> (Maybe a, b) - m3 x y = (fmap (\ xx -> (xx :: a)) x, y) |] + instance C1 [a] where + m1 :: forall b. [a] -> Maybe ([a], b) + m1 _ = Nothing :: Maybe ([a], b) |] ======> class C1 a where m1 :: forall b. a -> Maybe (a, b) diff --git a/singletons-base/tests/compile-and-dump/Singletons/T89.golden b/singletons-base/tests/compile-and-dump/Singletons/T89.golden index 690f3fcc..fcc4c5f7 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T89.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T89.golden @@ -10,10 +10,10 @@ Singletons/T89.hs:0:0:: Splicing declarations type FooSym0 :: Foo type family FooSym0 :: Foo where FooSym0 = Foo - type family LamCases_0123456789876543210 (n0123456789876543210 :: GHC.Num.Natural.Natural) a_0123456789876543210 where + type family LamCases_0123456789876543210 (n0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) a_0123456789876543210 where LamCases_0123456789876543210 n 'True = FooSym0 LamCases_0123456789876543210 n 'False = Apply ErrorSym0 (FromString "toEnum: bad argument") - data LamCases_0123456789876543210Sym0 (n0123456789876543210 :: GHC.Num.Natural.Natural) a_01234567898765432100123456789876543210 + data LamCases_0123456789876543210Sym0 (n0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) a_01234567898765432100123456789876543210 where LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 n0123456789876543210) arg) (LamCases_0123456789876543210Sym1 n0123456789876543210 arg) => LamCases_0123456789876543210Sym0 n0123456789876543210 a_01234567898765432100123456789876543210 @@ -21,13 +21,15 @@ Singletons/T89.hs:0:0:: Splicing declarations instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 n0123456789876543210) where suppressUnusedWarnings = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) - type family LamCases_0123456789876543210Sym1 (n0123456789876543210 :: GHC.Num.Natural.Natural) a_01234567898765432100123456789876543210 where + type family LamCases_0123456789876543210Sym1 (n0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural) a_01234567898765432100123456789876543210 where LamCases_0123456789876543210Sym1 n0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 n0123456789876543210 a_01234567898765432100123456789876543210 - type ToEnum_0123456789876543210 :: GHC.Num.Natural.Natural -> Foo - type family ToEnum_0123456789876543210 (a :: GHC.Num.Natural.Natural) :: Foo where + type ToEnum_0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural + -> Foo + type family ToEnum_0123456789876543210 (a :: GHC.Internal.Bignum.Natural.Natural) :: Foo where ToEnum_0123456789876543210 n = Apply (LamCases_0123456789876543210Sym0 n) (Apply (Apply (==@#@$) n) (FromInteger 0)) - type FromEnum_0123456789876543210 :: Foo -> GHC.Num.Natural.Natural - type family FromEnum_0123456789876543210 (a :: Foo) :: GHC.Num.Natural.Natural where + type FromEnum_0123456789876543210 :: Foo + -> GHC.Internal.Bignum.Natural.Natural + type family FromEnum_0123456789876543210 (a :: Foo) :: GHC.Internal.Bignum.Natural.Natural where FromEnum_0123456789876543210 Foo = FromInteger 0 instance PEnum Foo where type ToEnum a = ToEnum_0123456789876543210 a diff --git a/singletons-th/CHANGES.md b/singletons-th/CHANGES.md index 6925f7ce..496e1634 100644 --- a/singletons-th/CHANGES.md +++ b/singletons-th/CHANGES.md @@ -1,6 +1,10 @@ Changelog for the `singletons-th` project ========================================= +next [????.??.??] +----------------- +* Require building with GHC 9.14. + 3.5 [2024.12.11] ---------------- * Require building with GHC 9.12. diff --git a/singletons-th/README.md b/singletons-th/README.md index 1e2dfcb3..dfa05c1b 100644 --- a/singletons-th/README.md +++ b/singletons-th/README.md @@ -14,7 +14,7 @@ which describes how promotion works in greater detail. `singletons-th` generates code that relies on bleeding-edge GHC language extensions. As such, `singletons-th` only supports the latest major version -of GHC (currently GHC 9.12). For more information, +of GHC (currently GHC 9.14). For more information, consult the `singletons` [`README`](https://github.com/goldfirere/singletons/blob/master/README.md). diff --git a/singletons-th/singletons-th.cabal b/singletons-th/singletons-th.cabal index 1095e186..b31ac462 100644 --- a/singletons-th/singletons-th.cabal +++ b/singletons-th/singletons-th.cabal @@ -8,7 +8,7 @@ author: Richard Eisenberg , Jan Stolarek bug-reports: https://github.com/goldfirere/singletons/issues stability: experimental -tested-with: GHC == 9.12.2 +tested-with: GHC == 9.14.1 extra-source-files: README.md, CHANGES.md license: BSD3 license-file: LICENSE @@ -26,7 +26,7 @@ description: . @singletons-th@ generates code that relies on bleeding-edge GHC language extensions. As such, @singletons-th@ only supports the latest major version - of GHC (currently GHC 9.12). For more information, + of GHC (currently GHC 9.14). For more information, consult the @singletons@ @@. . @@ -52,13 +52,13 @@ source-repository head library hs-source-dirs: src - build-depends: base >= 4.21 && < 4.22, + build-depends: base >= 4.22 && < 4.23, containers >= 0.5, mtl >= 2.2.1 && < 2.4, ghc-boot-th, singletons == 3.0.*, syb >= 0.4, - template-haskell >= 2.23 && < 2.24, + template-haskell >= 2.24 && < 2.25, th-desugar >= 1.19 && < 1.20, th-orphans >= 0.13.11 && < 0.14, transformers >= 0.5.2 diff --git a/singletons/singletons.cabal b/singletons/singletons.cabal index 44e60569..008190b2 100644 --- a/singletons/singletons.cabal +++ b/singletons/singletons.cabal @@ -21,6 +21,7 @@ tested-with: GHC == 8.0.2 , GHC == 9.8.4 , GHC == 9.10.3 , GHC == 9.12.2 + , GHC == 9.14.1 extra-source-files: README.md, CHANGES.md license: BSD3 license-file: LICENSE @@ -61,7 +62,7 @@ source-repository head library hs-source-dirs: src - build-depends: base >= 4.9 && < 4.22 + build-depends: base >= 4.9 && < 4.23 default-language: Haskell2010 exposed-modules: Data.Singletons Data.Singletons.Decide