Skip to content

Commit

Permalink
Support GHC 9.8 (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bodigrim authored Jul 10, 2023
1 parent 4cbd194 commit 865a906
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions inspection-testing.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ library
Test.Inspection.Plugin
Test.Inspection.Core
hs-source-dirs: src
build-depends: base >=4.9 && <4.19
build-depends: ghc >= 8.0.2 && <9.7
build-depends: base >=4.9 && <4.20
build-depends: ghc >= 8.0.2 && <9.9
build-depends: template-haskell
build-depends: containers
build-depends: transformers
Expand Down
10 changes: 4 additions & 6 deletions src/Test/Inspection/Core.hs
Original file line number Diff line number Diff line change
Expand Up @@ -356,13 +356,8 @@ eqSlice eqv slice1 slice2
go_alt lv env (Alt c1 bs1 e1) (Alt c2 bs2 e2)
= guard (c1 == c2) >> go lv (rnBndrs2 env bs1 bs2) e1 e2

#if MIN_VERSION_ghc(9,2,0)
go_tick :: RnEnv2 -> CoreTickish -> CoreTickish -> Bool
go_tick env (Breakpoint _ lid lids) (Breakpoint _ rid rids)
#else
go_tick :: RnEnv2 -> Tickish Id -> Tickish Id -> Bool
go_tick env (Breakpoint lid lids) (Breakpoint rid rids)
#endif
go_tick env Breakpoint{ breakpointId = lid, breakpointFVs = lids } Breakpoint{ breakpointId = rid, breakpointFVs = rids }
= lid == rid && map (rnOccL env) lids == map (rnOccR env) rids
go_tick _ l r = l == r

Expand All @@ -385,6 +380,9 @@ eqSlice eqv slice1 slice2
-- continue with the rest of bindings, adding a pair as matching one.
goBinds lv (rnBndr2 env v1 v2) xs ys

#if !MIN_VERSION_ghc(9,2,0)
type CoreTickish = Tickish Id
#endif

traceBlock :: Monad m => Int -> String -> String -> (Int -> m ()) -> m ()
traceBlock lv name msg action = do
Expand Down

0 comments on commit 865a906

Please sign in to comment.