lineSeparator are only used in toList/toPlain.

This commit is contained in:
Kazu Yamamoto
2014-04-21 15:58:36 +09:00
parent 3d03cff06b
commit 8983cf2d88
4 changed files with 67 additions and 62 deletions

View File

@@ -2,7 +2,6 @@ module Language.Haskell.GhcMod.Lint where
import Control.Applicative ((<$>))
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.Utils (replace)
import Language.Haskell.HLint (hlint)
-- | Checking syntax of a target file using hlint.
@@ -12,6 +11,5 @@ lintSyntax :: Options
-> IO String
lintSyntax opt file = pack <$> hlint (file : "--quiet" : hopts)
where
LineSeparator lsep = lineSeparator opt
pack = convert opt . map (replace '\n' lsep . init . show)
pack = convert opt . map (init . show) -- init drops the last \n.
hopts = hlintOpts opt