Safe Haskell | None |
---|---|
Language | Haskell2010 |
Source position and span information
Mostly taken from purescript's SourcePos definition.
Documentation
A Span of position information
Instances
Eq Span Source # | |
Ord Span Source # | |
Show Span Source # | |
Generic Span Source # | |
Semigroup Span Source # | |
NFData Span Source # | |
Defined in Source.Span | |
Hashable Span Source # | |
Defined in Source.Span | |
Lower Span Source # | |
Defined in Source.Span lowerBound :: Span # | |
ToJSON Span Source # | |
Defined in Source.Span | |
FromJSON Span Source # | |
HasSpan Span Source # | |
type Rep Span Source # | |
Defined in Source.Span type Rep Span = D1 ('MetaData "Span" "Source.Span" "semantic-source-0.0.0.1-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))) |
Construct a Span with a given value for both its start and end positions.
spanFromSrcLoc :: SrcLoc -> Span Source #
Source position information (1-indexed)
Instances
Eq Pos Source # | |
Ord Pos Source # | |
Show Pos Source # | |
Generic Pos Source # | |
NFData Pos Source # | |
Defined in Source.Span | |
Hashable Pos Source # | |
Defined in Source.Span | |
Lower Pos Source # | |
Defined in Source.Span lowerBound :: Pos # | |
ToJSON Pos Source # | |
Defined in Source.Span | |
FromJSON Pos Source # | |
type Rep Pos Source # | |
Defined in Source.Span type Rep Pos = D1 ('MetaData "Pos" "Source.Span" "semantic-source-0.0.0.1-inplace" 'False) (C1 ('MetaCons "Pos" 'PrefixI 'True) (S1 ('MetaSel ('Just "line") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "column") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Int))) |