language-c-0.8.2: Analysis and generation of C code

Copyright(c) [1995..2000] Manuel M. T. Chakravarty
[2008..2009] Benedikt Huber
LicenseBSD-style
Maintainerbenedikt.huber@gmail.com
Stabilityexperimental
Portabilityghc
Safe HaskellNone
LanguageHaskell98

Language.C.Data.Position

Description

Source code position

Synopsis

Documentation

data Position #

uniform representation of source file positions

Instances
Eq Position # 
Instance details

Defined in Language.C.Data.Position

Data Position # 
Instance details

Defined in Language.C.Data.Position

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Position -> c Position #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Position #

toConstr :: Position -> Constr #

dataTypeOf :: Position -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Position) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Position) #

gmapT :: (forall b. Data b => b -> b) -> Position -> Position #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Position -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Position -> r #

gmapQ :: (forall d. Data d => d -> u) -> Position -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Position -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Position -> m Position #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Position -> m Position #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Position -> m Position #

Ord Position # 
Instance details

Defined in Language.C.Data.Position

Show Position # 
Instance details

Defined in Language.C.Data.Position

Generic Position # 
Instance details

Defined in Language.C.Data.Position

Associated Types

type Rep Position :: Type -> Type #

Methods

from :: Position -> Rep Position x #

to :: Rep Position x -> Position #

NFData Position # 
Instance details

Defined in Language.C.Data.Position

Methods

rnf :: Position -> () #

type Rep Position # 
Instance details

Defined in Language.C.Data.Position

position :: Int -> String -> Int -> Int -> Maybe Position -> Position #

position absoluteOffset fileName lineNumber columnNumber initializes a Position using the given arguments

type PosLength = (Position, Int) #

Position and length of a token

posRow :: Position -> Int #

row (line) in the original file. Affected by #LINE pragmas.

posColumn :: Position -> Int #

column in the preprocessed file. Inaccurate w.r.t. to the original file in the presence of preprocessor macros.

posOffset :: Position -> Int #

absolute offset in the preprocessed file

initPos :: FilePath -> Position #

initialize a Position to the start of the translation unit starting in the given file

isSourcePos :: Position -> Bool #

returns True if the given position refers to an actual source file

nopos :: Position #

no position (for unknown position information)

isNoPos :: Position -> Bool #

returns True if the there is no position information available

builtinPos :: Position #

position attached to built-in objects

isBuiltinPos :: Position -> Bool #

returns True if the given position refers to a builtin definition

internalPos :: Position #

position used for internal errors

isInternalPos :: Position -> Bool #

returns True if the given position is internal

incPos :: Position -> Int -> Position #

advance column

retPos :: Position -> Position #

advance to next line

incOffset :: Position -> Int -> Position #

advance just the offset

class Pos a where #

class of type which aggregate a source code location

Methods

posOf :: a -> Position #

Instances
Pos NodeInfo # 
Instance details

Defined in Language.C.Data.Node

Methods

posOf :: NodeInfo -> Position #

Pos Ident # 
Instance details

Defined in Language.C.Data.Ident

Methods

posOf :: Ident -> Position #

Pos Attr # 
Instance details

Defined in Language.C.Analysis.SemRep

Methods

posOf :: Attr -> Position #

Pos Enumerator # 
Instance details

Defined in Language.C.Analysis.SemRep

Methods

posOf :: Enumerator -> Position #

Pos EnumType # 
Instance details

Defined in Language.C.Analysis.SemRep

Methods

posOf :: EnumType -> Position #

Pos CompType # 
Instance details

Defined in Language.C.Analysis.SemRep

Methods

posOf :: CompType -> Position #

Pos EnumTypeRef # 
Instance details

Defined in Language.C.Analysis.SemRep

Pos CompTypeRef # 
Instance details

Defined in Language.C.Analysis.SemRep

Pos TypeDefRef # 
Instance details

Defined in Language.C.Analysis.SemRep

Methods

posOf :: TypeDefRef -> Position #

Pos TypeDef # 
Instance details

Defined in Language.C.Analysis.SemRep

Methods

posOf :: TypeDef -> Position #

Pos MemberDecl # 
Instance details

Defined in Language.C.Analysis.SemRep

Methods

posOf :: MemberDecl -> Position #

Pos ParamDecl # 
Instance details

Defined in Language.C.Analysis.SemRep

Methods

posOf :: ParamDecl -> Position #

Pos FunDef # 
Instance details

Defined in Language.C.Analysis.SemRep

Methods

posOf :: FunDef -> Position #

Pos ObjDef # 
Instance details

Defined in Language.C.Analysis.SemRep

Methods

posOf :: ObjDef -> Position #

Pos Decl # 
Instance details

Defined in Language.C.Analysis.SemRep

Methods

posOf :: Decl -> Position #

Pos DeclEvent # 
Instance details

Defined in Language.C.Analysis.SemRep

Methods

posOf :: DeclEvent -> Position #

Pos IdentDecl # 
Instance details

Defined in Language.C.Analysis.SemRep

Methods

posOf :: IdentDecl -> Position #

Pos TagDef # 
Instance details

Defined in Language.C.Analysis.SemRep

Methods

posOf :: TagDef -> Position #

Pos a => Pos [a] # 
Instance details

Defined in Language.C.Parser.Parser

Methods

posOf :: [a] -> Position #

CNode t1 => Pos (CStringLiteral t1) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

posOf :: CStringLiteral t1 -> Position #

CNode t1 => Pos (CConstant t1) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

posOf :: CConstant t1 -> Position #

CNode t1 => Pos (CBuiltinThing t1) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

posOf :: CBuiltinThing t1 -> Position #

CNode t1 => Pos (CExpression t1) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

posOf :: CExpression t1 -> Position #

CNode t1 => Pos (CAttribute t1) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

posOf :: CAttribute t1 -> Position #

CNode t1 => Pos (CPartDesignator t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => Pos (CInitializer t1) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

posOf :: CInitializer t1 -> Position #

CNode t1 => Pos (CEnumeration t1) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

posOf :: CEnumeration t1 -> Position #

CNode t1 => Pos (CStructureUnion t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => Pos (CAlignmentSpecifier t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => Pos (CFunctionSpecifier t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => Pos (CTypeQualifier t1) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

posOf :: CTypeQualifier t1 -> Position #

CNode t1 => Pos (CTypeSpecifier t1) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

posOf :: CTypeSpecifier t1 -> Position #

CNode t1 => Pos (CStorageSpecifier t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => Pos (CDeclarationSpecifier t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => Pos (CCompoundBlockItem t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => Pos (CAssemblyOperand t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => Pos (CAssemblyStatement t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => Pos (CStatement t1) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

posOf :: CStatement t1 -> Position #

CNode t1 => Pos (CDerivedDeclarator t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => Pos (CDeclarator t1) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

posOf :: CDeclarator t1 -> Position #

CNode t1 => Pos (CDeclaration t1) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

posOf :: CDeclaration t1 -> Position #

CNode t1 => Pos (CFunctionDef t1) # 
Instance details

Defined in Language.C.Syntax.AST

Methods

posOf :: CFunctionDef t1 -> Position #

CNode t1 => Pos (CExternalDeclaration t1) # 
Instance details

Defined in Language.C.Syntax.AST

CNode t1 => Pos (CTranslationUnit t1) # 
Instance details

Defined in Language.C.Syntax.AST