haddock
haddock copied to clipboard
Named chunks in module header
Apparently, haddock (or the parser, rather) doesn't allow named chunk references in the module header:
-- |
-- $doc
module Foo where
-- $doc
-- foo
Foo.hs:2:1: error: parse error on input ‘-- $doc’
|
2 | -- $doc
| ^^^^^^^
As is usually the case here, the problem is in GHC's moduleheader production. We could tweak this to also accept
-- $doc
module Foo where
-- $doc
-- foo
The main concern is that chunk references have to be tokens on their own. All of this will become much simpler once I finish https://phabricator.haskell.org/D5057.
I guess named chunks in module header didn't happen yet ?