Skip to content

Commit

Permalink
Make type-check-test work with GHC 9.10
Browse files Browse the repository at this point in the history
This requires using a more recent version of `typediff` (0.1.6) that is aware
of the module names in `ghc-internal`. It also requires incurring a dependency
on `ghc-internal` itself to ensure that GHCi prints things like
`GHC.Internal.Maybe.Maybe` rather than `ghc-internal:GHC.Internal.Maybe.Maybe`,
the latter of which `typediff` cannot parse.
  • Loading branch information
RyanGlScott committed Apr 23, 2024
1 parent 1b35b07 commit fc8bea3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ jobs:
- name: install typediff
run: |
mkdir -p $HOME/.local/bin
curl -L https://github.com/haskell-compat/base-compat/releases/download/typediff-0.1.5/typediff > $HOME/.local/bin/typediff
curl -L https://github.com/haskell-compat/base-compat/releases/download/typediff-0.1.6/typediff > $HOME/.local/bin/typediff
chmod a+x $HOME/.local/bin/typediff
- name: checkout
uses: actions/checkout@v3
Expand Down
7 changes: 7 additions & 0 deletions check/type-check.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ executable for-repl
build-depends:
base,
base-compat-batteries
if impl(ghc >= 9.10)
-- This depends on `ghc-internal` to ensure that GHCi prints things like
-- GHC.Internal.Maybe.Maybe rather than
-- ghc-internal:GHC.Internal.Maybe.Maybe, the latter of which typediff
-- cannot parse.
build-depends:
ghc-internal

-- Run with
-- (cd check && cabal new-run dumptypes Control.Monad.Compat)
Expand Down
2 changes: 1 addition & 1 deletion github.yml.patch
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ index 417a210..5fa3f49 100644
+ - name: install typediff
+ run: |
+ mkdir -p $HOME/.local/bin
+ curl -L https://github.com/haskell-compat/base-compat/releases/download/typediff-0.1.5/typediff > $HOME/.local/bin/typediff
+ curl -L https://github.com/haskell-compat/base-compat/releases/download/typediff-0.1.6/typediff > $HOME/.local/bin/typediff
+ chmod a+x $HOME/.local/bin/typediff
- name: checkout
uses: actions/checkout@v3
Expand Down

0 comments on commit fc8bea3

Please sign in to comment.