semantic-source-0.1.0.2: Types and functionality for working with source code
Safe HaskellSafe-Inferred
LanguageHaskell2010

Source.Loc

Synopsis

Documentation

data Loc Source #

Constructors

Loc 

Fields

Instances

Instances details
Semigroup Loc Source # 
Instance details

Defined in Source.Loc

Methods

(<>) :: Loc -> Loc -> Loc

sconcat :: NonEmpty Loc -> Loc

stimes :: Integral b => b -> Loc -> Loc

Generic Loc Source # 
Instance details

Defined in Source.Loc

Associated Types

type Rep Loc :: Type -> Type

Methods

from :: Loc -> Rep Loc x

to :: Rep Loc x -> Loc

Show Loc Source # 
Instance details

Defined in Source.Loc

Methods

showsPrec :: Int -> Loc -> ShowS

show :: Loc -> String

showList :: [Loc] -> ShowS

NFData Loc Source # 
Instance details

Defined in Source.Loc

Methods

rnf :: Loc -> ()

Eq Loc Source # 
Instance details

Defined in Source.Loc

Methods

(==) :: Loc -> Loc -> Bool

(/=) :: Loc -> Loc -> Bool

Ord Loc Source # 
Instance details

Defined in Source.Loc

Methods

compare :: Loc -> Loc -> Ordering

(<) :: Loc -> Loc -> Bool

(<=) :: Loc -> Loc -> Bool

(>) :: Loc -> Loc -> Bool

(>=) :: Loc -> Loc -> Bool

max :: Loc -> Loc -> Loc

min :: Loc -> Loc -> Loc

Hashable Loc Source # 
Instance details

Defined in Source.Loc

Methods

hashWithSalt :: Int -> Loc -> Int

hash :: Loc -> Int

HasSpan Loc Source # 
Instance details

Defined in Source.Loc

Methods

span_ :: Lens' Loc Span Source #

start_ :: Lens' Loc Pos Source #

end_ :: Lens' Loc Pos Source #

ToJSON Loc Source # 
Instance details

Defined in Source.Loc

Methods

toJSON :: Loc -> Value

toEncoding :: Loc -> Encoding

toJSONList :: [Loc] -> Value

toEncodingList :: [Loc] -> Encoding

type Rep Loc Source # 
Instance details

Defined in Source.Loc

type Rep Loc = D1 ('MetaData "Loc" "Source.Loc" "semantic-source-0.1.0.2-inplace" 'False) (C1 ('MetaCons "Loc" 'PrefixI 'True) (S1 ('MetaSel ('Just "byteRange") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Range) :*: S1 ('MetaSel ('Just "span") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Span)))

data Span Source #

A Span of position information

Constructors

Span !Pos !Pos 

Instances

Instances details
Semigroup Span Source # 
Instance details

Defined in Source.Span

Methods

(<>) :: Span -> Span -> Span

sconcat :: NonEmpty Span -> Span

stimes :: Integral b => b -> Span -> Span

Generic Span Source # 
Instance details

Defined in Source.Span

Associated Types

type Rep Span :: Type -> Type

Methods

from :: Span -> Rep Span x

to :: Rep Span x -> Span

Show Span Source # 
Instance details

Defined in Source.Span

Methods

showsPrec :: Int -> Span -> ShowS

show :: Span -> String

showList :: [Span] -> ShowS

NFData Span Source # 
Instance details

Defined in Source.Span

Methods

rnf :: Span -> ()

Eq Span Source # 
Instance details

Defined in Source.Span

Methods

(==) :: Span -> Span -> Bool

(/=) :: Span -> Span -> Bool

Ord Span Source # 
Instance details

Defined in Source.Span

Methods

compare :: Span -> Span -> Ordering

(<) :: Span -> Span -> Bool

(<=) :: Span -> Span -> Bool

(>) :: Span -> Span -> Bool

(>=) :: Span -> Span -> Bool

max :: Span -> Span -> Span

min :: Span -> Span -> Span

Hashable Span Source # 
Instance details

Defined in Source.Span

Methods

hashWithSalt :: Int -> Span -> Int

hash :: Span -> Int

HasSpan Span Source # 
Instance details

Defined in Source.Span

Methods

span_ :: Lens' Span Span Source #

start_ :: Lens' Span Pos Source #

end_ :: Lens' Span Pos Source #

FromJSON Span Source # 
Instance details

Defined in Source.Span

Methods

parseJSON :: Value -> Parser Span

parseJSONList :: Value -> Parser [Span]

ToJSON Span Source # 
Instance details

Defined in Source.Span

Methods

toJSON :: Span -> Value

toEncoding :: Span -> Encoding

toJSONList :: [Span] -> Value

toEncodingList :: [Span] -> Encoding

type Rep Span Source # 
Instance details

Defined in Source.Span

type Rep Span = D1 ('MetaData "Span" "Source.Span" "semantic-source-0.1.0.2-inplace" 'False) (C1 ('MetaCons "Span" 'PrefixI 'True) (S1 ('MetaSel ('Just "start") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Pos) :*: S1 ('MetaSel ('Just "end") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Pos)))

data Range Source #

A 0-indexed, half-open interval of integers, defined by start & end indices.

Constructors

Range !Int !Int 

Instances

Instances details
Semigroup Range Source # 
Instance details

Defined in Source.Range

Methods

(<>) :: Range -> Range -> Range

sconcat :: NonEmpty Range -> Range

stimes :: Integral b => b -> Range -> Range

Generic Range Source # 
Instance details

Defined in Source.Range

Associated Types

type Rep Range :: Type -> Type

Methods

from :: Range -> Rep Range x

to :: Rep Range x -> Range

Show Range Source # 
Instance details

Defined in Source.Range

Methods

showsPrec :: Int -> Range -> ShowS

show :: Range -> String

showList :: [Range] -> ShowS

NFData Range Source # 
Instance details

Defined in Source.Range

Methods

rnf :: Range -> ()

Eq Range Source # 
Instance details

Defined in Source.Range

Methods

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

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

Ord Range Source # 
Instance details

Defined in Source.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

Hashable Range Source # 
Instance details

Defined in Source.Range

Methods

hashWithSalt :: Int -> Range -> Int

hash :: Range -> Int

Lower Range Source # 
Instance details

Defined in Source.Range

Methods

lowerBound :: Range

ToJSON Range Source # 
Instance details

Defined in Source.Range

Methods

toJSON :: Range -> Value

toEncoding :: Range -> Encoding

toJSONList :: [Range] -> Value

toEncodingList :: [Range] -> Encoding

type Rep Range Source # 
Instance details

Defined in Source.Range

type Rep Range = D1 ('MetaData "Range" "Source.Range" "semantic-source-0.1.0.2-inplace" 'False) (C1 ('MetaCons "Range" 'PrefixI 'True) (S1 ('MetaSel ('Just "start") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "end") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Int)))