fortran-src-0.4.0: Parser and anlyses for Fortran standards 66, 77, 90 and 95.

Safe HaskellSafe
LanguageHaskell2010

Language.Fortran.Util.Position

Synopsis

Documentation

class Loc a where Source #

Methods

getPos :: a -> Position Source #

Instances
Loc AlexInput Source # 
Instance details

Defined in Language.Fortran.Lexer.FreeForm

Loc AlexInput Source # 
Instance details

Defined in Language.Fortran.Lexer.FixedForm

data Position Source #

Constructors

Position 

Fields

Instances
Eq Position Source # 
Instance details

Defined in Language.Fortran.Util.Position

Data Position Source # 
Instance details

Defined in Language.Fortran.Util.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 Source # 
Instance details

Defined in Language.Fortran.Util.Position

Show Position Source # 
Instance details

Defined in Language.Fortran.Util.Position

Generic Position Source # 
Instance details

Defined in Language.Fortran.Util.Position

Associated Types

type Rep Position :: Type -> Type #

Methods

from :: Position -> Rep Position x #

to :: Rep Position x -> Position #

Binary Position Source # 
Instance details

Defined in Language.Fortran.Util.Position

Methods

put :: Position -> Put #

get :: Get Position #

putList :: [Position] -> Put #

NFData Position Source # 
Instance details

Defined in Language.Fortran.Util.Position

Methods

rnf :: Position -> () #

type Rep Position Source # 
Instance details

Defined in Language.Fortran.Util.Position

type Rep Position = D1 (MetaData "Position" "Language.Fortran.Util.Position" "fortran-src-0.4.0-6iUwcUBJgeJJnlH0SPB9We" False) (C1 (MetaCons "Position" PrefixI True) ((S1 (MetaSel (Just "posAbsoluteOffset") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int) :*: S1 (MetaSel (Just "posColumn") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)) :*: (S1 (MetaSel (Just "posLine") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int) :*: (S1 (MetaSel (Just "filePath") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Just "posPragmaOffset") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Int, String)))))))

apparentLineCol :: Position -> (Int, Int) Source #

(line, column) number taking into account any specified line pragmas.

apparentFilePath :: Position -> String Source #

Path of file taking into account any specified line pragmas.

data SrcSpan Source #

Constructors

SrcSpan Position Position 
Instances
Eq SrcSpan Source # 
Instance details

Defined in Language.Fortran.Util.Position

Methods

(==) :: SrcSpan -> SrcSpan -> Bool #

(/=) :: SrcSpan -> SrcSpan -> Bool #

Data SrcSpan Source # 
Instance details

Defined in Language.Fortran.Util.Position

Methods

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

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

toConstr :: SrcSpan -> Constr #

dataTypeOf :: SrcSpan -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord SrcSpan Source # 
Instance details

Defined in Language.Fortran.Util.Position

Show SrcSpan Source # 
Instance details

Defined in Language.Fortran.Util.Position

Generic SrcSpan Source # 
Instance details

Defined in Language.Fortran.Util.Position

Associated Types

type Rep SrcSpan :: Type -> Type #

Methods

from :: SrcSpan -> Rep SrcSpan x #

to :: Rep SrcSpan x -> SrcSpan #

Out SrcSpan Source # 
Instance details

Defined in Language.Fortran.Util.Position

Methods

docPrec :: Int -> SrcSpan -> Doc #

doc :: SrcSpan -> Doc #

docList :: [SrcSpan] -> Doc #

Binary SrcSpan Source # 
Instance details

Defined in Language.Fortran.Util.Position

Methods

put :: SrcSpan -> Put #

get :: Get SrcSpan #

putList :: [SrcSpan] -> Put #

NFData SrcSpan Source # 
Instance details

Defined in Language.Fortran.Util.Position

Methods

rnf :: SrcSpan -> () #

Spanned SrcSpan Source # 
Instance details

