| Copyright | (c) [1995..2000] Manuel M. T. Chakravarty [2008..2009] Benedikt Huber  | 
|---|---|
| License | BSD-style | 
| Maintainer | [email protected] | 
| Stability | experimental | 
| Portability | ghc | 
| Safe Haskell | None | 
| Language | Haskell2010 | 
Language.C.Data.Position
Description
Source code position
Synopsis
- data Position
 - position :: Int -> String -> Int -> Int -> Maybe Position -> Position
 - type PosLength = (Position, Int)
 - posFile :: Position -> String
 - posRow :: Position -> Int
 - posColumn :: Position -> Int
 - posOffset :: Position -> Int
 - posParent :: Position -> Maybe Position
 - initPos :: FilePath -> Position
 - isSourcePos :: Position -> Bool
 - nopos :: Position
 - isNoPos :: Position -> Bool
 - builtinPos :: Position
 - isBuiltinPos :: Position -> Bool
 - internalPos :: Position
 - isInternalPos :: Position -> Bool
 - incPos :: Position -> Int -> Position
 - retPos :: Position -> Position
 - incOffset :: Position -> Int -> Position
 - class Pos a where
 
Documentation
uniform representation of source file positions
Instances
| Eq Position Source # | |
| Data Position Source # | |
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 :: forall r r'. (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 Source # | |
Defined in Language.C.Data.Position  | |
| Show Position Source # | |
| Generic Position Source # | |
| NFData Position Source # | |
Defined in Language.C.Data.Position  | |
| type Rep Position Source # | |
Defined in Language.C.Data.Position  | |
position :: Int -> String -> Int -> Int -> Maybe Position -> Position Source #
position absoluteOffset fileName lineNumber columnNumber initializes a Position using the given arguments
posColumn :: Position -> Int Source #
column in the preprocessed file. Inaccurate w.r.t. to the original file in the presence of preprocessor macros.
initPos :: FilePath -> Position Source #
initialize a Position to the start of the translation unit starting in the given file
isSourcePos :: Position -> Bool Source #
returns True if the given position refers to an actual source file
builtinPos :: Position Source #
position attached to built-in objects
isBuiltinPos :: Position -> Bool Source #
returns True if the given position refers to a builtin definition
internalPos :: Position Source #
position used for internal errors
isInternalPos :: Position -> Bool Source #
returns True if the given position is internal
class of type which aggregate a source code location