haddock
haddock copied to clipboard
Issue with escaping single quote character
In my file I have the following:
import qualified Data.List as List (foldl', foldl1')
-- | A total variant of `List.foldl1\'`
foldl1' :: (a -> a -> a) -> NonEmpty a -> a
foldl1' f (x:|xs) = List.foldl' f x xs
This doesn't correct link in the displayed haddock comment. Am I doing something wrong?
Maybe haddock trips over its own too liberal linking syntax: https://haskell-haddock.readthedocs.io/en/latest/markup.html#hyperlinked-identifiers
Referring to a Haskell identifier, whether it be a type, class, constructor, or function, is done by surrounding it with a combination of single quotes and backticks. For example:
-- | This module defines the type 'T'. `T` is also ok. 'T` and `T' are accepted but less common.
The latter two variants should better be rejected...
Maybe related:
- https://github.com/haskell/haddock/issues/1593