From 6cd77d4c638012be63d66882403804aa28feb6ed Mon Sep 17 00:00:00 2001
From: Albert Krewinkel <albert@zeitkraut.de>
Date: Fri, 7 Feb 2020 10:15:57 +0100
Subject: Resolve HLint warnings

All warnings are either fixed or, if more appropriate, HLint is
configured to ignore them. HLint suggestions remain.

  * Ignore "Use camelCase" warnings in Lua and legacy code
  * Fix or ignore remaining HLint warnings
  * Remove redundant brackets
  * Remove redundant `return`s
  * Remove redundant as-pattern
  * Fuse mapM_/map
  * Use `.` to shorten code
  * Remove redundant `fmap`
  * Remove unused LANGUAGE pragmas
  * Hoist `not` in Text.Pandoc.App
  * Use fewer imports for `Text.DocTemplates`
  * Remove redundant `do`s
  * Remove redundant `$`s
  * Jira reader: remove unnecessary parentheses
---
 src/Text/Pandoc/App/CommandLineOptions.hs | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

(limited to 'src/Text/Pandoc/App')

diff --git a/src/Text/Pandoc/App/CommandLineOptions.hs b/src/Text/Pandoc/App/CommandLineOptions.hs
index e407d8854..18d15843e 100644
--- a/src/Text/Pandoc/App/CommandLineOptions.hs
+++ b/src/Text/Pandoc/App/CommandLineOptions.hs
@@ -37,6 +37,7 @@ import Data.List (isPrefixOf)
 #endif
 #endif
 import Data.Maybe (fromMaybe, isJust)
+import Data.Text (Text)
 import Safe (tailDef)
 import Skylighting (Style, Syntax (..), defaultSyntaxMap, parseTheme)
 import System.Console.GetOpt
@@ -44,7 +45,7 @@ import System.Environment (getArgs, getProgName)
 import System.Exit (exitSuccess)
 import System.FilePath
 import System.IO (stdout)
-import Text.DocTemplates (Val(..))
+import Text.DocTemplates (Context (..), ToContext (toVal), Val (..))
 import Text.Pandoc
 import Text.Pandoc.App.Opt (Opt (..), LineEnding (..), IpynbOutput (..), addMeta)
 import Text.Pandoc.Filter (Filter (..))
@@ -64,10 +65,8 @@ import qualified Data.ByteString as BS
 import qualified Data.ByteString.Lazy as B
 import qualified Data.Map as M
 import qualified Data.Text as T
-import Data.Text (Text)
-import Text.DocTemplates (ToContext(toVal), Context(..))
-import qualified Text.Pandoc.UTF8 as UTF8
 import qualified Data.YAML as Y
+import qualified Text.Pandoc.UTF8 as UTF8
 
 parseOptions :: [OptDescr (Opt -> IO Opt)] -> Opt -> IO Opt
 parseOptions options' defaults = do
@@ -648,7 +647,7 @@ options =
                       "all" -> return opt{ optIpynbOutput = IpynbOutputAll }
                       "best" -> return opt{ optIpynbOutput = IpynbOutputBest }
                       "none" -> return opt{ optIpynbOutput = IpynbOutputNone }
-                      _ -> E.throwIO $ PandocOptionError $
+                      _ -> E.throwIO $ PandocOptionError
                              "ipynb-output must be all, none, or best")
                  "all|none|best")
                  "" -- "Starting number for sections, subsections, etc."
-- 
cgit v1.2.3