[Git][ghc/ghc][master] Document etymology of "bind" as the name for `>>=`
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: b418408b by Irene Knapp at 2025-09-25T09:47:54-04:00 Document etymology of "bind" as the name for `>>=` It took me twenty years of contemplation to realize why it's called that. I therefore feel that it may not be obvious to beginners. - - - - - 1 changed file: - libraries/ghc-internal/src/GHC/Internal/Base.hs Changes: ===================================== libraries/ghc-internal/src/GHC/Internal/Base.hs ===================================== @@ -1353,9 +1353,9 @@ class Applicative m => Monad m where -- bs a -- @ -- - -- An alternative name for this function is \'bind\', but some people - -- may refer to it as \'flatMap\', which results from it being equivalent - -- to + -- An alternative name for this function is \'bind\', because it + -- is used to introduce bindings in monadic contexts, but some people may + -- refer to it as \'flatMap\', which results from it being equivalent to -- -- @\\x f -> 'join' ('fmap' f x) :: Monad m => m a -> (a -> m b) -> m b@ -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b418408b73703910128f481cad85124e... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b418408b73703910128f481cad85124e... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Marge Bot (@marge-bot)