writing docs.

This commit is contained in:
Kazu Yamamoto
2013-05-20 14:28:56 +09:00
parent 849c308e5c
commit 089d490607
15 changed files with 150 additions and 47 deletions

View File

@@ -17,7 +17,11 @@ import Var
----------------------------------------------------------------
browseModule :: Options -> String -> IO String
-- | Getting functions, classes, etc from a module.
-- If 'detailed' is 'True', their types are also obtained.
browseModule :: Options
-> ModuleString -- ^ A module name. (e.g. \"Data.List\")
-> IO String
browseModule opt mdlName = convert opt . format <$> withGHCDummyFile (browse opt mdlName)
where
format
@@ -32,7 +36,11 @@ browseModule opt mdlName = convert opt . format <$> withGHCDummyFile (browse opt
(name, tail_) = break isSpace x
formatOps' [] = error "formatOps'"
browse :: Options -> String -> Ghc [String]
-- | Getting functions, classes, etc from a module.
-- If 'detailed' is 'True', their types are also obtained.
browse :: Options
-> ModuleString -- ^ A module name. (e.g. \"Data.List\")
-> Ghc [String]
browse opt mdlName = do
initializeFlags opt
getModule >>= getModuleInfo >>= listExports