adding docs.
This commit is contained in:
parent
5c79376ca7
commit
782da60d0c
@ -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
|
||||
|
@ -58,6 +58,7 @@ setLogger True df ls = do
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
||||
-- | Converting 'SourceError' to 'String'.
|
||||
handleErrMsg :: LineSeparator -> SourceError -> Ghc [String]
|
||||
handleErrMsg ls err = do
|
||||
dflag <- getSessionDynFlags
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user