Changing GHCMod as a library.
This commit is contained in:
14
Language/Haskell/GhcMod/Lint.hs
Normal file
14
Language/Haskell/GhcMod/Lint.hs
Normal file
@@ -0,0 +1,14 @@
|
||||
module Language.Haskell.GhcMod.Lint where
|
||||
|
||||
import Control.Applicative
|
||||
import Data.List
|
||||
import Language.Haskell.GhcMod.Types
|
||||
import Language.Haskell.HLint
|
||||
|
||||
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)
|
||||
Reference in New Issue
Block a user