From a95823de00718d38aefac6b18c5567e2d42d8307 Mon Sep 17 00:00:00 2001 From: Ryan Scott Date: Sat, 26 Oct 2024 06:37:05 -0400 Subject: [PATCH 1/2] D.S.TH.Promote: Convert some wildcard patterns to {} --- singletons-th/src/Data/Singletons/TH/Promote.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/singletons-th/src/Data/Singletons/TH/Promote.hs b/singletons-th/src/Data/Singletons/TH/Promote.hs index ed41d23f..aef55574 100644 --- a/singletons-th/src/Data/Singletons/TH/Promote.hs +++ b/singletons-th/src/Data/Singletons/TH/Promote.hs @@ -1480,10 +1480,10 @@ promoteExp (DSigE exp ty) = do (exp', ann_exp) <- promoteExp exp ty' <- promoteType ty return (DSigT exp' ty', ADSigE exp' ann_exp ty') -promoteExp e@(DStaticE _) = fail ("Static expressions cannot be promoted: " ++ show e) -promoteExp e@(DTypedBracketE _) = fail ("Typed bracket expressions cannot be promoted: " ++ show e) -promoteExp e@(DTypedSpliceE _) = fail ("Typed splice expressions cannot be promoted: " ++ show e) -promoteExp e@(DTypeE _) = fail ("Embedded type expressions cannot be promoted: " ++ show e) +promoteExp e@(DStaticE {}) = fail ("Static expressions cannot be promoted: " ++ show e) +promoteExp e@(DTypedBracketE {}) = fail ("Typed bracket expressions cannot be promoted: " ++ show e) +promoteExp e@(DTypedSpliceE {}) = fail ("Typed splice expressions cannot be promoted: " ++ show e) +promoteExp e@(DTypeE {}) = fail ("Embedded type expressions cannot be promoted: " ++ show e) promoteLitExp :: OptionsMonad q => Lit -> q DType promoteLitExp (IntegerL n) = do From d89988f1b95643fa7dca1d2ca352d2085b8c07c2 Mon Sep 17 00:00:00 2001 From: Ryan Scott Date: Sat, 26 Oct 2024 06:46:17 -0400 Subject: [PATCH 2/2] Bump th-desugar to bring in changes from goldfirere/th-desugar#231 --- .github/workflows/haskell-ci.yml | 12 ++++++------ cabal.project | 2 +- singletons-th/src/Data/Singletons/TH/Promote.hs | 2 ++ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 2f577343..2cce35bb 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.19.20240514 +# version: 0.19.20240708 # -# REGENDATA ("0.19.20240514",["github","cabal.project"]) +# REGENDATA ("0.19.20240708",["github","cabal.project"]) # name: Haskell-CI on: @@ -95,10 +95,10 @@ jobs: apt-get update apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev 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" + curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.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) + "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) env: HCKIND: ${{ matrix.compilerKind }} HCNAME: ${{ matrix.compiler }} @@ -116,7 +116,7 @@ jobs: 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" + echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.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" @@ -215,7 +215,7 @@ jobs: source-repository-package type: git location: https://github.com/goldfirere/th-desugar - tag: c7b460412fe9896597270be94a243972833c0a66 + tag: 730a0ed799c91324d42b70d3780d6b3215cafc3c EOF $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(Cabal|Cabal-syntax|singletons|singletons-base|singletons-th)$/; }' >> cabal.project.local cat cabal.project diff --git a/cabal.project b/cabal.project index a2de1faa..d45233ee 100644 --- a/cabal.project +++ b/cabal.project @@ -5,4 +5,4 @@ packages: ./singletons source-repository-package type: git location: https://github.com/goldfirere/th-desugar - tag: c7b460412fe9896597270be94a243972833c0a66 + tag: 730a0ed799c91324d42b70d3780d6b3215cafc3c diff --git a/singletons-th/src/Data/Singletons/TH/Promote.hs b/singletons-th/src/Data/Singletons/TH/Promote.hs index aef55574..aeca1b1c 100644 --- a/singletons-th/src/Data/Singletons/TH/Promote.hs +++ b/singletons-th/src/Data/Singletons/TH/Promote.hs @@ -1484,6 +1484,8 @@ promoteExp e@(DStaticE {}) = fail ("Static expressions cannot be promoted: " ++ promoteExp e@(DTypedBracketE {}) = fail ("Typed bracket expressions cannot be promoted: " ++ show e) promoteExp e@(DTypedSpliceE {}) = fail ("Typed splice expressions cannot be promoted: " ++ show e) promoteExp e@(DTypeE {}) = fail ("Embedded type expressions cannot be promoted: " ++ show e) +promoteExp e@(DForallE {}) = fail ("Embedded `forall` expressions cannot be promoted: " ++ show e) +promoteExp e@(DConstrainedE {}) = fail ("Embedded constraint expressions cannot be promoted: " ++ show e) promoteLitExp :: OptionsMonad q => Lit -> q DType promoteLitExp (IntegerL n) = do