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

Language.Fortran.Vars.Kind

Synopsis

Documentation

typeOfExpVal :: ExpVal -> Type Source #

Given an ExpVal, return the Type of that value

isStr :: ExpVal -> Bool Source #

Given an ExpVal, return true if it is a Str, else false

getKindOfExpVal :: ExpVal -> Int Source #

Given an ExpVal determine the kind of it

toInt :: ExpVal -> Int Source #

Convert an ExpVal to an ExpVal. This will fail if the ExpVal is not already known to be an ExpVal

getKind :: SymbolTable -> TypeSpec (Analysis a) -> Maybe (Expression (Analysis a)) -> Maybe Int Source #

Given a SymbolTable, a TypeSpec for a variable, and possibly an Expression for the length of a character array, determine the kind of that variable The charLength also works for nonstandard kind

kindOfBaseType :: BaseType -> Int Source #

Given a BaseType infer the "default" kind (or size of the variable in memory).

Useful when you need a default kind, but gives you an unwrapped type. Consider using Analysis.deriveSemTypeFromBaseType also.

Further documentation: https://docs.oracle.com/cd/E19957-01/805-4939/c400041360f5/index.html

deriveSemTypeFromBaseType :: BaseType -> SemType Source #

Derive SemType directly from BaseType, using relevant default kinds.