cleaning up APIs.
This commit is contained in:
@@ -10,15 +10,8 @@ import Language.Haskell.HLint (hlint)
|
||||
lintSyntax :: Options
|
||||
-> FilePath -- ^ A target file.
|
||||
-> IO String
|
||||
lintSyntax opt file = pack <$> lint hopts file
|
||||
lintSyntax opt file = pack . map show <$> hlint (file : "--quiet" : hopts)
|
||||
where
|
||||
LineSeparator lsep = lineSeparator opt
|
||||
pack = convert opt . map (intercalate lsep . lines)
|
||||
hopts = hlintOpts opt
|
||||
|
||||
-- | Checking syntax of a target file using hlint.
|
||||
-- Warnings and errors are returned.
|
||||
lint :: [String]
|
||||
-> FilePath -- ^ A target file.
|
||||
-> IO [String]
|
||||
lint hopts file = map show <$> hlint (file : "--quiet" : hopts)
|
||||
|
||||
Reference in New Issue
Block a user