From 8b183b4a62ce56045059eabcf7d2b5e531898ec8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Wed, 30 Mar 2022 22:49:46 -0400 Subject: [PATCH 1/5] temporarily using ghc-9.2.2 I don't think it's polite to pin a nightly if an lts will do, so I don't want to make this change permanent. --- stack.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stack.yaml b/stack.yaml index e8a8edd..40a6f58 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-17.15 +resolver: nightly-2022-03-30 packages: - . extra-deps: [] From 27bb638c4d1ff869d21659a659ccc739861c84fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Wed, 30 Mar 2022 22:51:10 -0400 Subject: [PATCH 2/5] support "Monad of no return" the error message recommends deleting the 'return' definition, so I did. It is safe to do so because their definition was equivalent to @return = pure@. --- src/Control/Monad/Trans/OptionParser.hs | 1 - src/Control/Monad/Trans/Uncertain.hs | 1 - 2 files changed, 2 deletions(-) diff --git a/src/Control/Monad/Trans/OptionParser.hs b/src/Control/Monad/Trans/OptionParser.hs index f0ea04b..bde3ef1 100644 --- a/src/Control/Monad/Trans/OptionParser.hs +++ b/src/Control/Monad/Trans/OptionParser.hs @@ -80,7 +80,6 @@ instance (Functor m, Monad m) => Applicative (OptionParserT o m) where OptionParserT mf <*> OptionParserT mx = OptionParserT (mf <*> mx) instance Monad m => Monad (OptionParserT o m) where - return = OptionParserT . return OptionParserT mx >>= f = OptionParserT (mx >>= f') where f' = unOptionParserT . f diff --git a/src/Control/Monad/Trans/Uncertain.hs b/src/Control/Monad/Trans/Uncertain.hs index 0b461bb..5c8e671 100644 --- a/src/Control/Monad/Trans/Uncertain.hs +++ b/src/Control/Monad/Trans/Uncertain.hs @@ -38,7 +38,6 @@ instance (Functor m, Monad m) => Applicative (UncertainT m) where UncertainT mf <*> UncertainT mx = UncertainT (mf <*> mx) instance Monad m => Monad (UncertainT m) where - return = UncertainT . return UncertainT mx >>= f = UncertainT (mx >>= f') where f' = unUncertainT . f From 40d875b0c20c1552ac3350c32308c623dd399826 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Wed, 30 Mar 2022 22:53:40 -0400 Subject: [PATCH 3/5] disable poly-kinds looks like PolyKinds is on by default now. Not sure why it's causing issues in this module, but these type variables are definitely intended to have kind *. Maybe it would have been better to use a kind annotation? --- src/Data/HaskellExpr.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Data/HaskellExpr.hs b/src/Data/HaskellExpr.hs index 1c22ae3..4bca36a 100644 --- a/src/Data/HaskellExpr.hs +++ b/src/Data/HaskellExpr.hs @@ -1,4 +1,5 @@ -- | A String-based representation of simple Haskell expressions, typed via phantom types. +{-# LANGUAGE NoPolyKinds #-} module Data.HaskellExpr where import Text.Printf From efe4855e83710aa2937782d43e9b04b139efaf80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Wed, 30 Mar 2022 23:08:19 -0400 Subject: [PATCH 4/5] poke CI From fbe571c97cd568b1deb63a8f1396ff1d2c559185 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20G=C3=A9lineau?= Date: Wed, 30 Mar 2022 23:34:48 -0400 Subject: [PATCH 5/5] temporarily disable CI cache CI failed with @Prelude.chr: bad argument@, which usually means that one version of ghc is trying to load a file compiled with another version of ghc. CI is compiling the code with multiple versions of ghc... but it's supposed to be using separate caches! Let's disable the cache to clarify whether caching is involved or not. --- .github/workflows/ci.yml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8860c65..3972a68 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,22 +34,6 @@ jobs: steps: - uses: actions/checkout@v2 - # see https://github.com/actions/cache/issues/403 - - name: Work around actions/cache bug - if: matrix.os == 'macos-latest' - run: | - brew update && brew install gnu-tar - echo PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH" >> $GITHUB_ENV - - - uses: actions/cache@v2 - name: Cache Stack Artifacts - with: - path: | - ~/.stack - ~/.local/bin - .stack-work - key: ${{ runner.os }}-stack-${{ hashFiles(matrix.stack_yaml) }}-6 - - uses: haskell/actions/setup@v1 id: setup-haskell-stack name: Setup Stack