ghc-mod/Language/Haskell/GhcMod/Modules.hs

15 lines
518 B
Haskell
Raw Normal View History

2014-08-28 09:41:03 +00:00
module Language.Haskell.GhcMod.Modules (modules) where
2010-03-11 10:03:17 +00:00
2014-03-27 07:02:16 +00:00
import Control.Applicative ((<$>))
import qualified GHC as G
2014-05-11 22:40:00 +00:00
import Language.Haskell.GhcMod.Convert
2014-07-17 05:30:42 +00:00
import Language.Haskell.GhcMod.Monad
2015-01-16 14:47:56 +00:00
import Language.Haskell.GhcMod.Gap (listVisibleModuleNames)
import Module (moduleNameString)
2010-03-11 10:03:17 +00:00
----------------------------------------------------------------
2013-05-20 05:28:56 +00:00
-- | Listing installed modules.
modules :: IOish m => GhcModT m String
2015-01-16 14:47:56 +00:00
modules = convert' =<< map moduleNameString . listVisibleModuleNames <$> G.getSessionDynFlags