Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC

Commits:

19 changed files:

Changes:

  • compiler/GHC/Core/Lint.hs
    ... ... @@ -26,6 +26,7 @@ module GHC.Core.Lint (
    26 26
         -- ** Debug output
    
    27 27
         EndPassConfig (..),
    
    28 28
         endPassIO,
    
    29
    +    lintMessage,
    
    29 30
         displayLintResults, dumpPassResult
    
    30 31
      ) where
    
    31 32
     
    
    ... ... @@ -309,11 +310,6 @@ path does not result in allocation in the hot path. This can be surprisingly
    309 310
     impactful. Changing `lint_app` reduced allocations for one test program I was
    
    310 311
     looking at by ~4%.
    
    311 312
     
    
    312
    -Note [MCInfo for Lint]
    
    313
    -~~~~~~~~~~~~~~~~~~~~~~
    
    314
    -When printing a Lint message, use the MCInfo severity so that the
    
    315
    -message is printed on stderr rather than stdout (#13342).
    
    316
    -
    
    317 313
     ************************************************************************
    
    318 314
     *                                                                      *
    
    319 315
                      Beginning and ending passes
    
    ... ... @@ -321,6 +317,12 @@ message is printed on stderr rather than stdout (#13342).
    321 317
     ************************************************************************
    
    322 318
     -}
    
    323 319
     
    
    320
    +lintMessage :: Logger -> SDoc -> IO ()
    
    321
    +lintMessage logger =
    
    322
    +  -- Note: Use logInfo when printing a Lint message, so that the message is
    
    323
    +  -- printed on stderr rather than stdout (#13342).
    
    324
    +  logInfo logger . withPprStyle defaultDumpStyle
    
    325
    +
    
    324 326
     -- | Configuration for boilerplate operations at the end of a
    
    325 327
     -- compilation pass producing Core.
    
    326 328
     data EndPassConfig = EndPassConfig
    
    ... ... @@ -436,8 +438,7 @@ displayLintResults :: Logger
    436 438
                        -> IO ()
    
    437 439
     displayLintResults logger display_warnings pp_what pp_pgm (warns, errs)
    
    438 440
       | not (isEmptyBag errs)
    
    439
    -  = do { logMsg logger Err.MCInfo noSrcSpan  -- See Note [MCInfo for Lint]
    
    440
    -           $ withPprStyle defaultDumpStyle
    
    441
    +  = do { lintMessage logger
    
    441 442
                (vcat [ lint_banner "errors" pp_what, Err.pprMessageBag errs
    
    442 443
                      , text "*** Offending Program ***"
    
    443 444
                      , pp_pgm
    
    ... ... @@ -447,8 +448,7 @@ displayLintResults logger display_warnings pp_what pp_pgm (warns, errs)
    447 448
       | not (isEmptyBag warns)
    
    448 449
       , log_enable_debug (logFlags logger)
    
    449 450
       , display_warnings
    
    450
    -  = logMsg logger Err.MCInfo noSrcSpan  -- See Note [MCInfo for Lint]
    
    451
    -      $ withPprStyle defaultDumpStyle
    
    451
    +  = lintMessage logger
    
    452 452
             (lint_banner "warnings" pp_what $$ Err.pprMessageBag (mapBag ($$ blankLine) warns))
    
    453 453
     
    
    454 454
       | otherwise = return ()
    

  • compiler/GHC/Data/IOEnv.hs
    ... ... @@ -45,7 +45,7 @@ import Data.IORef ( IORef, newIORef, readIORef, writeIORef, modifyIORef,
    45 45
                               atomicModifyIORef, atomicModifyIORef' )
    
    46 46
     import System.IO.Unsafe ( unsafeInterleaveIO )
    
    47 47
     import System.IO        ( fixIO )
    
    48
    -import Control.Monad
    
    48
    +import Control.Monad    ( MonadPlus )
    
    49 49
     import Control.Monad.Trans.Reader
    
    50 50
     import Control.Monad.Catch (MonadCatch, MonadMask, MonadThrow)
    
    51 51
     import GHC.Utils.Monad
    

  • compiler/GHC/Driver/CodeOutput.hs
    ... ... @@ -18,6 +18,7 @@ import GHC.Prelude
    18 18
     import GHC.Platform
    
    19 19
     import GHC.ForeignSrcLang
    
    20 20
     import GHC.Data.FastString
    
    21
    +import GHC.Core.Lint ( lintMessage )
    
    21 22
     
    
    22 23
     import GHC.CmmToAsm     ( nativeCodeGen )
    
    23 24
     import GHC.CmmToLlvm    ( llvmCodeGen )
    
    ... ... @@ -55,7 +56,6 @@ import GHC.Utils.Panic.Plain ( pgmError )
    55 56
     import GHC.Unit
    
    56 57
     import GHC.Unit.Finder      ( mkStubPaths )
    
    57 58
     
    
    58
    -import GHC.Types.SrcLoc
    
    59 59
     import GHC.Types.CostCentre
    
    60 60
     import GHC.Types.ForeignStubs
    
    61 61
     import GHC.Types.Unique.DSM
    
    ... ... @@ -109,10 +109,7 @@ codeOutput logger tmpfs llvm_config dflags unit_state this_mod filenm location g
    109 109
                       (text "CmmLint"<+>brackets (ppr this_mod))
    
    110 110
                       (const ()) $ do
    
    111 111
                     { case cmmLint (targetPlatform dflags) cmm of
    
    112
    -                        Just err -> do { logMsg logger
    
    113
    -                                                   MCInfo -- See Note [MCInfo for Lint] in "GHC.Core.Lint"
    
    114
    -                                                   noSrcSpan
    
    115
    -                                                   $ withPprStyle defaultDumpStyle err
    
    112
    +                        Just err -> do { lintMessage logger err
    
    116 113
                                            ; ghcExit logger 1
    
    117 114
                                            }
    
    118 115
                             Nothing  -> return ()
    

  • compiler/GHC/Driver/Pipeline/Execute.hs
    ... ... @@ -1162,7 +1162,7 @@ getHCFilePackages filename =
    1162 1162
     linkDynLibCheck :: Logger -> TmpFs -> DynFlags -> UnitEnv -> [String] -> [UnitId] -> IO ()
    
    1163 1163
     linkDynLibCheck logger tmpfs dflags unit_env o_files dep_units = do
    
    1164 1164
       when (haveRtsOptsFlags dflags) $
    
    1165
    -    logMsg logger MCInfo noSrcSpan
    
    1165
    +    logInfo logger
    
    1166 1166
           $ withPprStyle defaultUserStyle
    
    1167 1167
           (text "Warning: -rtsopts and -with-rtsopts have no effect with -shared." $$
    
    1168 1168
           text "    Call hs_init_ghc() from your main() function to set these options.")
    

  • compiler/GHC/Iface/Load.hs
    ... ... @@ -1104,7 +1104,7 @@ For some background on this choice see #15269.
    1104 1104
     showIface :: Logger -> DynFlags -> UnitState -> NameCache -> FilePath -> IO ()
    
    1105 1105
     showIface logger dflags unit_state name_cache filename = do
    
    1106 1106
        let profile = targetProfile dflags
    
    1107
    -       printer = logMsg logger MCOutput noSrcSpan . withPprStyle defaultDumpStyle
    
    1107
    +       printer = logOutput logger . withPprStyle defaultDumpStyle
    
    1108 1108
     
    
    1109 1109
        -- skip the hi way check; we don't want to worry about profiled vs.
    
    1110 1110
        -- non-profiled interfaces, for example.
    

  • compiler/GHC/Linker/Loader.hs
    ... ... @@ -508,7 +508,7 @@ classifyLdInput logger platform f
    508 508
       | isObjectFilename platform f = return (Just (Objects [f]))
    
    509 509
       | isDynLibFilename platform f = return (Just (DLLPath f))
    
    510 510
       | otherwise          = do
    
    511
    -        logMsg logger MCInfo noSrcSpan
    
    511
    +        logInfo logger
    
    512 512
                 $ withPprStyle defaultUserStyle
    
    513 513
                 (text ("Warning: ignoring unrecognised input `" ++ f ++ "'"))
    
    514 514
             return Nothing
    

  • compiler/GHC/Stg/Lint.hs
    ... ... @@ -104,6 +104,7 @@ import GHC.Stg.Utils
    104 104
     import GHC.Core.DataCon
    
    105 105
     import GHC.Core             ( AltCon(..) )
    
    106 106
     import GHC.Core.Type
    
    107
    +import GHC.Core.Lint        ( lintMessage )
    
    107 108
     
    
    108 109
     import GHC.Types.Basic      ( TopLevelFlag(..), isTopLevel, isMarkedCbv )
    
    109 110
     import GHC.Types.CostCentre ( isCurrentCCS )
    
    ... ... @@ -148,8 +149,7 @@ lintStgTopBindings platform logger diag_opts opts extra_vars this_mod unarised w
    148 149
           Nothing  ->
    
    149 150
             return ()
    
    150 151
           Just msg -> do
    
    151
    -        logMsg logger Err.MCInfo noSrcSpan   -- See Note [MCInfo for Lint] in "GHC.Core.Lint"
    
    152
    -          $ withPprStyle defaultDumpStyle
    
    152
    +        lintMessage logger
    
    153 153
               (vcat [ text "*** Stg Lint ErrMsgs: in" <+>
    
    154 154
                             text whodunit <+> text "***",
    
    155 155
                       msg,
    

  • compiler/GHC/StgToByteCode.hs
    ... ... @@ -748,12 +748,21 @@ doTailCall init_d s p fn args = do
    748 748
     
    
    749 749
       where
    
    750 750
       do_pushes !d [] reps = do
    
    751
    -        assert (null reps) return ()
    
    752
    -        (push_fn, sz) <- pushAtom d p (StgVarArg fn)
    
    753 751
             platform <- profilePlatform <$> getProfile
    
    754
    -        assert (sz == wordSize platform) return ()
    
    755
    -        let slide = mkSlideB platform (d - init_d + wordSize platform) (init_d - s)
    
    756
    -        return (push_fn `appOL` (slide `appOL` unitOL ENTER))
    
    752
    +        assert (null reps) return ()
    
    753
    +        case lookupBCEnv_maybe fn p of
    
    754
    +          Just d_v
    
    755
    +            | d - d_v == 0  -- shortcut; the first thing on the stack is what we want to enter,
    
    756
    +            , d_v <= init_d -- and it is between init_d and sequel (which will be dropped)
    
    757
    +            -> do
    
    758
    +              let slide = mkSlideB platform (d - init_d + wordSize platform)
    
    759
    +                                            (init_d - s - wordSize platform)
    
    760
    +              return (slide `appOL` unitOL ENTER)
    
    761
    +          _ -> do
    
    762
    +              (push_fn, sz) <- pushAtom d p (StgVarArg fn)
    
    763
    +              assert (sz == wordSize platform) return ()
    
    764
    +              let slide = mkSlideB platform (d - init_d + wordSize platform) (init_d - s)
    
    765
    +              return (push_fn `appOL` (slide `appOL` unitOL ENTER))
    
    757 766
       do_pushes !d args reps = do
    
    758 767
           let (push_apply, n, rest_of_reps) = findPushSeq reps
    
    759 768
               (these_args, rest_of_args) = splitAt n args
    

  • compiler/GHC/Tc/Utils/Monad.hs
    ... ... @@ -2351,8 +2351,7 @@ failIfM msg = do
    2351 2351
         env <- getLclEnv
    
    2352 2352
         let full_msg = (if_loc env <> colon) $$ nest 2 msg
    
    2353 2353
         logger <- getLogger
    
    2354
    -    liftIO (logMsg logger MCFatal
    
    2355
    -             noSrcSpan $ withPprStyle defaultErrStyle full_msg)
    
    2354
    +    liftIO $ fatalErrorMsg logger full_msg
    
    2356 2355
         failM
    
    2357 2356
     
    
    2358 2357
     --------------------
    
    ... ... @@ -2384,10 +2383,7 @@ forkM doc thing_inside
    2384 2383
                           logger <- getLogger
    
    2385 2384
                           let msg = hang (text "forkM failed:" <+> doc)
    
    2386 2385
                                        2 (text (show exn))
    
    2387
    -                      liftIO $ logMsg logger
    
    2388
    -                                         MCFatal
    
    2389
    -                                         noSrcSpan
    
    2390
    -                                         $ withPprStyle defaultErrStyle msg
    
    2386
    +                      liftIO $ fatalErrorMsg logger msg
    
    2391 2387
                     ; traceIf (text "} ending fork (badly)" <+> doc)
    
    2392 2388
                     ; pgmError "Cannot continue after interface file error" }
    
    2393 2389
         }
    

  • libraries/base/changelog.md
    ... ... @@ -6,6 +6,7 @@
    6 6
       * Fix issues with toRational for types capable to represent infinite and not-a-number values ([CLC proposal #338](https://github.com/haskell/core-libraries-committee/issues/338))
    
    7 7
       * Modify the implementation of `Data.List.sortOn` to use `(>)` instead of `compare`. ([CLC proposal #332](https://github.com/haskell/core-libraries-committee/issues/332))
    
    8 8
       * `GHC.Exts.IOPort#` and its related operations have been removed  ([CLC #213](https://github.com/haskell/core-libraries-committee/issues/213))
    
    9
    +  * Add `thenA` and `thenM`. ([CLC proposal #351](https://github.com/haskell/core-libraries-committee/issues/351))
    
    9 10
       * Fix bug where `naturalAndNot` was incorrectly truncating results ([CLC proposal #350](github.com/haskell/core-libraries-committee/issues/350))
    
    10 11
       * Remove extra laziness from `Data.Bifunctor.Bifunctor` instances for all tuples to have the same laziness as their `Data.Functor.Functor` counterparts (i.e. they became more strict than before) ([CLC proposal #339](https://github.com/haskell/core-libraries-committee/issues/339))
    
    11 12
       * Adjust the strictness of `Data.List.iterate'` to be more reasonable: every element of the output list is forced to WHNF when the `(:)` containing it is forced. ([CLC proposal #335)](https://github.com/haskell/core-libraries-committee/issues/335)
    

  • libraries/base/src/Control/Applicative.hs
    ... ... @@ -49,6 +49,7 @@ module Control.Applicative (
    49 49
         liftA, liftA3,
    
    50 50
         optional,
    
    51 51
         asum,
    
    52
    +    thenA,
    
    52 53
         ) where
    
    53 54
     
    
    54 55
     import GHC.Internal.Control.Category hiding ((.), id)
    

  • libraries/base/src/Control/Monad.hs
    ... ... @@ -57,6 +57,7 @@ module Control.Monad
    57 57
          liftM4,
    
    58 58
          liftM5,
    
    59 59
          ap,
    
    60
    +     thenM,
    
    60 61
          -- **  Strict monadic functions
    
    61 62
          (<$!>)
    
    62 63
          ) where
    

  • libraries/ghc-internal/src/GHC/Internal/Base.hs
    ... ... @@ -1223,6 +1223,9 @@ class Functor f => Applicative f where
    1223 1223
     --
    
    1224 1224
     -- As such this function may be used to implement a `Functor` instance from an `Applicative` one.
    
    1225 1225
     --
    
    1226
    +-- This function can be used to define `fmap = liftA`, if `Applicative` is already
    
    1227
    +-- defined for a data type.
    
    1228
    +--
    
    1226 1229
     -- ==== __Examples__
    
    1227 1230
     -- Using the Applicative instance for Lists:
    
    1228 1231
     --
    
    ... ... @@ -1233,7 +1236,6 @@ class Functor f => Applicative f where
    1233 1236
     --
    
    1234 1237
     -- >>> liftA (+1) (Just 3)
    
    1235 1238
     -- Just 4
    
    1236
    -
    
    1237 1239
     liftA :: Applicative f => (a -> b) -> f a -> f b
    
    1238 1240
     liftA f a = pure f <*> a
    
    1239 1241
     -- Caution: since this may be used for `fmap`, we can't use the obvious
    
    ... ... @@ -1253,6 +1255,18 @@ liftA3 f a b c = liftA2 f a b <*> c
    1253 1255
     {-# SPECIALISE liftA3 :: (a1->a2->a3->r) ->
    
    1254 1256
                                     Maybe a1 -> Maybe a2 -> Maybe a3 -> Maybe r #-}
    
    1255 1257
     
    
    1258
    +-- | Sequence two `Applicative` actions, discarding the result of the first one.
    
    1259
    +--
    
    1260
    +-- Defined as `thenA fa fb = (id <$ fa) <*> fb`.
    
    1261
    +--
    
    1262
    +-- This can be used to explicitly define `(*>) = thenA`, which is the default
    
    1263
    +-- definition.
    
    1264
    +--
    
    1265
    +-- @since 4.23.0.0
    
    1266
    +thenA :: Applicative f => f a -> f b -> f b
    
    1267
    +thenA fa fb = (id <$ fa) <*> fb
    
    1268
    +{-# INLINEABLE thenA #-}
    
    1269
    +
    
    1256 1270
     -- | The 'join' function is the conventional monad join operator. It
    
    1257 1271
     -- is used to remove one level of monadic structure, projecting its
    
    1258 1272
     -- bound argument into the outer level.
    
    ... ... @@ -1453,12 +1467,18 @@ similar problems in nofib.
    1453 1467
     
    
    1454 1468
     -- | Promote a function to a monad.
    
    1455 1469
     -- This is equivalent to 'fmap' but specialised to Monads.
    
    1470
    +--
    
    1471
    +-- This function can be used to define `fmap = liftM`, if `Monad` is already
    
    1472
    +-- defined for a data type.
    
    1456 1473
     liftM   :: (Monad m) => (a1 -> r) -> m a1 -> m r
    
    1457 1474
     liftM f m1              = do { x1 <- m1; return (f x1) }
    
    1458 1475
     
    
    1459 1476
     -- | Promote a function to a monad, scanning the monadic arguments from
    
    1460 1477
     -- left to right.
    
    1461 1478
     --
    
    1479
    +-- This function can be used to define `liftA2 = liftM2`, if `Monad` is already
    
    1480
    +-- defined for a data type.
    
    1481
    +--
    
    1462 1482
     -- ==== __Examples__
    
    1463 1483
     --
    
    1464 1484
     -- >>> liftM2 (+) [0,1] [0,2]
    
    ... ... @@ -1514,6 +1534,9 @@ is equivalent to
    1514 1534
     
    
    1515 1535
     > liftM<n> f x1 x2 ... xn
    
    1516 1536
     
    
    1537
    +This function can be used to define `(<*>) = ap`, if `Monad` is already
    
    1538
    +defined for a data type.
    
    1539
    +
    
    1517 1540
     ==== __Examples__
    
    1518 1541
     
    
    1519 1542
     >>> pure (\x y z -> x + y * z) `ap` Just 1 `ap` Just 5 `ap` Just 10
    
    ... ... @@ -1527,6 +1550,17 @@ ap m1 m2 = do { x1 <- m1; x2 <- m2; return (x1 x2) }
    1527 1550
     {-# SPECIALISE ap :: IO (a -> b) -> IO a -> IO b #-}
    
    1528 1551
     {-# SPECIALISE ap :: Maybe (a -> b) -> Maybe a -> Maybe b #-}
    
    1529 1552
     
    
    1553
    +-- | Sequence two monadic actions, discarding the result of the first one.
    
    1554
    +--
    
    1555
    +-- Defined as `thenM ma mb = ma >>= const mb`.
    
    1556
    +--
    
    1557
    +-- This can be used to define `(*>) = thenM`.
    
    1558
    +--
    
    1559
    +-- @since 4.23.0.0
    
    1560
    +thenM :: (Monad m) => m a -> m b -> m b
    
    1561
    +thenM ma mb = ma >>= const mb
    
    1562
    +{-# INLINEABLE thenM #-}
    
    1563
    +
    
    1530 1564
     -- instances for Prelude types
    
    1531 1565
     
    
    1532 1566
     -- | @since base-2.01
    

  • libraries/ghc-internal/src/GHC/Internal/Control/Monad.hs
    ... ... @@ -71,6 +71,8 @@ module GHC.Internal.Control.Monad
    71 71
     
    
    72 72
         , ap
    
    73 73
     
    
    74
    +    , thenM
    
    75
    +
    
    74 76
         -- ** Strict monadic functions
    
    75 77
     
    
    76 78
         , (<$!>)
    

  • testsuite/tests/interface-stability/base-exports.stdout
    ... ... @@ -34,6 +34,7 @@ module Control.Applicative where
    34 34
       liftA :: forall (f :: * -> *) a b. Applicative f => (a -> b) -> f a -> f b
    
    35 35
       liftA3 :: forall (f :: * -> *) a b c d. Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d
    
    36 36
       optional :: forall (f :: * -> *) a. Alternative f => f a -> f (GHC.Internal.Maybe.Maybe a)
    
    37
    +  thenA :: forall (f :: * -> *) a b. Applicative f => f a -> f b -> f b
    
    37 38
     
    
    38 39
     module Control.Arrow where
    
    39 40
       -- Safety: Safe
    
    ... ... @@ -483,6 +484,7 @@ module Control.Monad where
    483 484
       replicateM_ :: forall (m :: * -> *) a. GHC.Internal.Base.Applicative m => GHC.Internal.Types.Int -> m a -> m ()
    
    484 485
       sequence :: forall (t :: * -> *) (m :: * -> *) a. (GHC.Internal.Data.Traversable.Traversable t, Monad m) => t (m a) -> m (t a)
    
    485 486
       sequence_ :: forall (t :: * -> *) (m :: * -> *) a. (GHC.Internal.Data.Foldable.Foldable t, Monad m) => t (m a) -> m ()
    
    487
    +  thenM :: forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
    
    486 488
       unless :: forall (f :: * -> *). GHC.Internal.Base.Applicative f => GHC.Internal.Types.Bool -> f () -> f ()
    
    487 489
       void :: forall (f :: * -> *) a. Functor f => f a -> f ()
    
    488 490
       when :: forall (f :: * -> *). GHC.Internal.Base.Applicative f => GHC.Internal.Types.Bool -> f () -> f ()
    

  • testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs
    ... ... @@ -34,6 +34,7 @@ module Control.Applicative where
    34 34
       liftA :: forall (f :: * -> *) a b. Applicative f => (a -> b) -> f a -> f b
    
    35 35
       liftA3 :: forall (f :: * -> *) a b c d. Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d
    
    36 36
       optional :: forall (f :: * -> *) a. Alternative f => f a -> f (GHC.Internal.Maybe.Maybe a)
    
    37
    +  thenA :: forall (f :: * -> *) a b. Applicative f => f a -> f b -> f b
    
    37 38
     
    
    38 39
     module Control.Arrow where
    
    39 40
       -- Safety: Safe
    
    ... ... @@ -483,6 +484,7 @@ module Control.Monad where
    483 484
       replicateM_ :: forall (m :: * -> *) a. GHC.Internal.Base.Applicative m => GHC.Internal.Types.Int -> m a -> m ()
    
    484 485
       sequence :: forall (t :: * -> *) (m :: * -> *) a. (GHC.Internal.Data.Traversable.Traversable t, Monad m) => t (m a) -> m (t a)
    
    485 486
       sequence_ :: forall (t :: * -> *) (m :: * -> *) a. (GHC.Internal.Data.Foldable.Foldable t, Monad m) => t (m a) -> m ()
    
    487
    +  thenM :: forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
    
    486 488
       unless :: forall (f :: * -> *). GHC.Internal.Base.Applicative f => GHC.Internal.Types.Bool -> f () -> f ()
    
    487 489
       void :: forall (f :: * -> *) a. Functor f => f a -> f ()
    
    488 490
       when :: forall (f :: * -> *). GHC.Internal.Base.Applicative f => GHC.Internal.Types.Bool -> f () -> f ()
    

  • testsuite/tests/interface-stability/base-exports.stdout-mingw32
    ... ... @@ -34,6 +34,7 @@ module Control.Applicative where
    34 34
       liftA :: forall (f :: * -> *) a b. Applicative f => (a -> b) -> f a -> f b
    
    35 35
       liftA3 :: forall (f :: * -> *) a b c d. Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d
    
    36 36
       optional :: forall (f :: * -> *) a. Alternative f => f a -> f (GHC.Internal.Maybe.Maybe a)
    
    37
    +  thenA :: forall (f :: * -> *) a b. Applicative f => f a -> f b -> f b
    
    37 38
     
    
    38 39
     module Control.Arrow where
    
    39 40
       -- Safety: Safe
    
    ... ... @@ -483,6 +484,7 @@ module Control.Monad where
    483 484
       replicateM_ :: forall (m :: * -> *) a. GHC.Internal.Base.Applicative m => GHC.Internal.Types.Int -> m a -> m ()
    
    484 485
       sequence :: forall (t :: * -> *) (m :: * -> *) a. (GHC.Internal.Data.Traversable.Traversable t, Monad m) => t (m a) -> m (t a)
    
    485 486
       sequence_ :: forall (t :: * -> *) (m :: * -> *) a. (GHC.Internal.Data.Foldable.Foldable t, Monad m) => t (m a) -> m ()
    
    487
    +  thenM :: forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
    
    486 488
       unless :: forall (f :: * -> *). GHC.Internal.Base.Applicative f => GHC.Internal.Types.Bool -> f () -> f ()
    
    487 489
       void :: forall (f :: * -> *) a. Functor f => f a -> f ()
    
    488 490
       when :: forall (f :: * -> *). GHC.Internal.Base.Applicative f => GHC.Internal.Types.Bool -> f () -> f ()
    

  • testsuite/tests/interface-stability/base-exports.stdout-ws-32
    ... ... @@ -34,6 +34,7 @@ module Control.Applicative where
    34 34
       liftA :: forall (f :: * -> *) a b. Applicative f => (a -> b) -> f a -> f b
    
    35 35
       liftA3 :: forall (f :: * -> *) a b c d. Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d
    
    36 36
       optional :: forall (f :: * -> *) a. Alternative f => f a -> f (GHC.Internal.Maybe.Maybe a)
    
    37
    +  thenA :: forall (f :: * -> *) a b. Applicative f => f a -> f b -> f b
    
    37 38
     
    
    38 39
     module Control.Arrow where
    
    39 40
       -- Safety: Safe
    
    ... ... @@ -483,6 +484,7 @@ module Control.Monad where
    483 484
       replicateM_ :: forall (m :: * -> *) a. GHC.Internal.Base.Applicative m => GHC.Internal.Types.Int -> m a -> m ()
    
    484 485
       sequence :: forall (t :: * -> *) (m :: * -> *) a. (GHC.Internal.Data.Traversable.Traversable t, Monad m) => t (m a) -> m (t a)
    
    485 486
       sequence_ :: forall (t :: * -> *) (m :: * -> *) a. (GHC.Internal.Data.Foldable.Foldable t, Monad m) => t (m a) -> m ()
    
    487
    +  thenM :: forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
    
    486 488
       unless :: forall (f :: * -> *). GHC.Internal.Base.Applicative f => GHC.Internal.Types.Bool -> f () -> f ()
    
    487 489
       void :: forall (f :: * -> *) a. Functor f => f a -> f ()
    
    488 490
       when :: forall (f :: * -> *). GHC.Internal.Base.Applicative f => GHC.Internal.Types.Bool -> f () -> f ()
    

  • testsuite/tests/profiling/should_run/callstack001.stdout
    1
    -["GHC.Internal.TopHandler.runMainIO1 (<no location info>)","Main.main (callstack001.hs:17:8-21)","Main.mapM (callstack001.hs:10:13-17)","Main.mapM.go (callstack001.hs:(12,21)-(15,25))","Main.mapM.go (callstack001.hs:13:17-19)","Main.f (callstack001.hs:7:7-49)","Main.f (callstack001.hs:7:10-35)","GHC.Internal.Base.>>= (libraries/ghc-internal/src/GHC/Internal/Base.hs:1350:5-55)","GHC.Internal.Base.$fMonadIO1 (<no location info>)","GHC.Internal.Stack.CCS.currentCallStack (libraries/ghc-internal/src/GHC/Internal/Stack/CCS.hsc:126:1-16)","GHC.Internal.Stack.CCS.currentCallStack1 (<no location info>)"]
    
    2
    -["GHC.Internal.TopHandler.runMainIO1 (<no location info>)","Main.main (callstack001.hs:17:8-21)","Main.mapM (callstack001.hs:10:13-17)","Main.mapM.go (callstack001.hs:(12,21)-(15,25))","GHC.Internal.Base.>>= (libraries/ghc-internal/src/GHC/Internal/Base.hs:1350:5-55)","GHC.Internal.Base.$fMonadIO1 (<no location info>)","GHC.Internal.Stack.CCS.currentCallStack (libraries/ghc-internal/src/GHC/Internal/Stack/CCS.hsc:126:1-16)","GHC.Internal.Stack.CCS.currentCallStack1 (<no location info>)"]
    1
    +["GHC.Internal.TopHandler.runMainIO1 (<no location info>)","Main.main (callstack001.hs:17:8-21)","Main.mapM (callstack001.hs:10:13-17)","Main.mapM.go (callstack001.hs:(12,21)-(15,25))","Main.mapM.go (callstack001.hs:13:17-19)","Main.f (callstack001.hs:7:7-49)","Main.f (callstack001.hs:7:10-35)","GHC.Internal.Base.>>= (libraries/ghc-internal/src/GHC/Internal/Base.hs:1364:5-55)","GHC.Internal.Base.$fMonadIO1 (<no location info>)","GHC.Internal.Stack.CCS.currentCallStack (libraries/ghc-internal/src/GHC/Internal/Stack/CCS.hsc:126:1-16)","GHC.Internal.Stack.CCS.currentCallStack1 (<no location info>)"]
    
    2
    +["GHC.Internal.TopHandler.runMainIO1 (<no location info>)","Main.main (callstack001.hs:17:8-21)","Main.mapM (callstack001.hs:10:13-17)","Main.mapM.go (callstack001.hs:(12,21)-(15,25))","GHC.Internal.Base.>>= (libraries/ghc-internal/src/GHC/Internal/Base.hs:1364:5-55)","GHC.Internal.Base.$fMonadIO1 (<no location info>)","GHC.Internal.Stack.CCS.currentCallStack (libraries/ghc-internal/src/GHC/Internal/Stack/CCS.hsc:126:1-16)","GHC.Internal.Stack.CCS.currentCallStack1 (<no location info>)"]