Portability | ghc |
---|---|
Stability | experimental |
Maintainer | benedikt.huber@gmail.com |
Source code position
- data Position = Position String !Int !Int
- posFile :: Position -> String
- posRow :: Position -> Int
- posColumn :: Position -> Int
- isSourcePos :: Position -> Bool
- nopos :: Position
- isNoPos :: Position -> Bool
- builtinPos :: Position
- isBuiltinPos :: Position -> Bool
- internalPos :: Position
- isInternalPos :: Position -> Bool
- incPos :: Position -> Int -> Position
- tabPos :: Position -> Position
- retPos :: Position -> Position
- class Pos a where
Documentation
uniform representation of source file positions; the order of the arguments is important as it leads to the desired ordering of source positions
posFile :: Position -> StringSource
get the source file of the specified position. Fails unless isSourcePos pos
.
posRow :: Position -> IntSource
get the line number of the specified position. Fails unless isSourcePos pos
posColumn :: Position -> IntSource
get the column of the specified position. Fails unless isSourcePos pos
isSourcePos :: Position -> BoolSource
returns True
if the given position refers to an actual source file
position attached to built-in objects
isBuiltinPos :: Position -> BoolSource
returns True
if the given position refers to a builtin definition
position used for internal errors
isInternalPos :: Position -> BoolSource
returns True
if the given position is internal
tabPos :: Position -> PositionSource
advance column to next tab positions (tabs are considered to be at every 8th column)
class of type which aggregate a source code location
Pos NodeInfo | |
Pos Ident | |
Pos CStrLit | |
Pos CConst | |
Pos CBuiltin | |
Pos CExpr | |
Pos CAttr | |
Pos CDesignator | |
Pos CInit | |
Pos CEnum | |
Pos CStructUnion | |
Pos CTypeQual | |
Pos CTypeSpec | |
Pos CStorageSpec | |
Pos CDeclSpec | |
Pos CBlockItem | |
Pos CAsmOperand | |
Pos CAsmStmt | |
Pos CStat | |
Pos CDerivedDeclr | |
Pos CDeclr | |
Pos CDecl | |
Pos CFunDef | |
Pos CExtDecl | |
Pos CTranslUnit | |
Pos CToken | |
Pos Attr | |
Pos Enumerator | |
Pos EnumType | |
Pos CompType | |
Pos EnumTypeRef | |
Pos CompTypeRef | |
Pos TypeDefRef | |
Pos TypeDef | |
Pos MemberDecl | |
Pos ParamDecl | |
Pos FunDef | |
Pos ObjDef | |
Pos Decl | |
Pos DeclEvent | |
Pos IdentDecl | |
Pos TagDef | |
Pos a => Pos [a] | |
Pos a => Pos (Reversed a) | |
Pos (Located a) |