| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Language.Fortran.Vars.StructureTable
Synopsis
- type StructureTable = Map String Structure
- data StructureTableEntry
- collectStructures :: Data a => SymbolTable -> ProgramUnit (Analysis a) -> StructureTable
- lookupField :: StructureTable -> Type -> String -> Either TypeError Type
- hasEntry :: String -> Structure -> Either TypeError Type
- programStructureTables :: Data a => ProgramFile (Analysis a) -> ProgramStructureTables
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
Constructors
| FieldEntry String Type | |
| UnionEntry [Structure] |
Instances
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
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