Files
ghc-mod/Lint.hs

15 lines
384 B
Haskell
Raw Normal View History

2010-05-06 15:29:55 +09:00
module Lint where
import Control.Applicative
import Data.List
2010-06-08 11:12:59 +09:00
import Language.Haskell.HLint
2010-05-06 15:29:55 +09:00
import Types
lintSyntax :: Options -> String -> IO String
lintSyntax opt file = pretty <$> lint opt file
2010-05-06 15:29:55 +09:00
where
2010-06-08 11:27:21 +09:00
pretty = unlines . map (concat . intersperse "\0" . lines)
2010-05-06 15:29:55 +09:00
lint :: Options -> String -> IO [String]
lint opt file = map show <$> hlint ([file, "--quiet"] ++ hlintOpts opt)