Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Reimplements the LineColPos from `uu-parsinglib`, and adds some more functions related to positioning.
Synopsis
- data LineColPos = LineColPos {}
- data Region = Region {
- rgStart :: !LineColPos
- rgEnd :: !LineColPos
- emptyRg :: Region
- rgOr :: Region -> Region -> Region
- before :: Region -> Region -> Bool
- beforeOrOnLine :: Region -> Region -> Bool
- beforeEnd :: Region -> Region -> Bool
- beforeEndLine :: Region -> Region -> Bool
- upto :: Region -> Region -> Region
Documentation
data LineColPos Source #
Instances
FromJSON LineColPos Source # | |
Defined in GLua.Position parseJSON :: Value -> Parser LineColPos # parseJSONList :: Value -> Parser [LineColPos] # | |
ToJSON LineColPos Source # | |
Defined in GLua.Position toJSON :: LineColPos -> Value # toEncoding :: LineColPos -> Encoding # toJSONList :: [LineColPos] -> Value # toEncodingList :: [LineColPos] -> Encoding # | |
Show LineColPos Source # | |
Defined in GLua.Position showsPrec :: Int -> LineColPos -> ShowS # show :: LineColPos -> String # showList :: [LineColPos] -> ShowS # | |
Eq LineColPos Source # | |
Defined in GLua.Position (==) :: LineColPos -> LineColPos -> Bool # (/=) :: LineColPos -> LineColPos -> Bool # | |
Ord LineColPos Source # | |
Defined in GLua.Position compare :: LineColPos -> LineColPos -> Ordering # (<) :: LineColPos -> LineColPos -> Bool # (<=) :: LineColPos -> LineColPos -> Bool # (>) :: LineColPos -> LineColPos -> Bool # (>=) :: LineColPos -> LineColPos -> Bool # max :: LineColPos -> LineColPos -> LineColPos # min :: LineColPos -> LineColPos -> LineColPos # |
Region | |
|
Instances
FromJSON Region Source # | |
ToJSON Region Source # | |
Defined in GLua.Position | |
Generic Region Source # | |
Show Region Source # | |
Eq Region Source # | |
Ord Region Source # | |
type Rep Region Source # | |
Defined in GLua.Position type Rep Region = D1 ('MetaData "Region" "GLua.Position" "glualint-1.27.0-A7JGH9cqUPLzpTGmLbCDI" 'False) (C1 ('MetaCons "Region" 'PrefixI 'True) (S1 ('MetaSel ('Just "rgStart") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 LineColPos) :*: S1 ('MetaSel ('Just "rgEnd") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 LineColPos))) |
rgOr :: Region -> Region -> Region Source #
Hack: Chooses left region if it is not emptyRg
, and the right region if it is.
before :: Region -> Region -> Bool Source #
Whether the first region ends strictly before the second region starts
beforeOrOnLine :: Region -> Region -> Bool Source #
Whether the first region ends before or on the same line as the second region
beforeEnd :: Region -> Region -> Bool Source #
Whether the first region ends before the second region ends