-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handling of reserved identifiers and operators in the identifier parser #817
Comments
Good call. I have prepared haddock-api to emit renamer warnings already. Feel free to make a PR to output actual warnings. |
Strangely, when I tried to use my patch for #819 to produce warnings for A bit of print-debugging revealed that e.g. |
Maybe a difference between parseString and parseParas? Unlikely but an association I had. |
No, |
This happens entirely on the parseParas :: DynFlags -> Maybe Package -> String -> MetaDoc mod RdrName
parseParas d p = overDoc (P.overIdentifier (parseIdent d)) . P.parseParas p
parseString :: DynFlags -> String -> DocH mod RdrName
parseString d = P.overIdentifier (parseIdent d) . P.parseString
|
Thanks @harpocrates. I hadn't noticed that I'm wondering though if users of |
I've noticed that the identifier parser will accept e.g.
'case'
or'..'
as identifiers although both are reserved and can't be hyperlinked. This isn't much of a problem as the renamer will mark them asDocMonospaced
instead ofDocIdentifier
but maybe there are arguments for correcting this nonetheless?Relatedly, maybe haddock should emit a warning when it can't resolve an identifier and applies
DocMonospaced
?The text was updated successfully, but these errors were encountered: