leksah-server-0.12.1.2: Metadata collection for leksah

Safe Haskell | None

IDE.Core.CTypes

Description

Synopsis

- data PackageDescr = PackageDescr {
  - pdPackage :: PackageIdentifier
  - pdMbSourcePath :: Maybe FilePath
  - pdModules :: [ModuleDescr]
  - pdBuildDepends :: [PackageIdentifier]
  }
- data ModuleDescr = ModuleDescr {
  - mdModuleId :: PackModule
  - mdMbSourcePath :: Maybe FilePath
  - mdReferences :: Map ModuleName (Set String)
  - mdIdDescriptions :: [Descr]
  }
- data Descr
  - = Real RealDescr
  - | Reexported ReexportedDescr
- data RealDescr = RealDescr {
  - dscName' :: String
  - dscMbTypeStr' :: Maybe ByteString
  - dscMbModu' :: Maybe PackModule
  - dscMbLocation' :: Maybe Location
  - dscMbComment' :: Maybe ByteString
  - dscTypeHint' :: TypeDescr
  - dscExported' :: Bool
  }
- data ReexportedDescr = ReexportedDescr {
  - dsrMbModu :: Maybe PackModule
  - dsrDescr :: Descr
  }
- newtype Present alpha = Present alpha
- data TypeDescr
  - = VariableDescr
  - | FieldDescr Descr
  - | ConstructorDescr Descr
  - | DataDescr [SimpleDescr] [SimpleDescr]
  - | TypeDescr
  - | NewtypeDescr SimpleDescr (Maybe SimpleDescr)
  - | ClassDescr [String] [SimpleDescr]
  - | MethodDescr Descr
  - | InstanceDescr [String]
  - | KeywordDescr
  - | ExtensionDescr
  - | ModNameDescr
  - | QualModNameDescr
  - | ErrorDescr
- data DescrType
  - = Variable
  - | Field
  - | Constructor
  - | Data
  - | Type
  - | Newtype
  - | Class
  - | Method
  - | Instance
  - | Keyword
  - | Extension
  - | ModName
  - | QualModName
  - | Error
- data SimpleDescr = SimpleDescr {
  - sdName :: String
  - sdType :: Maybe ByteString
  - sdLocation :: Maybe Location
  - sdComment :: Maybe ByteString
  - sdExported :: Bool
  }
- data GenScope = forall alpha . SymbolTable alpha => GenScopeC (PackScope alpha)
- dscName :: Descr -> String
- dscMbTypeStr :: Descr -> Maybe ByteString
- dscMbModu :: Descr -> Maybe PackModule
- 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 = SymbolTable alpha => PackScope (Map PackageIdentifier PackageDescr) alpha
- class SymbolTable alpha where
  - symLookup :: String -> alpha -> [Descr]
  - symbols :: alpha -> Set String
  - symSplitLookup :: String -> alpha -> (alpha, Maybe [Descr], alpha)
  - symInsert :: String -> [Descr] -> alpha -> alpha
  - symEmpty :: alpha
  - symElems :: alpha -> [[Descr]]
  - symUnion :: alpha -> alpha -> alpha
- data PackModule = PM {
  - pack :: PackageIdentifier
  - modu :: ModuleName
  }
- parsePackModule :: String -> PackModule
- showPackModule :: PackModule -> String
- packageIdentifierToString :: PackageIdentifier -> String
- packageIdentifierFromString :: String -> Maybe PackageIdentifier
- data Location = Location {
  - locationSLine :: Int
  - locationSCol :: Int
  - locationELine :: Int
  - locationECol :: Int
  }
- data SrcSpan = SrcSpan {
  - srcSpanFilename :: String
  - srcSpanStartLine :: Int
  - srcSpanStartColumn :: Int
  - srcSpanEndLine :: Int
  - srcSpanEndColumn :: Int
  }
- data Scope
  - = PackageScope Bool
  - | WorkspaceScope Bool
  - | SystemScope
- data ServerCommand
  - = SystemCommand {
    - scRebuild :: Bool
    - scSources :: Bool
    - scExtract :: Bool
    }
  - | WorkspaceCommand {
    - wcRebuild :: Bool
    - wcPackage :: PackageIdentifier
    - wcPath :: FilePath
    - wcModList :: [(String, FilePath)]
    }
  - | ParseHeaderCommand {
    - hcFilePath :: FilePath
    }
- data ServerAnswer
  - = ServerOK
  - | ServerFailed String
  - | ServerHeader (Either [ImportDecl] Int)
- leksahVersion :: String
- configDirName :: String
- metadataVersion :: Integer
- data ImportDecl = ImportDecl {
  - importLoc :: Location
  - importModule :: String
  - importQualified :: Bool
  - importSrc :: Bool
  - importPkg :: Maybe String
  - importAs :: Maybe String
  - importSpecs :: Maybe ImportSpecList
  }
