fortran-vars-0.4.0: Fortran memory model and other static analysis tools.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Fortran.Vars.StructureTable

Synopsis

Documentation

type StructureTable = Map String Structure Source #

Map from a structure name to its internal structure, specifying members and their corresponding type. This can then be used to check the type of a data reference expression.

data StructureTableEntry Source #

Data structurue for a single field of a structure

Instances

Instances details
Data StructureTableEntry Source # 
Instance details

Defined in Language.Fortran.Vars.Types

Methods

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

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

toConstr :: StructureTableEntry -> Constr Source #

dataTypeOf :: StructureTableEntry -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show StructureTableEntry Source # 
Instance details

Defined in Language.Fortran.Vars.Types

Eq StructureTableEntry Source # 
Instance details

Defined in Language.Fortran.Vars.Types

collectStructures :: Data a => SymbolTable -> ProgramUnit (Analysis a) -> StructureTable Source #

Collect structures defined in a ProgramUnit and return a StructureTable

lookupField :: StructureTable -> Type -> String -> Either TypeError Type Source #

Look up reference on a type to return another Type

hasEntry :: String -> Structure -> Either TypeError Type Source #

Given a name, check that a Structure contains it once and return its corresponding Type

programStructureTables :: Data a => ProgramFile (Analysis a) -> ProgramStructureTables Source #

Given a ProgramFile, generate a StructureTable for each ProgramUnit. This can be used to check types in data reference expressions