Description
A similar patch to #288 is needed to remove more invalid Haddock markup, this time in GHC.Exts.Heap.FFIClosures.hs
(fixed upstream in https://gitlab.haskell.org/ghc/ghc/-/merge_requests/7291#note_400665). At least if we care about keeping ghc-lib
buildable on GHC 8.10 with -haddock
enabled.
Enabling -haddock
globally is quite common as it's useful for HLS (see: haskell/haskell-language-server#209). Unfortunately, with this flag enabled, GHC 8.10 fails completely when encountering invalid markup (somewhat surprisingly, in a year and a half, this is only the second such issue I've hit, after haskell/c2hs#256). GHC 9.0 rectifies the situation by downgrading these from errors to warnings (requiring -Winvalid-haddock
, which really ought to be in -Wall
: https://gitlab.haskell.org/ghc/ghc/-/issues/18905) and introducing a -no-haddock
flag. But in 8.10 we're stuck.
Corollary: #288 can be reverted once support for GHC 8.10 is dropped.