Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Development.IDE.Types.Location
Description
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
Constructors
Position | |
Fields
|
Instances
showPosition :: Position -> String Source #
Instances
FromJSON Range | |
Defined in Language.LSP.Protocol.Internal.Types.Range | |
ToJSON Range | |
Generic Range | |
Show Range | |
NFData Range | |
Defined in Language.LSP.Protocol.Internal.Types.Range | |
Eq Range | |
Ord Range | |
MapAge Range Source # | |
Hashable Range | |
Defined in Language.LSP.Protocol.Internal.Types.Range | |
Pretty Range | |
Defined in Language.LSP.Protocol.Internal.Types.Range | |
HasEnd Range Position | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasInsert EditRangeWithInsertReplace Range | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasInsert InsertReplaceEdit Range | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasRange AnnotatedTextEdit Range | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasRange CallHierarchyItem Range | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasRange CodeActionParams Range | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasRange CodeLens Range | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasRange ColorInformation Range | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasRange ColorPresentationParams Range | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasRange Diagnostic Range | |
Defined in Language.LSP.Protocol.Types.Lens Methods | |
HasRange DocumentHighlight Range | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasRange DocumentLink Range | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasRange DocumentRangeFormattingParams Range | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasRange DocumentSymbol Range | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasRange InlayHintParams Range | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasRange InlineValueEvaluatableExpression Range | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasRange InlineValueParams Range | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasRange InlineValueText Range | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasRange InlineValueVariableLookup Range | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasRange Location Range | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasRange PrepareRenamePlaceholder Range | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasRange SelectionRange Range | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasRange SemanticTokensRangeParams Range | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasRange TextDocumentContentChangePartial Range | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasRange TextEdit Range | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasRange TypeHierarchyItem Range | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasReplace EditRangeWithInsertReplace Range | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasReplace InsertReplaceEdit Range | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasSelectionRange CallHierarchyItem Range | |
Defined in Language.LSP.Protocol.Types.Lens Methods selectionRange :: Lens' CallHierarchyItem Range | |
HasSelectionRange DocumentSymbol Range | |
Defined in Language.LSP.Protocol.Types.Lens Methods selectionRange :: Lens' DocumentSymbol Range | |
HasSelectionRange TypeHierarchyItem Range | |
Defined in Language.LSP.Protocol.Types.Lens Methods selectionRange :: Lens' TypeHierarchyItem Range | |
HasStart Range Position | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasStoppedLocation InlineValueContext Range | |
Defined in Language.LSP.Protocol.Types.Lens Methods stoppedLocation :: Lens' InlineValueContext Range | |
HasTargetRange LocationLink Range | |
Defined in Language.LSP.Protocol.Types.Lens Methods targetRange :: Lens' LocationLink Range | |
HasTargetSelectionRange LocationLink Range | |
Defined in Language.LSP.Protocol.Types.Lens Methods targetSelectionRange :: Lens' LocationLink Range | |
HasEditRange CompletionItemDefaults (Maybe (Range |? EditRangeWithInsertReplace)) | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasFromRanges CallHierarchyIncomingCall [Range] | |
Defined in Language.LSP.Protocol.Types.Lens Methods fromRanges :: Lens' CallHierarchyIncomingCall [Range] | |
HasFromRanges CallHierarchyOutgoingCall [Range] | |
Defined in Language.LSP.Protocol.Types.Lens Methods fromRanges :: Lens' CallHierarchyOutgoingCall [Range] | |
HasOriginSelectionRange LocationLink (Maybe Range) | |
Defined in Language.LSP.Protocol.Types.Lens Methods originSelectionRange :: Lens' LocationLink (Maybe Range) | |
HasRange Hover (Maybe Range) | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasRanges LinkedEditingRanges [Range] | |
Defined in Language.LSP.Protocol.Types.Lens | |
HasSelection ShowDocumentParams (Maybe Range) | |
Defined in Language.LSP.Protocol.Types.Lens | |
type Rep Range | |
Defined in Language.LSP.Protocol.Internal.Types.Range type Rep Range = D1 ('MetaData "Range" "Language.LSP.Protocol.Internal.Types.Range" "lsp-types-2.3.0.1-Dt5cmuKhDStI87OYfVmx4l" 'False) (C1 ('MetaCons "Range" 'PrefixI 'True) (S1 ('MetaSel ('Just "_start") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Position) :*: S1 ('MetaSel ('Just "_end") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Position))) |
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 Methods relatedDocuments :: Lens' RelatedFullDocumentDiagnosticReport (Maybe (Map Uri (FullDocumentDiagnosticReport |? UnchangedDocumentDiagnosticReport))) | |
HasRelatedDocuments RelatedUnchangedDocumentDiagnosticReport (Maybe (Map Uri (FullDocumentDiagnosticReport |? UnchangedDocumentDiagnosticReport))) | |
Defined in Language.LSP.Protocol.Types.Lens Methods 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 Methods 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