Defined in Language.Fortran.Util.Position

FirstParameter Token SrcSpan Source # 
Instance details

Defined in Language.Fortran.Lexer.FreeForm

FirstParameter Token SrcSpan Source # 
Instance details

Defined in Language.Fortran.Lexer.FixedForm

SecondParameter (DimensionDeclarator a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (Declarator a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (Index a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (Expression a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (DoSpecification a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (FlushSpec a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (FormatItem a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (UnionMap a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (StructureItem a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (DataGroup a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (Namelist a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (CommonGroup a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (ImpElement a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (ImpList a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (AllocOpt a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (ControlPair a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (Attribute a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (Argument a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (Use a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (ProcInterface a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (ProcDecl a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (Statement a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (Block a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (Suffix a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (Prefix a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (ProgramUnit a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (Selector a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (TypeSpec a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

SecondParameter (LValue a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.LValue

SecondParameter (AList t a) SrcSpan Source # 
Instance details

Defined in Language.Fortran.AST

type Rep SrcSpan Source # 
Instance details

Defined in Language.Fortran.Util.Position

type Rep SrcSpan = D1 (MetaData "SrcSpan" "Language.Fortran.Util.Position" "fortran-src-0.4.0-6iUwcUBJgeJJnlH0SPB9We" False) (C1 (MetaCons "SrcSpan" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Position) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Position)))

class Spanned a where Source #

Minimal complete definition

Nothing

Instances
Spanned SrcSpan Source # 
Instance details

Defined in Language.Fortran.Util.Position

FirstParameter Token SrcSpan => Spanned Token Source # 
Instance details

Defined in Language.Fortran.Lexer.FreeForm

Spanned Lexeme Source # 
Instance details

Defined in Language.Fortran.Lexer.FreeForm

FirstParameter Token SrcSpan => Spanned Token Source # 
Instance details

Defined in Language.Fortran.Lexer.FixedForm

Spanned a => Spanned [a] Source # 
Instance details

Defined in Language.Fortran.AST

Methods

getSpan :: [a] -> SrcSpan Source #

setSpan :: SrcSpan -> [a] -> [a] Source #

Spanned (DimensionDeclarator a) Source # 
Instance details

Defined in Language.Fortran.AST

Spanned (Declarator a) Source # 
Instance details

Defined in Language.Fortran.AST

Spanned (Index a) Source # 
Instance details

Defined in Language.Fortran.AST

Spanned (Expression a) Source # 
Instance details

Defined in Language.Fortran.AST

Spanned (DoSpecification a) Source # 
Instance details

Defined in Language.Fortran.AST

Spanned (FlushSpec a) Source # 
Instance details

Defined in Language.Fortran.AST

Spanned (FormatItem a) Source # 
Instance details

Defined in Language.Fortran.AST

Spanned (UnionMap a) Source # 
Instance details

Defined in Language.Fortran.AST

Spanned (StructureItem a) Source # 
Instance details

Defined in Language.Fortran.AST

Spanned (DataGroup a) Source # 
Instance details

Defined in Language.Fortran.AST

Spanned (Namelist a) Source # 
Instance details

Defined in Language.Fortran.AST

Spanned (CommonGroup a) Source # 
Instance details

Defined in Language.Fortran.AST

Spanned (ImpElement a) Source # 
Instance details

Defined in Language.Fortran.AST

Spanned (ImpList a) Source # 
Instance details

Defined in Language.Fortran.AST

Spanned (AllocOpt a) Source # 
Instance details

Defined in Language.Fortran.AST

Spanned (ControlPair a) Source # 
Instance details

Defined in Language.Fortran.AST

Spanned (Attribute a) Source # 
Instance details

Defined in Language.Fortran.AST

Spanned (Argument a) Source # 
Instance details

Defined in Language.Fortran.AST

Spanned (Use a) Source # 
Instance details

Defined in Language.Fortran.AST

Methods

getSpan :: Use a -> SrcSpan Source #

setSpan :: SrcSpan -> Use a -> Use a Source #

Spanned (ProcInterface a) Source # 
Instance details

Defined in Language.Fortran.AST

Spanned (ProcDecl a) Source # 
Instance details

Defined in Language.Fortran.AST

Spanned (Statement a) Source # 
Instance details

Defined in Language.Fortran.AST

Spanned (Block a) Source # 
Instance details

Defined in Language.Fortran.AST

Spanned (Suffix a) Source # 
Instance details

Defined in Language.Fortran.AST

Spanned (Prefix a) Source # 
Instance details

Defined in Language.Fortran.AST

Spanned (ProgramUnit a) Source # 
Instance details

Defined in Language.Fortran.AST

Spanned (ProgramFile a) Source # 
Instance details

Defined in Language.Fortran.AST

Spanned (Selector a) Source # 
Instance details

Defined in Language.Fortran.AST

Spanned (TypeSpec a) Source # 
Instance details

Defined in Language.Fortran.AST

Spanned (LValue a) Source # 
Instance details

Defined in Language.Fortran.LValue

(Spanned a, Spanned b) => Spanned (Either a b) Source # 
Instance details

Defined in Language.Fortran.AST

Methods

getSpan :: Either a b -> SrcSpan Source #

setSpan :: SrcSpan -> Either a b -> Either a b Source #

(Spanned a, Spanned b) => Spanned (Maybe a, b) Source # 
Instance details

Defined in Language.Fortran.AST

Methods

getSpan :: (Maybe a, b) -> SrcSpan Source #

setSpan :: SrcSpan -> (Maybe a, b) -> (Maybe a, b) Source #

(Spanned a, Spanned b) => Spanned (a, b) Source # 
Instance details

Defined in Language.Fortran.AST

Methods

getSpan :: (a, b) -> SrcSpan Source #

setSpan :: SrcSpan -> (a, b) -> (a, b) Source #

(Spanned a, Spanned b) => Spanned (a, Maybe b) Source # 
Instance details

Defined in Language.Fortran.AST

Methods

getSpan :: (a, Maybe b) -> SrcSpan Source #

setSpan :: SrcSpan -> (a, Maybe b) -> (a, Maybe b) Source #

Spanned (AList t a) Source # 
Instance details

Defined in Language.Fortran.AST

Methods

getSpan :: AList t a -> SrcSpan Source #

setSpan :: SrcSpan -> AList t a -> AList t a Source #

(Spanned a, Spanned b, Spanned c) => Spanned (Maybe a, b, c) Source # 
Instance details

Defined in Language.Fortran.AST

Methods

getSpan :: (Maybe a, b, c) -> SrcSpan Source #

setSpan :: SrcSpan -> (Maybe a, b, c) -> (Maybe a, b, c) Source #

(Spanned a, Spanned b, Spanned c) => Spanned (Maybe a, Maybe b, Maybe c) Source # 
Instance details

Defined in Language.Fortran.AST

Methods

getSpan :: (Maybe a, Maybe b, Maybe c) -> SrcSpan Source #

setSpan :: SrcSpan -> (Maybe a, Maybe b, Maybe c) -> (Maybe a, Maybe b, Maybe c) Source #

(Spanned a, Spanned b, Spanned c) => Spanned (a, b, c) Source # 
Instance details

Defined in Language.Fortran.AST

Methods

getSpan :: (a, b, c) -> SrcSpan Source #

setSpan :: SrcSpan -> (a, b, c) -> (a, b, c) Source #

(Spanned a, Spanned b, Spanned c) => Spanned (a, Maybe b, Maybe c) Source # 
Instance details

Defined in Language.Fortran.AST

Methods

getSpan :: (a, Maybe b, Maybe c) -> SrcSpan Source #

setSpan :: SrcSpan -> (a, Maybe b, Maybe c) -> (a, Maybe b, Maybe c) Source #