Distribution.Parsec.Position

Cabal-3.2.0.0: A framework for packaging Haskell software

Safe Haskell | None
Language | Haskell2010

Distribution.Parsec.Position

Synopsis

- data Position = Position !Int !Int
- incPos :: Int -> Position -> Position
- retPos :: Position -> Position
- showPos :: Position -> String
- zeroPos :: Position
- positionCol :: Position -> Int
- positionRow :: Position -> Int

# Documentation

data Position #

1-indexed row and column positions in a file.

Constructors

Position !Int !Int |

#### Instances

Instances details

Eq Position # |
Instance details Defined in Distribution.Parsec.Position Methods (==) :: Position -> Position -> Bool # (/=) :: Position -> Position -> Bool #
Ord Position # |
Instance details Defined in Distribution.Parsec.Position Methods compare :: Position -> Position -> Ordering # (<) :: Position -> Position -> Bool # (<=) :: Position -> Position -> Bool # (>) :: Position -> Position -> Bool # (>=) :: Position -> Position -> Bool # max :: Position -> Position -> Position # min :: Position -> Position -> Position #
Show Position # |
Instance details Defined in Distribution.Parsec.Position Methods showsPrec :: Int -> Position -> ShowS Source # show :: Position -> String Source # showList :: [Position] -> ShowS Source #
Generic Position # |
Instance details Defined in Distribution.Parsec.Position Associated Types type Rep Position :: Type -> Type Source # Methods from :: Position -> Rep Position x Source # to :: Rep Position x -> Position Source #
Binary Position # |
Instance details Defined in Distribution.Parsec.Position Methods put :: Position -> Put Source # get :: Get Position Source # putList :: [Position] -> Put Source #
NFData Position # |
Instance details Defined in Distribution.Parsec.Position Methods rnf :: Position -> () Source #
type Rep Position # |
Instance details Defined in Distribution.Parsec.Position type Rep Position = D1 ('MetaData "Position" "Distribution.Parsec.Position" "Cabal-3.2.0.0" 'False) (C1 ('MetaCons "Position" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Int)))

incPos :: Int -> Position -> Position #

Shift position by n columns to the right.

retPos :: Position -> Position #

Shift position to beginning of next row.

showPos :: Position -> String #

zeroPos :: Position #

positionCol :: Position -> Int #

Since: Cabal-3.0.0.0

positionRow :: Position -> Int #

Since: Cabal-3.0.0.0