adding docs.

This commit is contained in:
Kazu Yamamoto 2014-03-26 12:09:02 +09:00
parent 5c79376ca7
commit 782da60d0c
4 changed files with 8 additions and 5 deletions

View File

@ -133,6 +133,7 @@ showOutputable dflag = unwords . lines . showUnqualifiedPage dflag . ppr
----------------------------------------------------------------
-- | Browsing all functions in all system/user modules.
browseAll :: DynFlags -> Ghc [(String,String)]
browseAll dflag = do
ms <- packageDbModules True

View File

@ -58,6 +58,7 @@ setLogger True df ls = do
----------------------------------------------------------------
-- | Converting 'SourceError' to 'String'.
handleErrMsg :: LineSeparator -> SourceError -> Ghc [String]
handleErrMsg ls err = do
dflag <- getSessionDynFlags

View File

@ -31,6 +31,7 @@ import System.Process
----------------------------------------------------------------
-- | Obtaining the directory for system libraries.
getSystemLibDir :: IO (Maybe FilePath)
getSystemLibDir = do
res <- readProcess "ghc" ["--print-libdir"] []
@ -159,6 +160,7 @@ setTargetFiles files = do
targets <- forM files $ \file -> guessTarget file Nothing
setTargets targets
-- | Adding the files to the targets.
addTargetFiles :: (GhcMonad m) => [FilePath] -> m ()
addTargetFiles [] = error "ghc-mod: addTargetFiles: No target files given"
addTargetFiles files = do

View File

@ -14,24 +14,23 @@ module Language.Haskell.GhcMod.Internal (
, cabalDependPackages
, cabalSourceDirs
, cabalAllTargets
-- * Getting 'DynFlags'
-- * IO
, getSystemLibDir
, getDynamicFlags
-- * Initializing 'DynFlags'
, initializeFlags
, initializeFlagsWithCradle
-- * 'GhcMonad'
-- * 'Ghc' Monad
, setTargetFiles
, addTargetFiles
, handleErrMsg
, browseAll
-- * 'Ghc' Choice
, (||>)
, goNext
, runAnyOne
-- * 'GhcMonad' Choice
, (|||>)
-- * GHC
, getSystemLibDir
, browseAll
) where
import Language.Haskell.GhcMod.Browse