-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | Metadata collection for leksah
--   
--   The interface to GHC-API for leksah
@package leksah-server
@version 0.12.1.2

module IDE.Utils.Server

-- | make an IP Address: (127,0,0,1) is the localhost
ipAddress :: (Word8, Word8, Word8, Word8) -> HostAddress

-- | the specification of a serving process
data Server
Server :: SockAddr -> SocketType -> ServerRoutine -> Server
serverAddr :: Server -> SockAddr
serverTyp :: Server -> SocketType
serverRoutine :: Server -> ServerRoutine
serveOne :: Maybe UserAndGroup -> Server -> IO (ThreadId, MVar ())
serveMany :: Maybe UserAndGroup -> [Server] -> IO [(ThreadId, MVar ())]

-- | the functionality of a server
type ServerRoutine = (Handle, HostName, PortNumber) -> IO ()
data UserAndGroup
UserAndGroup :: String -> String -> UserAndGroup
UserWithDefaultGroup :: String -> UserAndGroup
class WaitFor a
waitFor :: WaitFor a => a -> IO ()
instance WaitFor (ThreadId, MVar ())
instance WaitFor a => WaitFor [a]
instance WaitFor (MVar a)

module IDE.Core.CTypes
data PackageDescr
PackageDescr :: PackageIdentifier -> (Maybe FilePath) -> [ModuleDescr] -> [PackageIdentifier] -> PackageDescr
pdPackage :: PackageDescr -> PackageIdentifier
pdMbSourcePath :: PackageDescr -> (Maybe FilePath)
pdModules :: PackageDescr -> [ModuleDescr]
pdBuildDepends :: PackageDescr -> [PackageIdentifier]
data ModuleDescr
ModuleDescr :: PackModule -> (Maybe FilePath) -> (Map ModuleName (Set String)) -> [Descr] -> ModuleDescr
mdModuleId :: ModuleDescr -> PackModule
mdMbSourcePath :: ModuleDescr -> (Maybe FilePath)
mdReferences :: ModuleDescr -> (Map ModuleName (Set String))
mdIdDescriptions :: ModuleDescr -> [Descr]
data Descr
Real :: RealDescr -> Descr
Reexported :: ReexportedDescr -> Descr
data RealDescr
RealDescr :: String -> Maybe ByteString -> Maybe PackModule -> Maybe Location -> Maybe ByteString -> TypeDescr -> Bool -> RealDescr
dscName' :: RealDescr -> String
dscMbTypeStr' :: RealDescr -> Maybe ByteString
dscMbModu' :: RealDescr -> Maybe PackModule
dscMbLocation' :: RealDescr -> Maybe Location
dscMbComment' :: RealDescr -> Maybe ByteString
dscTypeHint' :: RealDescr -> TypeDescr
dscExported' :: RealDescr -> Bool
data ReexportedDescr
ReexportedDescr :: Maybe PackModule -> Descr -> ReexportedDescr
dsrMbModu :: ReexportedDescr -> Maybe PackModule
dsrDescr :: ReexportedDescr -> Descr
newtype Present alpha
Present :: alpha -> Present alpha
data TypeDescr
VariableDescr :: TypeDescr
FieldDescr :: Descr -> TypeDescr
ConstructorDescr :: Descr -> TypeDescr

-- | first constructors, then fields
DataDescr :: [SimpleDescr] -> [SimpleDescr] -> TypeDescr
TypeDescr :: TypeDescr

-- | first constructors, then maybe field
NewtypeDescr :: SimpleDescr -> (Maybe SimpleDescr) -> TypeDescr

-- | first super, then methods
ClassDescr :: [String] -> [SimpleDescr] -> TypeDescr

-- | classDescr
MethodDescr :: Descr -> TypeDescr

-- | binds
InstanceDescr :: [String] -> TypeDescr
KeywordDescr :: TypeDescr
ExtensionDescr :: TypeDescr
ModNameDescr :: TypeDescr
QualModNameDescr :: TypeDescr
ErrorDescr :: TypeDescr
data DescrType
Variable :: DescrType
Field :: DescrType
Constructor :: DescrType
Data :: DescrType
Type :: DescrType
Newtype :: DescrType
Class :: DescrType
Method :: DescrType
Instance :: DescrType
Keyword :: DescrType
Extension :: DescrType
ModName :: DescrType
QualModName :: DescrType
Error :: DescrType
data SimpleDescr
SimpleDescr :: String -> Maybe ByteString -> Maybe Location -> Maybe ByteString -> Bool -> SimpleDescr
sdName :: SimpleDescr -> String
sdType :: SimpleDescr -> Maybe ByteString
sdLocation :: SimpleDescr -> Maybe Location
sdComment :: SimpleDescr -> Maybe ByteString
sdExported :: SimpleDescr -> Bool
data GenScope
GenScopeC :: (PackScope alpha) -> GenScope
dscName :: Descr -> String
dscMbTypeStr :: Descr -> Maybe ByteString

