Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

24 lines (19 sloc) 0.582 kB
module List (listModules) where
import Control.Applicative
import Data.List
import GHC
import GHCApi
import Packages
import Types
import UniqFM
----------------------------------------------------------------
listModules :: Options -> IO String
listModules opt = convert opt . nub . sort <$> list opt
list :: Options -> IO [String]
list opt = withGHC $ do
initSession0 opt
getExposedModules <$> getSessionDynFlags
where
getExposedModules = map moduleNameString
. concatMap exposedModules
. eltsUFM . pkgIdMap . pkgState
Jump to Line
Something went wrong with that request. Please try again.