ghc-mod/Language/Haskell/GhcMod/Modules.hs
2015-02-08 12:43:35 +01:00

15 lines
518 B
Haskell

module Language.Haskell.GhcMod.Modules (modules) where
import Control.Applicative ((<$>))
import qualified GHC as G
import Language.Haskell.GhcMod.Convert
import Language.Haskell.GhcMod.Monad
import Language.Haskell.GhcMod.Gap (listVisibleModuleNames)
import Module (moduleNameString)
----------------------------------------------------------------
-- | Listing installed modules.
modules :: IOish m => GhcModT m String
modules = convert' =<< map moduleNameString . listVisibleModuleNames <$> G.getSessionDynFlags