ghc-mod/Lint.hs
2013-03-12 16:19:44 +09:00

15 lines
371 B
Haskell

module Lint where
import Control.Applicative
import Data.List
import Language.Haskell.HLint
import Types
lintSyntax :: Options -> String -> IO String
lintSyntax opt file = pack <$> lint opt file
where
pack = unlines . map (intercalate "\0" . lines)
lint :: Options -> String -> IO [String]
lint opt file = map show <$> hlint ([file, "--quiet"] ++ hlintOpts opt)