haskell / haddock

Haskell Documentation Tool
www.haskell.org/haddock/
BSD 2-Clause "Simplified" License
361 stars 243 forks source link

Add a Haddock option for MagicHash #1562

Open nfrisby opened 1 year ago

nfrisby commented 1 year ago

I have a module where the code does not rely on -XMagicHash, but the haddock comments do (eg -- | See 'foo#' for more details).

cabal haddock doesn't resolve those names unless I add a -XMagicHash to the compilation. Thus, I'd prefer to write:

{-# OPTIONS_HADDOCK magic-hash #-}

so that haddock would itself add -XMagicHash when processing the module. Thanks!