Skip to content

Commit

Permalink
Add support for GHC912
Browse files Browse the repository at this point in the history
  • Loading branch information
albertodvp committed Dec 21, 2024
1 parent 1ba35af commit 2890055
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
push:
branches:
- main
- ghc912
pull_request:
branches:
- main
Expand Down Expand Up @@ -68,6 +69,7 @@ jobs:
- 9.8.1
- 9.8.2
- 9.10.1
- 9.12.1
include:
- os: macos-latest
ghc: 9.6.2
Expand Down
4 changes: 2 additions & 2 deletions doctest.cabal

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ library:
- Test.DocTest.Internal.Cabal

dependencies: &dependencies
ghc: ">= 8.0 && < 9.12"
ghc: ">= 8.0 && < 9.14"
syb: ">= 0.3"
code-page: ">= 0.1"
deepseq:
Expand Down
2 changes: 2 additions & 0 deletions src/Extract.hs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ import GHC.Unit.Module.Graph

-- | A wrapper around `SomeException`, to allow for a custom `Show` instance.
newtype ExtractError = ExtractError SomeException
#if __GLASGOW_HASKELL__ < 912
deriving Typeable
#endif

instance Show ExtractError where
show (ExtractError e) =
Expand Down
4 changes: 4 additions & 0 deletions test/Language/Haskell/GhciWrapperSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ spec = do

it "shows exceptions" $ withInterpreter $ \ghci -> do
ghci "import Control.Exception" `shouldReturn` ""
#if __GLASGOW_HASKELL__ >= 912
ghci "throwIO DivideByZero" `shouldReturn` "*** Exception: divide by zero\n\nHasCallStack backtrace:\n throwIO, called at <interactive>:25:1 in interactive:Ghci22\n\n"
#else
ghci "throwIO DivideByZero" `shouldReturn` "*** Exception: divide by zero\n"
#endif

it "shows exceptions (ExitCode)" $ withInterpreter $ \ghci -> do
ghci "import System.Exit" `shouldReturn` ""
Expand Down

0 comments on commit 2890055

Please sign in to comment.