Lint.hs 375 B

123456789101112131415
  1. module Lint where
  2. import Control.Applicative
  3. import Data.List
  4. import Language.Haskell.HLint
  5. import Types
  6. lintSyntax :: Options -> String -> IO String
  7. lintSyntax opt file = pretty <$> lint opt file
  8. where
  9. pretty = unlines . map (intercalate "\0" . lines)
  10. lint :: Options -> String -> IO [String]
  11. lint opt file = map show <$> hlint ([file, "--quiet"] ++ hlintOpts opt)