Language.C.Analysis.ConstEval

language-c-0.5.0: Analysis and generation of C code

Safe Haskell | None
Language | Haskell98

Language.C.Analysis.ConstEval

# Documentation

data MachineDesc

Constructors

MachineDesc |
Fields iSize :: IntType -> Integer fSize :: FloatType -> Integer builtinSize :: BuiltinType -> Integer ptrSize :: Integer voidSize :: Integer iAlign :: IntType -> Integer fAlign :: FloatType -> Integer builtinAlign :: BuiltinType -> Integer ptrAlign :: Integer voidAlign :: Integer

intExpr :: (Pos n, MonadName m) => n -> Integer -> m CExpr

sizeofType :: (MonadTrav m, CNode n) => MachineDesc -> n -> Type -> m Integer

alignofType :: (MonadTrav m, CNode n) => MachineDesc -> n -> Type -> m Integer

compSize :: MonadTrav m => MachineDesc -> CompTypeRef -> m Integer

intOp :: CBinaryOp -> Integer -> Integer -> Integer

intUnOp :: CUnaryOp -> Integer -> Maybe Integer

withWordBytes :: Int -> Integer -> Integer

boolValue :: CExpr -> Maybe Bool

intValue :: CExpr -> Maybe Integer

constEval :: MonadTrav m => MachineDesc -> Map Ident CExpr -> CExpr -> m CExpr