Options: /home/matt/ghc/_build/stage1/bin/ghc Distribution/Simple.hs -fforce-recomp -O2 +RTS -hi -l-au
Created at: 2020-05-03, 11:24 UTC
Type of profile: Info table profile (implied by -hi)
Sampling rate in seconds: 0.1
0x1063f70:/home/matt/ghc/compiler/GHC/Iface/Syntax.hs:2340:41
2336                     ec <- get bh
2337                     let start = mkRealSrcLoc file sl sc
2338                         end = mkRealSrcLoc file el ec
2339                     name <- get bh
2340                     return (IfaceSource (mkRealSrcSpan start end) name)
2341             _ -> panic ("get IfaceTickish " ++ show h)
2342 
2343 instance Binary IfaceConAlt where
2344     put_ bh IfaceDefault      = putByte bh 0
2345     put_ bh (IfaceDataAlt aa) = putByte bh 1 >> put_ bh aa
0x108bfc8:/home/matt/ghc/compiler/GHC/Iface/Syntax.hs:471:13
467         -- declaration with the name of the binder. (#5614, #7215)
468  ifaceDeclFingerprints :: Fingerprint -> IfaceDecl -> [(OccName,Fingerprint)]
469  ifaceDeclFingerprints hash decl
470    = (getOccName decl, hash) :
471      [ (occ, computeFingerprint' (hash,occ))
472      | occ <- ifaceDeclImplicitBndrs decl ]
473    where
474       computeFingerprint' =
475         unsafeDupablePerformIO
476          . computeFingerprint (panic "ifaceDeclFingerprints")
0x10f9d30:/home/matt/ghc/compiler/GHC/Iface/Load.hs:776:37
772          -- on the binder.  This is important because we must get the right name
773          -- which includes its nameParent.
774  
775          ; thing <- forkM doc $ do { bumpDeclStats main_name
776                                    ; tcIfaceDecl ignore_prags decl }
777  
778          -- Populate the type environment with the implicitTyThings too.
779          --
780          -- Note [Tricky iface loop]
781          -- ~~~~~~~~~~~~~~~~~~~~~~~~
0x10fa2a8:/home/matt/ghc/compiler/GHC/Iface/Load.hs:845:28
841  --         ; traceIf (text "Loading decl for " <> ppr main_name $$ ppr implicit_names)
842          ; return $ (main_name, thing) :
843                        -- uses the invariant that implicit_names and
844                        -- implicitTyThings are bijective
845                        [(n, lookup n) | n <- implicit_names]
846          }
847    where
848      doc = text "Declaration for" <+> ppr (ifName decl)
849  
850  bumpDeclStats :: Name -> IfL ()         -- Record that one more declaration has actually been used
0x10fa8f8:/home/matt/ghc/compiler/GHC/Iface/Load.hs:842:32
838  
839          ; implicit_names <- mapM lookupIfaceTop (ifaceDeclImplicitBndrs decl)
840  
841  --         ; traceIf (text "Loading decl for " <> ppr main_name $$ ppr implicit_names)
842          ; return $ (main_name, thing) :
843                        -- uses the invariant that implicit_names and
844                        -- implicitTyThings are bijective
845                        [(n, lookup n) | n <- implicit_names]
846          }
847    where
0x111a270:/home/matt/ghc/compiler/GHC/IfaceToCore.hs:1696:19
1692 
1693 tcIfaceTyCon :: IfaceTyCon -> IfL TyCon
1694 tcIfaceTyCon (IfaceTyCon name info)
1695   = do { thing <- tcIfaceGlobal name
1696        ; return $ case ifaceTyConIsPromoted info of
1697            NotPromoted -> tyThingTyCon thing
1698            IsPromoted  -> promoteDataCon $ tyThingDataCon thing }
1699 
1700 tcIfaceCoAxiom :: Name -> IfL (CoAxiom Branched)
1701 tcIfaceCoAxiom name = do { thing <- tcIfaceImplicit name
0x1123098:/home/matt/ghc/compiler/GHC/IfaceToCore.hs:1157:21
1153            ; pure (foldl' AppTy t' ts') }
1154     go (IfaceTyConApp tc tks)
1155       = do { tc' <- tcIfaceTyCon tc
1156            ; tks' <- mapM go (appArgsIfaceTypes tks)
1157            ; return (mkTyConApp tc' tks') }
1158     go (IfaceForAllTy bndr t)
1159       = bindIfaceForAllBndr bndr $ \ tv' vis ->
1160         ForAllTy (Bndr tv' vis) <$> go t
1161     go (IfaceCastTy ty co)   = CastTy <$> go ty <*> tcIfaceCo co
1162     go (IfaceCoercionTy co)  = CoercionTy <$> tcIfaceCo co
0x1597230:/home/matt/ghc/compiler/GHC/Utils/Binary.hs:599:32
595  instance (Binary a, Binary b) => Binary (a,b) where
596      put_ bh (a,b) = do put_ bh a; put_ bh b
597      get bh        = do a <- get bh
598                         b <- get bh
599                         return (a,b)
600  
601  instance (Binary a, Binary b, Binary c) => Binary (a,b,c) where
602      put_ bh (a,b,c) = do put_ bh a; put_ bh b; put_ bh c
603      get bh          = do a <- get bh
604                           b <- get bh
0x177ff78:/home/matt/ghc/compiler/GHC/Iface/Tidy.hs:1242:64
1238       = tidyUnfolding rhs_tidy_env unf_info unf_from_rhs
1239       | otherwise
1240       = minimal_unfold_info
1241     minimal_unfold_info = zapUnfolding unf_info
1242     unf_from_rhs = mkFinalUnfolding dflags InlineRhs final_sig tidy_rhs
1243     -- NB: do *not* expose the worker if show_unfold is off,
1244     --     because that means this thing is a loop breaker or
1245     --     marked NOINLINE or something like that
1246     -- This is important: if you expose the worker for a loop-breaker
1247     -- then you can make the simplifier go into an infinite loop, because
0x177ffb8:/home/matt/ghc/compiler/GHC/Iface/Tidy.hs:1242:64
1238       = tidyUnfolding rhs_tidy_env unf_info unf_from_rhs
1239       | otherwise
1240       = minimal_unfold_info
1241     minimal_unfold_info = zapUnfolding unf_info
1242     unf_from_rhs = mkFinalUnfolding dflags InlineRhs final_sig tidy_rhs
1243     -- NB: do *not* expose the worker if show_unfold is off,
1244     --     because that means this thing is a loop breaker or
1245     --     marked NOINLINE or something like that
1246     -- This is important: if you expose the worker for a loop-breaker
1247     -- then you can make the simplifier go into an infinite loop, because
0x177fff0:/home/matt/ghc/compiler/GHC/Iface/Tidy.hs:1242:64
1238       = tidyUnfolding rhs_tidy_env unf_info unf_from_rhs
1239       | otherwise
1240       = minimal_unfold_info
1241     minimal_unfold_info = zapUnfolding unf_info
1242     unf_from_rhs = mkFinalUnfolding dflags InlineRhs final_sig tidy_rhs
1243     -- NB: do *not* expose the worker if show_unfold is off,
1244     --     because that means this thing is a loop breaker or
1245     --     marked NOINLINE or something like that
1246     -- This is important: if you expose the worker for a loop-breaker
1247     -- then you can make the simplifier go into an infinite loop, because
0x1780030:/home/matt/ghc/compiler/GHC/Iface/Tidy.hs:1242:64
1238       = tidyUnfolding rhs_tidy_env unf_info unf_from_rhs
1239       | otherwise
1240       = minimal_unfold_info
1241     minimal_unfold_info = zapUnfolding unf_info
1242     unf_from_rhs = mkFinalUnfolding dflags InlineRhs final_sig tidy_rhs
1243     -- NB: do *not* expose the worker if show_unfold is off,
1244     --     because that means this thing is a loop breaker or
1245     --     marked NOINLINE or something like that
1246     -- This is important: if you expose the worker for a loop-breaker
1247     -- then you can make the simplifier go into an infinite loop, because
0x1ae6a60:/home/matt/ghc/compiler/GHC/Core/Opt/OccurAnal.hs:1885:28
1881            -> (Expr CoreBndr, [Arg CoreBndr], [Tickish Id])
1882            -> (UsageDetails, Expr CoreBndr)
1883 -- Naked variables (not applied) end up here too
1884 occAnalApp env (Var fun, args, ticks)
1885   | null ticks = (all_uds, mkApps fun' args')
1886   | otherwise  = (all_uds, mkTicks ticks $ mkApps fun' args')
1887   where
1888     (fun', fun_id') = lookupVarEnv (occ_bs_env env) fun
1889                       `orElse` (Var fun, fun)
1890                      -- See Note [The binder-swap substitution]
0x1b44b18:/home/matt/ghc/compiler/GHC/Core/Opt/Simplify.hs:3509:12
3505 mkLetUnfolding :: DynFlags -> TopLevelFlag -> UnfoldingSource
3506                -> InId -> OutExpr -> SimplM Unfolding
3507 mkLetUnfolding dflags top_lvl src id new_rhs
3508   = is_bottoming `seq`  -- See Note [Force bottoming field]
3509     return (mkUnfolding dflags src is_top_lvl is_bottoming new_rhs)
3510             -- We make an  unfolding *even for loop-breakers*.
3511             -- Reason: (a) It might be useful to know that they are WHNF
3512             --         (b) In GHC.Iface.Tidy we currently assume that, if we want to
3513             --             expose the unfolding then indeed we *have* an unfolding
3514             --             to expose.  (We could instead use the RHS, but currently
0x1b44b90:/home/matt/ghc/compiler/GHC/Core/Opt/Simplify.hs:3509:12
3505 mkLetUnfolding :: DynFlags -> TopLevelFlag -> UnfoldingSource
3506                -> InId -> OutExpr -> SimplM Unfolding
3507 mkLetUnfolding dflags top_lvl src id new_rhs
3508   = is_bottoming `seq`  -- See Note [Force bottoming field]
3509     return (mkUnfolding dflags src is_top_lvl is_bottoming new_rhs)
3510             -- We make an  unfolding *even for loop-breakers*.
3511             -- Reason: (a) It might be useful to know that they are WHNF
3512             --         (b) In GHC.Iface.Tidy we currently assume that, if we want to
3513             --             expose the unfolding then indeed we *have* an unfolding
3514             --             to expose.  (We could instead use the RHS, but currently
0x1b44c20:/home/matt/ghc/compiler/GHC/Core/Opt/Simplify.hs:3509:36
3505 mkLetUnfolding :: DynFlags -> TopLevelFlag -> UnfoldingSource
3506                -> InId -> OutExpr -> SimplM Unfolding
3507 mkLetUnfolding dflags top_lvl src id new_rhs
3508   = is_bottoming `seq`  -- See Note [Force bottoming field]
3509     return (mkUnfolding dflags src is_top_lvl is_bottoming new_rhs)
3510             -- We make an  unfolding *even for loop-breakers*.
3511             -- Reason: (a) It might be useful to know that they are WHNF
3512             --         (b) In GHC.Iface.Tidy we currently assume that, if we want to
3513             --             expose the unfolding then indeed we *have* an unfolding
3514             --             to expose.  (We could instead use the RHS, but currently
0x1b44c98:/home/matt/ghc/compiler/GHC/Core/Opt/Simplify.hs:3509:12
3505 mkLetUnfolding :: DynFlags -> TopLevelFlag -> UnfoldingSource
3506                -> InId -> OutExpr -> SimplM Unfolding
3507 mkLetUnfolding dflags top_lvl src id new_rhs
3508   = is_bottoming `seq`  -- See Note [Force bottoming field]
3509     return (mkUnfolding dflags src is_top_lvl is_bottoming new_rhs)
3510             -- We make an  unfolding *even for loop-breakers*.
3511             -- Reason: (a) It might be useful to know that they are WHNF
3512             --         (b) In GHC.Iface.Tidy we currently assume that, if we want to
3513             --             expose the unfolding then indeed we *have* an unfolding
3514             --             to expose.  (We could instead use the RHS, but currently
0x2484028:/home/matt/ghc/compiler/GHC/Data/FastString.hs:521:37
517    fp <- copyBytesToForeignPtr ptr len
518    let bs = BS.fromForeignPtr fp 0 len
519        zstr = mkZFastString n_zencs bs
520    n_chars <- countUTF8Chars ptr len
521    return (FastString uid n_chars bs zstr)
522  
523  copyBytesToForeignPtr :: Ptr Word8 -> Int -> IO (ForeignPtr Word8)
524  copyBytesToForeignPtr ptr len = do
525    fp <- mallocForeignPtrBytes len
526    withForeignPtr fp $ \ptr' -> copyBytes ptr' ptr len
0x2484b40:/home/matt/ghc/compiler/GHC/Data/FastString.hs:513:37
509                            -> IORef Int -> IO FastString
510  mkNewFastStringByteString bs ptr len uid n_zencs = do
511    let zstr = mkZFastString n_zencs bs
512    n_chars <- countUTF8Chars ptr len
513    return (FastString uid n_chars bs zstr)
514  
515  copyNewFastString :: Ptr Word8 -> Int -> Int -> IORef Int -> IO FastString
516  copyNewFastString ptr len uid n_zencs = do
517    fp <- copyBytesToForeignPtr ptr len
518    let bs = BS.fromForeignPtr fp 0 len
0x24859b8:/home/matt/ghc/compiler/GHC/Data/FastString.hs:506:37
502  mkNewFastString fp ptr len uid n_zencs = do
503    let bs = BS.fromForeignPtr fp 0 len
504        zstr = mkZFastString n_zencs bs
505    n_chars <- countUTF8Chars ptr len
506    return (FastString uid n_chars bs zstr)
507  
508  mkNewFastStringByteString :: ByteString -> Ptr Word8 -> Int -> Int
509                            -> IORef Int -> IO FastString
510  mkNewFastStringByteString bs ptr len uid n_zencs = do
511    let zstr = mkZFastString n_zencs bs
0x27d7bb0:/home/matt/ghc/compiler/GHC/Iface/UpdateCafInfos.hs:43:29
39                 , md_rules = rules
40                 } = mod_details
41   
42       -- type TypeEnv = NameEnv TyThing
43       ~type_env' = mapNameEnv (updateTyThingCafInfos type_env' non_cafs) type_env
44       -- Not strict!
45   
46       !insts' = strictMap (updateInstCafInfos type_env' non_cafs) insts
47       !rules' = strictMap (updateRuleCafInfos type_env') rules
48     in
0x2b17e00:/home/matt/ghc/compiler/GHC/Core/Tidy.hs:158:53
154          var_env' = extendVarEnv var_env id id'
155  
156          -- Note [Tidy IdInfo]
157          new_info = vanillaIdInfo `setOccInfo` occInfo old_info
158                                   `setUnfoldingInfo` new_unf
159                                    -- see Note [Preserve OneShotInfo]
160                                   `setOneShotInfo` oneShotInfo old_info
161          old_info = idInfo id
162          old_unf  = unfoldingInfo old_info
163          new_unf  = zapUnfolding old_unf  -- See Note [Preserve evaluatedness]
0x2b17ec8:/home/matt/ghc/compiler/GHC/Core/Tidy.hs:153:48
149          -- though we could extract it from the Id
150          --
151          ty'      = tidyType env (idType id)
152          name'    = mkInternalName (idUnique id) occ' noSrcSpan
153          id'      = mkLocalIdWithInfo name' ty' new_info
154          var_env' = extendVarEnv var_env id id'
155  
156          -- Note [Tidy IdInfo]
157          new_info = vanillaIdInfo `setOccInfo` occInfo old_info
158                                   `setUnfoldingInfo` new_unf
0x2b18008:/home/matt/ghc/compiler/GHC/Core/Tidy.hs:153:44
149          -- though we could extract it from the Id
150          --
151          ty'      = tidyType env (idType id)
152          name'    = mkInternalName (idUnique id) occ' noSrcSpan
153          id'      = mkLocalIdWithInfo name' ty' new_info
154          var_env' = extendVarEnv var_env id id'
155  
156          -- Note [Tidy IdInfo]
157          new_info = vanillaIdInfo `setOccInfo` occInfo old_info
158                                   `setUnfoldingInfo` new_unf
0x40450e8:/home/matt/ghc/libraries/base/GHC/Base.hs:1249:16
1245   -- We want the RULEs "map" and "map/coerce" to fire first.
1246   -- map is recursive, so won't inline anyway,
1247   -- but saying so is more explicit, and silences warnings
1248 map _ []     = []
1249 map f (x:xs) = f x : map f xs
1250 
1251 -- Note eta expanded
1252 mapFB ::  (elt -> lst -> lst) -> (a -> elt) -> a -> lst -> lst
1253 {-# INLINE [0] mapFB #-} -- See Note [Inline FB functions] in GHC.List
1254 mapFB c f = \x ys -> c (f x) ys
0x4161c20:/home/matt/ghc/libraries/base/GHC/IO/Unsafe.hs:155:23
151  unsafeDupableInterleaveIO (IO m)
152    = IO ( \ s -> let
153                     r = case m s of (# _, res #) -> res
154                  in
155                  (# s, r #))
156  
157  {-|
158  Ensures that the suspensions under evaluation by the current thread
159  are unique; that is, the current thread is not evaluating anything
160  that is also under evaluation by another thread that has also executed
0x43965c0:/home/matt/ghc/rts/StgStdThunks.cmm:94:86
90        evaluate to a function, because we're going to do a field
91        selection on the result. */
92   
93   SELECTOR_CODE_UPD(0)
94   SELECTOR_CODE_UPD(1)
95   SELECTOR_CODE_UPD(2)
96   SELECTOR_CODE_UPD(3)
97   SELECTOR_CODE_UPD(4)
98   SELECTOR_CODE_UPD(5)
99   SELECTOR_CODE_UPD(6)
0x4396630:/home/matt/ghc/rts/StgStdThunks.cmm:95:86
91        selection on the result. */
92   
93   SELECTOR_CODE_UPD(0)
94   SELECTOR_CODE_UPD(1)
95   SELECTOR_CODE_UPD(2)
96   SELECTOR_CODE_UPD(3)
97   SELECTOR_CODE_UPD(4)
98   SELECTOR_CODE_UPD(5)
99   SELECTOR_CODE_UPD(6)
100  SELECTOR_CODE_UPD(7)
0x753128:/home/matt/ghc/compiler/GHC/Types/SrcLoc.hs:398:63
394  combineSrcSpans (UnhelpfulSpan _) r = r -- this seems more useful
395  combineSrcSpans l (UnhelpfulSpan _) = l
396  combineSrcSpans (RealSrcSpan span1 mbspan1) (RealSrcSpan span2 mbspan2)
397    | srcSpanFile span1 == srcSpanFile span2
398        = RealSrcSpan (combineRealSrcSpans span1 span2) (liftA2 combineBufSpans mbspan1 mbspan2)
399    | otherwise = UnhelpfulSpan (fsLit "")
400  
401  -- | Combines two 'SrcSpan' into one that spans at least all the characters
402  -- within both spans. Assumes the "file" part is the same in both inputs
403  combineRealSrcSpans :: RealSrcSpan -> RealSrcSpan -> RealSrcSpan