-- | The definition module
dscMbModu :: Descr -> Maybe PackModule

-- | The exporting module
dsMbModu :: Descr -> Maybe PackModule
dscMbLocation :: Descr -> Maybe Location
dscMbComment :: Descr -> Maybe ByteString
dscTypeHint :: Descr -> TypeDescr
dscExported :: Descr -> Bool
descrType :: TypeDescr -> DescrType
isReexported :: Descr -> Bool
data PackScope alpha
PackScope :: (Map PackageIdentifier PackageDescr) -> alpha -> PackScope alpha
class SymbolTable alpha
symLookup :: SymbolTable alpha => String -> alpha -> [Descr]
symbols :: SymbolTable alpha => alpha -> Set String
symSplitLookup :: SymbolTable alpha => String -> alpha -> (alpha, Maybe [Descr], alpha)
symInsert :: SymbolTable alpha => String -> [Descr] -> alpha -> alpha
symEmpty :: SymbolTable alpha => alpha
symElems :: SymbolTable alpha => alpha -> [[Descr]]
symUnion :: SymbolTable alpha => alpha -> alpha -> alpha
data PackModule
PM :: PackageIdentifier -> ModuleName -> PackModule
pack :: PackModule -> PackageIdentifier
modu :: PackModule -> ModuleName
parsePackModule :: String -> PackModule
showPackModule :: PackModule -> String
packageIdentifierToString :: PackageIdentifier -> String
packageIdentifierFromString :: String -> Maybe PackageIdentifier
data Location
Location :: Int -> Int -> Int -> Int -> Location
locationSLine :: Location -> Int
locationSCol :: Location -> Int
locationELine :: Location -> Int
locationECol :: Location -> Int

-- | A portion of the source, spanning one or more lines and zero or more
--   columns.
data SrcSpan
SrcSpan :: String -> Int -> Int -> Int -> Int -> SrcSpan
srcSpanFilename :: SrcSpan -> String
srcSpanStartLine :: SrcSpan -> Int
srcSpanStartColumn :: SrcSpan -> Int
srcSpanEndLine :: SrcSpan -> Int
srcSpanEndColumn :: SrcSpan -> Int
data Scope
PackageScope :: Bool -> Scope
WorkspaceScope :: Bool -> Scope
SystemScope :: Scope
data ServerCommand
SystemCommand :: Bool -> Bool -> Bool -> ServerCommand
scRebuild :: ServerCommand -> Bool
scSources :: ServerCommand -> Bool
scExtract :: ServerCommand -> Bool
WorkspaceCommand :: Bool -> PackageIdentifier -> FilePath -> [(String, FilePath)] -> ServerCommand
wcRebuild :: ServerCommand -> Bool
wcPackage :: ServerCommand -> PackageIdentifier
wcPath :: ServerCommand -> FilePath
wcModList :: ServerCommand -> [(String, FilePath)]
ParseHeaderCommand :: FilePath -> ServerCommand
hcFilePath :: ServerCommand -> FilePath
data ServerAnswer
ServerOK :: ServerAnswer
ServerFailed :: String -> ServerAnswer
ServerHeader :: (Either [ImportDecl] Int) -> ServerAnswer
leksahVersion :: String
configDirName :: String
metadataVersion :: Integer

-- | An import declaration.
data ImportDecl
ImportDecl :: Location -> String -> Bool -> Bool -> Maybe String -> Maybe String -> Maybe ImportSpecList -> ImportDecl
importLoc :: ImportDecl -> Location

-- | name of the module imported.
importModule :: ImportDecl -> String

-- | imported qualified?
importQualified :: ImportDecl -> Bool

