close import.

This commit is contained in:
Kazu Yamamoto 2014-03-27 16:02:16 +09:00
parent ff70313049
commit 5f6adb53f2
2 changed files with 16 additions and 15 deletions

View File

@ -31,11 +31,11 @@ module Language.Haskell.GhcMod.Gap (
) where
import Control.Applicative hiding (empty)
import Control.Monad
import CoreSyn
import Data.List
import Data.Maybe
import Data.Time.Clock
import Control.Monad (filterM)
import CoreSyn (CoreExpr)
import Data.List (intersperse)
import Data.Maybe (catMaybes)
import Data.Time.Clock (UTCTime)
import DataCon (dataConRepType)
import Desugar (deSugarExpr)
import DynFlags
@ -321,7 +321,7 @@ typeForUser = pprTypeForUser False
#endif
deSugar :: TypecheckedModule -> LHsExpr Id -> HscEnv
-> IO (Maybe CoreSyn.CoreExpr)
-> IO (Maybe CoreExpr)
#if __GLASGOW_HASKELL__ >= 707
deSugar _ e hs_env = snd <$> deSugarExpr hs_env e
#else

View File

@ -1,13 +1,14 @@
module Language.Haskell.GhcMod.List (listModules, listMods) where
import Control.Applicative
import Control.Applicative ((<$>))
import Control.Monad (void)
import Data.List
import GHC
import Data.List (nub, sort)
import GHC (Ghc)
import qualified GHC as G
import Language.Haskell.GhcMod.GHCApi
import Language.Haskell.GhcMod.Types
import Packages
import UniqFM
import Packages (pkgIdMap, exposedModules, sourcePackageId, display)
import UniqFM (eltsUFM)
----------------------------------------------------------------
@ -23,11 +24,11 @@ listModules opt cradle = convert opt . nub . sort . map dropPkgs <$> withGHCDumm
listMods :: Options -> Cradle -> Ghc [(String, String)]
listMods opt cradle = do
void $ initializeFlagsWithCradle opt cradle [] False
getExposedModules <$> getSessionDynFlags
getExposedModules <$> G.getSessionDynFlags
where
getExposedModules = concatMap exposedModules'
. eltsUFM . pkgIdMap . pkgState
. eltsUFM . pkgIdMap . G.pkgState
exposedModules' p =
map moduleNameString (exposedModules p)
map G.moduleNameString (exposedModules p)
`zip`
repeat (display $ sourcePackageId p)