ghcide-2.5.0.0: The core of an IDE
Safe HaskellSafe-Inferred
LanguageHaskell2010

Development.IDE.Types.Location

Description

Types and functions for working with source code locations.

Synopsis

Documentation

data Location #

Represents a location inside a resource, such as a line inside a text file.

Constructors

Location 

Fields

Instances

Instances details
FromJSON Location 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Location

ToJSON Location 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Location

Generic Location 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Location

Associated Types

type Rep Location :: Type -> Type #

Methods

from :: Location -> Rep Location x #

to :: Rep Location x -> Location #

Show Location 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Location

NFData Location 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Location

Methods

rnf :: Location -> () #

Eq Location 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Location

Ord Location 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Location

Hashable Location 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Location

Methods

hashWithSalt :: Int -> Location -> Int #

hash :: Location -> Int #

Pretty Location 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Location

Methods

pretty :: Location -> Doc ann #

prettyList :: [Location] -> Doc ann #

HasLocation DiagnosticRelatedInformation Location 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasLocation SymbolInformation Location 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange Location Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasUri Location Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

Methods

uri :: Lens' Location Uri #

HasLocation InlayHintLabelPart (Maybe Location) 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

type Rep Location 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Location

type Rep Location = D1 ('MetaData "Location" "Language.LSP.Protocol.Internal.Types.Location" "lsp-types-2.1.0.0-4XLhOyhXn16LNWGw0cjrdM" 'False) (C1 ('MetaCons "Location" 'PrefixI 'True) (S1 ('MetaSel ('Just "_uri") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uri) :*: S1 ('MetaSel ('Just "_range") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Range)))

data Position #

Position in a text document expressed as zero-based line and character offset. Prior to 3.17 the offsets were always based on a UTF-16 string representation. So a string of the form a𐐀b the character offset of the character a is 0, the character offset of 𐐀 is 1 and the character offset of b is 3 since 𐐀 is represented using two code units in UTF-16. Since 3.17 clients and servers can agree on a different string encoding representation (e.g. UTF-8). The client announces it's supported encoding via the client capability `general.positionEncodings`. The value is an array of position encodings the client supports, with decreasing preference (e.g. the encoding at index `0` is the most preferred one). To stay backwards compatible the only mandatory encoding is UTF-16 represented via the string `utf-16`. The server can pick one of the encodings offered by the client and signals that encoding back to the client via the initialize result's property [`capabilities.positionEncoding`](#serverCapabilities). If the string value `utf-16` is missing from the client's capability `general.positionEncodings` servers can safely assume that the client supports UTF-16. If the server omits the position encoding in its initialize result the encoding defaults to the string value `utf-16`. Implementation considerations: since the conversion from one encoding into another requires the content of the file / line the conversion is best done where the file is read which is usually on the server side.

Positions are line end character agnostic. So you can not specify a position that denotes `r|n` or `n|` where `|` represents the character offset.

@since 3.17.0 - support for negotiated position encoding.

Constructors

Position 

Fields

  • _line :: UInt

    Line position in a document (zero-based).

    If a line number is greater than the number of lines in a document, it defaults back to the number of lines in the document. If a line number is negative, it defaults to 0.

  • _character :: UInt

    Character offset on a line in a document (zero-based).

    The meaning of this offset is determined by the negotiated PositionEncodingKind.

    If the character value is greater than the line length it defaults back to the line length.

Instances

Instances details
FromJSON Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Position

ToJSON Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Position

Generic Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Position

Associated Types

type Rep Position :: Type -> Type #

Methods

from :: Position -> Rep Position x #

to :: Rep Position x -> Position #

Show Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Position

NFData Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Position

Methods

rnf :: Position -> () #

Eq Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Position

Ord Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Position

Hashable Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Position

Methods

hashWithSalt :: Int -> Position -> Int #

hash :: Position -> Int #

Pretty Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Position

Methods

pretty :: Position -> Doc ann #

prettyList :: [Position] -> Doc ann #

HasCharacter Position UInt 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasEnd Range Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasLine Position UInt 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPosition CallHierarchyPrepareParams Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPosition CompletionParams Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPosition DeclarationParams Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPosition DefinitionParams Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPosition DocumentHighlightParams Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPosition DocumentOnTypeFormattingParams Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPosition HoverParams Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPosition ImplementationParams Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPosition InlayHint Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPosition LinkedEditingRangeParams Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPosition MonikerParams Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPosition PrepareRenameParams Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPosition ReferenceParams Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPosition RenameParams Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPosition SignatureHelpParams Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPosition TextDocumentPositionParams Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPosition TypeDefinitionParams Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPosition TypeHierarchyPrepareParams Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasStart Range Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasPositions SelectionRangeParams [Position] 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

type Rep Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Position

type Rep Position = D1 ('MetaData "Position" "Language.LSP.Protocol.Internal.Types.Position" "lsp-types-2.1.0.0-4XLhOyhXn16LNWGw0cjrdM" 'False) (C1 ('MetaCons "Position" 'PrefixI 'True) (S1 ('MetaSel ('Just "_line") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 UInt) :*: S1 ('MetaSel ('Just "_character") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 UInt)))

data Range #

A range in a text document expressed as (zero-based) start and end positions.

If you want to specify a range that contains a line including the line ending character(s) then use an end position denoting the start of the next line. For example: ```ts { start: { line: 5, character: 23 } end : { line 6, character : 0 } } ```

Constructors

Range 

Fields

Instances

Instances details
FromJSON Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Range

ToJSON Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Range

Generic Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Range

Associated Types

type Rep Range :: Type -> Type #

Methods

from :: Range -> Rep Range x #

to :: Rep Range x -> Range #

Show Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Range

Methods

showsPrec :: Int -> Range -> ShowS #

show :: Range -> String #

showList :: [Range] -> ShowS #

NFData Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Range

Methods

rnf :: Range -> () #

Eq Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Range

Methods

(==) :: Range -> Range -> Bool #

(/=) :: Range -> Range -> Bool #

Ord Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Range

Methods

compare :: Range -> Range -> Ordering #

(<) :: Range -> Range -> Bool #

(<=) :: Range -> Range -> Bool #

(>) :: Range -> Range -> Bool #

(>=) :: Range -> Range -> Bool #

max :: Range -> Range -> Range #

min :: Range -> Range -> Range #

MapAge Range Source # 
Instance details

Defined in Development.IDE.Core.UseStale

Methods

mapAgeFrom :: forall (from :: Age) (to :: Age). PositionMap from to -> Tracked to Range -> Maybe (Tracked from Range) Source #

mapAgeTo :: forall (from :: Age) (to :: Age). PositionMap from to -> Tracked from Range -> Maybe (Tracked to Range) Source #

Hashable Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Range

Methods

hashWithSalt :: Int -> Range -> Int #

hash :: Range -> Int #

Pretty Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Range

Methods

pretty :: Range -> Doc ann #

prettyList :: [Range] -> Doc ann #

HasEnd Range Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasInsert InsertReplaceEdit Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange AnnotatedTextEdit Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange CallHierarchyItem Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange CodeActionParams Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange CodeLens Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange ColorInformation Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange ColorPresentationParams Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange Diagnostic Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange DocumentHighlight Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange DocumentLink Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange DocumentRangeFormattingParams Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange DocumentSymbol Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange InlayHintParams Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange InlineValueEvaluatableExpression Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange InlineValueParams Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange InlineValueText Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange InlineValueVariableLookup Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange Location Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange SelectionRange Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange SemanticTokensRangeParams Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange TextEdit Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange TypeHierarchyItem Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasReplace InsertReplaceEdit Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasSelectionRange CallHierarchyItem Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasSelectionRange DocumentSymbol Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasSelectionRange TypeHierarchyItem Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasStart Range Position 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasStoppedLocation InlineValueContext Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasTargetRange LocationLink Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasTargetSelectionRange LocationLink Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasFromRanges CallHierarchyIncomingCall [Range] 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasFromRanges CallHierarchyOutgoingCall [Range] 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasOriginSelectionRange LocationLink (Maybe Range) 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRange Hover (Maybe Range) 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRanges LinkedEditingRanges [Range] 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasSelection ShowDocumentParams (Maybe Range) 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

type Rep Range 
Instance details

Defined in Language.LSP.Protocol.Internal.Types.Range

type Rep Range = D1 ('MetaData "Range" "Language.LSP.Protocol.Internal.Types.Range" "lsp-types-2.1.0.0-4XLhOyhXn16LNWGw0cjrdM" 'False) (C1 ('MetaCons "Range" 'PrefixI 'True) (S1 ('MetaSel ('Just "_start") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Position) :*: S1 ('MetaSel ('Just "_end") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Position)))

newtype Uri #

The Uri type in the LSP specification.

Constructors

Uri 

Fields

Instances

Instances details
FromJSON Uri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

FromJSONKey Uri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

ToJSON Uri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

ToJSONKey Uri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Generic Uri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Associated Types

type Rep Uri :: Type -> Type #

Methods

from :: Uri -> Rep Uri x #

to :: Rep Uri x -> Uri #

Read Uri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Show Uri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Methods

showsPrec :: Int -> Uri -> ShowS #

show :: Uri -> String #

showList :: [Uri] -> ShowS #

NFData Uri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Methods

rnf :: Uri -> () #

Eq Uri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Methods

(==) :: Uri -> Uri -> Bool #

(/=) :: Uri -> Uri -> Bool #

Ord Uri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Methods

compare :: Uri -> Uri -> Ordering #

(<) :: Uri -> Uri -> Bool #

(<=) :: Uri -> Uri -> Bool #

(>) :: Uri -> Uri -> Bool #

(>=) :: Uri -> Uri -> Bool #

max :: Uri -> Uri -> Uri #

min :: Uri -> Uri -> Uri #

Hashable Uri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Methods

hashWithSalt :: Int -> Uri -> Int #

hash :: Uri -> Int #

Pretty Uri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Methods

pretty :: Uri -> Doc ann #

prettyList :: [Uri] -> Doc ann #

HasDocument NotebookCell Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasHref CodeDescription Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasNewUri RenameFile Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasOldUri RenameFile Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasTargetUri LocationLink Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasUri CallHierarchyItem Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasUri CreateFile Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasUri DeleteFile Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasUri FileEvent Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

Methods

uri :: Lens' FileEvent Uri #

HasUri Location Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

Methods

uri :: Lens' Location Uri #

HasUri NotebookDocument Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasUri NotebookDocumentIdentifier Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasUri OptionalVersionedTextDocumentIdentifier Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasUri PreviousResultId Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasUri PublishDiagnosticsParams Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasUri ShowDocumentParams Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasUri TextDocumentIdentifier Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasUri TextDocumentItem Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasUri TypeHierarchyItem Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasUri VersionedNotebookDocumentIdentifier Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasUri VersionedTextDocumentIdentifier Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasUri WorkspaceFolder Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasUri WorkspaceFullDocumentDiagnosticReport Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasUri WorkspaceUnchangedDocumentDiagnosticReport Uri 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasChanges WorkspaceEdit (Maybe (Map Uri [TextEdit])) 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRelatedDocuments RelatedFullDocumentDiagnosticReport (Maybe (Map Uri (FullDocumentDiagnosticReport |? UnchangedDocumentDiagnosticReport))) 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRelatedDocuments RelatedUnchangedDocumentDiagnosticReport (Maybe (Map Uri (FullDocumentDiagnosticReport |? UnchangedDocumentDiagnosticReport))) 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasBaseUri RelativePattern (WorkspaceFolder |? Uri) 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRelatedDocuments DocumentDiagnosticReportPartialResult (Map Uri (FullDocumentDiagnosticReport |? UnchangedDocumentDiagnosticReport)) 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRootUri InitializeParams (Uri |? Null) 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

HasRootUri UInitializeParams (Uri |? Null) 
Instance details

Defined in Language.LSP.Protocol.Internal.Lens

type Rep Uri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

type Rep Uri = D1 ('MetaData "Uri" "Language.LSP.Protocol.Types.Uri" "lsp-types-2.1.0.0-4XLhOyhXn16LNWGw0cjrdM" 'True) (C1 ('MetaCons "Uri" 'PrefixI 'True) (S1 ('MetaSel ('Just "getUri") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

data NormalizedUri #

A normalized Uri.

If you want to use a URI as a map key, use this type. It is important to normalize the percent encoding in the URI since URIs that only differ when it comes to the percent-encoding should be treated as equivalent.

NormalizedUri has a cached hash in order to make it especially fast in a hash map.

Instances

Instances details
Generic NormalizedUri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Associated Types

type Rep NormalizedUri :: Type -> Type #

Read NormalizedUri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Show NormalizedUri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

NFData NormalizedUri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Methods

rnf :: NormalizedUri -> () #

Eq NormalizedUri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Ord NormalizedUri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Hashable NormalizedUri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Pretty NormalizedUri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Methods

pretty :: NormalizedUri -> Doc ann #

prettyList :: [NormalizedUri] -> Doc ann #

HasVfsMap VFS (Map NormalizedUri VirtualFile) 
Instance details

Defined in Language.LSP.VFS

type Rep NormalizedUri 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

type Rep NormalizedUri = D1 ('MetaData "NormalizedUri" "Language.LSP.Protocol.Types.Uri" "lsp-types-2.1.0.0-4XLhOyhXn16LNWGw0cjrdM" 'False) (C1 ('MetaCons "NormalizedUri" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)))

data NormalizedFilePath #

A file path that is already normalized.

The NormalizedUri is cached to avoided repeated normalisation when we need to compute them (which is a lot).

This is one of the most performance critical parts of HLS, do not modify it without profiling.

Instances

Instances details
IsString NormalizedFilePath 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Generic NormalizedFilePath 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Associated Types

type Rep NormalizedFilePath :: Type -> Type #

Show NormalizedFilePath 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Binary NormalizedFilePath 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

NFData NormalizedFilePath 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Methods

rnf :: NormalizedFilePath -> () #

Eq NormalizedFilePath 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Ord NormalizedFilePath 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

Hashable NormalizedFilePath 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

type Rep NormalizedFilePath 
Instance details

Defined in Language.LSP.Protocol.Types.Uri

type Rep NormalizedFilePath = D1 ('MetaData "NormalizedFilePath" "Language.LSP.Protocol.Types.Uri" "lsp-types-2.1.0.0-4XLhOyhXn16LNWGw0cjrdM" 'False) (C1 ('MetaCons "NormalizedFilePath" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NormalizedUri) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Text)))

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