hsdev-0.1.3.0: Haskell development library and tool with support of autocompletion, symbol info, go to declaration, find references etc.

Safe HaskellNone
LanguageHaskell98

HsDev.Symbols

Contents

Synopsis

Information

export :: Export -> Text Source

Get name of export

passImportList :: ImportList -> Text -> Bool Source

Check whether name pass import list

importName :: Import -> Text Source

Get import module name

import_ :: Text -> Import Source

Simple import

moduleLocals :: Module -> Module Source

Bring locals to top

setDefinedIn :: Module -> Module Source

Set all declaration definedIn to this module

dropExternals :: Module -> Module Source

Drop all declarations, that not defined in this module

clearDefinedIn :: Module -> Module Source

Clear definedIn information

moduleLocalDeclarations :: Module -> [Declaration] Source

Get declarations with locals

moduleModuleDeclarations :: Module -> [ModuleDeclaration] Source

Get list of declarations as ModuleDeclaration

class Locals a where Source

Methods

locals :: a -> [Declaration] Source

where_ :: a -> [Declaration] -> a Source

data Declaration Source

Declaration

Constructors

Declaration 

Fields

declarationName :: Text
 
declarationDefined :: Maybe ModuleId

Where declaration defined, Nothing if here

declarationImported :: Maybe [Import]

Declaration imported with. Nothing if unknown (cabal modules) or here (source file)

declarationDocs :: Maybe Text
 
declarationPosition :: Maybe Position
 
declaration :: DeclarationInfo
 

scopes :: Declaration -> [Maybe Text] Source

Get scopes of Declaration, where Nothing is global scope

data TypeInfo Source

Common info for type, newtype, data and class

data Inspection Source

Inspection data

Constructors

InspectionNone

No inspection

InspectionAt POSIXTime [String]

Time and flags of inspection

inspectionOpts :: Inspection -> [String] Source

Get inspection opts

Functions

declarationInfo :: DeclarationInfo -> Either (Maybe Text, [Declaration]) TypeInfo Source

Get function type of type info

declarationTypeInfo :: DeclarationInfo -> Maybe TypeInfo Source

Get type info of declaration

qualifiedName :: ModuleId -> Declaration -> Text Source

Returns qualified name of symbol

importQualifier :: Maybe Text -> Import -> Bool Source

Imported module can be accessed via qualifier

Utility

class Canonicalize a where Source

Canonicalize all paths within something

Methods

canonicalize :: a -> IO a Source

locateProject :: FilePath -> IO (Maybe Project) Source

Find project file is related to

locateSourceDir :: FilePath -> IO (Maybe FilePath) Source

Locate source dir of file

sourceModuleRoot :: Text -> FilePath -> FilePath Source

Get source module root directory, i.e. for "...srcFooBar.hs" with module Bar will return "...src"

importedModulePath :: Text -> FilePath -> Text -> FilePath Source

Get path of imported module >importedModulePath Foo.Bar "...srcFooBar.hs" Quux.Blah = "...srcQuuxBlah.hs"

Modifiers

addDeclaration :: Declaration -> Module -> Module Source

Add declaration to module

Other

unalias :: Module -> Text -> [Text] Source

Unalias import name

moduleContents :: Module -> [String] Source

Module contents

Reexports