-package ghc.
This commit is contained in:
parent
fb7f0c9802
commit
8fd3c80a54
11
Check.hs
11
Check.hs
@ -43,7 +43,7 @@ check fileName dir = ghandle ignore $ runGhc (Just libdir) $ do
|
|||||||
initSession = do
|
initSession = do
|
||||||
dflags <- getSessionDynFlags
|
dflags <- getSessionDynFlags
|
||||||
(dflags',_,_) <- parseDynamicFlags dflags cmdOptions
|
(dflags',_,_) <- parseDynamicFlags dflags cmdOptions
|
||||||
setSessionDynFlags $ setImportPath $ setOutputDir dir dflags'
|
setSessionDynFlags $ setGhcPackage $ setImportPath $ setOutputDir dir dflags'
|
||||||
setTargetFile file = do
|
setTargetFile file = do
|
||||||
target <- guessTarget file Nothing
|
target <- guessTarget file Nothing
|
||||||
setTargets [target]
|
setTargets [target]
|
||||||
@ -76,13 +76,18 @@ setImportPath d = d {
|
|||||||
importPaths = importPaths d ++ ["..","../..","../../..","../../../../.."]
|
importPaths = importPaths d ++ ["..","../..","../../..","../../../../.."]
|
||||||
}
|
}
|
||||||
|
|
||||||
{-
|
|
||||||
setGhcPackage :: DynFlags -> DynFlags
|
setGhcPackage :: DynFlags -> DynFlags
|
||||||
setGhcPackage d = d {
|
setGhcPackage d = d {
|
||||||
packageFlags = ExposePackage "ghc" : packageFlags d
|
packageFlags = ExposePackage "ghc" : packageFlags d
|
||||||
|
, ghcLink = NoLink
|
||||||
|
}
|
||||||
|
|
||||||
|
{-
|
||||||
|
setTarget :: DynFlags -> DynFlags
|
||||||
|
setTarget d = d {
|
||||||
|
hscTarget = HscNothing
|
||||||
}
|
}
|
||||||
-}
|
-}
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
showErrMsg :: ErrMsg -> String
|
showErrMsg :: ErrMsg -> String
|
||||||
|
Loading…
Reference in New Issue
Block a user