Cabal-syntax-3.10.2.0: A library for working with .cabal files
Safe HaskellSafe-Inferred
LanguageHaskell2010

Distribution.Parsec.Position

Synopsis

Documentation

data Position Source #

1-indexed row and column positions in a file.

Constructors

Position !Int !Int 

Instances

Instances details
Generic Position Source # 
Instance details

Defined in Distribution.Parsec.Position

Associated Types

type Rep Position 
Instance details

Defined in Distribution.Parsec.Position

type Rep Position = D1 ('MetaData "Position" "Distribution.Parsec.Position" "Cabal-syntax-3.10.2.0-d35e" '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)))
Show Position Source # 
Instance details

Defined in Distribution.Parsec.Position

Binary Position Source # 
Instance details

Defined in Distribution.Parsec.Position

NFData Position Source # 
Instance details

Defined in Distribution.Parsec.Position

Methods

rnf :: Position -> () Source #

Eq Position Source # 
Instance details

Defined in Distribution.Parsec.Position

Ord Position Source # 
Instance details

Defined in Distribution.Parsec.Position

type Rep Position Source # 
Instance details

Defined in Distribution.Parsec.Position

type Rep Position = D1 ('MetaData "Position" "Distribution.Parsec.Position" "Cabal-syntax-3.10.2.0-d35e" '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 Source #

Shift position by n columns to the right.

retPos :: Position -> Position Source #

Shift position to beginning of next row.

positionCol :: Position -> Int Source #

Since: Cabal-syntax-3.0.0.0

positionRow :: Position -> Int Source #

Since: Cabal-syntax-3.0.0.0