Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove CPP which was used for compatibility with GHC < 8.* #97

Merged
merged 1 commit into from
Jun 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions GhcEvents.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{-# LANGUAGE CPP #-}

module Main where

import GHC.RTS.Events
Expand Down Expand Up @@ -242,8 +240,3 @@ showMap showKey showValue m =
concat $ zipWith (++)
(map showKey . M.keys $ m :: [String])
(map (showValue . (M.!) m) . M.keys $ m :: [String])

#if !MIN_VERSION_base(4,8,0)
die :: String -> IO a
die err = hPutStrLn stderr err >> exitFailure
#endif
5 changes: 0 additions & 5 deletions src/GHC/RTS/Events.hs
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,6 @@ import GHC.RTS.EventTypes
import GHC.RTS.Events.Binary
import GHC.RTS.Events.Incremental

#if !MIN_VERSION_base(4, 8, 0)
import Data.Foldable (foldMap)
import Data.Monoid (mempty)
#endif

#if !MIN_VERSION_base(4, 11, 0)
import Data.Monoid ((<>))
#endif
Expand Down
4 changes: 0 additions & 4 deletions src/GHC/RTS/Events/Incremental.hs
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,6 @@ readEvents :: Header -> BL.ByteString -> ([Event], Maybe String)
readEvents header = f . break isLeft . readEvents' header
where
f (rs, ls) = (rights rs, listToMaybe (lefts ls))
#if !MIN_VERSION_base(4, 7, 0)
isLeft (Left _) = True
isLeft _ = False
#endif

-- | Read events from a lazy bytestring. It returns an error message if it
-- encounters an error while decoding the header.
Expand Down