Skip to content
This repository has been archived by the owner on Sep 28, 2023. It is now read-only.

Hlint improvements #133

Merged
merged 7 commits into from
Sep 9, 2019
Merged

Hlint improvements #133

merged 7 commits into from
Sep 9, 2019

Conversation

KommuSoft
Copy link
Contributor

After running hlint some suggestions showed up. The following suggestions have been ignored:

Examples/multirow.hs:28:5: Suggestion: Reduce duplication
Found:
  mempty & "Column g2b" <> lnbk
  mempty & "Column g2c" <> lnbk
  mempty & "Column g2d" <> lnbk
  hline
  
Why not:
  Combine with Examples/multirow.hs:45:5

Text/LaTeX/Base/Class.hs:56:26: Suggestion: Use const
Found:
  \ _ -> l
Why not:
  const l

Text/LaTeX/Base/Commands.hs:1167:1: Suggestion: Use camelCase
Found:
  hatex_version = ...
Why not:
  hatexVersion = ...

3 hints

(the const was already merged into the master)

@@ -132,7 +133,7 @@ latexBlockParser = foldr1 (<|>)
text :: Parser LaTeX
text = do
mbC <- peekChar
let nottext :: [Char]
let nottext :: String
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Char] (or even Set Char) expresses the intend better.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, perhaps it is better to move nottext out of the text function, and use a Set instead. Updated.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. Data.Set is kind of overkill, but whatever.

Text/LaTeX/Base/Syntax.hs Show resolved Hide resolved
@leftaroundabout leftaroundabout merged commit 8b07c6c into Daniel-Diaz:master Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants