toml-parser-1.3.2.0: TOML 1.0.0 parser
Copyright(c) Eric Mertens 2023
LicenseISC
Maintaineremertens@gmail.com
Safe HaskellSafe-Inferred
LanguageHaskell2010

Toml.Position

Description

This module provides the Position type for tracking locations in files while doing lexing and parsing for providing more useful error messages.

This module assumes 8 column wide tab stops.

Synopsis

Documentation

data Position Source #

A position in a text file

Constructors

Position 

Fields

Instances

Instances details
Read Position Source #

Default instance

Instance details

Defined in Toml.Position

Show Position Source #

Default instance

Instance details

Defined in Toml.Position

Eq Position Source #

Default instance

Instance details

Defined in Toml.Position

Ord Position Source #

Default instance

Instance details

Defined in Toml.Position

startPos :: Position Source #

The initial Position for the start of a file

move :: Char -> Position -> Position Source #

Adjust a file position given a single character handling newlines and tabs. All other characters are considered to fill exactly one column.