Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Types and functions for working with source code locations.
Synopsis
- data Location = Location {}
- noFilePath :: FilePath
- noRange :: Range
- data Position = Position {
- _line :: UInt
- _character :: UInt
- showPosition :: Position -> String
- data Range = Range {}
- newtype Uri = Uri {}
- data NormalizedUri
- toNormalizedUri :: Uri -> NormalizedUri
- fromNormalizedUri :: NormalizedUri -> Uri
- data NormalizedFilePath
- fromUri :: NormalizedUri -> NormalizedFilePath
- emptyFilePath :: NormalizedFilePath
- emptyPathUri :: NormalizedUri
- toNormalizedFilePath' :: FilePath -> NormalizedFilePath
- fromNormalizedFilePath :: NormalizedFilePath -> FilePath
- filePathToUri' :: NormalizedFilePath -> NormalizedUri
- uriToFilePath' :: Uri -> Maybe FilePath
- readSrcSpan :: ReadS RealSrcSpan
Documentation
Instances
Position | |
|
Instances
showPosition :: Position -> String Source #
Instances
Instances
FromJSON Uri | |
Defined in Language.LSP.Protocol.Types.Uri | |
FromJSONKey Uri | |
Defined in Language.LSP.Protocol.Types.Uri | |
ToJSON Uri | |
ToJSONKey Uri | |
Defined in Language.LSP.Protocol.Types.Uri | |
Generic Uri | |
Read Uri | |
Show Uri | |
NFData Uri | |
Defined in Language.LSP.Protocol.Types.Uri | |
Eq Uri | |
Ord Uri | |
Hashable Uri | |
Defined in Language.LSP.Protocol.Types.Uri | |
Pretty Uri | |
Defined in Language.LSP.Protocol.Types.Uri | |
HasDocument NotebookCell Uri | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasHref CodeDescription Uri | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasNewUri RenameFile Uri | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasOldUri RenameFile Uri | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasTargetUri LocationLink Uri | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasUri CallHierarchyItem Uri | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasUri CreateFile Uri | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasUri DeleteFile Uri | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasUri FileEvent Uri | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasUri Location Uri | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasUri LocationUriOnly Uri | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasUri NotebookDocument Uri | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasUri NotebookDocumentIdentifier Uri | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasUri OptionalVersionedTextDocumentIdentifier Uri | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasUri PreviousResultId Uri | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasUri PublishDiagnosticsParams Uri | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasUri ShowDocumentParams Uri | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasUri TextDocumentIdentifier Uri | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasUri TextDocumentItem Uri | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasUri TypeHierarchyItem Uri | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasUri VersionedNotebookDocumentIdentifier Uri | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasUri VersionedTextDocumentIdentifier Uri | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasUri WorkspaceFolder Uri | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasUri WorkspaceFullDocumentDiagnosticReport Uri | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasUri WorkspaceUnchangedDocumentDiagnosticReport Uri | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasChanges WorkspaceEdit (Maybe (Map Uri [TextEdit])) | |
HasRelatedDocuments RelatedFullDocumentDiagnosticReport (Maybe (Map Uri (FullDocumentDiagnosticReport |? UnchangedDocumentDiagnosticReport))) | |
Defined in Language.LSP.Protocol.Types.Lens relatedDocuments :: Lens' RelatedFullDocumentDiagnosticReport (Maybe (Map Uri (FullDocumentDiagnosticReport |? UnchangedDocumentDiagnosticReport))) | |
HasRelatedDocuments RelatedUnchangedDocumentDiagnosticReport (Maybe (Map Uri (FullDocumentDiagnosticReport |? UnchangedDocumentDiagnosticReport))) | |
Defined in Language.LSP.Protocol.Types.Lens relatedDocuments :: Lens' RelatedUnchangedDocumentDiagnosticReport (Maybe (Map Uri (FullDocumentDiagnosticReport |? UnchangedDocumentDiagnosticReport))) | |
HasScopeUri ConfigurationItem (Maybe Uri) | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasTarget DocumentLink (Maybe Uri) | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasBaseUri RelativePattern (WorkspaceFolder |? Uri) | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasRelatedDocuments DocumentDiagnosticReportPartialResult (Map Uri (FullDocumentDiagnosticReport |? UnchangedDocumentDiagnosticReport)) | |
Defined in Language.LSP.Protocol.Types.Lens relatedDocuments :: Lens' DocumentDiagnosticReportPartialResult (Map Uri (FullDocumentDiagnosticReport |? UnchangedDocumentDiagnosticReport)) | |
HasRootUri InitializeParams (Uri |? Null) | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasRootUri UInitializeParams (Uri |? Null) | |
Defined in Language.LSP.Protocol.Types.Lens | |
type Rep Uri | |
Defined in Language.LSP.Protocol.Types.Uri |
data NormalizedUri #
Instances
toNormalizedUri :: Uri -> NormalizedUri #
fromNormalizedUri :: NormalizedUri -> Uri #
data NormalizedFilePath #
Instances
uriToFilePath' :: Uri -> Maybe FilePath Source #
We use an empty string as a filepath when we don’t have a file. However, haskell-lsp doesn’t support that in uriToFilePath and given that it is not a valid filepath it does not make sense to upstream a fix. So we have our own wrapper here that supports empty filepaths.
readSrcSpan :: ReadS RealSrcSpan Source #
Parser for the GHC output format