Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- baseToType :: BaseType -> Type
- getTypeKind :: Type -> Maybe Int
- setTypeKind :: Type -> Maybe Int -> Type
- typeOfExpVal :: ExpVal -> Type
- isStr :: ExpVal -> Bool
- getKindOfExpVal :: ExpVal -> Int
- toInt :: ExpVal -> Int
- getKind :: SymbolTable -> TypeSpec (Analysis a) -> Maybe (Expression (Analysis a)) -> Maybe Int
- kindOfBaseType :: BaseType -> Int
- getTypeSize :: SemType -> Maybe Int
- setTypeSize :: SemType -> Maybe Int -> SemType
- deriveSemTypeFromBaseType :: BaseType -> SemType
Documentation
baseToType :: BaseType -> Type Source #
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 #
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
getTypeSize :: SemType -> Maybe Int #