close import.
This commit is contained in:
parent
ff70313049
commit
5f6adb53f2
@ -31,11 +31,11 @@ module Language.Haskell.GhcMod.Gap (
|
|||||||
) where
|
) where
|
||||||
|
|
||||||
import Control.Applicative hiding (empty)
|
import Control.Applicative hiding (empty)
|
||||||
import Control.Monad
|
import Control.Monad (filterM)
|
||||||
import CoreSyn
|
import CoreSyn (CoreExpr)
|
||||||
import Data.List
|
import Data.List (intersperse)
|
||||||
import Data.Maybe
|
import Data.Maybe (catMaybes)
|
||||||
import Data.Time.Clock
|
import Data.Time.Clock (UTCTime)
|
||||||
import DataCon (dataConRepType)
|
import DataCon (dataConRepType)
|
||||||
import Desugar (deSugarExpr)
|
import Desugar (deSugarExpr)
|
||||||
import DynFlags
|
import DynFlags
|
||||||
@ -321,7 +321,7 @@ typeForUser = pprTypeForUser False
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
deSugar :: TypecheckedModule -> LHsExpr Id -> HscEnv
|
deSugar :: TypecheckedModule -> LHsExpr Id -> HscEnv
|
||||||
-> IO (Maybe CoreSyn.CoreExpr)
|
-> IO (Maybe CoreExpr)
|
||||||
#if __GLASGOW_HASKELL__ >= 707
|
#if __GLASGOW_HASKELL__ >= 707
|
||||||
deSugar _ e hs_env = snd <$> deSugarExpr hs_env e
|
deSugar _ e hs_env = snd <$> deSugarExpr hs_env e
|
||||||
#else
|
#else
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
module Language.Haskell.GhcMod.List (listModules, listMods) where
|
module Language.Haskell.GhcMod.List (listModules, listMods) where
|
||||||
|
|
||||||
import Control.Applicative
|
import Control.Applicative ((<$>))
|
||||||
import Control.Monad (void)
|
import Control.Monad (void)
|
||||||
import Data.List
|
import Data.List (nub, sort)
|
||||||
import GHC
|
import GHC (Ghc)
|
||||||
|
import qualified GHC as G
|
||||||
import Language.Haskell.GhcMod.GHCApi
|
import Language.Haskell.GhcMod.GHCApi
|
||||||
import Language.Haskell.GhcMod.Types
|
import Language.Haskell.GhcMod.Types
|
||||||
import Packages
|
import Packages (pkgIdMap, exposedModules, sourcePackageId, display)
|
||||||
import UniqFM
|
import UniqFM (eltsUFM)
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
@ -23,11 +24,11 @@ listModules opt cradle = convert opt . nub . sort . map dropPkgs <$> withGHCDumm
|
|||||||
listMods :: Options -> Cradle -> Ghc [(String, String)]
|
listMods :: Options -> Cradle -> Ghc [(String, String)]
|
||||||
listMods opt cradle = do
|
listMods opt cradle = do
|
||||||
void $ initializeFlagsWithCradle opt cradle [] False
|
void $ initializeFlagsWithCradle opt cradle [] False
|
||||||
getExposedModules <$> getSessionDynFlags
|
getExposedModules <$> G.getSessionDynFlags
|
||||||
where
|
where
|
||||||
getExposedModules = concatMap exposedModules'
|
getExposedModules = concatMap exposedModules'
|
||||||
. eltsUFM . pkgIdMap . pkgState
|
. eltsUFM . pkgIdMap . G.pkgState
|
||||||
exposedModules' p =
|
exposedModules' p =
|
||||||
map moduleNameString (exposedModules p)
|
map G.moduleNameString (exposedModules p)
|
||||||
`zip`
|
`zip`
|
||||||
repeat (display $ sourcePackageId p)
|
repeat (display $ sourcePackageId p)
|
||||||
|
Loading…
Reference in New Issue
Block a user