-- | imported with {-# SOURCE #-}?
importSrc :: ImportDecl -> Bool

-- | imported with explicit package name
importPkg :: ImportDecl -> Maybe String

-- | optional alias name in an as clause.
importAs :: ImportDecl -> Maybe String

-- | optional list of import specifications.
importSpecs :: ImportDecl -> Maybe ImportSpecList

-- | An explicit import specification list.
data ImportSpecList
ImportSpecList :: Bool -> [ImportSpec] -> ImportSpecList

-- | An import specification, representing a single explicit item imported
--   (or hidden) from a module.
data ImportSpec

-- | variable
IVar :: String -> ImportSpec

-- | T: the name of a class, datatype or type synonym.
IAbs :: String -> ImportSpec

-- | T(..): a class imported with all of its methods, or a
--   datatype imported with all of its constructors.
IThingAll :: String -> ImportSpec

-- | T(C_1,...,C_n): a class imported with some of its methods, or
--   a datatype imported with some of its constructors.
IThingWith :: String -> [String] -> ImportSpec
getThisPackage :: PackageConfig -> PackageIdentifier
data RetrieveStrategy
RetrieveThenBuild :: RetrieveStrategy
BuildThenRetrieve :: RetrieveStrategy
NeverRetrieve :: RetrieveStrategy
instance Typeable PackModule
instance Typeable Location
instance Typeable SimpleDescr
instance Typeable RealDescr
instance Typeable TypeDescr
instance Typeable Descr
instance Typeable ReexportedDescr
instance Typeable ModuleDescr
instance Typeable PackageDescr
instance Show RetrieveStrategy
instance Read RetrieveStrategy
instance Eq RetrieveStrategy
instance Ord RetrieveStrategy
instance Enum RetrieveStrategy
instance Bounded RetrieveStrategy
instance Eq ServerCommand
instance Ord ServerCommand
instance Show ServerCommand
instance Read ServerCommand
instance Show DescrType
instance Eq DescrType
instance Ord DescrType
instance Bounded DescrType
instance Enum DescrType
instance Read DescrType
instance Eq PackModule
instance Ord PackModule
instance Read PackModule
instance Show PackModule
instance Eq SrcSpan
instance Ord SrcSpan
instance Show SrcSpan
instance Show Location
instance Eq Location
instance Ord Location
instance Read Location
instance Show SimpleDescr
instance Read SimpleDescr
instance Eq SimpleDescr
instance Ord SimpleDescr
instance Show RealDescr
instance Read RealDescr
instance Show TypeDescr
instance Read TypeDescr
instance Eq TypeDescr
instance Ord TypeDescr
instance Show Descr
instance Read Descr
instance Eq Descr
instance Ord Descr
instance Show ReexportedDescr
instance Read ReexportedDescr
instance Show ModuleDescr
instance Show PackageDescr
instance Show Scope
instance Eq Scope
instance Read Scope
instance Eq ImportSpec
instance Ord ImportSpec
instance Read ImportSpec
instance Show ImportSpec
instance Eq ImportSpecList
instance Ord ImportSpecList
instance Read ImportSpecList
instance Show ImportSpecList
instance Eq ImportDecl
instance Ord ImportDecl
instance Read ImportDecl
instance Show ImportDecl
instance Eq ServerAnswer
instance Ord ServerAnswer
instance Show ServerAnswer
instance Read ServerAnswer
instance NFData PackageName
instance NFData ModuleName
instance NFData PackModule
instance NFData DescrType
instance NFData PackageIdentifier
instance NFData SimpleDescr
instance NFData TypeDescr
instance NFData Descr
instance NFData ModuleDescr
instance NFData PackageDescr
instance NFData Location
instance Pretty VName
instance Pretty ImportSpec
instance Pretty ImportDecl
instance Ord Scope
instance Default ByteString
instance Default PackageIdentifier
instance Default PackModule
instance Ord ReexportedDescr
instance Eq ReexportedDescr
instance Ord RealDescr
instance Eq RealDescr
instance Show (Present Descr)
instance Show (Present PackModule)
instance Default DescrType
instance Ord ModuleDescr
instance Eq ModuleDescr
instance Show (Present ModuleDescr)
instance Default ModuleDescr
instance Ord PackageDescr
instance Eq PackageDescr
instance Show (Present PackageDescr)
instance Default PackageDescr
instance SymbolTable (Map String [Descr])

module IDE.Core.Serializable
instance Typeable PackageName
instance Typeable ModuleName
instance Typeable PackageIdentifier
instance BinaryShared PackageName
instance BinaryShared ModuleName
instance BinaryShared Location
instance BinaryShared SimpleDescr
instance BinaryShared TypeDescr
instance BinaryShared Descr
instance BinaryShared ModuleDescr
instance BinaryShared PackageDescr
instance BinaryShared Version
instance BinaryShared PackageIdentifier
instance BinaryShared PackModule

module IDE.StrippedPrefs

-- | Preferences is a data structure to hold configuration data
data Prefs
Prefs :: [FilePath] -> Maybe FilePath -> String -> RetrieveStrategy -> Int -> Bool -> Prefs
sourceDirectories :: Prefs -> [FilePath]
unpackDirectory :: Prefs -> Maybe FilePath
retrieveURL :: Prefs -> String
retrieveStrategy :: Prefs -> RetrieveStrategy
serverPort :: Prefs -> Int
endWithLastConn :: Prefs -> Bool
data RetrieveStrategy
RetrieveThenBuild :: RetrieveStrategy
BuildThenRetrieve :: RetrieveStrategy
NeverRetrieve :: RetrieveStrategy
readStrippedPrefs :: FilePath -> IO Prefs
writeStrippedPrefs :: FilePath -> Prefs -> IO ()
getSourceDirectories :: Prefs -> IO [FilePath]
getUnpackDirectory :: Prefs -> IO (Maybe FilePath)
instance Eq Prefs
instance Show Prefs

-- | Support for running external tools. Written mainly for GHCi but with |
--   support for others in mind.
module IDE.Utils.Tool
data ToolOutput
ToolInput :: String -> ToolOutput
ToolError :: String -> ToolOutput
ToolOutput :: String -> ToolOutput
ToolPrompt :: String -> ToolOutput
ToolExit :: ExitCode -> ToolOutput
toolline :: ToolOutput -> String
data ToolCommand
ToolCommand :: String -> String -> (Iteratee ToolOutput IO ()) -> ToolCommand
data ToolState
ToolState :: MVar ProcessHandle -> MVar Bool -> Chan ToolCommand -> Chan ToolCommand -> MVar ToolCommand -> ToolState
toolProcessMVar :: ToolState -> MVar ProcessHandle
outputClosed :: ToolState -> MVar Bool
toolCommands :: ToolState -> Chan ToolCommand
toolCommandsRead :: ToolState -> Chan ToolCommand
currentToolCommand :: ToolState -> MVar ToolCommand
toolProcess :: ToolState -> IO ProcessHandle
newToolState :: IO ToolState
runTool :: MonadIO m => FilePath -> [String] -> Maybe FilePath -> IO (Enumerator ToolOutput m b, ProcessHandle)
runTool' :: FilePath -> [String] -> Maybe FilePath -> IO ([ToolOutput], ProcessHandle)
runInteractiveTool :: ToolState -> CommandLineReader -> FilePath -> [String] -> IO ()
newGhci :: [String] -> [String] -> (Iteratee ToolOutput IO ()) -> IO ToolState
newGhci' :: [String] -> (Iteratee ToolOutput IO ()) -> IO ToolState
executeCommand :: ToolState -> String -> String -> Iteratee ToolOutput IO () -> IO ()
executeGhciCommand :: ToolState -> String -> Iteratee ToolOutput IO () -> IO ()
quoteArg :: String -> String
escapeQuotes :: String -> String

-- | Runs a command using the shell.
runCommand :: String -> IO ProcessHandle

-- | Waits for the specified process to terminate, and returns its exit
--   code.
--   
--   GHC Note: in order to call waitForProcess without blocking
--   all the other threads in the system, you must compile the program with
--   -threaded.
waitForProcess :: ProcessHandle -> IO ExitCode

-- | Sends an interrupt signal to the process group of the given process.
--   
--   On Unix systems, it sends the group the SIGINT signal.
--   
--   On Windows systems, it generates a CTRL_BREAK_EVENT and will only work
--   for processes created using createProcess and setting the
--   create_group flag
interruptProcessGroupOf :: ProcessHandle -> IO ()
data ProcessHandle :: *

-- | This is a non-blocking version of waitForProcess. If the
--   process is still running, Nothing is returned. If the process
--   has exited, then Just e is returned where e
--   is the exit code of the process.
getProcessExitCode :: ProcessHandle -> IO (Maybe ExitCode)

-- | Runs a raw command, and returns Handles that may be used to
--   communicate with the process via its stdin, stdout
--   and stderr respectively.
--   
--   For example, to start a process and feed a string to its stdin:
--   
--   
--   (inp,out,err,pid) <- runInteractiveProcess "..."
--   forkIO (hPutStr inp str)
--   
--   
--   The Handles are initially in binary mode; if you need them to
--   be in text mode then use hSetBinaryMode.
runInteractiveProcess :: FilePath -> [String] -> Maybe FilePath -> Maybe [(String, String)] -> IO (Handle, Handle, Handle, ProcessHandle)

-- | Runs a raw command, optionally specifying Handles from which to
--   take the stdin, stdout and stderr channels
--   for the new process (otherwise these handles are inherited from the
--   current process).
--   
--   Any Handles passed to runProcess are placed immediately
--   in the closed state.
--   
--   Note: consider using the more general createProcess instead of
--   runProcess.
runProcess :: FilePath -> [String] -> Maybe FilePath -> Maybe [(String, String)] -> Maybe Handle -> Maybe Handle -> Maybe Handle -> IO ProcessHandle
instance Eq ToolOutput
instance Show ToolOutput
instance Eq RawToolOutput
instance Show RawToolOutput
instance NFData ToolOutput
instance NFData ExitCode

module IDE.Utils.VersionUtils
getHaddockVersion :: IO String
getGhcVersion :: IO FilePath

module IDE.Utils.Utils
leksahSessionFileExtension :: [Char]
leksahWorkspaceFileExtension :: [Char]
leksahPreferencesFileExtension :: [Char]
leksahCandyFileExtension :: [Char]
leksahKeymapFileExtension :: [Char]
leksahSourcesFileExtension :: [Char]
leksahMetadataSystemFileExtension :: [Char]
leksahMetadataPathFileExtension :: [Char]
leksahMetadataWorkspaceFileExtension :: [Char]
leksahMetadataDebugExtension :: [Char]
leksahTemplateFileExtension :: [Char]
leksahFlagFileExtension :: [Char]
standardSessionFilename :: [Char]
emptySessionFilename :: [Char]
packageSessionFilename :: [Char]
standardKeymapFilename :: [Char]
standardCandyFilename :: [Char]
standardPreferencesFilename :: [Char]
strippedPreferencesFilename :: [Char]
standardSourcesFilename :: [Char]
standardModuleTemplateFilename :: [Char]

module IDE.Utils.FileUtils
allModules :: FilePath -> IO [ModuleName]
allHiFiles :: FilePath -> IO [FilePath]
allHaskellSourceFiles :: FilePath -> IO [FilePath]
isEmptyDirectory :: FilePath -> IO Bool
cabalFileName :: FilePath -> IO (Maybe FilePath)
allCabalFiles :: FilePath -> IO [FilePath]
getConfigFilePathForLoad :: String -> Maybe FilePath -> FilePath -> IO FilePath
hasSavedConfigFile :: String -> IO Bool

-- | The directory where config files reside
getConfigDir :: IO FilePath
getConfigFilePathForSave :: String -> IO FilePath
getCollectorPath :: MonadIO m => m FilePath
getSysLibDir :: IO FilePath
moduleNameFromFilePath :: FilePath -> IO (Maybe String)
moduleNameFromFilePath' :: FilePath -> String -> IO (Maybe String)
findKnownPackages :: FilePath -> IO (Set String)

-- | Returns True if the second path is a location which starts with the
--   first path
isSubPath :: FilePath -> FilePath -> Bool
findSourceFile :: [FilePath] -> [String] -> ModuleName -> IO (Maybe FilePath)
findSourceFile' :: [FilePath] -> String -> IO (Maybe FilePath)
haskellSrcExts :: [String]
getCabalUserPackageDir :: IO (Maybe FilePath)
autoExtractCabalTarFiles :: FilePath -> IO ()
autoExtractTarFiles :: FilePath -> IO ()
getInstalledPackageIds :: IO [PackageIdentifier]
figureOutGhcOpts :: IO [String]
figureOutHaddockOpts :: IO [String]
allFilesWithExtensions :: [String] -> Bool -> [FilePath] -> FilePath -> IO [FilePath]

-- | canonicalizePath without crashing
myCanonicalizePath :: String -> IO String

module IDE.Utils.GHCUtils
inGhcIO :: [String] -> [DynFlag] -> (DynFlags -> Ghc a) -> IO a
getInstalledPackageInfos :: Ghc [PackageConfig]
findFittingPackages :: [Dependency] -> Ghc [PackageIdentifier]
myParseModule :: DynFlags -> FilePath -> Maybe StringBuffer -> IO (Either ErrMsg (Located (HsModule RdrName)))
myParseHeader :: FilePath -> String -> [String] -> IO (Either String (DynFlags, HsModule RdrName))
instance MonadIO Ghc

module IDE.Metainfo.PackageCollector
collectPackage :: Bool -> Prefs -> Int -> (PackageConfig, Int) -> IO PackageCollectStats
