-
Notifications
You must be signed in to change notification settings - Fork 93
Fix couple of haddock issues #471
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
Conversation
@@ -371,7 +371,6 @@ data ResponseError = | |||
|
|||
deriveJSON lspOptions ''ResponseError | |||
|
|||
-- | Either result or error must be Just. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is misleading since the former 2 Maybe fields were replaced with Either in
95f2e76#diff-6031041f17e1defe329987e180cff35227ab23a55bf8fa9415d7ebb4ab5c93d2R409
The comment seems to have returned through merge mistake in
9e78cce#diff-6031041f17e1defe329987e180cff35227ab23a55bf8fa9415d7ebb4ab5c93d2R368
@@ -304,8 +304,8 @@ data ServerDefinition config = forall m a. | |||
-- | |||
-- @ | |||
-- ServerDefinition { ... | |||
-- , doInitialize = \env _req -> pure $ Right env | |||
-- , interpretHandler = \env -> Iso | |||
-- , doInitialize = \\env _req -> pure $ Right env |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Special characters (like \
) need to be escaped in @ code blocks: https://haskell-haddock.readthedocs.io/en/latest/markup.html#code-blocks
@@ -232,7 +232,7 @@ data SymbolInformation = | |||
, _kind :: SymbolKind -- ^ The kind of this symbol. | |||
, _tags :: Maybe (List SymbolTag) -- ^ Tags for this symbol. | |||
, _deprecated :: Maybe Bool -- ^ Indicates if this symbol is deprecated. Deprecated, use tags instead. | |||
-- | The location of this symbol. The location's range is used by a tool | |||
, -- | The location of this symbol. The location's range is used by a tool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes misplaced comment
Mixing -- ^
and -- |
style comments in records leads to misplaced comments.
In these cases -- |
is not interpreted as beginning of the next comment, but as a continuation of -- ^ comment.
This issue is relatively pervasive in this package and I can think of 2 approaches to fixing these:
- move commas to make it clear to haddock that this comment belongs to the next field
i.e. from
-- | bla
, somefield :: Int
to
, -- | bla
somefield :: Int
- switch all
-- ^
comments within records to-- |
style
This would mean more lines of code changed, but also more consistency.
Would you prefer 1 or 2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think option 1 is a bit weird, maybe we switch it to 2? I personally prefer '-- |` comments.
Or as a compromise, what about this: any comment which contains at least one -- |
comment must contain all -- |
comments. And the ones that are purely -- ^
can be left as is.
with the generated types merged #478 this pull request is no longer applicable. |
No description provided.