Skip to content

Missing lambdas in Monad laws documentation

Summary

In the documentation specifying the Monad laws in GHC.Base, the lambdas used in the law for m1 <*> m2 seem to be correctly escaped in the source:

https://gitlab.haskell.org/ghc/ghc/-/blob/0759c069e7cf328c8e397623bb2e5403de52e869/libraries/base/GHC/Base.hs#L835

but once the documentation is rendered they have disappeared:

m1 <*> m2 = m1 >>= (x1 -> m2 >>= (x2 -> return (x1 x2)))
--                  ^             ^

as seen on hackage: https://hackage.haskell.org/package/base-4.15.0.0/docs/Prelude.html#t:Monad

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information