Wolfgang Jeltsch pushed to branch wip/jeltsch/base-buildable-with-ghc-9-14 at Glasgow Haskell Compiler / GHC Commits: 011148d6 by Wolfgang Jeltsch at 2026-05-19T13:47:14+03:00 Make `thenM` available with GHC 9.14 - - - - - 1 changed file: - libraries/base/src/Control/Monad.hs Changes: ===================================== libraries/base/src/Control/Monad.hs ===================================== @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE Safe #-} -- | @@ -63,6 +64,9 @@ module Control.Monad ) where import GHC.Internal.Control.Monad +#if __GLASGOW_HASKELL__ < 1000 +import Data.Function (const) +#endif {- $naming @@ -88,3 +92,18 @@ The functions in this module use the following naming conventions:
mfilter :: MonadPlus m => (a -> Bool) -> m a -> m a
-} + +#if __GLASGOW_HASKELL__ < 1000 + +-- | Sequence two monadic actions, discarding the result of the first one. +-- +-- Defined as `thenM ma mb = ma >>= const mb`. +-- +-- This can be used to define `(*>) = thenM`. +-- +-- @since 4.23.0.0 +thenM :: (Monad m) => m a -> m b -> m b +thenM ma mb = ma >>= const mb +{-# INLINEABLE thenM #-} + +#endif View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/011148d667039d7e17fb3ac6c37eb909... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/011148d667039d7e17fb3ac6c37eb909... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Wolfgang Jeltsch (@jeltsch)