- data ImportSpecList = ImportSpecList Bool [ImportSpec]
- data ImportSpec
  - = IVar String
  - | IAbs String
  - | IThingAll String
  - | IThingWith String [String]
- getThisPackage :: PackageConfig -> PackageIdentifier
- data RetrieveStrategy
  - = RetrieveThenBuild
  - | BuildThenRetrieve
  - | NeverRetrieve

# Documentation

data PackageDescr Source

Constructors

PackageDescr |

Fields

pdPackage :: PackageIdentifier
pdMbSourcePath :: Maybe FilePath
pdModules :: [ModuleDescr]
pdBuildDepends :: [PackageIdentifier]

Instances

Eq PackageDescr |
Ord PackageDescr |
Show PackageDescr |
Typeable PackageDescr |
BinaryShared PackageDescr |
NFData PackageDescr |
Default PackageDescr |
Show (Present PackageDescr) |

data ModuleDescr Source

Constructors

ModuleDescr |

Fields

mdModuleId :: PackModule
mdMbSourcePath :: Maybe FilePath
mdReferences :: Map ModuleName (Set String)
mdIdDescriptions :: [Descr]

Instances

Eq ModuleDescr |
Ord ModuleDescr |
Show ModuleDescr |
Typeable ModuleDescr |
BinaryShared ModuleDescr |
NFData ModuleDescr |
Default ModuleDescr |
Show (Present ModuleDescr) |

data Descr Source

Constructors

Real RealDescr |
Reexported ReexportedDescr |

Instances

Eq Descr |
Ord Descr |
Read Descr |
Show Descr |
Typeable Descr |
BinaryShared Descr |
NFData Descr |
Show (Present Descr) |
SymbolTable (Map String [Descr]) |

data RealDescr Source

Constructors

RealDescr |

Fields

dscName' :: String
dscMbTypeStr' :: Maybe ByteString
dscMbModu' :: Maybe PackModule
dscMbLocation' :: Maybe Location
dscMbComment' :: Maybe ByteString
dscTypeHint' :: TypeDescr
dscExported' :: Bool

Instances

Eq RealDescr |
Ord RealDescr |
Read RealDescr |
Show RealDescr |
Typeable RealDescr |

data ReexportedDescr Source

Constructors

ReexportedDescr |

Fields

dsrMbModu :: Maybe PackModule
dsrDescr :: Descr

Instances

Eq ReexportedDescr |
Ord ReexportedDescr |
Read ReexportedDescr |
Show ReexportedDescr |
Typeable ReexportedDescr |

newtype Present alpha Source

Constructors

Present alpha |

Instances

Show (Present PackModule) |
Show (Present Descr) |
Show (Present ModuleDescr) |
Show (Present PackageDescr) |

data TypeDescr Source

Constructors

VariableDescr |
FieldDescr Descr |
ConstructorDescr Descr |
DataDescr [SimpleDescr] [SimpleDescr] | first constructors, then fields
TypeDescr |
NewtypeDescr SimpleDescr (Maybe SimpleDescr) | first constructors, then maybe field
ClassDescr [String] [SimpleDescr] | first super, then methods
MethodDescr Descr | classDescr
InstanceDescr [String] | binds
KeywordDescr |
ExtensionDescr |
ModNameDescr |
QualModNameDescr |
ErrorDescr |

Instances

Eq TypeDescr |
Ord TypeDescr |
Read TypeDescr |
Show TypeDescr |
Typeable TypeDescr |
BinaryShared TypeDescr |
NFData TypeDescr |

data DescrType Source

Constructors

Variable |
Field |
Constructor |
Data |
Type |
Newtype |
Class |
Method |
Instance |
Keyword |
Extension |
ModName |
QualModName |
Error |

Instances

Bounded DescrType |
Enum DescrType |
Eq DescrType |
Ord DescrType |
Read DescrType |
Show DescrType |
NFData DescrType |
Default DescrType |

data SimpleDescr Source

Constructors

SimpleDescr |

Fields

sdName :: String
sdType :: Maybe ByteString
sdLocation :: Maybe Location
sdComment :: Maybe ByteString
sdExported :: Bool

Instances

Eq SimpleDescr |
Ord SimpleDescr |
Read SimpleDescr |
Show SimpleDescr |
Typeable SimpleDescr |
BinaryShared SimpleDescr |
NFData SimpleDescr |

data GenScope Source

Constructors

forall alpha . SymbolTable alpha => GenScopeC (PackScope alpha) |

dscName :: Descr -> String Source

dscMbTypeStr :: Descr -> Maybe ByteString Source

dscMbModu :: Descr -> Maybe PackModule Source

The definition module

dsMbModu :: Descr -> Maybe PackModule Source

The exporting module

dscMbLocation :: Descr -> Maybe Location Source

dscMbComment :: Descr -> Maybe ByteString Source

