ddc-core-0.4.3.1: Disciplined Disciple Compiler core language and type checker.

Safe HaskellSafe
LanguageHaskell98

DDC.Data.SourcePos

Synopsis

Documentation

data SourcePos Source #

A position in a source file.

If there is no file path then we assume that the input has been read from an interactive session and display ''<interactive>'' when pretty printing.

data Located a Source #

A located thing.

Constructors

Located !SourcePos !a 

Instances

Eq a => Eq (Located a) Source # 

Methods

(==) :: Located a -> Located a -> Bool #

(/=) :: Located a -> Located a -> Bool #

Show a => Show (Located a) Source # 

Methods

showsPrec :: Int -> Located a -> ShowS #

show :: Located a -> String #

showList :: [Located a] -> ShowS #

sourcePosOfLocated :: Located a -> SourcePos Source #

Take the source position of a located thing.

parsecSourcePosOfLocated :: Located a -> SourcePos Source #

Take the parsec source position of a located thing.

nameOfLocated :: Located a -> String Source #

Yield the source name of a located thing.

lineOfLocated :: Located a -> Int Source #

Yield the line number of a located thing.

columnOfLocated :: Located a -> Int Source #

Yield the column number of a located thing.

valueOfLocated :: Located a -> a Source #

Yield the contained value of a located thing.