language-c-0.9.2: Analysis and generation of C code
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.C.Analysis.ConstEval

Synopsis

Documentation

data MachineDesc Source #

Constructors

MachineDesc 

Fields

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

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

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

compSizeAndAlign Source #

Arguments

:: MonadTrav m 
=> MachineDesc 
-> CompTypeRef 
-> m (Integer, Integer)

(size, alignment)

roundToAlignment Source #

Arguments

:: Integer

The alignment

-> Integer

The value to align

-> Integer

The next multiple of alignment

Find the next multiple of an alignment

intOp :: CBinaryOp -> Integer -> Integer -> Integer Source #

intUnOp :: CUnaryOp -> Integer -> Maybe Integer Source #

withWordBytes :: Int -> Integer -> Integer Source #

boolValue :: CExpr -> Maybe Bool Source #

intValue :: CExpr -> Maybe Integer Source #