dscTypeHint :: Descr -> TypeDescr Source

dscExported :: Descr -> Bool Source

descrType :: TypeDescr -> DescrType Source

isReexported :: Descr -> Bool Source

data PackScope alpha Source

Constructors

SymbolTable alpha => PackScope (Map PackageIdentifier PackageDescr) alpha |

class SymbolTable alpha where Source

Methods

symLookup :: String -> alpha -> [Descr]Source

symbols :: alpha -> Set String Source

symSplitLookup :: String -> alpha -> (alpha, Maybe [Descr], alpha)Source

symInsert :: String -> [Descr] -> alpha -> alphaSource

symEmpty :: alphaSource

symElems :: alpha -> [[Descr]]Source

symUnion :: alpha -> alpha -> alphaSource

Instances

SymbolTable (Map String [Descr]) |

data PackModule Source

Constructors

PM |

Fields

pack :: PackageIdentifier
modu :: ModuleName

Instances

Eq PackModule |
Ord PackModule |
Read PackModule |
Show PackModule |
Typeable PackModule |
BinaryShared PackModule |
NFData PackModule |
Default PackModule |
Show (Present PackModule) |

parsePackModule :: String -> PackModule Source

showPackModule :: PackModule -> String Source

packageIdentifierToString :: PackageIdentifier -> String Source

packageIdentifierFromString :: String -> Maybe PackageIdentifier Source

data Location Source

Constructors

Location |

Fields

locationSLine :: Int
locationSCol :: Int
locationELine :: Int
locationECol :: Int

Instances

Eq Location |
Ord Location |
Read Location |
Show Location |
Typeable Location |
BinaryShared Location |
NFData Location |

data SrcSpan Source

A portion of the source, spanning one or more lines and zero or more columns.

Constructors

SrcSpan |

Fields

srcSpanFilename :: String
srcSpanStartLine :: Int
srcSpanStartColumn :: Int
srcSpanEndLine :: Int
srcSpanEndColumn :: Int

Instances

Eq SrcSpan |
Ord SrcSpan |
Show SrcSpan |

data Scope Source

Constructors

PackageScope Bool |
WorkspaceScope Bool |
SystemScope |

Instances

Eq Scope |
Ord Scope |
Read Scope |
Show Scope |

data ServerCommand Source

Constructors

SystemCommand |

Fields

scRebuild :: Bool
scSources :: Bool
scExtract :: Bool

WorkspaceCommand |

Fields

wcRebuild :: Bool
wcPackage :: PackageIdentifier
wcPath :: FilePath
wcModList :: [(String, FilePath)]

ParseHeaderCommand |

Fields

hcFilePath :: FilePath

Instances

Eq ServerCommand |
Ord ServerCommand |
Read ServerCommand |
Show ServerCommand |

data ServerAnswer Source

Constructors

ServerOK |
ServerFailed String |
ServerHeader (Either [ImportDecl] Int) |

Instances

Eq ServerAnswer |
Ord ServerAnswer |
Read ServerAnswer |
Show ServerAnswer |

leksahVersion :: String Source

configDirName :: String Source

metadataVersion :: Integer Source

data ImportDecl Source

An import declaration.

Constructors

ImportDecl |

Fields

importLoc :: Location
importModule :: String

  name of the module imported.

importQualified :: Bool

  imported `qualified`?

importSrc :: Bool

  imported with `{-# SOURCE #-}`?

importPkg :: Maybe String

  imported with explicit package name

importAs :: Maybe String

  optional alias name in an `as` clause.

importSpecs :: Maybe ImportSpecList

  optional list of import specifications.

Instances

Eq ImportDecl |
Ord ImportDecl |
Read ImportDecl |
Show ImportDecl |
Pretty ImportDecl |

data ImportSpecList Source

An explicit import specification list.

Constructors

ImportSpecList Bool [ImportSpec] |

Instances

Eq ImportSpecList |
Ord ImportSpecList |
Read ImportSpecList |
Show ImportSpecList |

data ImportSpec Source

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

Constructors

IVar String | variable
IAbs String | `T`: the name of a class, datatype or type synonym.
IThingAll String | `T(..)`: a class imported with all of its methods, or a datatype imported with all of its constructors.
IThingWith String [String] | `T(C_1,...,C_n)`: a class imported with some of its methods, or a datatype imported with some of its constructors.

Instances

Eq ImportSpec |
Ord ImportSpec |
Read ImportSpec |
Show ImportSpec |
Pretty ImportSpec |

getThisPackage :: PackageConfig -> PackageIdentifier Source

data RetrieveStrategy Source

Constructors

RetrieveThenBuild |
BuildThenRetrieve |
NeverRetrieve |

Instances

Bounded RetrieveStrategy |
Enum RetrieveStrategy |
Eq RetrieveStrategy |
Ord RetrieveStrategy |
Read RetrieveStrategy |
Show RetrieveStrategy |