diff options
Diffstat (limited to 'compiler/GHC/Driver')
-rw-r--r-- | compiler/GHC/Driver/Backpack.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Driver/GenerateCgIPEStub.hs | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/compiler/GHC/Driver/Backpack.hs b/compiler/GHC/Driver/Backpack.hs index 93422e4161..cf94e0cf1d 100644 --- a/compiler/GHC/Driver/Backpack.hs +++ b/compiler/GHC/Driver/Backpack.hs @@ -939,4 +939,4 @@ hsModuleToModSummary home_keys pn hsc_src modname newUnitId :: UnitId -> Maybe FastString -> UnitId newUnitId uid mhash = case mhash of Nothing -> uid - Just hash -> UnitId (unitIdFS uid `appendFS` mkFastString "+" `appendFS` hash) + Just hash -> UnitId (concatFS [unitIdFS uid, fsLit "+", hash]) diff --git a/compiler/GHC/Driver/GenerateCgIPEStub.hs b/compiler/GHC/Driver/GenerateCgIPEStub.hs index be478f1bdb..40927bbc6e 100644 --- a/compiler/GHC/Driver/GenerateCgIPEStub.hs +++ b/compiler/GHC/Driver/GenerateCgIPEStub.hs @@ -3,7 +3,7 @@ module GHC.Driver.GenerateCgIPEStub (generateCgIPEStub) where import qualified Data.Map.Strict as Map -import Data.Maybe (catMaybes, listToMaybe) +import Data.Maybe (mapMaybe, listToMaybe) import GHC.Cmm import GHC.Cmm.CLabel (CLabel) import GHC.Cmm.Dataflow (Block, C, O) @@ -210,7 +210,7 @@ generateCgIPEStub hsc_env this_mod denv s = do collectNothing _ cmmGroupSRTs = pure ([], cmmGroupSRTs) collectInfoTables :: CmmGroupSRTs -> [(Label, CmmInfoTable)] - collectInfoTables cmmGroup = concat $ catMaybes $ map extractInfoTables cmmGroup + collectInfoTables cmmGroup = concat $ mapMaybe extractInfoTables cmmGroup extractInfoTables :: GenCmmDecl RawCmmStatics CmmTopInfo CmmGraph -> Maybe [(Label, CmmInfoTable)] extractInfoTables (CmmProc h _ _ _) = Just $ mapToList (info_tbls h) @@ -249,8 +249,7 @@ generateCgIPEStub hsc_env this_mod denv s = do lastTickInBlock block = listToMaybe $ - catMaybes $ - map maybeTick $ (reverse . blockToList) block + mapMaybe maybeTick $ (reverse . blockToList) block maybeTick :: CmmNode O O -> Maybe IpeSourceLocation maybeTick (CmmTick (SourceNote span name)) = Just (span, name) |