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

Copyright(c) 2008 Benedikt Huber
LicenseBSD-style
Maintainerbenedikt.huber@gmail.com
Stabilityexperimental
Portabilityghc
Safe HaskellNone
LanguageHaskell98

Language.C.Syntax.Ops

Contents

Description

Unary, binary and asssignment operators. Exported via AST.

Synopsis

Assignment operators

data CAssignOp #

C assignment operators (K&R A7.17)

Instances

Eq CAssignOp # 
Data CAssignOp # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CAssignOp -> c CAssignOp #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CAssignOp #

toConstr :: CAssignOp -> Constr #

dataTypeOf :: CAssignOp -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c CAssignOp) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CAssignOp) #

gmapT :: (forall b. Data b => b -> b) -> CAssignOp -> CAssignOp #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CAssignOp -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CAssignOp -> r #

gmapQ :: (forall d. Data d => d -> u) -> CAssignOp -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CAssignOp -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CAssignOp -> m CAssignOp #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CAssignOp -> m CAssignOp #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CAssignOp -> m CAssignOp #

Ord CAssignOp # 
Show CAssignOp # 
Pretty CAssignOp # 

Binary operators

data CBinaryOp #

C binary operators (K&R A7.6-15)

Constructors

CMulOp 
CDivOp 
CRmdOp

remainder of division

CAddOp 
CSubOp 
CShlOp

shift left

CShrOp

shift right

CLeOp

less

CGrOp

greater

CLeqOp

less or equal

CGeqOp

greater or equal

CEqOp

equal

CNeqOp

not equal

CAndOp

bitwise and

CXorOp

exclusive bitwise or

COrOp

inclusive bitwise or

CLndOp

logical and

CLorOp

logical or

Instances

Eq CBinaryOp # 
Data CBinaryOp # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CBinaryOp -> c CBinaryOp #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CBinaryOp #

toConstr :: CBinaryOp -> Constr #

dataTypeOf :: CBinaryOp -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c CBinaryOp) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CBinaryOp) #

gmapT :: (forall b. Data b => b -> b) -> CBinaryOp -> CBinaryOp #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CBinaryOp -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CBinaryOp -> r #

gmapQ :: (forall d. Data d => d -> u) -> CBinaryOp -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CBinaryOp -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CBinaryOp -> m CBinaryOp #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CBinaryOp -> m CBinaryOp #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CBinaryOp -> m CBinaryOp #

Ord CBinaryOp # 
Show CBinaryOp # 
Pretty CBinaryOp # 

Unary operators

data CUnaryOp #

C unary operator (K&R A7.3-4)

Constructors

CPreIncOp

prefix increment operator

CPreDecOp

prefix decrement operator

CPostIncOp

postfix increment operator

CPostDecOp

postfix decrement operator

CAdrOp

address operator

CIndOp

indirection operator

CPlusOp

prefix plus

CMinOp

prefix minus

CCompOp

one's complement

CNegOp

logical negation

Instances

Eq CUnaryOp # 
Data CUnaryOp # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CUnaryOp -> c CUnaryOp #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CUnaryOp #

toConstr :: CUnaryOp -> Constr #

dataTypeOf :: CUnaryOp -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c CUnaryOp) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CUnaryOp) #

gmapT :: (forall b. Data b => b -> b) -> CUnaryOp -> CUnaryOp #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CUnaryOp -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CUnaryOp -> r #

gmapQ :: (forall d. Data d => d -> u) -> CUnaryOp -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CUnaryOp -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CUnaryOp -> m CUnaryOp #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CUnaryOp -> m CUnaryOp #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CUnaryOp -> m CUnaryOp #

Ord CUnaryOp # 
Show CUnaryOp # 
Pretty CUnaryOp # 

Methods

pretty :: CUnaryOp -> Doc #

prettyPrec :: Int -> CUnaryOp -> Doc #