ghcide-0.6.0.1: The core of an IDE
Safe HaskellNone
LanguageHaskell2010

Development.IDE.Types.Location

Description

Types and functions for working with source code locations.

Synopsis

Documentation

data Location #

Constructors

Location 

Fields

Instances

Instances details
Eq Location 
Instance details

Defined in Language.Haskell.LSP.Types.Location

Ord Location 
Instance details

Defined in Language.Haskell.LSP.Types.Location

Read Location 
Instance details

Defined in Language.Haskell.LSP.Types.Location

Show Location 
Instance details

Defined in Language.Haskell.LSP.Types.Location

Generic Location 
Instance details

Defined in Language.Haskell.LSP.Types.Location

Associated Types

type Rep Location :: Type -> Type #

Methods

from :: Location -> Rep Location x #

to :: Rep Location x -> Location #

ToJSON Location 
Instance details

Defined in Language.Haskell.LSP.Types.Location

FromJSON Location 
Instance details

Defined in Language.Haskell.LSP.Types.Location

NFData Location 
Instance details

Defined in Language.Haskell.LSP.Types.Location

Methods

rnf :: Location -> () #

type Rep Location 
Instance details

Defined in Language.Haskell.LSP.Types.Location

type Rep Location = D1 ('MetaData "Location" "Language.Haskell.LSP.Types.Location" "haskell-lsp-types-0.22.0.0-3vYMHr1NKLe1fX3kUHhyB1" 'False) (C1 ('MetaCons "Location" 'PrefixI 'True) (S1 ('MetaSel ('Just "_uri") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Uri) :*: S1 ('MetaSel ('Just "_range") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Range)))

data Position #

Constructors

Position 

Fields

Instances

Instances details
Eq Position 
Instance details

Defined in Language.Haskell.LSP.Types.Location

Ord Position 
Instance details

Defined in Language.Haskell.LSP.Types.Location

Read Position 
Instance details

Defined in Language.Haskell.LSP.Types.Location

Show Position 
Instance details

Defined in Language.Haskell.LSP.Types.Location

Generic Position 
Instance details

Defined in Language.Haskell.LSP.Types.Location

Associated Types

type Rep Position :: Type -> Type #

Methods

from :: Position -> Rep Position x #

to :: Rep Position x -> Position #

ToJSON Position 
Instance details

Defined in Language.Haskell.LSP.Types.Location

FromJSON Position 
Instance details

Defined in Language.Haskell.LSP.Types.Location

NFData Position 
Instance details

Defined in Language.Haskell.LSP.Types.Location

Methods

rnf :: Position -> () #

type Rep Position 
Instance details

Defined in Language.Haskell.LSP.Types.Location

type Rep Position = D1 ('MetaData "Position" "Language.Haskell.LSP.Types.Location" "haskell-lsp-types-0.22.0.0-3vYMHr1NKLe1fX3kUHhyB1" 'False) (C1 ('MetaCons "Position" 'PrefixI 'True) (S1 ('MetaSel ('Just "_line") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "_character") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))

data Range #

Constructors

Range 

Fields

Instances

Instances details
Eq Range 
Instance details

Defined in Language.Haskell.LSP.Types.Location

Methods

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

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

Ord Range 
Instance details

Defined in Language.Haskell.LSP.Types.Location

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 #

Read Range 
Instance details

Defined in Language.Haskell.LSP.Types.Location

Show Range 
Instance details

Defined in Language.Haskell.LSP.Types.Location

Methods

showsPrec :: Int -> Range -> ShowS #

show :: Range -> String #

showList :: [Range] -> ShowS #

Generic Range 
Instance details

Defined in Language.Haskell.LSP.Types.Location

Associated Types

type Rep Range :: Type -> Type #

Methods

from :: Range -> Rep Range x #

to :: Rep Range x -> Range #

ToJSON Range 
Instance details

Defined in Language.Haskell.LSP.Types.Location

FromJSON Range 
Instance details

Defined in Language.Haskell.LSP.Types.Location

NFData Range 
Instance details

Defined in Language.Haskell.LSP.Types.Location

Methods

rnf :: Range -> () #

type Rep Range 
Instance details

Defined in Language.Haskell.LSP.Types.Location

type Rep Range = D1 ('MetaData "Range" "Language.Haskell.LSP.Types.Location" "haskell-lsp-types-0.22.0.0-3vYMHr1NKLe1fX3kUHhyB1" 'False) (C1 ('MetaCons "Range" 'PrefixI 'True) (S1 ('MetaSel ('Just "_start") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Position) :*: S1 ('MetaSel ('Just "_end") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Position)))

newtype Uri #

Constructors

Uri 

Fields

Instances

Instances details
Eq Uri 
Instance details

Defined in Language.Haskell.LSP.Types.Uri

Methods

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

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

Ord Uri 
Instance details

Defined in Language.Haskell.LSP.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 #

Read Uri 
Instance details

Defined in Language.Haskell.LSP.Types.Uri

Show Uri 
Instance details

Defined in Language.Haskell.LSP.Types.Uri

Methods

showsPrec :: Int -> Uri -> ShowS #

show :: Uri -> String #

showList :: [Uri] -> ShowS #

Generic Uri 
Instance details

Defined in Language.Haskell.LSP.Types.Uri

Associated Types

type Rep Uri :: Type -> Type #

Methods

from :: Uri -> Rep Uri x #

to :: Rep Uri x -> Uri #

Hashable Uri 
Instance details

Defined in Language.Haskell.LSP.Types.Uri

Methods

hashWithSalt :: Int -> Uri -> Int #

hash :: Uri -> Int #

ToJSON Uri 
Instance details

Defined in Language.Haskell.LSP.Types.Uri

ToJSONKey Uri 
Instance details

Defined in Language.Haskell.LSP.Types.Uri

FromJSON Uri 
Instance details

Defined in Language.Haskell.LSP.Types.Uri

FromJSONKey Uri 
Instance details

Defined in Language.Haskell.LSP.Types.Uri

NFData Uri 
Instance details

Defined in Language.Haskell.LSP.Types.Uri

Methods

rnf :: Uri -> () #

type Rep Uri 
Instance details

Defined in Language.Haskell.LSP.Types.Uri

type Rep Uri = D1 ('MetaData "Uri" "Language.Haskell.LSP.Types.Uri" "haskell-lsp-types-0.22.0.0-3vYMHr1NKLe1fX3kUHhyB1" 'True) (C1 ('MetaCons "Uri" 'PrefixI 'True) (S1 ('MetaSel ('Just "getUri") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

data NormalizedUri #

Instances

Instances details
Eq NormalizedUri 
Instance details

Defined in Language.Haskell.LSP.Types.Uri

Ord NormalizedUri 
Instance details

Defined in Language.Haskell.LSP.Types.Uri

Read NormalizedUri 
Instance details

Defined in Language.Haskell.LSP.Types.Uri

Show NormalizedUri 
Instance details

Defined in Language.Haskell.LSP.Types.Uri

Generic NormalizedUri 
Instance details

Defined in Language.Haskell.LSP.Types.Uri

Associated Types

type Rep NormalizedUri :: Type -> Type #

Hashable NormalizedUri 
Instance details

Defined in Language.Haskell.LSP.Types.Uri

NFData NormalizedUri 
Instance details

Defined in Language.Haskell.LSP.Types.Uri

Methods

rnf :: NormalizedUri -> () #

type Rep NormalizedUri 
Instance details

Defined in Language.Haskell.LSP.Types.Uri

type Rep NormalizedUri = D1 ('MetaData "NormalizedUri" "Language.Haskell.LSP.Types.Uri" "haskell-lsp-types-0.22.0.0-3vYMHr1NKLe1fX3kUHhyB1" '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 #

Newtype wrapper around FilePath that always has normalized slashes. The NormalizedUri and hash of the FilePath are 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 ghcide, do not modify it without profiling.

Instances

Instances details
Eq NormalizedFilePath 
Instance details

Defined in Language.Haskell.LSP.Types.Uri

Ord NormalizedFilePath 
Instance details

Defined in Language.Haskell.LSP.Types.Uri

Show NormalizedFilePath 
Instance details

Defined in Language.Haskell.LSP.Types.Uri

IsString NormalizedFilePath 
Instance details

Defined in Language.Haskell.LSP.Types.Uri

Generic NormalizedFilePath 
Instance details

Defined in Language.Haskell.LSP.Types.Uri

Associated Types

type Rep NormalizedFilePath :: Type -> Type #

Hashable NormalizedFilePath 
Instance details

Defined in Language.Haskell.LSP.Types.Uri

Binary NormalizedFilePath 
Instance details

Defined in Language.Haskell.LSP.Types.Uri

NFData NormalizedFilePath 
Instance details

Defined in Language.Haskell.LSP.Types.Uri

Methods

rnf :: NormalizedFilePath -> () #

type Rep NormalizedFilePath 
Instance details

Defined in Language.Haskell.LSP.Types.Uri

type Rep NormalizedFilePath = D1 ('MetaData "NormalizedFilePath" "Language.Haskell.LSP.Types.Uri" "haskell-lsp-types-0.22.0.0-3vYMHr1NKLe1fX3kUHhyB1" 'False) (C1 ('MetaCons "NormalizedFilePath" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NormalizedUri) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FilePath)))

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