language-eiffel-0.1.2: Parser and pretty printer for the Eiffel language.

Safe HaskellNone




data Pos a Source


Pos SourcePos a 


Functor Pos 
Eq a => Eq (Pos a) 
Ord a => Ord (Pos a) 
Show a => Show (Pos a) 
Binary a_1627412790 => Binary (Pos a_1627412790) 
NFData a_1627412790 => NFData (Pos a_1627412790) 

type Line = Int

type Column = Int

data SourcePos

The abstract data type SourcePos represents source positions. It contains the name of the source (i.e. file name), a line number and a column number. SourcePos is an instance of the Show, Eq and Ord class.

sourceLine :: SourcePos -> Line

Extracts the line number from a source position.

sourceColumn :: SourcePos -> Column

Extracts the column number from a source position.

sourceName :: SourcePos -> SourceName

Extracts the name of the source from a source position.

inheritPos :: (Pos a -> b) -> Pos a -> Pos bSource

attachPosM :: Monad m => m SourcePos -> m a -> m (Pos a)Source

takePos :: Pos a -> b -> Pos bSource