Make haddock more robust to changes to the `Language` data type
Make haddock more robust to changes to the `Language` data type

With the introduction of GHC2021, the `Languages` data type in GHC will
grow. In preparation of that (and to avoid changing haddock with each
new language), this change makes the code handle extensions to that data
type gracefully.

(cherry picked from commit c341dd7c9c3fc5ebc83a2d577c5a726f3eb152a5)

haskell/haddock,haskell/haddock,haskell/haddock,haskell/haddock,haskell/haddock