adding options: --package-conf and --no-user-package-conf
These command line options work just like the similar-named GHC flags. They are useful when working with non-standard package databases.
This commit is contained in:
10
Check.hs
10
Check.hs
@@ -18,13 +18,13 @@ import Types
|
||||
----------------------------------------------------------------
|
||||
|
||||
checkSyntax :: Options -> String -> IO String
|
||||
checkSyntax _ file = unlines <$> check file
|
||||
checkSyntax opt file = unlines <$> check opt file
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
||||
check :: String -> IO [String]
|
||||
check fileName = withGHC $ do
|
||||
file <- initializeGHC fileName options
|
||||
check :: Options -> String -> IO [String]
|
||||
check opt fileName = withGHC $ do
|
||||
file <- initializeGHC opt fileName options
|
||||
setTargetFile file
|
||||
ref <- newRef []
|
||||
loadWithLogger (refLogger ref) LoadAllTargets `gcatch` handleParseError ref
|
||||
@@ -69,4 +69,4 @@ showSDoc :: SDoc -> String
|
||||
showSDoc d = map toNull . Pretty.showDocWith PageMode $ d style
|
||||
where
|
||||
toNull '\n' = '\0'
|
||||
toNull x = x
|
||||
toNull x = x
|
||||
|
||||
Reference in New Issue
Block a user